[
  {
    "path": ".gitattributes",
    "content": "winlib/*  linguist-vendored\nsrc/lib/* linguist-vendored\nicon.inl  linguist-vendored\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: rxi\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2020 rxi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# lite\n![screenshot](https://user-images.githubusercontent.com/3920290/81471642-6c165880-91ea-11ea-8cd1-fae7ae8f0bc4.png)\n\nA lightweight text editor written in Lua\n\n* **[Get lite](https://github.com/rxi/lite/releases/latest)** — Download\n  for Windows and Linux\n* **[Get started](doc/usage.md)** — A quick overview on how to get started\n* **[Get plugins](https://github.com/rxi/lite-plugins)** — Add additional\n  functionality\n* **[Get color themes](https://github.com/rxi/lite-colors)** — Add additional colors\n  themes\n\n## Overview\nlite is a lightweight text editor written mostly in Lua — it aims to provide\nsomething practical, pretty, *small* and fast, implemented as simply as\npossible; easy to modify and extend, or to use without doing either.\n\n## Customization\nAdditional functionality can be added through plugins which are available from\nthe [plugins repository](https://github.com/rxi/lite-plugins); additional color\nthemes can be found in the [colors repository](https://github.com/rxi/lite-colors).\nThe editor can be customized by making changes to the\n[user module](data/user/init.lua).\n\n## Building\nYou can build the project yourself on Linux using the `build.sh` script\nor on Windows using the `build.bat` script *([MinGW](https://nuwen.net/mingw.html) is required)*.\nNote that the project does not need to be rebuilt if you are only making changes\nto the Lua portion of the code.\n\n## Contributing\nAny additional functionality that can be added through a plugin should be done\nso as a plugin, after which a pull request to the\n[plugins repository](https://github.com/rxi/lite-plugins) can be made. In hopes\nof remaining lightweight, pull requests adding additional functionality to the\ncore will likely not be merged. Bug reports and bug fixes are welcome.\n\n## License\nThis project is free software; you can redistribute it and/or modify it under\nthe terms of the MIT license. See [LICENSE](LICENSE) for details.\n"
  },
  {
    "path": "build.bat",
    "content": "@echo off\n\nrem download this:\nrem https://nuwen.net/mingw.html\n\necho compiling (windows)...\n\nwindres res.rc -O coff -o res.res\ngcc src/*.c src/api/*.c src/lib/lua52/*.c src/lib/stb/*.c^\n    -O3 -s -std=gnu11 -fno-strict-aliasing -Isrc -DLUA_USE_POPEN^\n    -Iwinlib/SDL2-2.0.10/x86_64-w64-mingw32/include^\n    -lmingw32 -lm -lSDL2main -lSDL2 -Lwinlib/SDL2-2.0.10/x86_64-w64-mingw32/lib^\n    -mwindows res.res^\n    -o lite.exe\n\necho done\n"
  },
  {
    "path": "build.sh",
    "content": "#!/bin/bash\n\ncflags=\"-Wall -O3 -g -std=gnu11 -fno-strict-aliasing -Isrc\"\nlflags=\"-lSDL2 -lm\"\n\nif [[ $* == *windows* ]]; then\n  platform=\"windows\"\n  outfile=\"lite.exe\"\n  compiler=\"x86_64-w64-mingw32-gcc\"\n  cflags=\"$cflags -DLUA_USE_POPEN -Iwinlib/SDL2-2.0.10/x86_64-w64-mingw32/include\"\n  lflags=\"$lflags -Lwinlib/SDL2-2.0.10/x86_64-w64-mingw32/lib\"\n  lflags=\"-lmingw32 -lSDL2main $lflags -mwindows -o $outfile res.res\"\n  x86_64-w64-mingw32-windres res.rc -O coff -o res.res\nelse\n  platform=\"unix\"\n  outfile=\"lite\"\n  compiler=\"gcc\"\n  cflags=\"$cflags -DLUA_USE_POSIX\"\n  lflags=\"$lflags -o $outfile\"\nfi\n\nif command -v ccache >/dev/null; then\n  compiler=\"ccache $compiler\"\nfi\n\n\necho \"compiling ($platform)...\"\nfor f in `find src -name \"*.c\"`; do\n  $compiler -c $cflags $f -o \"${f//\\//_}.o\"\n  if [[ $? -ne 0 ]]; then\n    got_error=true\n  fi\ndone\n\nif [[ ! $got_error ]]; then\n  echo \"linking...\"\n  $compiler *.o $lflags\nfi\n\necho \"cleaning up...\"\nrm *.o\nrm res.res 2>/dev/null\necho \"done\"\n"
  },
  {
    "path": "build_release.sh",
    "content": "#!/bin/bash\n./build.sh release windows\n./build.sh release\nrm lite.zip 2>/dev/null\ncp winlib/SDL2-2.0.10/x86_64-w64-mingw32/bin/SDL2.dll SDL2.dll\nstrip lite\nstrip lite.exe\nstrip SDL2.dll\nzip lite.zip lite lite.exe SDL2.dll data -r\n\n"
  },
  {
    "path": "data/core/command.lua",
    "content": "local core = require \"core\"\nlocal command = {}\n\ncommand.map = {}\n\nlocal always_true = function() return true end\n\n\nfunction command.add(predicate, map)\n  predicate = predicate or always_true\n  if type(predicate) == \"string\" then\n    predicate = require(predicate)\n  end\n  if type(predicate) == \"table\" then\n    local class = predicate\n    predicate = function() return core.active_view:is(class) end\n  end\n  for name, fn in pairs(map) do\n    assert(not command.map[name], \"command already exists: \" .. name)\n    command.map[name] = { predicate = predicate, perform = fn }\n  end\nend\n\n\nlocal function capitalize_first(str)\n  return str:sub(1, 1):upper() .. str:sub(2)\nend\n\nfunction command.prettify_name(name)\n  return name:gsub(\":\", \": \"):gsub(\"-\", \" \"):gsub(\"%S+\", capitalize_first)\nend\n\n\nfunction command.get_all_valid()\n  local res = {}\n  for name, cmd in pairs(command.map) do\n    if cmd.predicate() then\n      table.insert(res, name)\n    end\n  end\n  return res\nend\n\n\nlocal function perform(name)\n  local cmd = command.map[name]\n  if cmd and cmd.predicate() then\n    cmd.perform()\n    return true\n  end\n  return false\nend\n\n\nfunction command.perform(...)\n  local ok, res = core.try(perform, ...)\n  return not ok or res\nend\n\n\nfunction command.add_defaults()\n  local reg = { \"core\", \"root\", \"command\", \"doc\", \"findreplace\" }\n  for _, name in ipairs(reg) do\n    require(\"core.commands.\" .. name)\n  end\nend\n\n\nreturn command\n"
  },
  {
    "path": "data/core/commands/command.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal CommandView = require \"core.commandview\"\n\nlocal function has_commandview()\n  return core.active_view:is(CommandView)\nend\n\n\ncommand.add(has_commandview, {\n  [\"command:submit\"] = function()\n    core.active_view:submit()\n  end,\n\n  [\"command:complete\"] = function()\n    core.active_view:complete()\n  end,\n\n  [\"command:escape\"] = function()\n    core.active_view:exit()\n  end,\n\n  [\"command:select-previous\"] = function()\n    core.active_view:move_suggestion_idx(1)\n  end,\n\n  [\"command:select-next\"] = function()\n    core.active_view:move_suggestion_idx(-1)\n  end,\n})\n"
  },
  {
    "path": "data/core/commands/core.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal command = require \"core.command\"\nlocal keymap = require \"core.keymap\"\nlocal LogView = require \"core.logview\"\n\n\nlocal fullscreen = false\n\ncommand.add(nil, {\n  [\"core:quit\"] = function()\n    core.quit()\n  end,\n\n  [\"core:force-quit\"] = function()\n    core.quit(true)\n  end,\n\n  [\"core:toggle-fullscreen\"] = function()\n    fullscreen = not fullscreen\n    system.set_window_mode(fullscreen and \"fullscreen\" or \"normal\")\n  end,\n\n  [\"core:reload-module\"] = function()\n    core.command_view:enter(\"Reload Module\", function(text, item)\n      local text = item and item.text or text\n      core.reload_module(text)\n      core.log(\"Reloaded module %q\", text)\n    end, function(text)\n      local items = {}\n      for name in pairs(package.loaded) do\n        table.insert(items, name)\n      end\n      return common.fuzzy_match(items, text)\n    end)\n  end,\n\n  [\"core:find-command\"] = function()\n    local commands = command.get_all_valid()\n    core.command_view:enter(\"Do Command\", function(text, item)\n      if item then\n        command.perform(item.command)\n      end\n    end, function(text)\n      local res = common.fuzzy_match(commands, text)\n      for i, name in ipairs(res) do\n        res[i] = {\n          text = command.prettify_name(name),\n          info = keymap.get_binding(name),\n          command = name,\n        }\n      end\n      return res\n    end)\n  end,\n\n  [\"core:find-file\"] = function()\n    core.command_view:enter(\"Open File From Project\", function(text, item)\n      text = item and item.text or text\n      core.root_view:open_doc(core.open_doc(text))\n    end, function(text)\n      local files = {}\n      for _, item in pairs(core.project_files) do\n        if item.type == \"file\" then\n          table.insert(files, item.filename)\n        end\n      end\n      return common.fuzzy_match(files, text)\n    end)\n  end,\n\n  [\"core:new-doc\"] = function()\n    core.root_view:open_doc(core.open_doc())\n  end,\n\n  [\"core:open-file\"] = function()\n    core.command_view:enter(\"Open File\", function(text)\n      core.root_view:open_doc(core.open_doc(text))\n    end, common.path_suggest)\n  end,\n\n  [\"core:open-log\"] = function()\n    local node = core.root_view:get_active_node()\n    node:add_view(LogView())\n  end,\n\n  [\"core:open-user-module\"] = function()\n    core.root_view:open_doc(core.open_doc(EXEDIR .. \"/data/user/init.lua\"))\n  end,\n\n  [\"core:open-project-module\"] = function()\n    local filename = \".lite_project.lua\"\n    if system.get_file_info(filename) then\n      core.root_view:open_doc(core.open_doc(filename))\n    else\n      local doc = core.open_doc()\n      core.root_view:open_doc(doc)\n      doc:save(filename)\n    end\n  end,\n})\n"
  },
  {
    "path": "data/core/commands/doc.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal common = require \"core.common\"\nlocal config = require \"core.config\"\nlocal translate = require \"core.doc.translate\"\nlocal DocView = require \"core.docview\"\n\n\nlocal function dv()\n  return core.active_view\nend\n\n\nlocal function doc()\n  return core.active_view.doc\nend\n\n\nlocal function get_indent_string()\n  if config.tab_type == \"hard\" then\n    return \"\\t\"\n  end\n  return string.rep(\" \", config.indent_size)\nend\n\n\nlocal function insert_at_start_of_selected_lines(text, skip_empty)\n  local line1, col1, line2, col2, swap = doc():get_selection(true)\n  for line = line1, line2 do\n    local line_text = doc().lines[line]\n    if (not skip_empty or line_text:find(\"%S\")) then\n      doc():insert(line, 1, text)\n    end\n  end\n  doc():set_selection(line1, col1 + #text, line2, col2 + #text, swap)\nend\n\n\nlocal function remove_from_start_of_selected_lines(text, skip_empty)\n  local line1, col1, line2, col2, swap = doc():get_selection(true)\n  for line = line1, line2 do\n    local line_text = doc().lines[line]\n    if  line_text:sub(1, #text) == text\n    and (not skip_empty or line_text:find(\"%S\"))\n    then\n      doc():remove(line, 1, line, #text + 1)\n    end\n  end\n  doc():set_selection(line1, col1 - #text, line2, col2 - #text, swap)\nend\n\n\nlocal function append_line_if_last_line(line)\n  if line >= #doc().lines then\n    doc():insert(line, math.huge, \"\\n\")\n  end\nend\n\n\nlocal function save(filename)\n  doc():save(filename)\n  core.log(\"Saved \\\"%s\\\"\", doc().filename)\nend\n\n\nlocal commands = {\n  [\"doc:undo\"] = function()\n    doc():undo()\n  end,\n\n  [\"doc:redo\"] = function()\n    doc():redo()\n  end,\n\n  [\"doc:cut\"] = function()\n    if doc():has_selection() then\n      local text = doc():get_text(doc():get_selection())\n      system.set_clipboard(text)\n      doc():delete_to(0)\n    end\n  end,\n\n  [\"doc:copy\"] = function()\n    if doc():has_selection() then\n      local text = doc():get_text(doc():get_selection())\n      system.set_clipboard(text)\n    end\n  end,\n\n  [\"doc:paste\"] = function()\n    doc():text_input(system.get_clipboard():gsub(\"\\r\", \"\"))\n  end,\n\n  [\"doc:newline\"] = function()\n    local line, col = doc():get_selection()\n    local indent = doc().lines[line]:match(\"^[\\t ]*\")\n    if col <= #indent then\n      indent = indent:sub(#indent + 2 - col)\n    end\n    doc():text_input(\"\\n\" .. indent)\n  end,\n\n  [\"doc:newline-below\"] = function()\n    local line = doc():get_selection()\n    local indent = doc().lines[line]:match(\"^[\\t ]*\")\n    doc():insert(line, math.huge, \"\\n\" .. indent)\n    doc():set_selection(line + 1, math.huge)\n  end,\n\n  [\"doc:newline-above\"] = function()\n    local line = doc():get_selection()\n    local indent = doc().lines[line]:match(\"^[\\t ]*\")\n    doc():insert(line, 1, indent .. \"\\n\")\n    doc():set_selection(line, math.huge)\n  end,\n\n  [\"doc:delete\"] = function()\n    local line, col = doc():get_selection()\n    if not doc():has_selection() and doc().lines[line]:find(\"^%s*$\", col) then\n      doc():remove(line, col, line, math.huge)\n    end\n    doc():delete_to(translate.next_char)\n  end,\n\n  [\"doc:backspace\"] = function()\n    local line, col = doc():get_selection()\n    if not doc():has_selection() then\n      local text = doc():get_text(line, 1, line, col)\n      if #text >= config.indent_size and text:find(\"^ *$\") then\n        doc():delete_to(0, -config.indent_size)\n        return\n      end\n    end\n    doc():delete_to(translate.previous_char)\n  end,\n\n  [\"doc:select-all\"] = function()\n    doc():set_selection(1, 1, math.huge, math.huge)\n  end,\n\n  [\"doc:select-none\"] = function()\n    local line, col = doc():get_selection()\n    doc():set_selection(line, col)\n  end,\n\n  [\"doc:select-lines\"] = function()\n    local line1, _, line2, _, swap = doc():get_selection(true)\n    append_line_if_last_line(line2)\n    doc():set_selection(line1, 1, line2 + 1, 1, swap)\n  end,\n\n  [\"doc:select-word\"] = function()\n    local line1, col1 = doc():get_selection(true)\n    local line1, col1 = translate.start_of_word(doc(), line1, col1)\n    local line2, col2 = translate.end_of_word(doc(), line1, col1)\n    doc():set_selection(line2, col2, line1, col1)\n  end,\n\n  [\"doc:join-lines\"] = function()\n    local line1, _, line2 = doc():get_selection(true)\n    if line1 == line2 then line2 = line2 + 1 end\n    local text = doc():get_text(line1, 1, line2, math.huge)\n    text = text:gsub(\"(.-)\\n[\\t ]*\", function(x)\n      return x:find(\"^%s*$\") and x or x .. \" \"\n    end)\n    doc():insert(line1, 1, text)\n    doc():remove(line1, #text + 1, line2, math.huge)\n    if doc():has_selection() then\n      doc():set_selection(line1, math.huge)\n    end\n  end,\n\n  [\"doc:indent\"] = function()\n    local text = get_indent_string()\n    if doc():has_selection() then\n      insert_at_start_of_selected_lines(text)\n    else\n      doc():text_input(text)\n    end\n  end,\n\n  [\"doc:unindent\"] = function()\n    local text = get_indent_string()\n    remove_from_start_of_selected_lines(text)\n  end,\n\n  [\"doc:duplicate-lines\"] = function()\n    local line1, col1, line2, col2, swap = doc():get_selection(true)\n    append_line_if_last_line(line2)\n    local text = doc():get_text(line1, 1, line2 + 1, 1)\n    doc():insert(line2 + 1, 1, text)\n    local n = line2 - line1 + 1\n    doc():set_selection(line1 + n, col1, line2 + n, col2, swap)\n  end,\n\n  [\"doc:delete-lines\"] = function()\n    local line1, col1, line2 = doc():get_selection(true)\n    append_line_if_last_line(line2)\n    doc():remove(line1, 1, line2 + 1, 1)\n    doc():set_selection(line1, col1)\n  end,\n\n  [\"doc:move-lines-up\"] = function()\n    local line1, col1, line2, col2, swap = doc():get_selection(true)\n    append_line_if_last_line(line2)\n    if line1 > 1 then\n      local text = doc().lines[line1 - 1]\n      doc():insert(line2 + 1, 1, text)\n      doc():remove(line1 - 1, 1, line1, 1)\n      doc():set_selection(line1 - 1, col1, line2 - 1, col2, swap)\n    end\n  end,\n\n  [\"doc:move-lines-down\"] = function()\n    local line1, col1, line2, col2, swap = doc():get_selection(true)\n    append_line_if_last_line(line2 + 1)\n    if line2 < #doc().lines then\n      local text = doc().lines[line2 + 1]\n      doc():remove(line2 + 1, 1, line2 + 2, 1)\n      doc():insert(line1, 1, text)\n      doc():set_selection(line1 + 1, col1, line2 + 1, col2, swap)\n    end\n  end,\n\n  [\"doc:toggle-line-comments\"] = function()\n    local comment = doc().syntax.comment\n    if not comment then return end\n    local comment_text = comment .. \" \"\n    local line1, _, line2 = doc():get_selection(true)\n    local uncomment = true\n    for line = line1, line2 do\n      local text = doc().lines[line]\n      if text:find(\"%S\") and text:find(comment_text, 1, true) ~= 1 then\n        uncomment = false\n      end\n    end\n    if uncomment then\n      remove_from_start_of_selected_lines(comment_text, true)\n    else\n      insert_at_start_of_selected_lines(comment_text, true)\n    end\n  end,\n\n  [\"doc:upper-case\"] = function()\n    doc():replace(string.upper)\n  end,\n\n  [\"doc:lower-case\"] = function()\n    doc():replace(string.lower)\n  end,\n\n  [\"doc:go-to-line\"] = function()\n    local dv = dv()\n\n    local items\n    local function init_items()\n      if items then return end\n      items = {}\n      local mt = { __tostring = function(x) return x.text end }\n      for i, line in ipairs(dv.doc.lines) do\n        local item = { text = line:sub(1, -2), line = i, info = \"line: \" .. i }\n        table.insert(items, setmetatable(item, mt))\n      end\n    end\n\n    core.command_view:enter(\"Go To Line\", function(text, item)\n      local line = item and item.line or tonumber(text)\n      if not line then\n        core.error(\"Invalid line number or unmatched string\")\n        return\n      end\n      dv.doc:set_selection(line, 1  )\n      dv:scroll_to_line(line, true)\n\n    end, function(text)\n      if not text:find(\"^%d*$\") then\n        init_items()\n        return common.fuzzy_match(items, text)\n      end\n    end)\n  end,\n\n  [\"doc:toggle-line-ending\"] = function()\n    doc().crlf = not doc().crlf\n  end,\n\n  [\"doc:save-as\"] = function()\n    if doc().filename then\n      core.command_view:set_text(doc().filename)\n    end\n    core.command_view:enter(\"Save As\", function(filename)\n      save(filename)\n    end, common.path_suggest)\n  end,\n\n  [\"doc:save\"] = function()\n    if doc().filename then\n      save()\n    else\n      command.perform(\"doc:save-as\")\n    end\n  end,\n\n  [\"doc:rename\"] = function()\n    local old_filename = doc().filename\n    if not old_filename then\n      core.error(\"Cannot rename unsaved doc\")\n      return\n    end\n    core.command_view:set_text(old_filename)\n    core.command_view:enter(\"Rename\", function(filename)\n      doc():save(filename)\n      core.log(\"Renamed \\\"%s\\\" to \\\"%s\\\"\", old_filename, filename)\n      if filename ~= old_filename then\n        os.remove(old_filename)\n      end\n    end, common.path_suggest)\n  end,\n}\n\n\nlocal translations = {\n  [\"previous-char\"] = translate.previous_char,\n  [\"next-char\"] = translate.next_char,\n  [\"previous-word-start\"] = translate.previous_word_start,\n  [\"next-word-end\"] = translate.next_word_end,\n  [\"previous-block-start\"] = translate.previous_block_start,\n  [\"next-block-end\"] = translate.next_block_end,\n  [\"start-of-doc\"] = translate.start_of_doc,\n  [\"end-of-doc\"] = translate.end_of_doc,\n  [\"start-of-line\"] = translate.start_of_line,\n  [\"end-of-line\"] = translate.end_of_line,\n  [\"start-of-word\"] = translate.start_of_word,\n  [\"end-of-word\"] = translate.end_of_word,\n  [\"previous-line\"] = DocView.translate.previous_line,\n  [\"next-line\"] = DocView.translate.next_line,\n  [\"previous-page\"] = DocView.translate.previous_page,\n  [\"next-page\"] = DocView.translate.next_page,\n}\n\nfor name, fn in pairs(translations) do\n  commands[\"doc:move-to-\" .. name] = function() doc():move_to(fn, dv()) end\n  commands[\"doc:select-to-\" .. name] = function() doc():select_to(fn, dv()) end\n  commands[\"doc:delete-to-\" .. name] = function() doc():delete_to(fn, dv()) end\nend\n\ncommands[\"doc:move-to-previous-char\"] = function()\n  if doc():has_selection() then\n    local line, col = doc():get_selection(true)\n    doc():set_selection(line, col)\n  else\n    doc():move_to(translate.previous_char)\n  end\nend\n\ncommands[\"doc:move-to-next-char\"] = function()\n  if doc():has_selection() then\n    local _, _, line, col = doc():get_selection(true)\n    doc():set_selection(line, col)\n  else\n    doc():move_to(translate.next_char)\n  end\nend\n\ncommand.add(\"core.docview\", commands)\n"
  },
  {
    "path": "data/core/commands/findreplace.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal config = require \"core.config\"\nlocal search = require \"core.doc.search\"\nlocal DocView = require \"core.docview\"\n\nlocal max_previous_finds = 50\n\n\nlocal function doc()\n  return core.active_view.doc\nend\n\n\nlocal previous_finds\nlocal last_doc\nlocal last_fn, last_text\n\n\nlocal function push_previous_find(doc, sel)\n  if last_doc ~= doc then\n    last_doc = doc\n    previous_finds = {}\n  end\n  if #previous_finds >= max_previous_finds then\n    table.remove(previous_finds, 1)\n  end\n  table.insert(previous_finds, sel or { doc:get_selection() })\nend\n\n\nlocal function find(label, search_fn)\n  local dv = core.active_view\n  local sel = { dv.doc:get_selection() }\n  local text = dv.doc:get_text(table.unpack(sel))\n  local found = false\n\n  core.command_view:set_text(text, true)\n\n  core.command_view:enter(label, function(text)\n    if found then\n      last_fn, last_text = search_fn, text\n      previous_finds = {}\n      push_previous_find(dv.doc, sel)\n    else\n      core.error(\"Couldn't find %q\", text)\n      dv.doc:set_selection(table.unpack(sel))\n      dv:scroll_to_make_visible(sel[1], sel[2])\n    end\n\n  end, function(text)\n    local ok, line1, col1, line2, col2 = pcall(search_fn, dv.doc, sel[1], sel[2], text)\n    if ok and line1 and text ~= \"\" then\n      dv.doc:set_selection(line2, col2, line1, col1)\n      dv:scroll_to_line(line2, true)\n      found = true\n    else\n      dv.doc:set_selection(table.unpack(sel))\n      found = false\n    end\n\n  end, function(explicit)\n    if explicit then\n      dv.doc:set_selection(table.unpack(sel))\n      dv:scroll_to_make_visible(sel[1], sel[2])\n    end\n  end)\nend\n\n\nlocal function replace(kind, default, fn)\n  core.command_view:set_text(default, true)\n\n  core.command_view:enter(\"Find To Replace \" .. kind, function(old)\n    core.command_view:set_text(old, true)\n\n    local s = string.format(\"Replace %s %q With\", kind, old)\n    core.command_view:enter(s, function(new)\n      local n = doc():replace(function(text)\n        return fn(text, old, new)\n      end)\n      core.log(\"Replaced %d instance(s) of %s %q with %q\", n, kind, old, new)\n    end)\n  end)\nend\n\n\nlocal function has_selection()\n  return core.active_view:is(DocView)\n     and core.active_view.doc:has_selection()\nend\n\ncommand.add(has_selection, {\n  [\"find-replace:select-next\"] = function()\n    local l1, c1, l2, c2 = doc():get_selection(true)\n    local text = doc():get_text(l1, c1, l2, c2)\n    local l1, c1, l2, c2 = search.find(doc(), l2, c2, text, { wrap = true })\n    if l2 then doc():set_selection(l2, c2, l1, c1) end\n  end\n})\n\ncommand.add(\"core.docview\", {\n  [\"find-replace:find\"] = function()\n    find(\"Find Text\", function(doc, line, col, text)\n      local opt = { wrap = true, no_case = true }\n      return search.find(doc, line, col, text, opt)\n    end)\n  end,\n\n  [\"find-replace:find-pattern\"] = function()\n    find(\"Find Text Pattern\", function(doc, line, col, text)\n      local opt = { wrap = true, no_case = true, pattern = true }\n      return search.find(doc, line, col, text, opt)\n    end)\n  end,\n\n  [\"find-replace:repeat-find\"] = function()\n    if not last_fn then\n      core.error(\"No find to continue from\")\n    else\n      local line, col = doc():get_selection()\n      local line1, col1, line2, col2 = last_fn(doc(), line, col, last_text)\n      if line1 then\n        push_previous_find(doc())\n        doc():set_selection(line2, col2, line1, col1)\n        core.active_view:scroll_to_line(line2, true)\n      end\n    end\n  end,\n\n  [\"find-replace:previous-find\"] = function()\n    local sel = table.remove(previous_finds)\n    if not sel or doc() ~= last_doc then\n      core.error(\"No previous finds\")\n      return\n    end\n    doc():set_selection(table.unpack(sel))\n    core.active_view:scroll_to_line(sel[3], true)\n  end,\n\n  [\"find-replace:replace\"] = function()\n    replace(\"Text\", \"\", function(text, old, new)\n      return text:gsub(old:gsub(\"%W\", \"%%%1\"), new:gsub(\"%%\", \"%%%%\"), nil)\n    end)\n  end,\n\n  [\"find-replace:replace-pattern\"] = function()\n    replace(\"Pattern\", \"\", function(text, old, new)\n      return text:gsub(old, new)\n    end)\n  end,\n\n  [\"find-replace:replace-symbol\"] = function()\n    local first = \"\"\n    if doc():has_selection() then\n      local text = doc():get_text(doc():get_selection())\n      first = text:match(config.symbol_pattern) or \"\"\n    end\n    replace(\"Symbol\", first, function(text, old, new)\n      local n = 0\n      local res = text:gsub(config.symbol_pattern, function(sym)\n        if old == sym then\n          n = n + 1\n          return new\n        end\n      end)\n      return res, n\n    end)\n  end,\n})\n"
  },
  {
    "path": "data/core/commands/root.lua",
    "content": "local core = require \"core\"\nlocal style = require \"core.style\"\nlocal DocView = require \"core.docview\"\nlocal command = require \"core.command\"\nlocal common = require \"core.common\"\n\n\nlocal t = {\n  [\"root:close\"] = function()\n    local node = core.root_view:get_active_node()\n    node:close_active_view(core.root_view.root_node)\n  end,\n\n  [\"root:switch-to-previous-tab\"] = function()\n    local node = core.root_view:get_active_node()\n    local idx = node:get_view_idx(core.active_view)\n    idx = idx - 1\n    if idx < 1 then idx = #node.views end\n    node:set_active_view(node.views[idx])\n  end,\n\n  [\"root:switch-to-next-tab\"] = function()\n    local node = core.root_view:get_active_node()\n    local idx = node:get_view_idx(core.active_view)\n    idx = idx + 1\n    if idx > #node.views then idx = 1 end\n    node:set_active_view(node.views[idx])\n  end,\n\n  [\"root:move-tab-left\"] = function()\n    local node = core.root_view:get_active_node()\n    local idx = node:get_view_idx(core.active_view)\n    if idx > 1 then\n      table.remove(node.views, idx)\n      table.insert(node.views, idx - 1, core.active_view)\n    end\n  end,\n\n  [\"root:move-tab-right\"] = function()\n    local node = core.root_view:get_active_node()\n    local idx = node:get_view_idx(core.active_view)\n    if idx < #node.views then\n      table.remove(node.views, idx)\n      table.insert(node.views, idx + 1, core.active_view)\n    end\n  end,\n\n  [\"root:shrink\"] = function()\n    local node = core.root_view:get_active_node()\n    local parent = node:get_parent_node(core.root_view.root_node)\n    local n = (parent.a == node) and -0.1 or 0.1\n    parent.divider = common.clamp(parent.divider + n, 0.1, 0.9)\n  end,\n\n  [\"root:grow\"] = function()\n    local node = core.root_view:get_active_node()\n    local parent = node:get_parent_node(core.root_view.root_node)\n    local n = (parent.a == node) and 0.1 or -0.1\n    parent.divider = common.clamp(parent.divider + n, 0.1, 0.9)\n  end,\n}\n\n\nfor i = 1, 9 do\n  t[\"root:switch-to-tab-\" .. i] = function()\n    local node = core.root_view:get_active_node()\n    local view = node.views[i]\n    if view then\n      node:set_active_view(view)\n    end\n  end\nend\n\n\nfor _, dir in ipairs { \"left\", \"right\", \"up\", \"down\" } do\n  t[\"root:split-\" .. dir] = function()\n    local node = core.root_view:get_active_node()\n    local av = node.active_view\n    node:split(dir)\n    if av:is(DocView) then\n      core.root_view:open_doc(av.doc)\n    end\n  end\n\n  t[\"root:switch-to-\" .. dir] = function()\n    local node = core.root_view:get_active_node()\n    local x, y\n    if dir == \"left\" or dir == \"right\" then\n      y = node.position.y + node.size.y / 2\n      x = node.position.x + (dir == \"left\" and -1 or node.size.x + style.divider_size)\n    else\n      x = node.position.x + node.size.x / 2\n      y = node.position.y + (dir == \"up\"   and -1 or node.size.y + style.divider_size)\n    end\n    local node = core.root_view.root_node:get_child_overlapping_point(x, y)\n    if not node:get_locked_size() then\n      core.set_active_view(node.active_view)\n    end\n  end\nend\n\ncommand.add(function()\n  local node = core.root_view:get_active_node()\n  return not node:get_locked_size()\nend, t)\n"
  },
  {
    "path": "data/core/commandview.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal style = require \"core.style\"\nlocal Doc = require \"core.doc\"\nlocal DocView = require \"core.docview\"\nlocal View = require \"core.view\"\n\n\nlocal SingleLineDoc = Doc:extend()\n\nfunction SingleLineDoc:insert(line, col, text)\n  SingleLineDoc.super.insert(self, line, col, text:gsub(\"\\n\", \"\"))\nend\n\n\nlocal CommandView = DocView:extend()\n\nlocal max_suggestions = 10\n\nlocal noop = function() end\n\nlocal default_state = {\n  submit = noop,\n  suggest = noop,\n  cancel = noop,\n}\n\n\nfunction CommandView:new()\n  CommandView.super.new(self, SingleLineDoc())\n  self.suggestion_idx = 1\n  self.suggestions = {}\n  self.suggestions_height = 0\n  self.last_change_id = 0\n  self.gutter_width = 0\n  self.gutter_text_brightness = 0\n  self.selection_offset = 0\n  self.state = default_state\n  self.font = \"font\"\n  self.size.y = 0\n  self.label = \"\"\nend\n\n\nfunction CommandView:get_name()\n  return View.get_name(self)\nend\n\n\nfunction CommandView:get_line_screen_position()\n  local x = CommandView.super.get_line_screen_position(self, 1)\n  local _, y = self:get_content_offset()\n  local lh = self:get_line_height()\n  return x, y + (self.size.y - lh) / 2\nend\n\n\nfunction CommandView:get_scrollable_size()\n  return 0\nend\n\n\nfunction CommandView:scroll_to_make_visible()\n  -- no-op function to disable this functionality\nend\n\n\nfunction CommandView:get_text()\n  return self.doc:get_text(1, 1, 1, math.huge)\nend\n\n\nfunction CommandView:set_text(text, select)\n  self.doc:remove(1, 1, math.huge, math.huge)\n  self.doc:text_input(text)\n  if select then\n    self.doc:set_selection(math.huge, math.huge, 1, 1)\n  end\nend\n\n\nfunction CommandView:move_suggestion_idx(dir)\n  local n = self.suggestion_idx + dir\n  self.suggestion_idx = common.clamp(n, 1, #self.suggestions)\n  self:complete()\n  self.last_change_id = self.doc:get_change_id()\nend\n\n\nfunction CommandView:complete()\n  if #self.suggestions > 0 then\n    self:set_text(self.suggestions[self.suggestion_idx].text)\n  end\nend\n\n\nfunction CommandView:submit()\n  local suggestion = self.suggestions[self.suggestion_idx]\n  local text = self:get_text()\n  local submit = self.state.submit\n  self:exit(true)\n  submit(text, suggestion)\nend\n\n\nfunction CommandView:enter(text, submit, suggest, cancel)\n  if self.state ~= default_state then\n    return\n  end\n  self.state = {\n    submit = submit or noop,\n    suggest = suggest or noop,\n    cancel = cancel or noop,\n  }\n  core.set_active_view(self)\n  self:update_suggestions()\n  self.gutter_text_brightness = 100\n  self.label = text .. \": \"\nend\n\n\nfunction CommandView:exit(submitted, inexplicit)\n  if core.active_view == self then\n    core.set_active_view(core.last_active_view)\n  end\n  local cancel = self.state.cancel\n  self.state = default_state\n  self.doc:reset()\n  self.suggestions = {}\n  if not submitted then cancel(not inexplicit) end\nend\n\n\nfunction CommandView:get_gutter_width()\n  return self.gutter_width\nend\n\n\nfunction CommandView:get_suggestion_line_height()\n  return self:get_font():get_height() + style.padding.y\nend\n\n\nfunction CommandView:update_suggestions()\n  local t = self.state.suggest(self:get_text()) or {}\n  local res = {}\n  for i, item in ipairs(t) do\n    if i == max_suggestions then\n      break\n    end\n    if type(item) == \"string\" then\n      item = { text = item }\n    end\n    res[i] = item\n  end\n  self.suggestions = res\n  self.suggestion_idx = 1\nend\n\n\nfunction CommandView:update()\n  CommandView.super.update(self)\n\n  if core.active_view ~= self and self.state ~= default_state then\n    self:exit(false, true)\n  end\n\n  -- update suggestions if text has changed\n  if self.last_change_id ~= self.doc:get_change_id() then\n    self:update_suggestions()\n    self.last_change_id = self.doc:get_change_id()\n  end\n\n  -- update gutter text color brightness\n  self:move_towards(\"gutter_text_brightness\", 0, 0.1)\n\n  -- update gutter width\n  local dest = self:get_font():get_width(self.label) + style.padding.x\n  if self.size.y <= 0 then\n    self.gutter_width = dest\n  else\n    self:move_towards(\"gutter_width\", dest)\n  end\n\n  -- update suggestions box height\n  local lh = self:get_suggestion_line_height()\n  local dest = #self.suggestions * lh\n  self:move_towards(\"suggestions_height\", dest)\n\n  -- update suggestion cursor offset\n  local dest = self.suggestion_idx * self:get_suggestion_line_height()\n  self:move_towards(\"selection_offset\", dest)\n\n  -- update size based on whether this is the active_view\n  local dest = 0\n  if self == core.active_view then\n    dest = style.font:get_height() + style.padding.y * 2\n  end\n  self:move_towards(self.size, \"y\", dest)\nend\n\n\nfunction CommandView:draw_line_highlight()\n  -- no-op function to disable this functionality\nend\n\n\nfunction CommandView:draw_line_gutter(idx, x, y)\n  local yoffset = self:get_line_text_y_offset()\n  local pos = self.position\n  local color = common.lerp(style.text, style.accent, self.gutter_text_brightness / 100)\n  core.push_clip_rect(pos.x, pos.y, self:get_gutter_width(), self.size.y)\n  x = x + style.padding.x\n  renderer.draw_text(self:get_font(), self.label, x, y + yoffset, color)\n  core.pop_clip_rect()\nend\n\n\nlocal function draw_suggestions_box(self)\n  local lh = self:get_suggestion_line_height()\n  local dh = style.divider_size\n  local x, _ = self:get_line_screen_position()\n  local h = math.ceil(self.suggestions_height)\n  local rx, ry, rw, rh = self.position.x, self.position.y - h - dh, self.size.x, h\n\n  -- draw suggestions background\n  if #self.suggestions > 0 then\n    renderer.draw_rect(rx, ry, rw, rh, style.background3)\n    renderer.draw_rect(rx, ry - dh, rw, dh, style.divider)\n    local y = self.position.y - self.selection_offset - dh\n    renderer.draw_rect(rx, y, rw, lh, style.line_highlight)\n  end\n\n  -- draw suggestion text\n  core.push_clip_rect(rx, ry, rw, rh)\n  for i, item in ipairs(self.suggestions) do\n    local color = (i == self.suggestion_idx) and style.accent or style.text\n    local y = self.position.y - i * lh - dh\n    common.draw_text(self:get_font(), color, item.text, nil, x, y, 0, lh)\n\n    if item.info then\n      local w = self.size.x - x - style.padding.x\n      common.draw_text(self:get_font(), style.dim, item.info, \"right\", x, y, w, lh)\n    end\n  end\n  core.pop_clip_rect()\nend\n\n\nfunction CommandView:draw()\n  CommandView.super.draw(self)\n  core.root_view:defer_draw(draw_suggestions_box, self)\nend\n\n\nreturn CommandView\n"
  },
  {
    "path": "data/core/common.lua",
    "content": "local common = {}\n\n\nfunction common.is_utf8_cont(char)\n  local byte = char:byte()\n  return byte >= 0x80 and byte < 0xc0\nend\n\n\nfunction common.utf8_chars(text)\n  return text:gmatch(\"[\\0-\\x7f\\xc2-\\xf4][\\x80-\\xbf]*\")\nend\n\n\nfunction common.clamp(n, lo, hi)\n  return math.max(math.min(n, hi), lo)\nend\n\n\nfunction common.round(n)\n  return n >= 0 and math.floor(n + 0.5) or math.ceil(n - 0.5)\nend\n\n\nfunction common.lerp(a, b, t)\n  if type(a) ~= \"table\" then\n    return a + (b - a) * t\n  end\n  local res = {}\n  for k, v in pairs(b) do\n    res[k] = common.lerp(a[k], v, t)\n  end\n  return res\nend\n\n\nfunction common.color(str)\n  local r, g, b, a = str:match(\"#(%x%x)(%x%x)(%x%x)\")\n  if r then\n    r = tonumber(r, 16)\n    g = tonumber(g, 16)\n    b = tonumber(b, 16)\n    a = 1\n  elseif str:match(\"rgba?%s*%([%d%s%.,]+%)\") then\n    local f = str:gmatch(\"[%d.]+\")\n    r = (f() or 0)\n    g = (f() or 0)\n    b = (f() or 0)\n    a = f() or 1\n  else\n    error(string.format(\"bad color string '%s'\", str))\n  end\n  return r, g, b, a * 0xff\nend\n\n\nlocal function compare_score(a, b)\n  return a.score > b.score\nend\n\nlocal function fuzzy_match_items(items, needle)\n  local res = {}\n  for _, item in ipairs(items) do\n    local score = system.fuzzy_match(tostring(item), needle)\n    if score then\n      table.insert(res, { text = item, score = score })\n    end\n  end\n  table.sort(res, compare_score)\n  for i, item in ipairs(res) do\n    res[i] = item.text\n  end\n  return res\nend\n\n\nfunction common.fuzzy_match(haystack, needle)\n  if type(haystack) == \"table\" then\n    return fuzzy_match_items(haystack, needle)\n  end\n  return system.fuzzy_match(haystack, needle)\nend\n\n\nfunction common.path_suggest(text)\n  local path, name = text:match(\"^(.-)([^/\\\\]*)$\")\n  local files = system.list_dir(path == \"\" and \".\" or path) or {}\n  local res = {}\n  for _, file in ipairs(files) do\n    file = path .. file\n    local info = system.get_file_info(file)\n    if info then\n      if info.type == \"dir\" then\n        file = file .. PATHSEP\n      end\n      if file:lower():find(text:lower(), nil, true) == 1 then\n        table.insert(res, file)\n      end\n    end\n  end\n  return res\nend\n\n\nfunction common.match_pattern(text, pattern, ...)\n  if type(pattern) == \"string\" then\n    return text:find(pattern, ...)\n  end\n  for _, p in ipairs(pattern) do\n    local s, e = common.match_pattern(text, p, ...)\n    if s then return s, e end\n  end\n  return false\nend\n\n\nfunction common.draw_text(font, color, text, align, x,y,w,h)\n  local tw, th = font:get_width(text), font:get_height(text)\n  if align == \"center\" then\n    x = x + (w - tw) / 2\n  elseif align == \"right\" then\n    x = x + (w - tw)\n  end\n  y = common.round(y + (h - th) / 2)\n  return renderer.draw_text(font, text, x, y, color), y + th\nend\n\n\nfunction common.bench(name, fn, ...)\n  local start = system.get_time()\n  local res = fn(...)\n  local t = system.get_time() - start\n  local ms = t * 1000\n  local per = (t / (1 / 60)) * 100\n  print(string.format(\"*** %-16s : %8.3fms %6.2f%%\", name, ms, per))\n  return res\nend\n\n\nreturn common\n"
  },
  {
    "path": "data/core/config.lua",
    "content": "local config = {}\n\nconfig.project_scan_rate = 5\nconfig.fps = 60\nconfig.max_log_items = 80\nconfig.message_timeout = 3\nconfig.mouse_wheel_scroll = 50 * SCALE\nconfig.file_size_limit = 10\nconfig.ignore_files = \"^%.\"\nconfig.symbol_pattern = \"[%a_][%w_]*\"\nconfig.non_word_chars = \" \\t\\n/\\\\()\\\"':,.;<>~!@#$%^&*|+=[]{}`?-\"\nconfig.undo_merge_timeout = 0.3\nconfig.max_undos = 10000\nconfig.highlight_current_line = true\nconfig.line_height = 1.2\nconfig.indent_size = 2\nconfig.tab_type = \"soft\"\nconfig.line_limit = 80\n\nreturn config\n"
  },
  {
    "path": "data/core/doc/highlighter.lua",
    "content": "local core = require \"core\"\nlocal config = require \"core.config\"\nlocal tokenizer = require \"core.tokenizer\"\nlocal Object = require \"core.object\"\n\n\nlocal Highlighter = Object:extend()\n\n\nfunction Highlighter:new(doc)\n  self.doc = doc\n  self:reset()\n\n  -- init incremental syntax highlighting\n  core.add_thread(function()\n    while true do\n      if self.first_invalid_line > self.max_wanted_line then\n        self.max_wanted_line = 0\n        coroutine.yield(1 / config.fps)\n\n      else\n        local max = math.min(self.first_invalid_line + 40, self.max_wanted_line)\n\n        for i = self.first_invalid_line, max do\n          local state = (i > 1) and self.lines[i - 1].state\n          local line = self.lines[i]\n          if not (line and line.init_state == state) then\n            self.lines[i] = self:tokenize_line(i, state)\n          end\n        end\n\n        self.first_invalid_line = max + 1\n        core.redraw = true\n        coroutine.yield()\n      end\n    end\n  end, self)\nend\n\n\nfunction Highlighter:reset()\n  self.lines = {}\n  self.first_invalid_line = 1\n  self.max_wanted_line = 0\nend\n\n\nfunction Highlighter:invalidate(idx)\n  self.first_invalid_line = math.min(self.first_invalid_line, idx)\n  self.max_wanted_line = math.min(self.max_wanted_line, #self.doc.lines)\nend\n\n\nfunction Highlighter:tokenize_line(idx, state)\n  local res = {}\n  res.init_state = state\n  res.text = self.doc.lines[idx]\n  res.tokens, res.state = tokenizer.tokenize(self.doc.syntax, res.text, state)\n  return res\nend\n\n\nfunction Highlighter:get_line(idx)\n  local line = self.lines[idx]\n  if not line or line.text ~= self.doc.lines[idx] then\n    local prev = self.lines[idx - 1]\n    line = self:tokenize_line(idx, prev and prev.state)\n    self.lines[idx] = line\n  end\n  self.max_wanted_line = math.max(self.max_wanted_line, idx)\n  return line\nend\n\n\nfunction Highlighter:each_token(idx)\n  return tokenizer.each_token(self:get_line(idx).tokens)\nend\n\n\nreturn Highlighter\n"
  },
  {
    "path": "data/core/doc/init.lua",
    "content": "local Object = require \"core.object\"\nlocal Highlighter = require \"core.doc.highlighter\"\nlocal syntax = require \"core.syntax\"\nlocal config = require \"core.config\"\nlocal common = require \"core.common\"\n\n\nlocal Doc = Object:extend()\n\n\nlocal function split_lines(text)\n  local res = {}\n  for line in (text .. \"\\n\"):gmatch(\"(.-)\\n\") do\n    table.insert(res, line)\n  end\n  return res\nend\n\n\nlocal function splice(t, at, remove, insert)\n  insert = insert or {}\n  local offset = #insert - remove\n  local old_len = #t\n  if offset < 0 then\n    for i = at - offset, old_len - offset do\n      t[i + offset] = t[i]\n    end\n  elseif offset > 0 then\n    for i = old_len, at, -1 do\n      t[i + offset] = t[i]\n    end\n  end\n  for i, item in ipairs(insert) do\n    t[at + i - 1] = item\n  end\nend\n\n\nfunction Doc:new(filename)\n  self:reset()\n  if filename then\n    self:load(filename)\n  end\nend\n\n\nfunction Doc:reset()\n  self.lines = { \"\\n\" }\n  self.selection = { a = { line=1, col=1 }, b = { line=1, col=1 } }\n  self.undo_stack = { idx = 1 }\n  self.redo_stack = { idx = 1 }\n  self.clean_change_id = 1\n  self.highlighter = Highlighter(self)\n  self:reset_syntax()\nend\n\n\nfunction Doc:reset_syntax()\n  local header = self:get_text(1, 1, self:position_offset(1, 1, 128))\n  local syn = syntax.get(self.filename or \"\", header)\n  if self.syntax ~= syn then\n    self.syntax = syn\n    self.highlighter:reset()\n  end\nend\n\n\nfunction Doc:load(filename)\n  local fp = assert( io.open(filename, \"rb\") )\n  self:reset()\n  self.filename = filename\n  self.lines = {}\n  for line in fp:lines() do\n    if line:byte(-1) == 13 then\n      line = line:sub(1, -2)\n      self.crlf = true\n    end\n    table.insert(self.lines, line .. \"\\n\")\n  end\n  if #self.lines == 0 then\n    table.insert(self.lines, \"\\n\")\n  end\n  fp:close()\n  self:reset_syntax()\nend\n\n\nfunction Doc:save(filename)\n  filename = filename or assert(self.filename, \"no filename set to default to\")\n  local fp = assert( io.open(filename, \"wb\") )\n  for _, line in ipairs(self.lines) do\n    if self.crlf then line = line:gsub(\"\\n\", \"\\r\\n\") end\n    fp:write(line)\n  end\n  fp:close()\n  self.filename = filename or self.filename\n  self:reset_syntax()\n  self:clean()\nend\n\n\nfunction Doc:get_name()\n  return self.filename or \"unsaved\"\nend\n\n\nfunction Doc:is_dirty()\n  return self.clean_change_id ~= self:get_change_id()\nend\n\n\nfunction Doc:clean()\n  self.clean_change_id = self:get_change_id()\nend\n\n\nfunction Doc:get_change_id()\n  return self.undo_stack.idx\nend\n\n\nfunction Doc:set_selection(line1, col1, line2, col2, swap)\n  assert(not line2 == not col2, \"expected 2 or 4 arguments\")\n  if swap then line1, col1, line2, col2 = line2, col2, line1, col1 end\n  line1, col1 = self:sanitize_position(line1, col1)\n  line2, col2 = self:sanitize_position(line2 or line1, col2 or col1)\n  self.selection.a.line, self.selection.a.col = line1, col1\n  self.selection.b.line, self.selection.b.col = line2, col2\nend\n\n\nlocal function sort_positions(line1, col1, line2, col2)\n  if line1 > line2\n  or line1 == line2 and col1 > col2 then\n    return line2, col2, line1, col1, true\n  end\n  return line1, col1, line2, col2, false\nend\n\n\nfunction Doc:get_selection(sort)\n  local a, b = self.selection.a, self.selection.b\n  if sort then\n    return sort_positions(a.line, a.col, b.line, b.col)\n  end\n  return a.line, a.col, b.line, b.col\nend\n\n\nfunction Doc:has_selection()\n  local a, b = self.selection.a, self.selection.b\n  return not (a.line == b.line and a.col == b.col)\nend\n\n\nfunction Doc:sanitize_selection()\n  self:set_selection(self:get_selection())\nend\n\n\nfunction Doc:sanitize_position(line, col)\n  line = common.clamp(line, 1, #self.lines)\n  col = common.clamp(col, 1, #self.lines[line])\n  return line, col\nend\n\n\nlocal function position_offset_func(self, line, col, fn, ...)\n  line, col = self:sanitize_position(line, col)\n  return fn(self, line, col, ...)\nend\n\n\nlocal function position_offset_byte(self, line, col, offset)\n  line, col = self:sanitize_position(line, col)\n  col = col + offset\n  while line > 1 and col < 1 do\n    line = line - 1\n    col = col + #self.lines[line]\n  end\n  while line < #self.lines and col > #self.lines[line] do\n    col = col - #self.lines[line]\n    line = line + 1\n  end\n  return self:sanitize_position(line, col)\nend\n\n\nlocal function position_offset_linecol(self, line, col, lineoffset, coloffset)\n  return self:sanitize_position(line + lineoffset, col + coloffset)\nend\n\n\nfunction Doc:position_offset(line, col, ...)\n  if type(...) ~= \"number\" then\n    return position_offset_func(self, line, col, ...)\n  elseif select(\"#\", ...) == 1 then\n    return position_offset_byte(self, line, col, ...)\n  elseif select(\"#\", ...) == 2 then\n    return position_offset_linecol(self, line, col, ...)\n  else\n    error(\"bad number of arguments\")\n  end\nend\n\n\nfunction Doc:get_text(line1, col1, line2, col2)\n  line1, col1 = self:sanitize_position(line1, col1)\n  line2, col2 = self:sanitize_position(line2, col2)\n  line1, col1, line2, col2 = sort_positions(line1, col1, line2, col2)\n  if line1 == line2 then\n    return self.lines[line1]:sub(col1, col2 - 1)\n  end\n  local lines = { self.lines[line1]:sub(col1) }\n  for i = line1 + 1, line2 - 1 do\n    table.insert(lines, self.lines[i])\n  end\n  table.insert(lines, self.lines[line2]:sub(1, col2 - 1))\n  return table.concat(lines)\nend\n\n\nfunction Doc:get_char(line, col)\n  line, col = self:sanitize_position(line, col)\n  return self.lines[line]:sub(col, col)\nend\n\n\nlocal function push_undo(undo_stack, time, type, ...)\n  undo_stack[undo_stack.idx] = { type = type, time = time, ... }\n  undo_stack[undo_stack.idx - config.max_undos] = nil\n  undo_stack.idx = undo_stack.idx + 1\nend\n\n\nlocal function pop_undo(self, undo_stack, redo_stack)\n  -- pop command\n  local cmd = undo_stack[undo_stack.idx - 1]\n  if not cmd then return end\n  undo_stack.idx = undo_stack.idx - 1\n\n  -- handle command\n  if cmd.type == \"insert\" then\n    local line, col, text = table.unpack(cmd)\n    self:raw_insert(line, col, text, redo_stack, cmd.time)\n\n  elseif cmd.type == \"remove\" then\n    local line1, col1, line2, col2 = table.unpack(cmd)\n    self:raw_remove(line1, col1, line2, col2, redo_stack, cmd.time)\n\n  elseif cmd.type == \"selection\" then\n    self.selection.a.line, self.selection.a.col = cmd[1], cmd[2]\n    self.selection.b.line, self.selection.b.col = cmd[3], cmd[4]\n  end\n\n  -- if next undo command is within the merge timeout then treat as a single\n  -- command and continue to execute it\n  local next = undo_stack[undo_stack.idx - 1]\n  if next and math.abs(cmd.time - next.time) < config.undo_merge_timeout then\n    return pop_undo(self, undo_stack, redo_stack)\n  end\nend\n\n\nfunction Doc:raw_insert(line, col, text, undo_stack, time)\n  -- split text into lines and merge with line at insertion point\n  local lines = split_lines(text)\n  local before = self.lines[line]:sub(1, col - 1)\n  local after = self.lines[line]:sub(col)\n  for i = 1, #lines - 1 do\n    lines[i] = lines[i] .. \"\\n\"\n  end\n  lines[1] = before .. lines[1]\n  lines[#lines] = lines[#lines] .. after\n\n  -- splice lines into line array\n  splice(self.lines, line, 1, lines)\n\n  -- push undo\n  local line2, col2 = self:position_offset(line, col, #text)\n  push_undo(undo_stack, time, \"selection\", self:get_selection())\n  push_undo(undo_stack, time, \"remove\", line, col, line2, col2)\n\n  -- update highlighter and assure selection is in bounds\n  self.highlighter:invalidate(line)\n  self:sanitize_selection()\nend\n\n\nfunction Doc:raw_remove(line1, col1, line2, col2, undo_stack, time)\n  -- push undo\n  local text = self:get_text(line1, col1, line2, col2)\n  push_undo(undo_stack, time, \"selection\", self:get_selection())\n  push_undo(undo_stack, time, \"insert\", line1, col1, text)\n\n  -- get line content before/after removed text\n  local before = self.lines[line1]:sub(1, col1 - 1)\n  local after = self.lines[line2]:sub(col2)\n\n  -- splice line into line array\n  splice(self.lines, line1, line2 - line1 + 1, { before .. after })\n\n  -- update highlighter and assure selection is in bounds\n  self.highlighter:invalidate(line1)\n  self:sanitize_selection()\nend\n\n\nfunction Doc:insert(line, col, text)\n  self.redo_stack = { idx = 1 }\n  line, col = self:sanitize_position(line, col)\n  self:raw_insert(line, col, text, self.undo_stack, system.get_time())\nend\n\n\nfunction Doc:remove(line1, col1, line2, col2)\n  self.redo_stack = { idx = 1 }\n  line1, col1 = self:sanitize_position(line1, col1)\n  line2, col2 = self:sanitize_position(line2, col2)\n  line1, col1, line2, col2 = sort_positions(line1, col1, line2, col2)\n  self:raw_remove(line1, col1, line2, col2, self.undo_stack, system.get_time())\nend\n\n\nfunction Doc:undo()\n  pop_undo(self, self.undo_stack, self.redo_stack)\nend\n\n\nfunction Doc:redo()\n  pop_undo(self, self.redo_stack, self.undo_stack)\nend\n\n\nfunction Doc:text_input(text)\n  if self:has_selection() then\n    self:delete_to()\n  end\n  local line, col = self:get_selection()\n  self:insert(line, col, text)\n  self:move_to(#text)\nend\n\n\nfunction Doc:replace(fn)\n  local line1, col1, line2, col2, swap\n  local had_selection = self:has_selection()\n  if had_selection then\n    line1, col1, line2, col2, swap = self:get_selection(true)\n  else\n    line1, col1, line2, col2 = 1, 1, #self.lines, #self.lines[#self.lines]\n  end\n  local old_text = self:get_text(line1, col1, line2, col2)\n  local new_text, n = fn(old_text)\n  if old_text ~= new_text then\n    self:insert(line2, col2, new_text)\n    self:remove(line1, col1, line2, col2)\n    if had_selection then\n      line2, col2 = self:position_offset(line1, col1, #new_text)\n      self:set_selection(line1, col1, line2, col2, swap)\n    end\n  end\n  return n\nend\n\n\nfunction Doc:delete_to(...)\n  local line, col = self:get_selection(true)\n  if self:has_selection() then\n    self:remove(self:get_selection())\n  else\n    local line2, col2 = self:position_offset(line, col, ...)\n    self:remove(line, col, line2, col2)\n    line, col = sort_positions(line, col, line2, col2)\n  end\n  self:set_selection(line, col)\nend\n\n\nfunction Doc:move_to(...)\n  local line, col = self:get_selection()\n  self:set_selection(self:position_offset(line, col, ...))\nend\n\n\nfunction Doc:select_to(...)\n  local line, col, line2, col2 = self:get_selection()\n  line, col = self:position_offset(line, col, ...)\n  self:set_selection(line, col, line2, col2)\nend\n\n\nreturn Doc\n"
  },
  {
    "path": "data/core/doc/search.lua",
    "content": "local search = {}\n\nlocal default_opt = {}\n\n\nlocal function pattern_lower(str)\n  if str:sub(1, 1) == \"%\" then\n    return str\n  end\n  return str:lower()\nend\n\n\nlocal function init_args(doc, line, col, text, opt)\n  opt = opt or default_opt\n  line, col = doc:sanitize_position(line, col)\n\n  if opt.no_case then\n    if opt.pattern then\n      text = text:gsub(\"%%?.\", pattern_lower)\n    else\n      text = text:lower()\n    end\n  end\n\n  return doc, line, col, text, opt\nend\n\n\nfunction search.find(doc, line, col, text, opt)\n  doc, line, col, text, opt = init_args(doc, line, col, text, opt)\n\n  for line = line, #doc.lines do\n    local line_text = doc.lines[line]\n    if opt.no_case then\n      line_text = line_text:lower()\n    end\n    local s, e = line_text:find(text, col, not opt.pattern)\n    if s then\n      return line, s, line, e + 1\n    end\n    col = 1\n  end\n\n  if opt.wrap then\n    opt = { no_case = opt.no_case, pattern = opt.pattern }\n    return search.find(doc, 1, 1, text, opt)\n  end\nend\n\n\nreturn search\n"
  },
  {
    "path": "data/core/doc/translate.lua",
    "content": "local common = require \"core.common\"\nlocal config = require \"core.config\"\n\n-- functions for translating a Doc position to another position these functions\n-- can be passed to Doc:move_to|select_to|delete_to()\n\nlocal translate = {}\n\n\nlocal function is_non_word(char)\n  return config.non_word_chars:find(char, nil, true)\nend\n\n\nfunction translate.previous_char(doc, line, col)\n  repeat\n    line, col = doc:position_offset(line, col, -1)\n  until not common.is_utf8_cont(doc:get_char(line, col))\n  return line, col\nend\n\n\nfunction translate.next_char(doc, line, col)\n  repeat\n    line, col = doc:position_offset(line, col, 1)\n  until not common.is_utf8_cont(doc:get_char(line, col))\n  return line, col\nend\n\n\nfunction translate.previous_word_start(doc, line, col)\n  local prev\n  while line > 1 or col > 1 do\n    local l, c = doc:position_offset(line, col, -1)\n    local char = doc:get_char(l, c)\n    if prev and prev ~= char or not is_non_word(char) then\n      break\n    end\n    prev, line, col = char, l, c\n  end\n  return translate.start_of_word(doc, line, col)\nend\n\n\nfunction translate.next_word_end(doc, line, col)\n  local prev\n  local end_line, end_col = translate.end_of_doc(doc, line, col)\n  while line < end_line or col < end_col do\n    local char = doc:get_char(line, col)\n    if prev and prev ~= char or not is_non_word(char) then\n      break\n    end\n    line, col = doc:position_offset(line, col, 1)\n    prev = char\n  end\n  return translate.end_of_word(doc, line, col)\nend\n\n\nfunction translate.start_of_word(doc, line, col)\n  while true do\n    local line2, col2 = doc:position_offset(line, col, -1)\n    local char = doc:get_char(line2, col2)\n    if is_non_word(char)\n    or line == line2 and col == col2 then\n      break\n    end\n    line, col = line2, col2\n  end\n  return line, col\nend\n\n\nfunction translate.end_of_word(doc, line, col)\n  while true do\n    local line2, col2 = doc:position_offset(line, col, 1)\n    local char = doc:get_char(line, col)\n    if is_non_word(char)\n    or line == line2 and col == col2 then\n      break\n    end\n    line, col = line2, col2\n  end\n  return line, col\nend\n\n\nfunction translate.previous_block_start(doc, line, col)\n  while true do\n    line = line - 1\n    if line <= 1 then\n      return 1, 1\n    end\n    if doc.lines[line-1]:find(\"^%s*$\")\n    and not doc.lines[line]:find(\"^%s*$\") then\n      return line, (doc.lines[line]:find(\"%S\"))\n    end\n  end\nend\n\n\nfunction translate.next_block_end(doc, line, col)\n  while true do\n    if line >= #doc.lines then\n      return #doc.lines, 1\n    end\n    if doc.lines[line+1]:find(\"^%s*$\")\n    and not doc.lines[line]:find(\"^%s*$\") then\n      return line+1, #doc.lines[line+1]\n    end\n    line = line + 1\n  end\nend\n\n\nfunction translate.start_of_line(doc, line, col)\n  return line, 1\nend\n\n\nfunction translate.end_of_line(doc, line, col)\n  return line, math.huge\nend\n\n\nfunction translate.start_of_doc(doc, line, col)\n  return 1, 1\nend\n\n\nfunction translate.end_of_doc(doc, line, col)\n  return #doc.lines, #doc.lines[#doc.lines]\nend\n\n\nreturn translate\n"
  },
  {
    "path": "data/core/docview.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal config = require \"core.config\"\nlocal style = require \"core.style\"\nlocal keymap = require \"core.keymap\"\nlocal translate = require \"core.doc.translate\"\nlocal View = require \"core.view\"\n\n\nlocal DocView = View:extend()\n\n\nlocal function move_to_line_offset(dv, line, col, offset)\n  local xo = dv.last_x_offset\n  if xo.line ~= line or xo.col ~= col then\n    xo.offset = dv:get_col_x_offset(line, col)\n  end\n  xo.line = line + offset\n  xo.col = dv:get_x_offset_col(line + offset, xo.offset)\n  return xo.line, xo.col\nend\n\n\nDocView.translate = {\n  [\"previous_page\"] = function(doc, line, col, dv)\n    local min, max = dv:get_visible_line_range()\n    return line - (max - min), 1\n  end,\n\n  [\"next_page\"] = function(doc, line, col, dv)\n    local min, max = dv:get_visible_line_range()\n    return line + (max - min), 1\n  end,\n\n  [\"previous_line\"] = function(doc, line, col, dv)\n    if line == 1 then\n      return 1, 1\n    end\n    return move_to_line_offset(dv, line, col, -1)\n  end,\n\n  [\"next_line\"] = function(doc, line, col, dv)\n    if line == #doc.lines then\n      return #doc.lines, math.huge\n    end\n    return move_to_line_offset(dv, line, col, 1)\n  end,\n}\n\nlocal blink_period = 0.8\n\n\nfunction DocView:new(doc)\n  DocView.super.new(self)\n  self.cursor = \"ibeam\"\n  self.scrollable = true\n  self.doc = assert(doc)\n  self.font = \"code_font\"\n  self.last_x_offset = {}\n  self.blink_timer = 0\nend\n\n\nfunction DocView:try_close(do_close)\n  if self.doc:is_dirty()\n  and #core.get_views_referencing_doc(self.doc) == 1 then\n    core.command_view:enter(\"Unsaved Changes; Confirm Close\", function(_, item)\n      if item.text:match(\"^[cC]\") then\n        do_close()\n      elseif item.text:match(\"^[sS]\") then\n        self.doc:save()\n        do_close()\n      end\n    end, function(text)\n      local items = {}\n      if not text:find(\"^[^cC]\") then table.insert(items, \"Close Without Saving\") end\n      if not text:find(\"^[^sS]\") then table.insert(items, \"Save And Close\") end\n      return items\n    end)\n  else\n    do_close()\n  end\nend\n\n\nfunction DocView:get_name()\n  local post = self.doc:is_dirty() and \"*\" or \"\"\n  local name = self.doc:get_name()\n  return name:match(\"[^/%\\\\]*$\") .. post\nend\n\n\nfunction DocView:get_scrollable_size()\n  return self:get_line_height() * (#self.doc.lines - 1) + self.size.y\nend\n\n\nfunction DocView:get_font()\n  return style[self.font]\nend\n\n\nfunction DocView:get_line_height()\n  return math.floor(self:get_font():get_height() * config.line_height)\nend\n\n\nfunction DocView:get_gutter_width()\n  return self:get_font():get_width(#self.doc.lines) + style.padding.x * 2\nend\n\n\nfunction DocView:get_line_screen_position(idx)\n  local x, y = self:get_content_offset()\n  local lh = self:get_line_height()\n  local gw = self:get_gutter_width()\n  return x + gw, y + (idx-1) * lh + style.padding.y\nend\n\n\nfunction DocView:get_line_text_y_offset()\n  local lh = self:get_line_height()\n  local th = self:get_font():get_height()\n  return (lh - th) / 2\nend\n\n\nfunction DocView:get_visible_line_range()\n  local x, y, x2, y2 = self:get_content_bounds()\n  local lh = self:get_line_height()\n  local minline = math.max(1, math.floor(y / lh))\n  local maxline = math.min(#self.doc.lines, math.floor(y2 / lh) + 1)\n  return minline, maxline\nend\n\n\nfunction DocView:get_col_x_offset(line, col)\n  local text = self.doc.lines[line]\n  if not text then return 0 end\n  return self:get_font():get_width(text:sub(1, col - 1))\nend\n\n\nfunction DocView:get_x_offset_col(line, x)\n  local text = self.doc.lines[line]\n\n  local xoffset, last_i, i = 0, 1, 1\n  for char in common.utf8_chars(text) do\n    local w = self:get_font():get_width(char)\n    if xoffset >= x then\n      return (xoffset - x > w / 2) and last_i or i\n    end\n    xoffset = xoffset + w\n    last_i = i\n    i = i + #char\n  end\n\n  return #text\nend\n\n\nfunction DocView:resolve_screen_position(x, y)\n  local ox, oy = self:get_line_screen_position(1)\n  local line = math.floor((y - oy) / self:get_line_height()) + 1\n  line = common.clamp(line, 1, #self.doc.lines)\n  local col = self:get_x_offset_col(line, x - ox)\n  return line, col\nend\n\n\nfunction DocView:scroll_to_line(line, ignore_if_visible, instant)\n  local min, max = self:get_visible_line_range()\n  if not (ignore_if_visible and line > min and line < max) then\n    local lh = self:get_line_height()\n    self.scroll.to.y = math.max(0, lh * (line - 1) - self.size.y / 2)\n    if instant then\n      self.scroll.y = self.scroll.to.y\n    end\n  end\nend\n\n\nfunction DocView:scroll_to_make_visible(line, col)\n  local min = self:get_line_height() * (line - 1)\n  local max = self:get_line_height() * (line + 2) - self.size.y\n  self.scroll.to.y = math.min(self.scroll.to.y, min)\n  self.scroll.to.y = math.max(self.scroll.to.y, max)\n  local gw = self:get_gutter_width()\n  local xoffset = self:get_col_x_offset(line, col)\n  local max = xoffset - self.size.x + gw + self.size.x / 5\n  self.scroll.to.x = math.max(0, max)\nend\n\n\nlocal function mouse_selection(doc, clicks, line1, col1, line2, col2)\n  local swap = line2 < line1 or line2 == line1 and col2 <= col1\n  if swap then\n    line1, col1, line2, col2 = line2, col2, line1, col1\n  end\n  if clicks == 2 then\n    line1, col1 = translate.start_of_word(doc, line1, col1)\n    line2, col2 = translate.end_of_word(doc, line2, col2)\n  elseif clicks == 3 then\n    if line2 == #doc.lines and doc.lines[#doc.lines] ~= \"\\n\" then\n      doc:insert(math.huge, math.huge, \"\\n\")\n    end\n    line1, col1, line2, col2 = line1, 1, line2 + 1, 1\n  end\n  if swap then\n    return line2, col2, line1, col1\n  end\n  return line1, col1, line2, col2\nend\n\n\nfunction DocView:on_mouse_pressed(button, x, y, clicks)\n  local caught = DocView.super.on_mouse_pressed(self, button, x, y, clicks)\n  if caught then\n    return\n  end\n  if keymap.modkeys[\"shift\"] then\n    if clicks == 1 then\n      local line1, col1 = select(3, self.doc:get_selection())\n      local line2, col2 = self:resolve_screen_position(x, y)\n      self.doc:set_selection(line2, col2, line1, col1)\n    end\n  else\n    local line, col = self:resolve_screen_position(x, y)\n    self.doc:set_selection(mouse_selection(self.doc, clicks, line, col, line, col))\n    self.mouse_selecting = { line, col, clicks = clicks }\n  end\n  self.blink_timer = 0\nend\n\n\nfunction DocView:on_mouse_moved(x, y, ...)\n  DocView.super.on_mouse_moved(self, x, y, ...)\n\n  if self:scrollbar_overlaps_point(x, y) or self.dragging_scrollbar then\n    self.cursor = \"arrow\"\n  else\n    self.cursor = \"ibeam\"\n  end\n\n  if self.mouse_selecting then\n    local l1, c1 = self:resolve_screen_position(x, y)\n    local l2, c2 = table.unpack(self.mouse_selecting)\n    local clicks = self.mouse_selecting.clicks\n    self.doc:set_selection(mouse_selection(self.doc, clicks, l1, c1, l2, c2))\n  end\nend\n\n\nfunction DocView:on_mouse_released(button)\n  DocView.super.on_mouse_released(self, button)\n  self.mouse_selecting = nil\nend\n\n\nfunction DocView:on_text_input(text)\n  self.doc:text_input(text)\nend\n\n\nfunction DocView:update()\n  -- scroll to make caret visible and reset blink timer if it moved\n  local line, col = self.doc:get_selection()\n  if (line ~= self.last_line or col ~= self.last_col) and self.size.x > 0 then\n    if core.active_view == self then\n      self:scroll_to_make_visible(line, col)\n    end\n    self.blink_timer = 0\n    self.last_line, self.last_col = line, col\n  end\n\n  -- update blink timer\n  if self == core.active_view and not self.mouse_selecting then\n    local n = blink_period / 2\n    local prev = self.blink_timer\n    self.blink_timer = (self.blink_timer + 1 / config.fps) % blink_period\n    if (self.blink_timer > n) ~= (prev > n) then\n      core.redraw = true\n    end\n  end\n\n  DocView.super.update(self)\nend\n\n\nfunction DocView:draw_line_highlight(x, y)\n  local lh = self:get_line_height()\n  renderer.draw_rect(x, y, self.size.x, lh, style.line_highlight)\nend\n\n\nfunction DocView:draw_line_text(idx, x, y)\n  local tx, ty = x, y + self:get_line_text_y_offset()\n  local font = self:get_font()\n  for _, type, text in self.doc.highlighter:each_token(idx) do\n    local color = style.syntax[type]\n    tx = renderer.draw_text(font, text, tx, ty, color)\n  end\nend\n\n\nfunction DocView:draw_line_body(idx, x, y)\n  local line, col = self.doc:get_selection()\n\n  -- draw selection if it overlaps this line\n  local line1, col1, line2, col2 = self.doc:get_selection(true)\n  if idx >= line1 and idx <= line2 then\n    local text = self.doc.lines[idx]\n    if line1 ~= idx then col1 = 1 end\n    if line2 ~= idx then col2 = #text + 1 end\n    local x1 = x + self:get_col_x_offset(idx, col1)\n    local x2 = x + self:get_col_x_offset(idx, col2)\n    local lh = self:get_line_height()\n    renderer.draw_rect(x1, y, x2 - x1, lh, style.selection)\n  end\n\n  -- draw line highlight if caret is on this line\n  if config.highlight_current_line and not self.doc:has_selection()\n  and line == idx and core.active_view == self then\n    self:draw_line_highlight(x + self.scroll.x, y)\n  end\n\n  -- draw line's text\n  self:draw_line_text(idx, x, y)\n\n  -- draw caret if it overlaps this line\n  if line == idx and core.active_view == self\n  and self.blink_timer < blink_period / 2\n  and system.window_has_focus() then\n    local lh = self:get_line_height()\n    local x1 = x + self:get_col_x_offset(line, col)\n    renderer.draw_rect(x1, y, style.caret_width, lh, style.caret)\n  end\nend\n\n\nfunction DocView:draw_line_gutter(idx, x, y)\n  local color = style.line_number\n  local line1, _, line2, _ = self.doc:get_selection(true)\n  if idx >= line1 and idx <= line2 then\n    color = style.line_number2\n  end\n  local yoffset = self:get_line_text_y_offset()\n  x = x + style.padding.x\n  renderer.draw_text(self:get_font(), idx, x, y + yoffset, color)\nend\n\n\nfunction DocView:draw()\n  self:draw_background(style.background)\n\n  local font = self:get_font()\n  font:set_tab_width(font:get_width(\" \") * config.indent_size)\n\n  local minline, maxline = self:get_visible_line_range()\n  local lh = self:get_line_height()\n\n  local _, y = self:get_line_screen_position(minline)\n  local x = self.position.x\n  for i = minline, maxline do\n    self:draw_line_gutter(i, x, y)\n    y = y + lh\n  end\n\n  local x, y = self:get_line_screen_position(minline)\n  local gw = self:get_gutter_width()\n  local pos = self.position\n  core.push_clip_rect(pos.x + gw, pos.y, self.size.x, self.size.y)\n  for i = minline, maxline do\n    self:draw_line_body(i, x, y)\n    y = y + lh\n  end\n  core.pop_clip_rect()\n\n  self:draw_scrollbar()\nend\n\n\nreturn DocView\n"
  },
  {
    "path": "data/core/init.lua",
    "content": "require \"core.strict\"\nlocal common = require \"core.common\"\nlocal config = require \"core.config\"\nlocal style = require \"core.style\"\nlocal command\nlocal keymap\nlocal RootView\nlocal StatusView\nlocal CommandView\nlocal Doc\n\nlocal core = {}\n\n\nlocal function project_scan_thread()\n  local function diff_files(a, b)\n    if #a ~= #b then return true end\n    for i, v in ipairs(a) do\n      if b[i].filename ~= v.filename\n      or b[i].modified ~= v.modified then\n        return true\n      end\n    end\n  end\n\n  local function compare_file(a, b)\n    return a.filename < b.filename\n  end\n\n  local function get_files(path, t)\n    coroutine.yield()\n    t = t or {}\n    local size_limit = config.file_size_limit * 10e5\n    local all = system.list_dir(path) or {}\n    local dirs, files = {}, {}\n\n    for _, file in ipairs(all) do\n      if not common.match_pattern(file, config.ignore_files) then\n        local file = (path ~= \".\" and path .. PATHSEP or \"\") .. file\n        local info = system.get_file_info(file)\n        if info and info.size < size_limit then\n          info.filename = file\n          table.insert(info.type == \"dir\" and dirs or files, info)\n        end\n      end\n    end\n\n    table.sort(dirs, compare_file)\n    for _, f in ipairs(dirs) do\n      table.insert(t, f)\n      get_files(f.filename, t)\n    end\n\n    table.sort(files, compare_file)\n    for _, f in ipairs(files) do\n      table.insert(t, f)\n    end\n\n    return t\n  end\n\n  while true do\n    -- get project files and replace previous table if the new table is\n    -- different\n    local t = get_files(\".\")\n    if diff_files(core.project_files, t) then\n      core.project_files = t\n      core.redraw = true\n    end\n\n    -- wait for next scan\n    coroutine.yield(config.project_scan_rate)\n  end\nend\n\n\nfunction core.init()\n  command = require \"core.command\"\n  keymap = require \"core.keymap\"\n  RootView = require \"core.rootview\"\n  StatusView = require \"core.statusview\"\n  CommandView = require \"core.commandview\"\n  Doc = require \"core.doc\"\n\n  local project_dir = EXEDIR\n  local files = {}\n  for i = 2, #ARGS do\n    local info = system.get_file_info(ARGS[i]) or {}\n    if info.type == \"file\" then\n      table.insert(files, system.absolute_path(ARGS[i]))\n    elseif info.type == \"dir\" then\n      project_dir = ARGS[i]\n    end\n  end\n\n  system.chdir(project_dir)\n\n  core.frame_start = 0\n  core.clip_rect_stack = {{ 0,0,0,0 }}\n  core.log_items = {}\n  core.docs = {}\n  core.threads = setmetatable({}, { __mode = \"k\" })\n  core.project_files = {}\n  core.redraw = true\n\n  core.root_view = RootView()\n  core.command_view = CommandView()\n  core.status_view = StatusView()\n\n  core.root_view.root_node:split(\"down\", core.command_view, true)\n  core.root_view.root_node.b:split(\"down\", core.status_view, true)\n\n  core.add_thread(project_scan_thread)\n  command.add_defaults()\n  local got_plugin_error = not core.load_plugins()\n  local got_user_error = not core.try(require, \"user\")\n  local got_project_error = not core.load_project_module()\n\n  for _, filename in ipairs(files) do\n    core.root_view:open_doc(core.open_doc(filename))\n  end\n\n  if got_plugin_error or got_user_error or got_project_error then\n    command.perform(\"core:open-log\")\n  end\nend\n\n\nlocal temp_uid = (system.get_time() * 1000) % 0xffffffff\nlocal temp_file_prefix = string.format(\".lite_temp_%08x\", temp_uid)\nlocal temp_file_counter = 0\n\nlocal function delete_temp_files()\n  for _, filename in ipairs(system.list_dir(EXEDIR)) do\n    if filename:find(temp_file_prefix, 1, true) == 1 then\n      os.remove(EXEDIR .. PATHSEP .. filename)\n    end\n  end\nend\n\nfunction core.temp_filename(ext)\n  temp_file_counter = temp_file_counter + 1\n  return EXEDIR .. PATHSEP .. temp_file_prefix\n      .. string.format(\"%06x\", temp_file_counter) .. (ext or \"\")\nend\n\n\nfunction core.quit(force)\n  if force then\n    delete_temp_files()\n    os.exit()\n  end\n  local dirty_count = 0\n  local dirty_name\n  for _, doc in ipairs(core.docs) do\n    if doc:is_dirty() then\n      dirty_count = dirty_count + 1\n      dirty_name = doc:get_name()\n    end\n  end\n  if dirty_count > 0 then\n    local text\n    if dirty_count == 1 then\n      text = string.format(\"\\\"%s\\\" has unsaved changes. Quit anyway?\", dirty_name)\n    else\n      text = string.format(\"%d docs have unsaved changes. Quit anyway?\", dirty_count)\n    end\n    local confirm = system.show_confirm_dialog(\"Unsaved Changes\", text)\n    if not confirm then return end\n  end\n  core.quit(true)\nend\n\n\nfunction core.load_plugins()\n  local no_errors = true\n  local files = system.list_dir(EXEDIR .. \"/data/plugins\")\n  for _, filename in ipairs(files) do\n    local modname = \"plugins.\" .. filename:gsub(\".lua$\", \"\")\n    local ok = core.try(require, modname)\n    if ok then\n      core.log_quiet(\"Loaded plugin %q\", modname)\n    else\n      no_errors = false\n    end\n  end\n  return no_errors\nend\n\n\nfunction core.load_project_module()\n  local filename = \".lite_project.lua\"\n  if system.get_file_info(filename) then\n    return core.try(function()\n      local fn, err = loadfile(filename)\n      if not fn then error(\"Error when loading project module:\\n\\t\" .. err) end\n      fn()\n      core.log_quiet(\"Loaded project module\")\n    end)\n  end\n  return true\nend\n\n\nfunction core.reload_module(name)\n  local old = package.loaded[name]\n  package.loaded[name] = nil\n  local new = require(name)\n  if type(old) == \"table\" then\n    for k, v in pairs(new) do old[k] = v end\n    package.loaded[name] = old\n  end\nend\n\n\nfunction core.set_active_view(view)\n  assert(view, \"Tried to set active view to nil\")\n  if view ~= core.active_view then\n    core.last_active_view = core.active_view\n    core.active_view = view\n  end\nend\n\n\nfunction core.add_thread(f, weak_ref)\n  local key = weak_ref or #core.threads + 1\n  local fn = function() return core.try(f) end\n  core.threads[key] = { cr = coroutine.create(fn), wake = 0 }\nend\n\n\nfunction core.push_clip_rect(x, y, w, h)\n  local x2, y2, w2, h2 = table.unpack(core.clip_rect_stack[#core.clip_rect_stack])\n  local r, b, r2, b2 = x+w, y+h, x2+w2, y2+h2\n  x, y = math.max(x, x2), math.max(y, y2)\n  b, r = math.min(b, b2), math.min(r, r2)\n  w, h = r-x, b-y\n  table.insert(core.clip_rect_stack, { x, y, w, h })\n  renderer.set_clip_rect(x, y, w, h)\nend\n\n\nfunction core.pop_clip_rect()\n  table.remove(core.clip_rect_stack)\n  local x, y, w, h = table.unpack(core.clip_rect_stack[#core.clip_rect_stack])\n  renderer.set_clip_rect(x, y, w, h)\nend\n\n\nfunction core.open_doc(filename)\n  if filename then\n    -- try to find existing doc for filename\n    local abs_filename = system.absolute_path(filename)\n    for _, doc in ipairs(core.docs) do\n      if doc.filename\n      and abs_filename == system.absolute_path(doc.filename) then\n        return doc\n      end\n    end\n  end\n  -- no existing doc for filename; create new\n  local doc = Doc(filename)\n  table.insert(core.docs, doc)\n  core.log_quiet(filename and \"Opened doc \\\"%s\\\"\" or \"Opened new doc\", filename)\n  return doc\nend\n\n\nfunction core.get_views_referencing_doc(doc)\n  local res = {}\n  local views = core.root_view.root_node:get_children()\n  for _, view in ipairs(views) do\n    if view.doc == doc then table.insert(res, view) end\n  end\n  return res\nend\n\n\nlocal function log(icon, icon_color, fmt, ...)\n  local text = string.format(fmt, ...)\n  if icon then\n    core.status_view:show_message(icon, icon_color, text)\n  end\n\n  local info = debug.getinfo(2, \"Sl\")\n  local at = string.format(\"%s:%d\", info.short_src, info.currentline)\n  local item = { text = text, time = os.time(), at = at }\n  table.insert(core.log_items, item)\n  if #core.log_items > config.max_log_items then\n    table.remove(core.log_items, 1)\n  end\n  return item\nend\n\n\nfunction core.log(...)\n  return log(\"i\", style.text, ...)\nend\n\n\nfunction core.log_quiet(...)\n  return log(nil, nil, ...)\nend\n\n\nfunction core.error(...)\n  return log(\"!\", style.accent, ...)\nend\n\n\nfunction core.try(fn, ...)\n  local err\n  local ok, res = xpcall(fn, function(msg)\n    local item = core.error(\"%s\", msg)\n    item.info = debug.traceback(nil, 2):gsub(\"\\t\", \"\")\n    err = msg\n  end, ...)\n  if ok then\n    return true, res\n  end\n  return false, err\nend\n\n\nfunction core.on_event(type, ...)\n  local did_keymap = false\n  if type == \"textinput\" then\n    core.root_view:on_text_input(...)\n  elseif type == \"keypressed\" then\n    did_keymap = keymap.on_key_pressed(...)\n  elseif type == \"keyreleased\" then\n    keymap.on_key_released(...)\n  elseif type == \"mousemoved\" then\n    core.root_view:on_mouse_moved(...)\n  elseif type == \"mousepressed\" then\n    core.root_view:on_mouse_pressed(...)\n  elseif type == \"mousereleased\" then\n    core.root_view:on_mouse_released(...)\n  elseif type == \"mousewheel\" then\n    core.root_view:on_mouse_wheel(...)\n  elseif type == \"filedropped\" then\n    local filename, mx, my = ...\n    local info = system.get_file_info(filename)\n    if info and info.type == \"dir\" then\n      system.exec(string.format(\"%q %q\", EXEFILE, filename))\n    else\n      local ok, doc = core.try(core.open_doc, filename)\n      if ok then\n        local node = core.root_view.root_node:get_child_overlapping_point(mx, my)\n        node:set_active_view(node.active_view)\n        core.root_view:open_doc(doc)\n      end\n    end\n  elseif type == \"quit\" then\n    core.quit()\n  end\n  return did_keymap\nend\n\n\nfunction core.step()\n  -- handle events\n  local did_keymap = false\n  local mouse_moved = false\n  local mouse = { x = 0, y = 0, dx = 0, dy = 0 }\n\n  for type, a,b,c,d in system.poll_event do\n    if type == \"mousemoved\" then\n      mouse_moved = true\n      mouse.x, mouse.y = a, b\n      mouse.dx, mouse.dy = mouse.dx + c, mouse.dy + d\n    elseif type == \"textinput\" and did_keymap then\n      did_keymap = false\n    else\n      local _, res = core.try(core.on_event, type, a, b, c, d)\n      did_keymap = res or did_keymap\n    end\n    core.redraw = true\n  end\n  if mouse_moved then\n    core.try(core.on_event, \"mousemoved\", mouse.x, mouse.y, mouse.dx, mouse.dy)\n  end\n\n  local width, height = renderer.get_size()\n\n  -- update\n  core.root_view.size.x, core.root_view.size.y = width, height\n  core.root_view:update()\n  if not core.redraw then return false end\n  core.redraw = false\n\n  -- close unreferenced docs\n  for i = #core.docs, 1, -1 do\n    local doc = core.docs[i]\n    if #core.get_views_referencing_doc(doc) == 0 then\n      table.remove(core.docs, i)\n      core.log_quiet(\"Closed doc \\\"%s\\\"\", doc:get_name())\n    end\n  end\n\n  -- update window title\n  local name = core.active_view:get_name()\n  local title = (name ~= \"---\") and (name .. \" - lite\") or  \"lite\"\n  if title ~= core.window_title then\n    system.set_window_title(title)\n    core.window_title = title\n  end\n\n  -- draw\n  renderer.begin_frame()\n  core.clip_rect_stack[1] = { 0, 0, width, height }\n  renderer.set_clip_rect(table.unpack(core.clip_rect_stack[1]))\n  core.root_view:draw()\n  renderer.end_frame()\n  return true\nend\n\n\nlocal run_threads = coroutine.wrap(function()\n  while true do\n    local max_time = 1 / config.fps - 0.004\n    local ran_any_threads = false\n\n    for k, thread in pairs(core.threads) do\n      -- run thread\n      if thread.wake < system.get_time() then\n        local _, wait = assert(coroutine.resume(thread.cr))\n        if coroutine.status(thread.cr) == \"dead\" then\n          if type(k) == \"number\" then\n            table.remove(core.threads, k)\n          else\n            core.threads[k] = nil\n          end\n        elseif wait then\n          thread.wake = system.get_time() + wait\n        end\n        ran_any_threads = true\n      end\n\n      -- stop running threads if we're about to hit the end of frame\n      if system.get_time() - core.frame_start > max_time then\n        coroutine.yield()\n      end\n    end\n\n    if not ran_any_threads then coroutine.yield() end\n  end\nend)\n\n\nfunction core.run()\n  while true do\n    core.frame_start = system.get_time()\n    local did_redraw = core.step()\n    run_threads()\n    if not did_redraw and not system.window_has_focus() then\n      system.wait_event(0.25)\n    end\n    local elapsed = system.get_time() - core.frame_start\n    system.sleep(math.max(0, 1 / config.fps - elapsed))\n  end\nend\n\n\nfunction core.on_error(err)\n  -- write error to file\n  local fp = io.open(EXEDIR .. \"/error.txt\", \"wb\")\n  fp:write(\"Error: \" .. tostring(err) .. \"\\n\")\n  fp:write(debug.traceback(nil, 4))\n  fp:close()\n  -- save copy of all unsaved documents\n  for _, doc in ipairs(core.docs) do\n    if doc:is_dirty() and doc.filename then\n      doc:save(doc.filename .. \"~\")\n    end\n  end\nend\n\n\nreturn core\n"
  },
  {
    "path": "data/core/keymap.lua",
    "content": "local command = require \"core.command\"\nlocal keymap = {}\n\nkeymap.modkeys = {}\nkeymap.map = {}\nkeymap.reverse_map = {}\n\nlocal modkey_map = {\n  [\"left ctrl\"]   = \"ctrl\",\n  [\"right ctrl\"]  = \"ctrl\",\n  [\"left shift\"]  = \"shift\",\n  [\"right shift\"] = \"shift\",\n  [\"left alt\"]    = \"alt\",\n  [\"right alt\"]   = \"altgr\",\n}\n\nlocal modkeys = { \"ctrl\", \"alt\", \"altgr\", \"shift\" }\n\nlocal function key_to_stroke(k)\n  local stroke = \"\"\n  for _, mk in ipairs(modkeys) do\n    if keymap.modkeys[mk] then\n      stroke = stroke .. mk .. \"+\"\n    end\n  end\n  return stroke .. k\nend\n\n\nfunction keymap.add(map, overwrite)\n  for stroke, commands in pairs(map) do\n    if type(commands) == \"string\" then\n      commands = { commands }\n    end\n    if overwrite then\n      keymap.map[stroke] = commands\n    else\n      keymap.map[stroke] = keymap.map[stroke] or {}\n      for i = #commands, 1, -1 do\n        table.insert(keymap.map[stroke], 1, commands[i])\n      end\n    end\n    for _, cmd in ipairs(commands) do\n      keymap.reverse_map[cmd] = stroke\n    end\n  end\nend\n\n\nfunction keymap.get_binding(cmd)\n  return keymap.reverse_map[cmd]\nend\n\n\nfunction keymap.on_key_pressed(k)\n  local mk = modkey_map[k]\n  if mk then\n    keymap.modkeys[mk] = true\n    -- work-around for windows where `altgr` is treated as `ctrl+alt`\n    if mk == \"altgr\" then\n      keymap.modkeys[\"ctrl\"] = false\n    end\n  else\n    local stroke = key_to_stroke(k)\n    local commands = keymap.map[stroke]\n    if commands then\n      for _, cmd in ipairs(commands) do\n        local performed = command.perform(cmd)\n        if performed then break end\n      end\n      return true\n    end\n  end\n  return false\nend\n\n\nfunction keymap.on_key_released(k)\n  local mk = modkey_map[k]\n  if mk then\n    keymap.modkeys[mk] = false\n  end\nend\n\n\nkeymap.add {\n  [\"ctrl+shift+p\"] = \"core:find-command\",\n  [\"ctrl+p\"] = \"core:find-file\",\n  [\"ctrl+o\"] = \"core:open-file\",\n  [\"ctrl+n\"] = \"core:new-doc\",\n  [\"alt+return\"] = \"core:toggle-fullscreen\",\n\n  [\"alt+shift+j\"] = \"root:split-left\",\n  [\"alt+shift+l\"] = \"root:split-right\",\n  [\"alt+shift+i\"] = \"root:split-up\",\n  [\"alt+shift+k\"] = \"root:split-down\",\n  [\"alt+j\"] = \"root:switch-to-left\",\n  [\"alt+l\"] = \"root:switch-to-right\",\n  [\"alt+i\"] = \"root:switch-to-up\",\n  [\"alt+k\"] = \"root:switch-to-down\",\n\n  [\"ctrl+w\"] = \"root:close\",\n  [\"ctrl+tab\"] = \"root:switch-to-next-tab\",\n  [\"ctrl+shift+tab\"] = \"root:switch-to-previous-tab\",\n  [\"ctrl+pageup\"] = \"root:move-tab-left\",\n  [\"ctrl+pagedown\"] = \"root:move-tab-right\",\n  [\"alt+1\"] = \"root:switch-to-tab-1\",\n  [\"alt+2\"] = \"root:switch-to-tab-2\",\n  [\"alt+3\"] = \"root:switch-to-tab-3\",\n  [\"alt+4\"] = \"root:switch-to-tab-4\",\n  [\"alt+5\"] = \"root:switch-to-tab-5\",\n  [\"alt+6\"] = \"root:switch-to-tab-6\",\n  [\"alt+7\"] = \"root:switch-to-tab-7\",\n  [\"alt+8\"] = \"root:switch-to-tab-8\",\n  [\"alt+9\"] = \"root:switch-to-tab-9\",\n\n  [\"ctrl+f\"] = \"find-replace:find\",\n  [\"ctrl+r\"] = \"find-replace:replace\",\n  [\"f3\"] = \"find-replace:repeat-find\",\n  [\"shift+f3\"] = \"find-replace:previous-find\",\n  [\"ctrl+g\"] = \"doc:go-to-line\",\n  [\"ctrl+s\"] = \"doc:save\",\n  [\"ctrl+shift+s\"] = \"doc:save-as\",\n\n  [\"ctrl+z\"] = \"doc:undo\",\n  [\"ctrl+y\"] = \"doc:redo\",\n  [\"ctrl+x\"] = \"doc:cut\",\n  [\"ctrl+c\"] = \"doc:copy\",\n  [\"ctrl+v\"] = \"doc:paste\",\n  [\"escape\"] = { \"command:escape\", \"doc:select-none\" },\n  [\"tab\"] = { \"command:complete\", \"doc:indent\" },\n  [\"shift+tab\"] = \"doc:unindent\",\n  [\"backspace\"] = \"doc:backspace\",\n  [\"shift+backspace\"] = \"doc:backspace\",\n  [\"ctrl+backspace\"] = \"doc:delete-to-previous-word-start\",\n  [\"ctrl+shift+backspace\"] = \"doc:delete-to-previous-word-start\",\n  [\"delete\"] = \"doc:delete\",\n  [\"shift+delete\"] = \"doc:delete\",\n  [\"ctrl+delete\"] = \"doc:delete-to-next-word-end\",\n  [\"ctrl+shift+delete\"] = \"doc:delete-to-next-word-end\",\n  [\"return\"] = { \"command:submit\", \"doc:newline\" },\n  [\"keypad enter\"] = { \"command:submit\", \"doc:newline\" },\n  [\"ctrl+return\"] = \"doc:newline-below\",\n  [\"ctrl+shift+return\"] = \"doc:newline-above\",\n  [\"ctrl+j\"] = \"doc:join-lines\",\n  [\"ctrl+a\"] = \"doc:select-all\",\n  [\"ctrl+d\"] = { \"find-replace:select-next\", \"doc:select-word\" },\n  [\"ctrl+l\"] = \"doc:select-lines\",\n  [\"ctrl+/\"] = \"doc:toggle-line-comments\",\n  [\"ctrl+up\"] = \"doc:move-lines-up\",\n  [\"ctrl+down\"] = \"doc:move-lines-down\",\n  [\"ctrl+shift+d\"] = \"doc:duplicate-lines\",\n  [\"ctrl+shift+k\"] = \"doc:delete-lines\",\n\n  [\"left\"] = \"doc:move-to-previous-char\",\n  [\"right\"] = \"doc:move-to-next-char\",\n  [\"up\"] = { \"command:select-previous\", \"doc:move-to-previous-line\" },\n  [\"down\"] = { \"command:select-next\", \"doc:move-to-next-line\" },\n  [\"ctrl+left\"] = \"doc:move-to-previous-word-start\",\n  [\"ctrl+right\"] = \"doc:move-to-next-word-end\",\n  [\"ctrl+[\"] = \"doc:move-to-previous-block-start\",\n  [\"ctrl+]\"] = \"doc:move-to-next-block-end\",\n  [\"home\"] = \"doc:move-to-start-of-line\",\n  [\"end\"] = \"doc:move-to-end-of-line\",\n  [\"ctrl+home\"] = \"doc:move-to-start-of-doc\",\n  [\"ctrl+end\"] = \"doc:move-to-end-of-doc\",\n  [\"pageup\"] = \"doc:move-to-previous-page\",\n  [\"pagedown\"] = \"doc:move-to-next-page\",\n\n  [\"shift+left\"] = \"doc:select-to-previous-char\",\n  [\"shift+right\"] = \"doc:select-to-next-char\",\n  [\"shift+up\"] = \"doc:select-to-previous-line\",\n  [\"shift+down\"] = \"doc:select-to-next-line\",\n  [\"ctrl+shift+left\"] = \"doc:select-to-previous-word-start\",\n  [\"ctrl+shift+right\"] = \"doc:select-to-next-word-end\",\n  [\"ctrl+shift+[\"] = \"doc:select-to-previous-block-start\",\n  [\"ctrl+shift+]\"] = \"doc:select-to-next-block-end\",\n  [\"shift+home\"] = \"doc:select-to-start-of-line\",\n  [\"shift+end\"] = \"doc:select-to-end-of-line\",\n  [\"ctrl+shift+home\"] = \"doc:select-to-start-of-doc\",\n  [\"ctrl+shift+end\"] = \"doc:select-to-end-of-doc\",\n  [\"shift+pageup\"] = \"doc:select-to-previous-page\",\n  [\"shift+pagedown\"] = \"doc:select-to-next-page\",\n}\n\nreturn keymap\n"
  },
  {
    "path": "data/core/logview.lua",
    "content": "local core = require \"core\"\nlocal style = require \"core.style\"\nlocal View = require \"core.view\"\n\n\nlocal LogView = View:extend()\n\n\nfunction LogView:new()\n  LogView.super.new(self)\n  self.last_item = core.log_items[#core.log_items]\n  self.scrollable = true\n  self.yoffset = 0\nend\n\n\nfunction LogView:get_name()\n  return \"Log\"\nend\n\n\nfunction LogView:update()\n  local item = core.log_items[#core.log_items]\n  if self.last_item ~= item then\n    self.last_item = item\n    self.scroll.to.y = 0\n    self.yoffset = -(style.font:get_height() + style.padding.y)\n  end\n\n  self:move_towards(\"yoffset\", 0)\n\n  LogView.super.update(self)\nend\n\n\nlocal function draw_text_multiline(font, text, x, y, color)\n  local th = font:get_height()\n  local resx, resy = x, y\n  for line in text:gmatch(\"[^\\n]+\") do\n    resy = y\n    resx = renderer.draw_text(style.font, line, x, y, color)\n    y = y + th\n  end\n  return resx, resy\nend\n\n\nfunction LogView:draw()\n  self:draw_background(style.background)\n\n  local ox, oy = self:get_content_offset()\n  local th = style.font:get_height()\n  local y = oy + style.padding.y + self.yoffset\n\n  for i = #core.log_items, 1, -1 do\n    local x = ox + style.padding.x\n    local item = core.log_items[i]\n    local time = os.date(nil, item.time)\n    x = renderer.draw_text(style.font, time, x, y, style.dim)\n    x = x + style.padding.x\n    local subx = x\n    x, y = draw_text_multiline(style.font, item.text, x, y, style.text)\n    renderer.draw_text(style.font, \" at \" .. item.at, x, y, style.dim)\n    y = y + th\n    if item.info then\n      subx, y = draw_text_multiline(style.font, item.info, subx, y, style.dim)\n      y = y + th\n    end\n    y = y + style.padding.y\n  end\nend\n\n\nreturn LogView\n"
  },
  {
    "path": "data/core/object.lua",
    "content": "local Object = {}\nObject.__index = Object\n\n\nfunction Object:new()\nend\n\n\nfunction Object:extend()\n  local cls = {}\n  for k, v in pairs(self) do\n    if k:find(\"__\") == 1 then\n      cls[k] = v\n    end\n  end\n  cls.__index = cls\n  cls.super = self\n  setmetatable(cls, self)\n  return cls\nend\n\n\nfunction Object:implement(...)\n  for _, cls in pairs({...}) do\n    for k, v in pairs(cls) do\n      if self[k] == nil and type(v) == \"function\" then\n        self[k] = v\n      end\n    end\n  end\nend\n\n\nfunction Object:is(T)\n  local mt = getmetatable(self)\n  while mt do\n    if mt == T then\n      return true\n    end\n    mt = getmetatable(mt)\n  end\n  return false\nend\n\n\nfunction Object:__tostring()\n  return \"Object\"\nend\n\n\nfunction Object:__call(...)\n  local obj = setmetatable({}, self)\n  obj:new(...)\n  return obj\nend\n\n\nreturn Object\n"
  },
  {
    "path": "data/core/rootview.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal style = require \"core.style\"\nlocal keymap = require \"core.keymap\"\nlocal Object = require \"core.object\"\nlocal View = require \"core.view\"\nlocal DocView = require \"core.docview\"\n\n\nlocal EmptyView = View:extend()\n\nlocal function draw_text(x, y, color)\n  local th = style.big_font:get_height()\n  local dh = th + style.padding.y * 2\n  x = renderer.draw_text(style.big_font, \"lite\", x, y + (dh - th) / 2, color)\n  x = x + style.padding.x\n  renderer.draw_rect(x, y, math.ceil(1 * SCALE), dh, color)\n  local lines = {\n    { fmt = \"%s to run a command\", cmd = \"core:find-command\" },\n    { fmt = \"%s to open a file from the project\", cmd = \"core:find-file\" },\n  }\n  th = style.font:get_height()\n  y = y + (dh - th * 2 - style.padding.y) / 2\n  local w = 0\n  for _, line in ipairs(lines) do\n    local text = string.format(line.fmt, keymap.get_binding(line.cmd))\n    w = math.max(w, renderer.draw_text(style.font, text, x + style.padding.x, y, color))\n    y = y + th + style.padding.y\n  end\n  return w, dh\nend\n\nfunction EmptyView:draw()\n  self:draw_background(style.background)\n  local w, h = draw_text(0, 0, { 0, 0, 0, 0 })\n  local x = self.position.x + math.max(style.padding.x, (self.size.x - w) / 2)\n  local y = self.position.y + (self.size.y - h) / 2\n  draw_text(x, y, style.dim)\nend\n\n\n\nlocal Node = Object:extend()\n\nfunction Node:new(type)\n  self.type = type or \"leaf\"\n  self.position = { x = 0, y = 0 }\n  self.size = { x = 0, y = 0 }\n  self.views = {}\n  self.divider = 0.5\n  if self.type == \"leaf\" then\n    self:add_view(EmptyView())\n  end\nend\n\n\nfunction Node:propagate(fn, ...)\n  self.a[fn](self.a, ...)\n  self.b[fn](self.b, ...)\nend\n\n\nfunction Node:on_mouse_moved(x, y, ...)\n  self.hovered_tab = self:get_tab_overlapping_point(x, y)\n  if self.type == \"leaf\" then\n    self.active_view:on_mouse_moved(x, y, ...)\n  else\n    self:propagate(\"on_mouse_moved\", x, y, ...)\n  end\nend\n\n\nfunction Node:on_mouse_released(...)\n  if self.type == \"leaf\" then\n    self.active_view:on_mouse_released(...)\n  else\n    self:propagate(\"on_mouse_released\", ...)\n  end\nend\n\n\nfunction Node:consume(node)\n  for k, _ in pairs(self) do self[k] = nil end\n  for k, v in pairs(node) do self[k] = v   end\nend\n\n\nlocal type_map = { up=\"vsplit\", down=\"vsplit\", left=\"hsplit\", right=\"hsplit\" }\n\nfunction Node:split(dir, view, locked)\n  assert(self.type == \"leaf\", \"Tried to split non-leaf node\")\n  local type = assert(type_map[dir], \"Invalid direction\")\n  local last_active = core.active_view\n  local child = Node()\n  child:consume(self)\n  self:consume(Node(type))\n  self.a = child\n  self.b = Node()\n  if view then self.b:add_view(view) end\n  if locked then\n    self.b.locked = locked\n    core.set_active_view(last_active)\n  end\n  if dir == \"up\" or dir == \"left\" then\n    self.a, self.b = self.b, self.a\n  end\n  return child\nend\n\n\nfunction Node:close_active_view(root)\n  local do_close = function()\n    if #self.views > 1 then\n      local idx = self:get_view_idx(self.active_view)\n      table.remove(self.views, idx)\n      self:set_active_view(self.views[idx] or self.views[#self.views])\n    else\n      local parent = self:get_parent_node(root)\n      local is_a = (parent.a == self)\n      local other = parent[is_a and \"b\" or \"a\"]\n      if other:get_locked_size() then\n        self.views = {}\n        self:add_view(EmptyView())\n      else\n        parent:consume(other)\n        local p = parent\n        while p.type ~= \"leaf\" do\n          p = p[is_a and \"a\" or \"b\"]\n        end\n        p:set_active_view(p.active_view)\n      end\n    end\n    core.last_active_view = nil\n  end\n  self.active_view:try_close(do_close)\nend\n\n\nfunction Node:add_view(view)\n  assert(self.type == \"leaf\", \"Tried to add view to non-leaf node\")\n  assert(not self.locked, \"Tried to add view to locked node\")\n  if self.views[1] and self.views[1]:is(EmptyView) then\n    table.remove(self.views)\n  end\n  table.insert(self.views, view)\n  self:set_active_view(view)\nend\n\n\nfunction Node:set_active_view(view)\n  assert(self.type == \"leaf\", \"Tried to set active view on non-leaf node\")\n  self.active_view = view\n  core.set_active_view(view)\nend\n\n\nfunction Node:get_view_idx(view)\n  for i, v in ipairs(self.views) do\n    if v == view then return i end\n  end\nend\n\n\nfunction Node:get_node_for_view(view)\n  for _, v in ipairs(self.views) do\n    if v == view then return self end\n  end\n  if self.type ~= \"leaf\" then\n    return self.a:get_node_for_view(view) or self.b:get_node_for_view(view)\n  end\nend\n\n\nfunction Node:get_parent_node(root)\n  if root.a == self or root.b == self then\n    return root\n  elseif root.type ~= \"leaf\" then\n    return self:get_parent_node(root.a) or self:get_parent_node(root.b)\n  end\nend\n\n\nfunction Node:get_children(t)\n  t = t or {}\n  for _, view in ipairs(self.views) do\n    table.insert(t, view)\n  end\n  if self.a then self.a:get_children(t) end\n  if self.b then self.b:get_children(t) end\n  return t\nend\n\n\nfunction Node:get_divider_overlapping_point(px, py)\n  if self.type ~= \"leaf\" then\n    local p = 6\n    local x, y, w, h = self:get_divider_rect()\n    x, y = x - p, y - p\n    w, h = w + p * 2, h + p * 2\n    if px > x and py > y and px < x + w and py < y + h then\n      return self\n    end\n    return self.a:get_divider_overlapping_point(px, py)\n        or self.b:get_divider_overlapping_point(px, py)\n  end\nend\n\n\nfunction Node:get_tab_overlapping_point(px, py)\n  if #self.views == 1 then return nil end\n  local x, y, w, h = self:get_tab_rect(1)\n  if px >= x and py >= y and px < x + w * #self.views and py < y + h then\n    return math.floor((px - x) / w) + 1\n  end\nend\n\n\nfunction Node:get_child_overlapping_point(x, y)\n  local child\n  if self.type == \"leaf\" then\n    return self\n  elseif self.type == \"hsplit\" then\n    child = (x < self.b.position.x) and self.a or self.b\n  elseif self.type == \"vsplit\" then\n    child = (y < self.b.position.y) and self.a or self.b\n  end\n  return child:get_child_overlapping_point(x, y)\nend\n\n\nfunction Node:get_tab_rect(idx)\n  local tw = math.min(style.tab_width, math.ceil(self.size.x / #self.views))\n  local h = style.font:get_height() + style.padding.y * 2\n  return self.position.x + (idx-1) * tw, self.position.y, tw, h\nend\n\n\nfunction Node:get_divider_rect()\n  local x, y = self.position.x, self.position.y\n  if self.type == \"hsplit\" then\n    return x + self.a.size.x, y, style.divider_size, self.size.y\n  elseif self.type == \"vsplit\" then\n    return x, y + self.a.size.y, self.size.x, style.divider_size\n  end\nend\n\n\nfunction Node:get_locked_size()\n  if self.type == \"leaf\" then\n    if self.locked then\n      local size = self.active_view.size\n      return size.x, size.y\n    end\n  else\n    local x1, y1 = self.a:get_locked_size()\n    local x2, y2 = self.b:get_locked_size()\n    if x1 and x2 then\n      local dsx = (x1 < 1 or x2 < 1) and 0 or style.divider_size\n      local dsy = (y1 < 1 or y2 < 1) and 0 or style.divider_size\n      return x1 + x2 + dsx, y1 + y2 + dsy\n    end\n  end\nend\n\n\nlocal function copy_position_and_size(dst, src)\n  dst.position.x, dst.position.y = src.position.x, src.position.y\n  dst.size.x, dst.size.y = src.size.x, src.size.y\nend\n\n\n-- calculating the sizes is the same for hsplits and vsplits, except the x/y\n-- axis are swapped; this function lets us use the same code for both\nlocal function calc_split_sizes(self, x, y, x1, x2)\n  local n\n  local ds = (x1 and x1 < 1 or x2 and x2 < 1) and 0 or style.divider_size\n  if x1 then\n    n = x1 + ds\n  elseif x2 then\n    n = self.size[x] - x2\n  else\n    n = math.floor(self.size[x] * self.divider)\n  end\n  self.a.position[x] = self.position[x]\n  self.a.position[y] = self.position[y]\n  self.a.size[x] = n - ds\n  self.a.size[y] = self.size[y]\n  self.b.position[x] = self.position[x] + n\n  self.b.position[y] = self.position[y]\n  self.b.size[x] = self.size[x] - n\n  self.b.size[y] = self.size[y]\nend\n\n\nfunction Node:update_layout()\n  if self.type == \"leaf\" then\n    local av = self.active_view\n    if #self.views > 1 then\n      local _, _, _, th = self:get_tab_rect(1)\n      av.position.x, av.position.y = self.position.x, self.position.y + th\n      av.size.x, av.size.y = self.size.x, self.size.y - th\n    else\n      copy_position_and_size(av, self)\n    end\n  else\n    local x1, y1 = self.a:get_locked_size()\n    local x2, y2 = self.b:get_locked_size()\n    if self.type == \"hsplit\" then\n      calc_split_sizes(self, \"x\", \"y\", x1, x2)\n    elseif self.type == \"vsplit\" then\n      calc_split_sizes(self, \"y\", \"x\", y1, y2)\n    end\n    self.a:update_layout()\n    self.b:update_layout()\n  end\nend\n\n\nfunction Node:update()\n  if self.type == \"leaf\" then\n    for _, view in ipairs(self.views) do\n      view:update()\n    end\n  else\n    self.a:update()\n    self.b:update()\n  end\nend\n\n\nfunction Node:draw_tabs()\n  local x, y, _, h = self:get_tab_rect(1)\n  local ds = style.divider_size\n  core.push_clip_rect(x, y, self.size.x, h)\n  renderer.draw_rect(x, y, self.size.x, h, style.background2)\n  renderer.draw_rect(x, y + h - ds, self.size.x, ds, style.divider)\n\n  for i, view in ipairs(self.views) do\n    local x, y, w, h = self:get_tab_rect(i)\n    local text = view:get_name()\n    local color = style.dim\n    if view == self.active_view then\n      color = style.text\n      renderer.draw_rect(x, y, w, h, style.background)\n      renderer.draw_rect(x + w, y, ds, h, style.divider)\n      renderer.draw_rect(x - ds, y, ds, h, style.divider)\n    end\n    if i == self.hovered_tab then\n      color = style.text\n    end\n    core.push_clip_rect(x, y, w, h)\n    x, w = x + style.padding.x, w - style.padding.x * 2\n    local align = style.font:get_width(text) > w and \"left\" or \"center\"\n    common.draw_text(style.font, color, text, align, x, y, w, h)\n    core.pop_clip_rect()\n  end\n\n  core.pop_clip_rect()\nend\n\n\nfunction Node:draw()\n  if self.type == \"leaf\" then\n    if #self.views > 1 then\n      self:draw_tabs()\n    end\n    local pos, size = self.active_view.position, self.active_view.size\n    core.push_clip_rect(pos.x, pos.y, size.x + pos.x % 1, size.y + pos.y % 1)\n    self.active_view:draw()\n    core.pop_clip_rect()\n  else\n    local x, y, w, h = self:get_divider_rect()\n    renderer.draw_rect(x, y, w, h, style.divider)\n    self:propagate(\"draw\")\n  end\nend\n\n\n\nlocal RootView = View:extend()\n\nfunction RootView:new()\n  RootView.super.new(self)\n  self.root_node = Node()\n  self.deferred_draws = {}\n  self.mouse = { x = 0, y = 0 }\nend\n\n\nfunction RootView:defer_draw(fn, ...)\n  table.insert(self.deferred_draws, 1, { fn = fn, ... })\nend\n\n\nfunction RootView:get_active_node()\n  return self.root_node:get_node_for_view(core.active_view)\nend\n\n\nfunction RootView:open_doc(doc)\n  local node = self:get_active_node()\n  if node.locked and core.last_active_view then\n    core.set_active_view(core.last_active_view)\n    node = self:get_active_node()\n  end\n  assert(not node.locked, \"Cannot open doc on locked node\")\n  for i, view in ipairs(node.views) do\n    if view.doc == doc then\n      node:set_active_view(node.views[i])\n      return view\n    end\n  end\n  local view = DocView(doc)\n  node:add_view(view)\n  self.root_node:update_layout()\n  view:scroll_to_line(view.doc:get_selection(), true, true)\n  return view\nend\n\n\nfunction RootView:on_mouse_pressed(button, x, y, clicks)\n  local div = self.root_node:get_divider_overlapping_point(x, y)\n  if div then\n    self.dragged_divider = div\n    return\n  end\n  local node = self.root_node:get_child_overlapping_point(x, y)\n  local idx = node:get_tab_overlapping_point(x, y)\n  if idx then\n    node:set_active_view(node.views[idx])\n    if button == \"middle\" then\n      node:close_active_view(self.root_node)\n    end\n  else\n    core.set_active_view(node.active_view)\n    node.active_view:on_mouse_pressed(button, x, y, clicks)\n  end\nend\n\n\nfunction RootView:on_mouse_released(...)\n  if self.dragged_divider then\n    self.dragged_divider = nil\n  end\n  self.root_node:on_mouse_released(...)\nend\n\n\nfunction RootView:on_mouse_moved(x, y, dx, dy)\n  if self.dragged_divider then\n    local node = self.dragged_divider\n    if node.type == \"hsplit\" then\n      node.divider = node.divider + dx / node.size.x\n    else\n      node.divider = node.divider + dy / node.size.y\n    end\n    node.divider = common.clamp(node.divider, 0.01, 0.99)\n    return\n  end\n\n  self.mouse.x, self.mouse.y = x, y\n  self.root_node:on_mouse_moved(x, y, dx, dy)\n\n  local node = self.root_node:get_child_overlapping_point(x, y)\n  local div = self.root_node:get_divider_overlapping_point(x, y)\n  if div then\n    system.set_cursor(div.type == \"hsplit\" and \"sizeh\" or \"sizev\")\n  elseif node:get_tab_overlapping_point(x, y) then\n    system.set_cursor(\"arrow\")\n  else\n    system.set_cursor(node.active_view.cursor)\n  end\nend\n\n\nfunction RootView:on_mouse_wheel(...)\n  local x, y = self.mouse.x, self.mouse.y\n  local node = self.root_node:get_child_overlapping_point(x, y)\n  node.active_view:on_mouse_wheel(...)\nend\n\n\nfunction RootView:on_text_input(...)\n  core.active_view:on_text_input(...)\nend\n\n\nfunction RootView:update()\n  copy_position_and_size(self.root_node, self)\n  self.root_node:update()\n  self.root_node:update_layout()\nend\n\n\nfunction RootView:draw()\n  self.root_node:draw()\n  while #self.deferred_draws > 0 do\n    local t = table.remove(self.deferred_draws)\n    t.fn(table.unpack(t))\n  end\nend\n\n\nreturn RootView\n"
  },
  {
    "path": "data/core/statusview.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal command = require \"core.command\"\nlocal config = require \"core.config\"\nlocal style = require \"core.style\"\nlocal DocView = require \"core.docview\"\nlocal LogView = require \"core.logview\"\nlocal View = require \"core.view\"\n\n\nlocal StatusView = View:extend()\n\nStatusView.separator  = \"      \"\nStatusView.separator2 = \"   |   \"\n\n\nfunction StatusView:new()\n  StatusView.super.new(self)\n  self.message_timeout = 0\n  self.message = {}\nend\n\n\nfunction StatusView:on_mouse_pressed()\n  core.set_active_view(core.last_active_view)\n  if system.get_time() < self.message_timeout\n  and not core.active_view:is(LogView) then\n    command.perform \"core:open-log\"\n  end\nend\n\n\nfunction StatusView:show_message(icon, icon_color, text)\n  self.message = {\n    icon_color, style.icon_font, icon,\n    style.dim, style.font, StatusView.separator2, style.text, text\n  }\n  self.message_timeout = system.get_time() + config.message_timeout\nend\n\n\nfunction StatusView:update()\n  self.size.y = style.font:get_height() + style.padding.y * 2\n\n  if system.get_time() < self.message_timeout then\n    self.scroll.to.y = self.size.y\n  else\n    self.scroll.to.y = 0\n  end\n\n  StatusView.super.update(self)\nend\n\n\nlocal function draw_items(self, items, x, y, draw_fn)\n  local font = style.font\n  local color = style.text\n\n  for _, item in ipairs(items) do\n    if type(item) == \"userdata\" then\n      font = item\n    elseif type(item) == \"table\" then\n      color = item\n    else\n      x = draw_fn(font, color, item, nil, x, y, 0, self.size.y)\n    end\n  end\n\n  return x\nend\n\n\nlocal function text_width(font, _, text, _, x)\n  return x + font:get_width(text)\nend\n\n\nfunction StatusView:draw_items(items, right_align, yoffset)\n  local x, y = self:get_content_offset()\n  y = y + (yoffset or 0)\n  if right_align then\n    local w = draw_items(self, items, 0, 0, text_width)\n    x = x + self.size.x - w - style.padding.x\n    draw_items(self, items, x, y, common.draw_text)\n  else\n    x = x + style.padding.x\n    draw_items(self, items, x, y, common.draw_text)\n  end\nend\n\n\nfunction StatusView:get_items()\n  if getmetatable(core.active_view) == DocView then\n    local dv = core.active_view\n    local line, col = dv.doc:get_selection()\n    local dirty = dv.doc:is_dirty()\n\n    return {\n      dirty and style.accent or style.text, style.icon_font, \"f\",\n      style.dim, style.font, self.separator2, style.text,\n      dv.doc.filename and style.text or style.dim, dv.doc:get_name(),\n      style.text,\n      self.separator,\n      \"line: \", line,\n      self.separator,\n      col > config.line_limit and style.accent or style.text, \"col: \", col,\n      style.text,\n      self.separator,\n      string.format(\"%d%%\", line / #dv.doc.lines * 100),\n    }, {\n      style.icon_font, \"g\",\n      style.font, style.dim, self.separator2, style.text,\n      #dv.doc.lines, \" lines\",\n      self.separator,\n      dv.doc.crlf and \"CRLF\" or \"LF\"\n    }\n  end\n\n  return {}, {\n    style.icon_font, \"g\",\n    style.font, style.dim, self.separator2,\n    #core.docs, style.text, \" / \",\n    #core.project_files, \" files\"\n  }\nend\n\n\nfunction StatusView:draw()\n  self:draw_background(style.background2)\n\n  if self.message then\n    self:draw_items(self.message, false, self.size.y)\n  end\n\n  local left, right = self:get_items()\n  self:draw_items(left)\n  self:draw_items(right, true)\nend\n\n\nreturn StatusView\n"
  },
  {
    "path": "data/core/strict.lua",
    "content": "local strict = {}\nstrict.defined = {}\n\n\n-- used to define a global variable\nfunction global(t)\n  for k, v in pairs(t) do\n    strict.defined[k] = true\n    rawset(_G, k, v)\n  end\nend\n\n\nfunction strict.__newindex(t, k, v)\n  error(\"cannot set undefined variable: \" .. k, 2)\nend\n\n\nfunction strict.__index(t, k)\n  if not strict.defined[k] then\n    error(\"cannot get undefined variable: \" .. k, 2)\n  end\nend\n\n\nsetmetatable(_G, strict)\n"
  },
  {
    "path": "data/core/style.lua",
    "content": "local common = require \"core.common\"\nlocal style = {}\n\nstyle.padding = { x = common.round(14 * SCALE), y = common.round(7 * SCALE) }\nstyle.divider_size = common.round(1 * SCALE)\nstyle.scrollbar_size = common.round(4 * SCALE)\nstyle.caret_width = common.round(2 * SCALE)\nstyle.tab_width = common.round(170 * SCALE)\n\nstyle.font = renderer.font.load(EXEDIR .. \"/data/fonts/font.ttf\", 14 * SCALE)\nstyle.big_font = renderer.font.load(EXEDIR .. \"/data/fonts/font.ttf\", 34 * SCALE)\nstyle.icon_font = renderer.font.load(EXEDIR .. \"/data/fonts/icons.ttf\", 14 * SCALE)\nstyle.code_font = renderer.font.load(EXEDIR .. \"/data/fonts/monospace.ttf\", 13.5 * SCALE)\n\nstyle.background = { common.color \"#2e2e32\" }\nstyle.background2 = { common.color \"#252529\" }\nstyle.background3 = { common.color \"#252529\" }\nstyle.text = { common.color \"#97979c\" }\nstyle.caret = { common.color \"#93DDFA\" }\nstyle.accent = { common.color \"#e1e1e6\" }\nstyle.dim = { common.color \"#525257\" }\nstyle.divider = { common.color \"#202024\" }\nstyle.selection = { common.color \"#48484f\" }\nstyle.line_number = { common.color \"#525259\" }\nstyle.line_number2 = { common.color \"#83838f\" }\nstyle.line_highlight = { common.color \"#343438\" }\nstyle.scrollbar = { common.color \"#414146\" }\nstyle.scrollbar2 = { common.color \"#4b4b52\" }\n\nstyle.syntax = {}\nstyle.syntax[\"normal\"] = { common.color \"#e1e1e6\" }\nstyle.syntax[\"symbol\"] = { common.color \"#e1e1e6\" }\nstyle.syntax[\"comment\"] = { common.color \"#676b6f\" }\nstyle.syntax[\"keyword\"] = { common.color \"#E58AC9\" }\nstyle.syntax[\"keyword2\"] = { common.color \"#F77483\" }\nstyle.syntax[\"number\"] = { common.color \"#FFA94D\" }\nstyle.syntax[\"literal\"] = { common.color \"#FFA94D\" }\nstyle.syntax[\"string\"] = { common.color \"#f7c95c\" }\nstyle.syntax[\"operator\"] = { common.color \"#93DDFA\" }\nstyle.syntax[\"function\"] = { common.color \"#93DDFA\" }\n\nreturn style\n"
  },
  {
    "path": "data/core/syntax.lua",
    "content": "local common = require \"core.common\"\n\nlocal syntax = {}\nsyntax.items = {}\n\nlocal plain_text_syntax = { patterns = {}, symbols = {} }\n\n\nfunction syntax.add(t)\n  table.insert(syntax.items, t)\nend\n\n\nlocal function find(string, field)\n  for i = #syntax.items, 1, -1 do\n    local t = syntax.items[i]\n    if common.match_pattern(string, t[field] or {}) then\n      return t\n    end\n  end\nend\n\nfunction syntax.get(filename, header)\n  return find(filename, \"files\")\n      or find(header, \"headers\")\n      or plain_text_syntax\nend\n\n\nreturn syntax\n"
  },
  {
    "path": "data/core/tokenizer.lua",
    "content": "local tokenizer = {}\n\n\nlocal function push_token(t, type, text)\n  local prev_type = t[#t-1]\n  local prev_text = t[#t]\n  if prev_type and (prev_type == type or prev_text:find(\"^%s*$\")) then\n    t[#t-1] = type\n    t[#t] = prev_text .. text\n  else\n    table.insert(t, type)\n    table.insert(t, text)\n  end\nend\n\n\nlocal function is_escaped(text, idx, esc)\n  local byte = esc:byte()\n  local count = 0\n  for i = idx - 1, 1, -1 do\n    if text:byte(i) ~= byte then break end\n    count = count + 1\n  end\n  return count % 2 == 1\nend\n\n\nlocal function find_non_escaped(text, pattern, offset, esc)\n  while true do\n    local s, e = text:find(pattern, offset)\n    if not s then break end\n    if esc and is_escaped(text, s, esc) then\n      offset = e + 1\n    else\n      return s, e\n    end\n  end\nend\n\n\nfunction tokenizer.tokenize(syntax, text, state)\n  local res = {}\n  local i = 1\n\n  if #syntax.patterns == 0 then\n    return { \"normal\", text }\n  end\n\n  while i <= #text do\n    -- continue trying to match the end pattern of a pair if we have a state set\n    if state then\n      local p = syntax.patterns[state]\n      local s, e = find_non_escaped(text, p.pattern[2], i, p.pattern[3])\n\n      if s then\n        push_token(res, p.type, text:sub(i, e))\n        state = nil\n        i = e + 1\n      else\n        push_token(res, p.type, text:sub(i))\n        break\n      end\n    end\n\n    -- find matching pattern\n    local matched = false\n    for n, p in ipairs(syntax.patterns) do\n      local pattern = (type(p.pattern) == \"table\") and p.pattern[1] or p.pattern\n      local s, e = text:find(\"^\" .. pattern, i)\n\n      if s then\n        -- matched pattern; make and add token\n        local t = text:sub(s, e)\n        push_token(res, syntax.symbols[t] or p.type, t)\n\n        -- update state if this was a start|end pattern pair\n        if type(p.pattern) == \"table\" then\n          state = n\n        end\n\n        -- move cursor past this token\n        i = e + 1\n        matched = true\n        break\n      end\n    end\n\n    -- consume character if we didn't match\n    if not matched then\n      push_token(res, \"normal\", text:sub(i, i))\n      i = i + 1\n    end\n  end\n\n  return res, state\nend\n\n\nlocal function iter(t, i)\n  i = i + 2\n  local type, text = t[i], t[i+1]\n  if type then\n    return i, type, text\n  end\nend\n\nfunction tokenizer.each_token(t)\n  return iter, t, -1\nend\n\n\nreturn tokenizer\n"
  },
  {
    "path": "data/core/view.lua",
    "content": "local core = require \"core\"\nlocal config = require \"core.config\"\nlocal style = require \"core.style\"\nlocal common = require \"core.common\"\nlocal Object = require \"core.object\"\n\n\nlocal View = Object:extend()\n\n\nfunction View:new()\n  self.position = { x = 0, y = 0 }\n  self.size = { x = 0, y = 0 }\n  self.scroll = { x = 0, y = 0, to = { x = 0, y = 0 } }\n  self.cursor = \"arrow\"\n  self.scrollable = false\nend\n\n\nfunction View:move_towards(t, k, dest, rate)\n  if type(t) ~= \"table\" then\n    return self:move_towards(self, t, k, dest, rate)\n  end\n  local val = t[k]\n  if math.abs(val - dest) < 0.5 then\n    t[k] = dest\n  else\n    t[k] = common.lerp(val, dest, rate or 0.5)\n  end\n  if val ~= dest then\n    core.redraw = true\n  end\nend\n\n\nfunction View:try_close(do_close)\n  do_close()\nend\n\n\nfunction View:get_name()\n  return \"---\"\nend\n\n\nfunction View:get_scrollable_size()\n  return math.huge\nend\n\n\nfunction View:get_scrollbar_rect()\n  local sz = self:get_scrollable_size()\n  if sz <= self.size.y or sz == math.huge then\n    return 0, 0, 0, 0\n  end\n  local h = math.max(20, self.size.y * self.size.y / sz)\n  return\n    self.position.x + self.size.x - style.scrollbar_size,\n    self.position.y + self.scroll.y * (self.size.y - h) / (sz - self.size.y),\n    style.scrollbar_size,\n    h\nend\n\n\nfunction View:scrollbar_overlaps_point(x, y)\n  local sx, sy, sw, sh = self:get_scrollbar_rect()\n  return x >= sx - sw * 3 and x < sx + sw and y >= sy and y < sy + sh\nend\n\n\nfunction View:on_mouse_pressed(button, x, y, clicks)\n  if self:scrollbar_overlaps_point(x, y) then\n    self.dragging_scrollbar = true\n    return true\n  end\nend\n\n\nfunction View:on_mouse_released(button, x, y)\n  self.dragging_scrollbar = false\nend\n\n\nfunction View:on_mouse_moved(x, y, dx, dy)\n  if self.dragging_scrollbar then\n    local delta = self:get_scrollable_size() / self.size.y * dy\n    self.scroll.to.y = self.scroll.to.y + delta\n  end\n  self.hovered_scrollbar = self:scrollbar_overlaps_point(x, y)\nend\n\n\nfunction View:on_text_input(text)\n  -- no-op\nend\n\n\nfunction View:on_mouse_wheel(y)\n  if self.scrollable then\n    self.scroll.to.y = self.scroll.to.y + y * -config.mouse_wheel_scroll\n  end\nend\n\n\nfunction View:get_content_bounds()\n  local x = self.scroll.x\n  local y = self.scroll.y\n  return x, y, x + self.size.x, y + self.size.y\nend\n\n\nfunction View:get_content_offset()\n  local x = common.round(self.position.x - self.scroll.x)\n  local y = common.round(self.position.y - self.scroll.y)\n  return x, y\nend\n\n\nfunction View:clamp_scroll_position()\n  local max = self:get_scrollable_size() - self.size.y\n  self.scroll.to.y = common.clamp(self.scroll.to.y, 0, max)\nend\n\n\nfunction View:update()\n  self:clamp_scroll_position()\n  self:move_towards(self.scroll, \"x\", self.scroll.to.x, 0.3)\n  self:move_towards(self.scroll, \"y\", self.scroll.to.y, 0.3)\nend\n\n\nfunction View:draw_background(color)\n  local x, y = self.position.x, self.position.y\n  local w, h = self.size.x, self.size.y\n  renderer.draw_rect(x, y, w + x % 1, h + y % 1, color)\nend\n\n\nfunction View:draw_scrollbar()\n  local x, y, w, h = self:get_scrollbar_rect()\n  local highlight = self.hovered_scrollbar or self.dragging_scrollbar\n  local color = highlight and style.scrollbar2 or style.scrollbar\n  renderer.draw_rect(x, y, w, h, color)\nend\n\n\nfunction View:draw()\nend\n\n\nreturn View\n"
  },
  {
    "path": "data/plugins/autocomplete.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal config = require \"core.config\"\nlocal command = require \"core.command\"\nlocal style = require \"core.style\"\nlocal keymap = require \"core.keymap\"\nlocal translate = require \"core.doc.translate\"\nlocal RootView = require \"core.rootview\"\nlocal DocView = require \"core.docview\"\n\nconfig.autocomplete_max_suggestions = 6\n\nlocal autocomplete = {}\nautocomplete.map = {}\n\n\nlocal mt = { __tostring = function(t) return t.text end }\n\nfunction autocomplete.add(t)\n  local items = {}\n  for text, info in pairs(t.items) do\n    info = (type(info) == \"string\") and info\n    table.insert(items, setmetatable({ text = text, info = info }, mt))\n  end\n  autocomplete.map[t.name] =  { files = t.files or \".*\", items = items }\nend\n\n\ncore.add_thread(function()\n  local cache = setmetatable({}, { __mode = \"k\" })\n\n  local function get_symbols(doc)\n    local i = 1\n    local s = {}\n    while i < #doc.lines do\n      for sym in doc.lines[i]:gmatch(config.symbol_pattern) do\n        s[sym] = true\n      end\n      i = i + 1\n      if i % 100 == 0 then coroutine.yield() end\n    end\n    return s\n  end\n\n  local function cache_is_valid(doc)\n    local c = cache[doc]\n    return c and c.last_change_id == doc:get_change_id()\n  end\n\n  while true do\n    local symbols = {}\n\n    -- lift all symbols from all docs\n    for _, doc in ipairs(core.docs) do\n      -- update the cache if the doc has changed since the last iteration\n      if not cache_is_valid(doc) then\n        cache[doc] = {\n          last_change_id = doc:get_change_id(),\n          symbols = get_symbols(doc)\n        }\n      end\n      -- update symbol set with doc's symbol set\n      for sym in pairs(cache[doc].symbols) do\n        symbols[sym] = true\n      end\n      coroutine.yield()\n    end\n\n    -- update symbols list\n    autocomplete.add { name = \"open-docs\", items = symbols }\n\n    -- wait for next scan\n    local valid = true\n    while valid do\n      coroutine.yield(1)\n      for _, doc in ipairs(core.docs) do\n        if not cache_is_valid(doc) then\n          valid = false\n        end\n      end\n    end\n\n  end\nend)\n\n\nlocal partial = \"\"\nlocal suggestions_idx = 1\nlocal suggestions = {}\nlocal last_line, last_col\n\n\nlocal function reset_suggestions()\n  suggestions_idx = 1\n  suggestions = {}\nend\n\n\nlocal function update_suggestions()\n  local doc = core.active_view.doc\n  local filename = doc and doc.filename or \"\"\n\n  -- get all relevant suggestions for given filename\n  local items = {}\n  for _, v in pairs(autocomplete.map) do\n    if common.match_pattern(filename, v.files) then\n      for _, item in pairs(v.items) do\n        table.insert(items, item)\n      end\n    end\n  end\n\n  -- fuzzy match, remove duplicates and store\n  items = common.fuzzy_match(items, partial)\n  local j = 1\n  for i = 1, config.autocomplete_max_suggestions do\n    suggestions[i] = items[j]\n    while items[j] and items[i].text == items[j].text do\n      items[i].info = items[i].info or items[j].info\n      j = j + 1\n    end\n  end\nend\n\n\nlocal function get_partial_symbol()\n  local doc = core.active_view.doc\n  local line2, col2 = doc:get_selection()\n  local line1, col1 = doc:position_offset(line2, col2, translate.start_of_word)\n  return doc:get_text(line1, col1, line2, col2)\nend\n\n\nlocal function get_active_view()\n  if getmetatable(core.active_view) == DocView then\n    return core.active_view\n  end\nend\n\n\nlocal function get_suggestions_rect(av)\n  if #suggestions == 0 then\n    return 0, 0, 0, 0\n  end\n\n  local line, col = av.doc:get_selection()\n  local x, y = av:get_line_screen_position(line)\n  x = x + av:get_col_x_offset(line, col - #partial)\n  y = y + av:get_line_height() + style.padding.y\n  local font = av:get_font()\n  local th = font:get_height()\n\n  local max_width = 0\n  for _, s in ipairs(suggestions) do\n    local w = font:get_width(s.text)\n    if s.info then\n      w = w + style.font:get_width(s.info) + style.padding.x\n    end\n    max_width = math.max(max_width, w)\n  end\n\n  return\n    x - style.padding.x,\n    y - style.padding.y,\n    max_width + style.padding.x * 2,\n    #suggestions * (th + style.padding.y) + style.padding.y\nend\n\n\nlocal function draw_suggestions_box(av)\n  -- draw background rect\n  local rx, ry, rw, rh = get_suggestions_rect(av)\n  renderer.draw_rect(rx, ry, rw, rh, style.background3)\n\n  -- draw text\n  local font = av:get_font()\n  local lh = font:get_height() + style.padding.y\n  local y = ry + style.padding.y / 2\n  for i, s in ipairs(suggestions) do\n    local color = (i == suggestions_idx) and style.accent or style.text\n    common.draw_text(font, color, s.text, \"left\", rx + style.padding.x, y, rw, lh)\n    if s.info then\n      color = (i == suggestions_idx) and style.text or style.dim\n      common.draw_text(style.font, color, s.info, \"right\", rx, y, rw - style.padding.x, lh)\n    end\n    y = y + lh\n  end\nend\n\n\n-- patch event logic into RootView\nlocal on_text_input = RootView.on_text_input\nlocal update = RootView.update\nlocal draw = RootView.draw\n\n\nRootView.on_text_input = function(...)\n  on_text_input(...)\n\n  local av = get_active_view()\n  if av then\n    -- update partial symbol and suggestions\n    partial = get_partial_symbol()\n    if #partial >= 3 then\n      update_suggestions()\n      last_line, last_col = av.doc:get_selection()\n    else\n      reset_suggestions()\n    end\n\n    -- scroll if rect is out of bounds of view\n    local _, y, _, h = get_suggestions_rect(av)\n    local limit = av.position.y + av.size.y\n    if y + h > limit then\n      av.scroll.to.y = av.scroll.y + y + h - limit\n    end\n  end\nend\n\n\nRootView.update = function(...)\n  update(...)\n\n  local av = get_active_view()\n  if av then\n    -- reset suggestions if caret was moved\n    local line, col = av.doc:get_selection()\n    if line ~= last_line or col ~= last_col then\n      reset_suggestions()\n    end\n  end\nend\n\n\nRootView.draw = function(...)\n  draw(...)\n\n  local av = get_active_view()\n  if av then\n    -- draw suggestions box after everything else\n    core.root_view:defer_draw(draw_suggestions_box, av)\n  end\nend\n\n\nlocal function predicate()\n  return get_active_view() and #suggestions > 0\nend\n\n\ncommand.add(predicate, {\n  [\"autocomplete:complete\"] = function()\n    local doc = core.active_view.doc\n    local line, col = doc:get_selection()\n    local text = suggestions[suggestions_idx].text\n    doc:insert(line, col, text)\n    doc:remove(line, col, line, col - #partial)\n    doc:set_selection(line, col + #text - #partial)\n    reset_suggestions()\n  end,\n\n  [\"autocomplete:previous\"] = function()\n    suggestions_idx = math.max(suggestions_idx - 1, 1)\n  end,\n\n  [\"autocomplete:next\"] = function()\n    suggestions_idx = math.min(suggestions_idx + 1, #suggestions)\n  end,\n\n  [\"autocomplete:cancel\"] = function()\n    reset_suggestions()\n  end,\n})\n\n\nkeymap.add {\n  [\"tab\"]    = \"autocomplete:complete\",\n  [\"up\"]     = \"autocomplete:previous\",\n  [\"down\"]   = \"autocomplete:next\",\n  [\"escape\"] = \"autocomplete:cancel\",\n}\n\n\nreturn autocomplete\n"
  },
  {
    "path": "data/plugins/autoreload.lua",
    "content": "local core = require \"core\"\nlocal config = require \"core.config\"\nlocal Doc = require \"core.doc\"\n\n\nlocal times = setmetatable({}, { __mode = \"k\" })\n\nlocal function update_time(doc)\n  local info = system.get_file_info(doc.filename)\n  times[doc] = info.modified\nend\n\n\nlocal function reload_doc(doc)\n  local fp = io.open(doc.filename, \"r\")\n  local text = fp:read(\"*a\")\n  fp:close()\n\n  local sel = { doc:get_selection() }\n  doc:remove(1, 1, math.huge, math.huge)\n  doc:insert(1, 1, text:gsub(\"\\r\", \"\"):gsub(\"\\n$\", \"\"))\n  doc:set_selection(table.unpack(sel))\n\n  update_time(doc)\n  doc:clean()\n  core.log_quiet(\"Auto-reloaded doc \\\"%s\\\"\", doc.filename)\nend\n\n\ncore.add_thread(function()\n  while true do\n    -- check all doc modified times\n    for _, doc in ipairs(core.docs) do\n      local info = system.get_file_info(doc.filename or \"\")\n      if info and times[doc] ~= info.modified then\n        reload_doc(doc)\n      end\n      coroutine.yield()\n    end\n\n    -- wait for next scan\n    coroutine.yield(config.project_scan_rate)\n  end\nend)\n\n\n-- patch `Doc.save|load` to store modified time\nlocal load = Doc.load\nlocal save = Doc.save\n\nDoc.load = function(self, ...)\n  local res = load(self, ...)\n  update_time(self)\n  return res\nend\n\nDoc.save = function(self, ...)\n  local res = save(self, ...)\n  update_time(self)\n  return res\nend\n"
  },
  {
    "path": "data/plugins/language_c.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.c$\", \"%.h$\", \"%.inl$\", \"%.cpp$\", \"%.hpp$\" },\n  comment = \"//\",\n  patterns = {\n    { pattern = \"//.-\\n\",               type = \"comment\"  },\n    { pattern = { \"/%*\", \"%*/\" },       type = \"comment\"  },\n    { pattern = { \"#\", \"[^\\\\]\\n\" },     type = \"comment\"  },\n    { pattern = { '\"', '\"', '\\\\' },     type = \"string\"   },\n    { pattern = { \"'\", \"'\", '\\\\' },     type = \"string\"   },\n    { pattern = \"-?0x%x+\",              type = \"number\"   },\n    { pattern = \"-?%d+[%d%.eE]*f?\",     type = \"number\"   },\n    { pattern = \"-?%.?%d+f?\",           type = \"number\"   },\n    { pattern = \"[%+%-=/%*%^%%<>!~|&]\", type = \"operator\" },\n    { pattern = \"[%a_][%w_]*%f[(]\",     type = \"function\" },\n    { pattern = \"[%a_][%w_]*\",          type = \"symbol\"   },\n  },\n  symbols = {\n    [\"if\"]       = \"keyword\",\n    [\"then\"]     = \"keyword\",\n    [\"else\"]     = \"keyword\",\n    [\"elseif\"]   = \"keyword\",\n    [\"do\"]       = \"keyword\",\n    [\"while\"]    = \"keyword\",\n    [\"for\"]      = \"keyword\",\n    [\"break\"]    = \"keyword\",\n    [\"continue\"] = \"keyword\",\n    [\"return\"]   = \"keyword\",\n    [\"goto\"]     = \"keyword\",\n    [\"struct\"]   = \"keyword\",\n    [\"union\"]    = \"keyword\",\n    [\"typedef\"]  = \"keyword\",\n    [\"enum\"]     = \"keyword\",\n    [\"extern\"]   = \"keyword\",\n    [\"static\"]   = \"keyword\",\n    [\"volatile\"] = \"keyword\",\n    [\"const\"]    = \"keyword\",\n    [\"inline\"]   = \"keyword\",\n    [\"switch\"]   = \"keyword\",\n    [\"case\"]     = \"keyword\",\n    [\"default\"]  = \"keyword\",\n    [\"auto\"]     = \"keyword\",\n    [\"const\"]    = \"keyword\",\n    [\"void\"]     = \"keyword\",\n    [\"int\"]      = \"keyword2\",\n    [\"short\"]    = \"keyword2\",\n    [\"long\"]     = \"keyword2\",\n    [\"float\"]    = \"keyword2\",\n    [\"double\"]   = \"keyword2\",\n    [\"char\"]     = \"keyword2\",\n    [\"unsigned\"] = \"keyword2\",\n    [\"bool\"]     = \"keyword2\",\n    [\"true\"]     = \"literal\",\n    [\"false\"]    = \"literal\",\n    [\"NULL\"]     = \"literal\",\n  },\n}\n\n"
  },
  {
    "path": "data/plugins/language_css.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.css$\" },\n  patterns = {\n    { pattern = \"\\\\.\",                type = \"normal\"   },\n    { pattern = \"//.-\\n\",             type = \"comment\"  },\n    { pattern = { \"/%*\", \"%*/\" },     type = \"comment\"  },\n    { pattern = { '\"', '\"', '\\\\' },   type = \"string\"   },\n    { pattern = { \"'\", \"'\", '\\\\' },   type = \"string\"   },\n    { pattern = \"[%a][%w-]*%s*%f[:]\", type = \"keyword\"  },\n    { pattern = \"#%x+\",               type = \"string\"   },\n    { pattern = \"-?%d+[%d%.]*p[xt]\",  type = \"number\"   },\n    { pattern = \"-?%d+[%d%.]*deg\",    type = \"number\"   },\n    { pattern = \"-?%d+[%d%.]*\",       type = \"number\"   },\n    { pattern = \"[%a_][%w_]*\",        type = \"symbol\"   },\n    { pattern = \"#[%a][%w_-]*\",       type = \"keyword2\" },\n    { pattern = \"@[%a][%w_-]*\",       type = \"keyword2\" },\n    { pattern = \"%.[%a][%w_-]*\",      type = \"keyword2\" },\n    { pattern = \"[{}:]\",              type = \"operator\" },\n  },\n  symbols = {},\n}\n"
  },
  {
    "path": "data/plugins/language_js.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.js$\", \"%.json$\", \"%.cson$\" },\n  comment = \"//\",\n  patterns = {\n    { pattern = \"//.-\\n\",               type = \"comment\"  },\n    { pattern = { \"/%*\", \"%*/\" },       type = \"comment\"  },\n    { pattern = { '\"', '\"', '\\\\' },     type = \"string\"   },\n    { pattern = { \"'\", \"'\", '\\\\' },     type = \"string\"   },\n    { pattern = { \"`\", \"`\", '\\\\' },     type = \"string\"   },\n    { pattern = \"0x[%da-fA-F]+\",        type = \"number\"   },\n    { pattern = \"-?%d+[%d%.eE]*\",       type = \"number\"   },\n    { pattern = \"-?%.?%d+\",             type = \"number\"   },\n    { pattern = \"[%+%-=/%*%^%%<>!~|&]\", type = \"operator\" },\n    { pattern = \"[%a_][%w_]*%f[(]\",     type = \"function\" },\n    { pattern = \"[%a_][%w_]*\",          type = \"symbol\"   },\n  },\n  symbols = {\n    [\"async\"]      = \"keyword\",\n    [\"await\"]      = \"keyword\",\n    [\"break\"]      = \"keyword\",\n    [\"case\"]       = \"keyword\",\n    [\"catch\"]      = \"keyword\",\n    [\"class\"]      = \"keyword\",\n    [\"const\"]      = \"keyword\",\n    [\"continue\"]   = \"keyword\",\n    [\"debugger\"]   = \"keyword\",\n    [\"default\"]    = \"keyword\",\n    [\"delete\"]     = \"keyword\",\n    [\"do\"]         = \"keyword\",\n    [\"else\"]       = \"keyword\",\n    [\"export\"]     = \"keyword\",\n    [\"extends\"]    = \"keyword\",\n    [\"finally\"]    = \"keyword\",\n    [\"for\"]        = \"keyword\",\n    [\"function\"]   = \"keyword\",\n    [\"get\"]        = \"keyword\",\n    [\"if\"]         = \"keyword\",\n    [\"import\"]     = \"keyword\",\n    [\"in\"]         = \"keyword\",\n    [\"instanceof\"] = \"keyword\",\n    [\"let\"]        = \"keyword\",\n    [\"new\"]        = \"keyword\",\n    [\"return\"]     = \"keyword\",\n    [\"set\"]        = \"keyword\",\n    [\"static\"]     = \"keyword\",\n    [\"super\"]      = \"keyword\",\n    [\"switch\"]     = \"keyword\",\n    [\"throw\"]      = \"keyword\",\n    [\"try\"]        = \"keyword\",\n    [\"typeof\"]     = \"keyword\",\n    [\"var\"]        = \"keyword\",\n    [\"void\"]       = \"keyword\",\n    [\"while\"]      = \"keyword\",\n    [\"with\"]       = \"keyword\",\n    [\"yield\"]      = \"keyword\",\n    [\"true\"]       = \"literal\",\n    [\"false\"]      = \"literal\",\n    [\"null\"]       = \"literal\",\n    [\"undefined\"]  = \"literal\",\n    [\"arguments\"]  = \"keyword2\",\n    [\"Infinity\"]   = \"keyword2\",\n    [\"NaN\"]        = \"keyword2\",\n    [\"this\"]       = \"keyword2\",\n  },\n}\n"
  },
  {
    "path": "data/plugins/language_lua.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = \"%.lua$\",\n  headers = \"^#!.*[ /]lua\",\n  comment = \"--\",\n  patterns = {\n    { pattern = { '\"', '\"', '\\\\' },       type = \"string\"   },\n    { pattern = { \"'\", \"'\", '\\\\' },       type = \"string\"   },\n    { pattern = { \"%[%[\", \"%]%]\" },       type = \"string\"   },\n    { pattern = { \"%-%-%[%[\", \"%]%]\"},    type = \"comment\"  },\n    { pattern = \"%-%-.-\\n\",               type = \"comment\"  },\n    { pattern = \"-?0x%x+\",                type = \"number\"   },\n    { pattern = \"-?%d+[%d%.eE]*\",         type = \"number\"   },\n    { pattern = \"-?%.?%d+\",               type = \"number\"   },\n    { pattern = \"<%a+>\",                  type = \"keyword2\" },\n    { pattern = \"%.%.%.?\",                type = \"operator\" },\n    { pattern = \"[<>~=]=\",                type = \"operator\" },\n    { pattern = \"[%+%-=/%*%^%%#<>]\",      type = \"operator\" },\n    { pattern = \"[%a_][%w_]*%s*%f[(\\\"{]\", type = \"function\" },\n    { pattern = \"[%a_][%w_]*\",            type = \"symbol\"   },\n    { pattern = \"::[%a_][%w_]*::\",        type = \"function\" },\n  },\n  symbols = {\n    [\"if\"]       = \"keyword\",\n    [\"then\"]     = \"keyword\",\n    [\"else\"]     = \"keyword\",\n    [\"elseif\"]   = \"keyword\",\n    [\"end\"]      = \"keyword\",\n    [\"do\"]       = \"keyword\",\n    [\"function\"] = \"keyword\",\n    [\"repeat\"]   = \"keyword\",\n    [\"until\"]    = \"keyword\",\n    [\"while\"]    = \"keyword\",\n    [\"for\"]      = \"keyword\",\n    [\"break\"]    = \"keyword\",\n    [\"return\"]   = \"keyword\",\n    [\"local\"]    = \"keyword\",\n    [\"in\"]       = \"keyword\",\n    [\"not\"]      = \"keyword\",\n    [\"and\"]      = \"keyword\",\n    [\"or\"]       = \"keyword\",\n    [\"goto\"]     = \"keyword\",\n    [\"self\"]     = \"keyword2\",\n    [\"true\"]     = \"literal\",\n    [\"false\"]    = \"literal\",\n    [\"nil\"]      = \"literal\",\n  },\n}\n\n"
  },
  {
    "path": "data/plugins/language_md.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.md$\", \"%.markdown$\" },\n  patterns = {\n    { pattern = \"\\\\.\",                    type = \"normal\"   },\n    { pattern = { \"<!%-%-\", \"%-%->\" },    type = \"comment\"  },\n    { pattern = { \"```\", \"```\" },         type = \"string\"   },\n    { pattern = { \"``\", \"``\", \"\\\\\" },     type = \"string\"   },\n    { pattern = { \"`\", \"`\", \"\\\\\" },       type = \"string\"   },\n    { pattern = { \"~~\", \"~~\", \"\\\\\" },     type = \"keyword2\" },\n    { pattern = \"%-%-%-+\",                type = \"comment\" },\n    { pattern = \"%*%s+\",                  type = \"operator\" },\n    { pattern = { \"%*\", \"[%*\\n]\", \"\\\\\" }, type = \"operator\" },\n    { pattern = { \"%_\", \"[%_\\n]\", \"\\\\\" }, type = \"keyword2\" },\n    { pattern = \"#.-\\n\",                  type = \"keyword\"  },\n    { pattern = \"!?%[.-%]%(.-%)\",         type = \"function\" },\n    { pattern = \"https?://%S+\",           type = \"function\" },\n  },\n  symbols = { },\n}\n"
  },
  {
    "path": "data/plugins/language_python.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.py$\", \"%.pyw$\" },\n  headers = \"^#!.*[ /]python\",\n  comment = \"#\",\n  patterns = {\n    { pattern = { \"#\", \"\\n\" },            type = \"comment\"  },\n    { pattern = { '[ruU]?\"', '\"', '\\\\' }, type = \"string\"   },\n    { pattern = { \"[ruU]?'\", \"'\", '\\\\' }, type = \"string\"   },\n    { pattern = { '\"\"\"', '\"\"\"' },         type = \"string\"   },\n    { pattern = \"0x[%da-fA-F]+\",          type = \"number\"   },\n    { pattern = \"-?%d+[%d%.eE]*\",         type = \"number\"   },\n    { pattern = \"-?%.?%d+\",               type = \"number\"   },\n    { pattern = \"[%+%-=/%*%^%%<>!~|&]\",   type = \"operator\" },\n    { pattern = \"[%a_][%w_]*%f[(]\",       type = \"function\" },\n    { pattern = \"[%a_][%w_]*\",            type = \"symbol\"   },\n  },\n  symbols = {\n    [\"class\"]    = \"keyword\",\n    [\"finally\"]  = \"keyword\",\n    [\"is\"]       = \"keyword\",\n    [\"return\"]   = \"keyword\",\n    [\"continue\"] = \"keyword\",\n    [\"for\"]      = \"keyword\",\n    [\"lambda\"]   = \"keyword\",\n    [\"try\"]      = \"keyword\",\n    [\"def\"]      = \"keyword\",\n    [\"from\"]     = \"keyword\",\n    [\"nonlocal\"] = \"keyword\",\n    [\"while\"]    = \"keyword\",\n    [\"and\"]      = \"keyword\",\n    [\"global\"]   = \"keyword\",\n    [\"not\"]      = \"keyword\",\n    [\"with\"]     = \"keyword\",\n    [\"as\"]       = \"keyword\",\n    [\"elif\"]     = \"keyword\",\n    [\"if\"]       = \"keyword\",\n    [\"or\"]       = \"keyword\",\n    [\"else\"]     = \"keyword\",\n    [\"import\"]   = \"keyword\",\n    [\"pass\"]     = \"keyword\",\n    [\"break\"]    = \"keyword\",\n    [\"except\"]   = \"keyword\",\n    [\"in\"]       = \"keyword\",\n    [\"del\"]      = \"keyword\",\n    [\"raise\"]    = \"keyword\",\n    [\"yield\"]    = \"keyword\",\n    [\"assert\"]   = \"keyword\",\n    [\"self\"]     = \"keyword2\",\n    [\"None\"]     = \"literal\",\n    [\"True\"]     = \"literal\",\n    [\"False\"]    = \"literal\",\n  }\n}\n"
  },
  {
    "path": "data/plugins/language_xml.lua",
    "content": "local syntax = require \"core.syntax\"\n\nsyntax.add {\n  files = { \"%.xml$\", \"%.html?$\" },\n  headers = \"<%?xml\",\n  patterns = {\n    { pattern = { \"<!%-%-\", \"%-%->\" },     type = \"comment\"  },\n    { pattern = { '%f[^>][^<]', '%f[<]' }, type = \"normal\"   },\n    { pattern = { '\"', '\"', '\\\\' },        type = \"string\"   },\n    { pattern = { \"'\", \"'\", '\\\\' },        type = \"string\"   },\n    { pattern = \"0x[%da-fA-F]+\",           type = \"number\"   },\n    { pattern = \"-?%d+[%d%.]*f?\",          type = \"number\"   },\n    { pattern = \"-?%.?%d+f?\",              type = \"number\"   },\n    { pattern = \"%f[^<]![%a_][%w_]*\",      type = \"keyword2\" },\n    { pattern = \"%f[^<][%a_][%w_]*\",       type = \"function\" },\n    { pattern = \"%f[^<]/[%a_][%w_]*\",      type = \"function\" },\n    { pattern = \"[%a_][%w_]*\",             type = \"keyword\"  },\n    { pattern = \"[/<>=]\",                  type = \"operator\" },\n  },\n  symbols = {},\n}\n"
  },
  {
    "path": "data/plugins/macro.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal keymap = require \"core.keymap\"\n\nlocal handled_events = {\n  [\"keypressed\"]  = true,\n  [\"keyreleased\"] = true,\n  [\"textinput\"]   = true,\n}\n\nlocal state = \"stopped\"\nlocal event_buffer = {}\nlocal modkeys = {}\n\nlocal on_event = core.on_event\n\ncore.on_event = function(type, ...)\n  local res = on_event(type, ...)\n  if state == \"recording\" and handled_events[type] then\n    table.insert(event_buffer, { type, ... })\n  end\n  return res\nend\n\n\nlocal function clone(t)\n  local res = {}\n  for k, v in pairs(t) do res[k] = v end\n  return res\nend\n\n\nlocal function predicate()\n  return state ~= \"playing\"\nend\n\n\ncommand.add(predicate, {\n  [\"macro:toggle-record\"] = function()\n    if state == \"stopped\" then\n      state = \"recording\"\n      event_buffer = {}\n      modkeys = clone(keymap.modkeys)\n      core.log(\"Recording macro...\")\n    else\n      state = \"stopped\"\n      core.log(\"Stopped recording macro (%d events)\", #event_buffer)\n    end\n  end,\n\n  [\"macro:play\"] = function()\n    state = \"playing\"\n    core.log(\"Playing macro... (%d events)\", #event_buffer)\n    local mk = keymap.modkeys\n    keymap.modkeys = clone(modkeys)\n    for _, ev in ipairs(event_buffer) do\n      on_event(table.unpack(ev))\n      core.root_view:update()\n    end\n    keymap.modkeys = mk\n    state = \"stopped\"\n  end,\n})\n\n\nkeymap.add {\n  [\"ctrl+shift+;\"] = \"macro:toggle-record\",\n  [\"ctrl+;\"] = \"macro:play\",\n}\n"
  },
  {
    "path": "data/plugins/projectsearch.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal keymap = require \"core.keymap\"\nlocal command = require \"core.command\"\nlocal style = require \"core.style\"\nlocal View = require \"core.view\"\n\n\nlocal ResultsView = View:extend()\n\n\nfunction ResultsView:new(text, fn)\n  ResultsView.super.new(self)\n  self.scrollable = true\n  self.brightness = 0\n  self:begin_search(text, fn)\nend\n\n\nfunction ResultsView:get_name()\n  return \"Search Results\"\nend\n\n\nlocal function find_all_matches_in_file(t, filename, fn)\n  local fp = io.open(filename)\n  if not fp then return t end\n  local n = 1\n  for line in fp:lines() do\n    local s = fn(line)\n    if s then\n      table.insert(t, { file = filename, text = line, line = n, col = s })\n      core.redraw = true\n    end\n    if n % 100 == 0 then coroutine.yield() end\n    n = n + 1\n    core.redraw = true\n  end\n  fp:close()\nend\n\n\nfunction ResultsView:begin_search(text, fn)\n  self.search_args = { text, fn }\n  self.results = {}\n  self.last_file_idx = 1\n  self.query = text\n  self.searching = true\n  self.selected_idx = 0\n\n  core.add_thread(function()\n    for i, file in ipairs(core.project_files) do\n      if file.type == \"file\" then\n        find_all_matches_in_file(self.results, file.filename, fn)\n      end\n      self.last_file_idx = i\n    end\n    self.searching = false\n    self.brightness = 100\n    core.redraw = true\n  end, self.results)\n\n  self.scroll.to.y = 0\nend\n\n\nfunction ResultsView:refresh()\n  self:begin_search(table.unpack(self.search_args))\nend\n\n\nfunction ResultsView:on_mouse_moved(mx, my, ...)\n  ResultsView.super.on_mouse_moved(self, mx, my, ...)\n  self.selected_idx = 0\n  for i, item, x,y,w,h in self:each_visible_result() do\n    if mx >= x and my >= y and mx < x + w and my < y + h then\n      self.selected_idx = i\n      break\n    end\n  end\nend\n\n\nfunction ResultsView:on_mouse_pressed(...)\n  local caught = ResultsView.super.on_mouse_pressed(self, ...)\n  if not caught then\n    self:open_selected_result()\n  end\nend\n\n\nfunction ResultsView:open_selected_result()\n  local res = self.results[self.selected_idx]\n  if not res then\n    return\n  end\n  core.try(function()\n    local dv = core.root_view:open_doc(core.open_doc(res.file))\n    core.root_view.root_node:update_layout()\n    dv.doc:set_selection(res.line, res.col)\n    dv:scroll_to_line(res.line, false, true)\n  end)\nend\n\n\nfunction ResultsView:update()\n  self:move_towards(\"brightness\", 0, 0.1)\n  ResultsView.super.update(self)\nend\n\n\nfunction ResultsView:get_results_yoffset()\n  return style.font:get_height() + style.padding.y * 3\nend\n\n\nfunction ResultsView:get_line_height()\n  return style.padding.y + style.font:get_height()\nend\n\n\nfunction ResultsView:get_scrollable_size()\n  return self:get_results_yoffset() + #self.results * self:get_line_height()\nend\n\n\nfunction ResultsView:get_visible_results_range()\n  local lh = self:get_line_height()\n  local oy = self:get_results_yoffset()\n  local min = math.max(1, math.floor((self.scroll.y - oy) / lh))\n  return min, min + math.floor(self.size.y / lh) + 1\nend\n\n\nfunction ResultsView:each_visible_result()\n  return coroutine.wrap(function()\n    local lh = self:get_line_height()\n    local x, y = self:get_content_offset()\n    local min, max = self:get_visible_results_range()\n    y = y + self:get_results_yoffset() + lh * (min - 1)\n    for i = min, max do\n      local item = self.results[i]\n      if not item then break end\n      coroutine.yield(i, item, x, y, self.size.x, lh)\n      y = y + lh\n    end\n  end)\nend\n\n\nfunction ResultsView:scroll_to_make_selected_visible()\n  local h = self:get_line_height()\n  local y = self:get_results_yoffset() + h * (self.selected_idx - 1)\n  self.scroll.to.y = math.min(self.scroll.to.y, y)\n  self.scroll.to.y = math.max(self.scroll.to.y, y + h - self.size.y)\nend\n\n\nfunction ResultsView:draw()\n  self:draw_background(style.background)\n\n  -- status\n  local ox, oy = self:get_content_offset()\n  local x, y = ox + style.padding.x, oy + style.padding.y\n  local per = self.last_file_idx / #core.project_files\n  local text\n  if self.searching then\n    text = string.format(\"Searching %d%% (%d of %d files, %d matches) for %q...\",\n      per * 100, self.last_file_idx, #core.project_files,\n      #self.results, self.query)\n  else\n    text = string.format(\"Found %d matches for %q\",\n      #self.results, self.query)\n  end\n  local color = common.lerp(style.text, style.accent, self.brightness / 100)\n  renderer.draw_text(style.font, text, x, y, color)\n\n  -- horizontal line\n  local yoffset = self:get_results_yoffset()\n  local x = ox + style.padding.x\n  local w = self.size.x - style.padding.x * 2\n  local h = style.divider_size\n  local color = common.lerp(style.dim, style.text, self.brightness / 100)\n  renderer.draw_rect(x, oy + yoffset - style.padding.y, w, h, color)\n  if self.searching then\n    renderer.draw_rect(x, oy + yoffset - style.padding.y, w * per, h, style.text)\n  end\n\n  -- results\n  local y1, y2 = self.position.y, self.position.y + self.size.y\n  for i, item, x,y,w,h in self:each_visible_result() do\n    local color = style.text\n    if i == self.selected_idx then\n      color = style.accent\n      renderer.draw_rect(x, y, w, h, style.line_highlight)\n    end\n    x = x + style.padding.x\n    local text = string.format(\"%s at line %d (col %d): \", item.file, item.line, item.col)\n    x = common.draw_text(style.font, style.dim, text, \"left\", x, y, w, h)\n    x = common.draw_text(style.code_font, color, item.text, \"left\", x, y, w, h)\n  end\n\n  self:draw_scrollbar()\nend\n\n\nlocal function begin_search(text, fn)\n  if text == \"\" then\n    core.error(\"Expected non-empty string\")\n    return\n  end\n  local rv = ResultsView(text, fn)\n  core.root_view:get_active_node():add_view(rv)\nend\n\n\ncommand.add(nil, {\n  [\"project-search:find\"] = function()\n    core.command_view:enter(\"Find Text In Project\", function(text)\n      text = text:lower()\n      begin_search(text, function(line_text)\n        return line_text:lower():find(text, nil, true)\n      end)\n    end)\n  end,\n\n  [\"project-search:find-pattern\"] = function()\n    core.command_view:enter(\"Find Pattern In Project\", function(text)\n      begin_search(text, function(line_text) return line_text:find(text) end)\n    end)\n  end,\n\n  [\"project-search:fuzzy-find\"] = function()\n    core.command_view:enter(\"Fuzzy Find Text In Project\", function(text)\n      begin_search(text, function(line_text)\n        return common.fuzzy_match(line_text, text) and 1\n      end)\n    end)\n  end,\n})\n\n\ncommand.add(ResultsView, {\n  [\"project-search:select-previous\"] = function()\n    local view = core.active_view\n    view.selected_idx = math.max(view.selected_idx - 1, 1)\n    view:scroll_to_make_selected_visible()\n  end,\n\n  [\"project-search:select-next\"] = function()\n    local view = core.active_view\n    view.selected_idx = math.min(view.selected_idx + 1, #view.results)\n    view:scroll_to_make_selected_visible()\n  end,\n\n  [\"project-search:open-selected\"] = function()\n    core.active_view:open_selected_result()\n  end,\n\n  [\"project-search:refresh\"] = function()\n    core.active_view:refresh()\n  end,\n})\n\nkeymap.add {\n  [\"f5\"]           = \"project-search:refresh\",\n  [\"ctrl+shift+f\"] = \"project-search:find\",\n  [\"up\"]           = \"project-search:select-previous\",\n  [\"down\"]         = \"project-search:select-next\",\n  [\"return\"]       = \"project-search:open-selected\",\n}\n"
  },
  {
    "path": "data/plugins/quote.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal keymap = require \"core.keymap\"\n\n\nlocal escapes = {\n  [\"\\\\\"] = \"\\\\\\\\\",\n  [\"\\\"\"] = \"\\\\\\\"\",\n  [\"\\n\"] = \"\\\\n\",\n  [\"\\r\"] = \"\\\\r\",\n  [\"\\t\"] = \"\\\\t\",\n  [\"\\b\"] = \"\\\\b\",\n}\n\nlocal function replace(chr)\n  return escapes[chr] or string.format(\"\\\\x%02x\", chr:byte())\nend\n\n\ncommand.add(\"core.docview\", {\n  [\"quote:quote\"] = function()\n    core.active_view.doc:replace(function(text)\n      return '\"' .. text:gsub(\"[\\0-\\31\\\\\\\"]\", replace) .. '\"'\n    end)\n  end,\n})\n\nkeymap.add {\n  [\"ctrl+'\"] = \"quote:quote\",\n}\n"
  },
  {
    "path": "data/plugins/reflow.lua",
    "content": "local core = require \"core\"\nlocal config = require \"core.config\"\nlocal command = require \"core.command\"\nlocal keymap = require \"core.keymap\"\n\n\nlocal function wordwrap_text(text, limit)\n  local t = {}\n  local n = 0\n\n  for word in text:gmatch(\"%S+\") do\n    if n + #word > limit then\n      table.insert(t, \"\\n\")\n      n = 0\n    elseif #t > 0 then\n      table.insert(t, \" \")\n    end\n    table.insert(t, word)\n    n = n + #word + 1\n  end\n\n  return table.concat(t)\nend\n\n\ncommand.add(\"core.docview\", {\n  [\"reflow:reflow\"] = function()\n    local doc = core.active_view.doc\n    doc:replace(function(text)\n      local prefix_set = \"[^%w\\n%[%](){}`'\\\"]*\"\n\n      -- get line prefix and trailing whitespace\n      local prefix1 = text:match(\"^\\n*\" .. prefix_set)\n      local prefix2 = text:match(\"\\n(\" .. prefix_set .. \")\", #prefix1+1)\n      local trailing = text:match(\"%s*$\")\n      if not prefix2 or prefix2 == \"\" then\n        prefix2 = prefix1\n      end\n\n      -- strip all line prefixes and trailing whitespace\n      text = text:sub(#prefix1+1, -#trailing - 1):gsub(\"\\n\" .. prefix_set, \"\\n\")\n\n      -- split into blocks, wordwrap and join\n      local line_limit = config.line_limit - #prefix1\n      local blocks = {}\n      text = text:gsub(\"\\n\\n\", \"\\0\")\n      for block in text:gmatch(\"%Z+\") do\n        table.insert(blocks, wordwrap_text(block, line_limit))\n      end\n      text = table.concat(blocks, \"\\n\\n\")\n\n      -- add prefix to start of lines\n      text = prefix1 .. text:gsub(\"\\n\", \"\\n\" .. prefix2) .. trailing\n\n      return text\n    end)\n  end,\n})\n\n\nkeymap.add {\n  [\"ctrl+shift+q\"] = \"reflow:reflow\"\n}\n"
  },
  {
    "path": "data/plugins/tabularize.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal translate = require \"core.doc.translate\"\n\n\nlocal function gmatch_to_array(text, ptn)\n  local res = {}\n  for x in text:gmatch(ptn) do\n    table.insert(res, x)\n  end\n  return res\nend\n\n\nlocal function tabularize_lines(lines, delim)\n  local rows = {}\n  local cols = {}\n\n  -- split lines at delimiters and get maximum width of columns\n  local ptn = \"[^\" .. delim:sub(1,1):gsub(\"%W\", \"%%%1\") .. \"]+\"\n  for i, line in ipairs(lines) do\n    rows[i] = gmatch_to_array(line, ptn)\n    for j, col in ipairs(rows[i]) do\n      cols[j] = math.max(#col, cols[j] or 0)\n    end\n  end\n\n  -- pad columns with space\n  for _, row in ipairs(rows) do\n    for i = 1, #row - 1 do\n      row[i] = row[i] .. string.rep(\" \", cols[i] - #row[i])\n    end\n  end\n\n  -- write columns back to lines array\n  for i, line in ipairs(lines) do\n    lines[i] = table.concat(rows[i], delim)\n  end\nend\n\n\ncommand.add(\"core.docview\", {\n  [\"tabularize:tabularize\"] = function()\n    core.command_view:enter(\"Tabularize On Delimiter\", function(delim)\n      if delim == \"\" then delim = \" \" end\n\n      local doc = core.active_view.doc\n      local line1, col1, line2, col2, swap = doc:get_selection(true)\n      line1, col1 = doc:position_offset(line1, col1, translate.start_of_line)\n      line2, col2 = doc:position_offset(line2, col2, translate.end_of_line)\n      doc:set_selection(line1, col1, line2, col2, swap)\n\n      doc:replace(function(text)\n        local lines = gmatch_to_array(text, \"[^\\n]*\\n?\")\n        tabularize_lines(lines, delim)\n        return table.concat(lines)\n      end)\n    end)\n  end,\n})\n"
  },
  {
    "path": "data/plugins/treeview.lua",
    "content": "local core = require \"core\"\nlocal common = require \"core.common\"\nlocal command = require \"core.command\"\nlocal config = require \"core.config\"\nlocal keymap = require \"core.keymap\"\nlocal style = require \"core.style\"\nlocal View = require \"core.view\"\n\nconfig.treeview_size = 200 * SCALE\n\nlocal function get_depth(filename)\n  local n = 0\n  for sep in filename:gmatch(\"[\\\\/]\") do\n    n = n + 1\n  end\n  return n\nend\n\n\nlocal TreeView = View:extend()\n\nfunction TreeView:new()\n  TreeView.super.new(self)\n  self.scrollable = true\n  self.visible = true\n  self.init_size = true\n  self.cache = {}\nend\n\n\nfunction TreeView:get_cached(item)\n  local t = self.cache[item.filename]\n  if not t then\n    t = {}\n    t.filename = item.filename\n    t.abs_filename = system.absolute_path(item.filename)\n    t.name = t.filename:match(\"[^\\\\/]+$\")\n    t.depth = get_depth(t.filename)\n    t.type = item.type\n    self.cache[t.filename] = t\n  end\n  return t\nend\n\n\nfunction TreeView:get_name()\n  return \"Project\"\nend\n\n\nfunction TreeView:get_item_height()\n  return style.font:get_height() + style.padding.y\nend\n\n\nfunction TreeView:check_cache()\n  -- invalidate cache's skip values if project_files has changed\n  if core.project_files ~= self.last_project_files then\n    for _, v in pairs(self.cache) do\n      v.skip = nil\n    end\n    self.last_project_files = core.project_files\n  end\nend\n\n\nfunction TreeView:each_item()\n  return coroutine.wrap(function()\n    self:check_cache()\n    local ox, oy = self:get_content_offset()\n    local y = oy + style.padding.y\n    local w = self.size.x\n    local h = self:get_item_height()\n\n    local i = 1\n    while i <= #core.project_files do\n      local item = core.project_files[i]\n      local cached = self:get_cached(item)\n\n      coroutine.yield(cached, ox, y, w, h)\n      y = y + h\n      i = i + 1\n\n      if not cached.expanded then\n        if cached.skip then\n          i = cached.skip\n        else\n          local depth = cached.depth\n          while i <= #core.project_files do\n            local filename = core.project_files[i].filename\n            if get_depth(filename) <= depth then break end\n            i = i + 1\n          end\n          cached.skip = i\n        end\n      end\n    end\n  end)\nend\n\n\nfunction TreeView:on_mouse_moved(px, py)\n  self.hovered_item = nil\n  for item, x,y,w,h in self:each_item() do\n    if px > x and py > y and px <= x + w and py <= y + h then\n      self.hovered_item = item\n      break\n    end\n  end\nend\n\n\nfunction TreeView:on_mouse_pressed(button, x, y)\n  if not self.hovered_item then\n    return\n  elseif self.hovered_item.type == \"dir\" then\n    self.hovered_item.expanded = not self.hovered_item.expanded\n  else\n    core.try(function()\n      core.root_view:open_doc(core.open_doc(self.hovered_item.filename))\n    end)\n  end\nend\n\n\nfunction TreeView:update()\n  -- update width\n  local dest = self.visible and config.treeview_size or 0\n  if self.init_size then\n    self.size.x = dest\n    self.init_size = false\n  else\n    self:move_towards(self.size, \"x\", dest)\n  end\n\n  TreeView.super.update(self)\nend\n\n\nfunction TreeView:draw()\n  self:draw_background(style.background2)\n\n  local icon_width = style.icon_font:get_width(\"D\")\n  local spacing = style.font:get_width(\" \") * 2\n\n  local doc = core.active_view.doc\n  local active_filename = doc and system.absolute_path(doc.filename or \"\")\n\n  for item, x,y,w,h in self:each_item() do\n    local color = style.text\n\n    -- highlight active_view doc\n    if item.abs_filename == active_filename then\n      color = style.accent\n    end\n\n    -- hovered item background\n    if item == self.hovered_item then\n      renderer.draw_rect(x, y, w, h, style.line_highlight)\n      color = style.accent\n    end\n\n    -- icons\n    x = x + item.depth * style.padding.x + style.padding.x\n    if item.type == \"dir\" then\n      local icon1 = item.expanded and \"-\" or \"+\"\n      local icon2 = item.expanded and \"D\" or \"d\"\n      common.draw_text(style.icon_font, color, icon1, nil, x, y, 0, h)\n      x = x + style.padding.x\n      common.draw_text(style.icon_font, color, icon2, nil, x, y, 0, h)\n      x = x + icon_width\n    else\n      x = x + style.padding.x\n      common.draw_text(style.icon_font, color, \"f\", nil, x, y, 0, h)\n      x = x + icon_width\n    end\n\n    -- text\n    x = x + spacing\n    x = common.draw_text(style.font, color, item.name, nil, x, y, 0, h)\n  end\nend\n\n\n-- init\nlocal view = TreeView()\nlocal node = core.root_view:get_active_node()\nnode:split(\"left\", view, true)\n\n-- register commands and keymap\ncommand.add(nil, {\n  [\"treeview:toggle\"] = function()\n    view.visible = not view.visible\n  end,\n})\n\nkeymap.add { [\"ctrl+\\\\\"] = \"treeview:toggle\" }\n"
  },
  {
    "path": "data/plugins/trimwhitespace.lua",
    "content": "local core = require \"core\"\nlocal command = require \"core.command\"\nlocal Doc = require \"core.doc\"\n\n\nlocal function trim_trailing_whitespace(doc)\n  local cline, ccol = doc:get_selection()\n  for i = 1, #doc.lines do\n    local old_text = doc:get_text(i, 1, i, math.huge)\n    local new_text = old_text:gsub(\"%s*$\", \"\")\n\n    -- don't remove whitespace which would cause the caret to reposition\n    if cline == i and ccol > #new_text then\n      new_text = old_text:sub(1, ccol - 1)\n    end\n\n    if old_text ~= new_text then\n      doc:insert(i, 1, new_text)\n      doc:remove(i, #new_text + 1, i, math.huge)\n    end\n  end\nend\n\n\ncommand.add(\"core.docview\", {\n  [\"trim-whitespace:trim-trailing-whitespace\"] = function()\n    trim_trailing_whitespace(core.active_view.doc)\n  end,\n})\n\n\nlocal save = Doc.save\nDoc.save = function(self, ...)\n  trim_trailing_whitespace(self)\n  save(self, ...)\nend\n"
  },
  {
    "path": "data/user/colors/fall.lua",
    "content": "local style = require \"core.style\"\nlocal common = require \"core.common\"\n\nstyle.background = { common.color \"#343233\" }\nstyle.background2 = { common.color \"#2c2a2b\" }\nstyle.background3 = { common.color \"#2c2a2b\" }\nstyle.text = { common.color \"#c4b398\" }\nstyle.caret = { common.color \"#61efce\" }\nstyle.accent = { common.color \"#ffd152\" }\nstyle.dim = { common.color \"#615d5f\" }\nstyle.divider = { common.color \"#242223\" }\nstyle.selection = { common.color \"#454244\" }\nstyle.line_number = { common.color \"#454244\" }\nstyle.line_number2 = { common.color \"#615d5f\" }\nstyle.line_highlight = { common.color \"#383637\" }\nstyle.scrollbar = { common.color \"#454344\" }\nstyle.scrollbar2 = { common.color \"#524F50\" }\n\nstyle.syntax[\"normal\"] = { common.color \"#efdab9\" }\nstyle.syntax[\"symbol\"] = { common.color \"#efdab9\" }\nstyle.syntax[\"comment\"] = { common.color \"#615d5f\" }\nstyle.syntax[\"keyword\"] = { common.color \"#d36e2d\" }\nstyle.syntax[\"keyword2\"] = { common.color \"#ef6179\" }\nstyle.syntax[\"number\"] = { common.color \"#ffd152\" }\nstyle.syntax[\"literal\"] = { common.color \"#ffd152\" }\nstyle.syntax[\"string\"] = { common.color \"#ffd152\" }\nstyle.syntax[\"operator\"] = { common.color \"#efdab9\" }\nstyle.syntax[\"function\"] = { common.color \"#61efce\" }\n"
  },
  {
    "path": "data/user/colors/summer.lua",
    "content": "local style = require \"core.style\"\nlocal common = require \"core.common\"\n\nstyle.background = { common.color \"#fbfbfb\" }\nstyle.background2 = { common.color \"#f2f2f2\" }\nstyle.background3 = { common.color \"#f2f2f2\" }\nstyle.text = { common.color \"#404040\" }\nstyle.caret = { common.color \"#fc1785\" }\nstyle.accent = { common.color \"#fc1785\" }\nstyle.dim = { common.color \"#b0b0b0\" }\nstyle.divider = { common.color \"#e8e8e8\" }\nstyle.selection = { common.color \"#b7dce8\" }\nstyle.line_number = { common.color \"#d0d0d0\" }\nstyle.line_number2 = { common.color \"#808080\" }\nstyle.line_highlight = { common.color \"#f2f2f2\" }\nstyle.scrollbar = { common.color \"#e0e0e0\" }\nstyle.scrollbar2 = { common.color \"#c0c0c0\" }\n\nstyle.syntax[\"normal\"] = { common.color \"#181818\" }\nstyle.syntax[\"symbol\"] = { common.color \"#181818\" }\nstyle.syntax[\"comment\"] = { common.color \"#22a21f\" }\nstyle.syntax[\"keyword\"] = { common.color \"#fb6620\" }\nstyle.syntax[\"keyword2\"] = { common.color \"#fc1785\" }\nstyle.syntax[\"number\"] = { common.color \"#1586d2\" }\nstyle.syntax[\"literal\"] = { common.color \"#1586d2\" }\nstyle.syntax[\"string\"] = { common.color \"#1586d2\" }\nstyle.syntax[\"operator\"] = { common.color \"#fb6620\" }\nstyle.syntax[\"function\"] = { common.color \"#fc1785\" }\n"
  },
  {
    "path": "data/user/init.lua",
    "content": "-- put user settings here\n-- this module will be loaded after everything else when the application starts\n\nlocal keymap = require \"core.keymap\"\nlocal config = require \"core.config\"\nlocal style = require \"core.style\"\n\n-- light theme:\n-- require \"user.colors.summer\"\n\n-- key binding:\n-- keymap.add { [\"ctrl+escape\"] = \"core:quit\" }\n\n"
  },
  {
    "path": "doc/usage.md",
    "content": "# lite\n\n![screenshot](https://user-images.githubusercontent.com/3920290/81471642-6c165880-91ea-11ea-8cd1-fae7ae8f0bc4.png)\n\n## Overview\nlite is a lightweight text editor written mostly in Lua — it aims to provide\nsomething practical, pretty, *small* and fast, implemented as simply as\npossible; easy to modify and extend, or to use without doing either.\n\n\n## Getting Started\nWhen lite is started it's typically opened with a *project directory* — this\nis the directory where your project's code and other data resides. The project\ndirectory is set once when lite is started and, for the duration of the\nsession, cannot be changed.\n\nTo open lite with a specific project directory the directory name can be passed\nas a command-line argument *(`.` can be passed to use the current directory)* or\nthe directory can be dragged onto either the lite executable or a running\ninstance of lite.\n\nThe main way of opening files in lite is through the `core:find-file` command\n— this provides a fuzzy finder over all of the project's files and can be\nopened using the **`ctrl+p`** shortcut by default.\n\nCommands can be run using keyboard shortcuts, or by using the `core:find-command`\ncommand bound to **`ctrl+shift+p`** by default. For example, pressing\n`ctrl+shift+p` and typing `newdoc` then pressing `return` would open a new\ndocument. The current keyboard shortcut for a command can be seen to the right\nof the command name on the command finder, thus to find the shortcut for a command\n`ctrl+shift+p` can be pressed and the command name typed.\n\n\n## User Module\nlite can be configured through use of the user module. The user module can be\nused for changing options in the config module, adding additional key bindings,\nloading custom color themes, modifying the style or changing any other part of\nlite to your personal preference.\n\nThe user module is loaded by lite when the application starts, after the plugins\nhave been loaded.\n\nThe user module can be modified by running the `core:open-user-module` command\nor otherwise directly opening the `data/user/init.lua` file.\n\n\n## Project Module\nThe project module is an optional module which is loaded from the current\nproject's directory when lite is started. Project modules can be useful for\nthings like adding custom commands for project-specific build systems, or\nloading project-specific plugins.\n\nThe project module is loaded by lite when the application starts, after both the\nplugins and user module have been loaded.\n\nThe project module can be edited by running the `core:open-project-module`\ncommand — if the module does not exist for the current project when the\ncommand is run it will be created.\n\n\n## Commands\nCommands in lite are used both through the command finder (`ctrl+shift+p`) and\nby lite's keyboard shortcut system. Commands consist of 3 components:\n* **Name** — The command name in the form of `namespace:action-name`, for\n  example: `doc:select-all`\n* **Predicate** — A function that returns true if the command can be ran, for\n  example, for any document commands the predicate checks whether the active\n  view is a document\n* **Function** — The function which performs the command itself\n\nCommands can be added using the `command.add` function provided by the\n`core.command` module:\n```lua\nlocal core = require \"core\"\nlocal command = require \"core.command\"\n\ncommand.add(\"core.docview\", {\n  [\"doc:save\"] = function()\n    core.active_view.doc:save()\n    core.log(\"Saved '%s', core.active_view.doc.filename)\n  end\n})\n```\n\nCommands can be performed programatically (eg. from another command or by your\nuser module) by calling the `command.perform` function after requiring the\n`command` module:\n```lua\nlocal command = require \"core.command\"\ncommand.perform \"core:quit\"\n```\n\n\n## Keymap\nAll keyboard shortcuts in lite are handled by the `core.keymap` module. A key\nbinding in lite maps a \"stroke\" (eg. `ctrl+q`) to one or more commands (eg.\n`core:quit`). When the shortcut is pressed lite will iterate each command\nassigned to that key and run the *predicate function* for that command — if the\npredicate passes it stops iterating and runs the command.\n\nAn example of where this used is the default binding of the `tab` key:\n``` lua\n  [\"tab\"] = { \"command:complete\", \"doc:indent\" },\n```\nWhen tab is pressed the `command:complete` command is attempted which will only\nsucceed if the command-input at the bottom of the window is active. Otherwise\nthe `doc:indent` command is attempted which will only succeed if we have a\ndocument as our active view.\n\nA new mapping can be added by your user module as follows:\n```lua\nlocal keymap = require \"core.keymap\"\nkeymap.add { [\"ctrl+q\"] = \"core:quit\" }\n```\n\n\n## Plugins\nPlugins in lite are normal lua modules and are treated as such — no\ncomplicated plugin manager is provided, and, once a plugin is loaded, it is never\nexpected be to have to unload itself.\n\nTo install a plugin simply drop it in the `data/plugins` directory — installed\nplugins will be automatically loaded when lite starts. To uninstall a plugin the\nplugin file can be deleted — any plugin (including those included with lite's\ndefault installation) can be deleted to remove its functionality.\n\nIf you want to load a plugin only under a certain circumstance (for example,\nonly on a given project) the plugin can be placed somewhere other than the\n`data/plugins` directory so that it is not automatically loaded. The plugin can\nthen be loaded manually as needed by using the `require` function.\n\nPlugins can be downloaded from the [plugins repository](https://github.com/rxi/lite-plugins).\n\n\n## Color Themes\nColors themes in lite are lua modules which overwrite the color fields of lite's\n`core.style` module. Color themes should be placed in the `data/user/colors`\ndirectory.\n\nA color theme can be set by requiring it in your user module:\n```lua\nrequire \"user.colors.winter\"\n```\n\nColor themes can be downloaded from the [color themes repository](https://github.com/rxi/lite-colors).\n\n"
  },
  {
    "path": "icon.inl",
    "content": "static unsigned char icon_rgba[] = {\n  0x2e, 0x2e, 0x32, 0x6d, 0x2e, 0x2e, 0x32, 0xe4, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xe4,\n  0x2e, 0x2e, 0x32, 0x6d, 0x2e, 0x2e, 0x32, 0xe4, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xe4, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2e, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2d, 0x2d, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x30, 0x2f, 0x33, 0xff, 0x42, 0x35, 0x3a, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x37, 0x3c, 0xff, 0x42, 0x40, 0x44, 0xff,\n  0x41, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x38, 0x38, 0x3c, 0xff,\n  0x2f, 0x30, 0x34, 0xff, 0x38, 0x3f, 0x46, 0xff, 0x38, 0x3f, 0x46, 0xff,\n  0x2f, 0x30, 0x34, 0xff, 0x39, 0x35, 0x33, 0xff, 0x45, 0x3c, 0x35, 0xff,\n  0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff,\n  0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff, 0x42, 0x3a, 0x35, 0xff,\n  0x30, 0x2f, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2e, 0x31, 0xff, 0x42, 0x35, 0x3a, 0xff, 0xce, 0x66, 0x72, 0xff,\n  0xe2, 0x6d, 0x7b, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xdf, 0x77, 0x84, 0xff,\n  0xd0, 0xc3, 0xc9, 0xff, 0xcd, 0xce, 0xd3, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xd1, 0xd1, 0xd5, 0xff,\n  0x7d, 0x7d, 0x81, 0xff, 0x35, 0x3c, 0x42, 0xff, 0x7f, 0xba, 0xd2, 0xff,\n  0x7f, 0xba, 0xd2, 0xff, 0x34, 0x3d, 0x45, 0xff, 0x8a, 0x64, 0x3d, 0xff,\n  0xec, 0x9e, 0x4b, 0xff, 0xe8, 0x9c, 0x4a, 0xff, 0xe8, 0x9c, 0x4a, 0xff,\n  0xe8, 0x9c, 0x4a, 0xff, 0xe8, 0x9c, 0x4a, 0xff, 0xea, 0x9c, 0x4a, 0xff,\n  0xd4, 0x90, 0x47, 0xff, 0x42, 0x3a, 0x35, 0xff, 0x2d, 0x2d, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2c, 0x2d, 0x31, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0xe4, 0x6d, 0x7b, 0xff, 0xfb, 0x76, 0x85, 0xff, 0xfa, 0x75, 0x84, 0xff,\n  0xfa, 0x75, 0x84, 0xff, 0xfa, 0x75, 0x84, 0xff, 0xfa, 0x74, 0x83, 0xff,\n  0xf8, 0x81, 0x8f, 0xff, 0xe6, 0xd8, 0xde, 0xff, 0xe3, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe7, 0xe7, 0xec, 0xff, 0x88, 0x88, 0x8c, 0xff, 0x36, 0x3e, 0x45, 0xff,\n  0x8a, 0xce, 0xe8, 0xff, 0x8a, 0xce, 0xe8, 0xff, 0x35, 0x3f, 0x48, 0xff,\n  0x96, 0x6b, 0x3e, 0xff, 0xff, 0xad, 0x4e, 0xff, 0xff, 0xab, 0x4d, 0xff,\n  0xff, 0xab, 0x4d, 0xff, 0xff, 0xab, 0x4d, 0xff, 0xff, 0xab, 0x4d, 0xff,\n  0xff, 0xac, 0x4e, 0xff, 0xe8, 0x9d, 0x4a, 0xff, 0x45, 0x3c, 0x35, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2e, 0x31, 0xff,\n  0x42, 0x35, 0x3a, 0xff, 0xce, 0x66, 0x72, 0xff, 0xe2, 0x6d, 0x7b, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xdf, 0x77, 0x84, 0xff, 0xd0, 0xc3, 0xc9, 0xff,\n  0xcd, 0xce, 0xd3, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xd1, 0xd1, 0xd5, 0xff, 0x7d, 0x7d, 0x81, 0xff,\n  0x35, 0x3c, 0x42, 0xff, 0x7f, 0xba, 0xd2, 0xff, 0x7f, 0xba, 0xd2, 0xff,\n  0x34, 0x3d, 0x45, 0xff, 0x8a, 0x64, 0x3d, 0xff, 0xec, 0x9e, 0x4b, 0xff,\n  0xe8, 0x9c, 0x4a, 0xff, 0xe8, 0x9c, 0x4a, 0xff, 0xe8, 0x9c, 0x4a, 0xff,\n  0xe8, 0x9c, 0x4a, 0xff, 0xea, 0x9c, 0x4a, 0xff, 0xd4, 0x90, 0x47, 0xff,\n  0x42, 0x3a, 0x35, 0xff, 0x2d, 0x2d, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x30, 0x2f, 0x33, 0xff, 0x42, 0x35, 0x3a, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x37, 0x3c, 0xff,\n  0x42, 0x40, 0x44, 0xff, 0x41, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x38, 0x38, 0x3c, 0xff, 0x2f, 0x30, 0x34, 0xff, 0x38, 0x3f, 0x46, 0xff,\n  0x38, 0x3f, 0x46, 0xff, 0x2f, 0x30, 0x34, 0xff, 0x39, 0x35, 0x33, 0xff,\n  0x45, 0x3c, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff,\n  0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff,\n  0x42, 0x3a, 0x35, 0xff, 0x30, 0x2f, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2e, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2d, 0x2d, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x35, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x31, 0x31, 0x35, 0xff,\n  0x2f, 0x2f, 0x33, 0xff, 0x33, 0x34, 0x38, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x31, 0x31, 0x35, 0xff, 0x2f, 0x2f, 0x33, 0xff,\n  0x33, 0x34, 0x38, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x33, 0x34, 0x38, 0xff, 0x2f, 0x2f, 0x33, 0xff,\n  0x31, 0x31, 0x35, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x31, 0x31, 0x35, 0xff,\n  0x2f, 0x2f, 0x33, 0xff, 0x33, 0x34, 0x38, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x33, 0x34, 0x38, 0xff, 0x2f, 0x2f, 0x33, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x47, 0x49, 0x4d, 0xff,\n  0x61, 0x64, 0x68, 0xff, 0x60, 0x63, 0x67, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x47, 0x48, 0x4c, 0xff, 0x32, 0x33, 0x37, 0xff, 0x5a, 0x5e, 0x62, 0xff,\n  0x60, 0x64, 0x68, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x61, 0x64, 0x68, 0xff, 0x47, 0x48, 0x4c, 0xff,\n  0x32, 0x33, 0x37, 0xff, 0x5a, 0x5e, 0x62, 0xff, 0x60, 0x64, 0x68, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x64, 0x68, 0xff, 0x5a, 0x5e, 0x62, 0xff,\n  0x32, 0x33, 0x37, 0xff, 0x47, 0x48, 0x4c, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x47, 0x48, 0x4c, 0xff, 0x32, 0x33, 0x37, 0xff, 0x5a, 0x5e, 0x62, 0xff,\n  0x60, 0x64, 0x68, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x64, 0x68, 0xff, 0x5a, 0x5e, 0x62, 0xff, 0x33, 0x34, 0x38, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x32, 0x32, 0x36, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x40, 0x40, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x4a, 0x4c, 0x50, 0xff, 0x68, 0x6c, 0x70, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x68, 0x6c, 0x70, 0xff, 0x4a, 0x4c, 0x50, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x61, 0x64, 0x68, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x68, 0x6c, 0x70, 0xff,\n  0x4a, 0x4c, 0x50, 0xff, 0x33, 0x33, 0x37, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x61, 0x64, 0x68, 0xff, 0x33, 0x33, 0x37, 0xff, 0x4a, 0x4c, 0x50, 0xff,\n  0x68, 0x6c, 0x70, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x68, 0x6c, 0x70, 0xff, 0x4a, 0x4c, 0x50, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x61, 0x64, 0x68, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff,\n  0x67, 0x6b, 0x6f, 0xff, 0x67, 0x6b, 0x6f, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x47, 0x49, 0x4d, 0xff, 0x61, 0x64, 0x68, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x61, 0x64, 0x68, 0xff, 0x47, 0x48, 0x4c, 0xff,\n  0x32, 0x33, 0x37, 0xff, 0x5a, 0x5e, 0x62, 0xff, 0x60, 0x64, 0x68, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x61, 0x64, 0x68, 0xff, 0x47, 0x48, 0x4c, 0xff, 0x32, 0x33, 0x37, 0xff,\n  0x5a, 0x5e, 0x62, 0xff, 0x60, 0x64, 0x68, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x64, 0x68, 0xff, 0x5a, 0x5e, 0x62, 0xff, 0x32, 0x33, 0x37, 0xff,\n  0x47, 0x48, 0x4c, 0xff, 0x61, 0x64, 0x68, 0xff, 0x60, 0x63, 0x67, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x61, 0x64, 0x68, 0xff, 0x47, 0x48, 0x4c, 0xff,\n  0x32, 0x33, 0x37, 0xff, 0x5a, 0x5e, 0x62, 0xff, 0x60, 0x64, 0x68, 0xff,\n  0x60, 0x63, 0x67, 0xff, 0x60, 0x63, 0x67, 0xff, 0x60, 0x64, 0x68, 0xff,\n  0x5a, 0x5e, 0x62, 0xff, 0x33, 0x34, 0x38, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x30, 0x31, 0x35, 0xff,\n  0x33, 0x34, 0x38, 0xff, 0x33, 0x34, 0x38, 0xff, 0x33, 0x34, 0x38, 0xff,\n  0x30, 0x31, 0x35, 0xff, 0x2d, 0x2e, 0x32, 0xff, 0x32, 0x33, 0x37, 0xff,\n  0x33, 0x34, 0x38, 0xff, 0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x32, 0x33, 0x36, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff, 0x32, 0x33, 0x36, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x30, 0x30, 0x34, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff, 0x33, 0x33, 0x37, 0xff,\n  0x30, 0x31, 0x35, 0xff, 0x2f, 0x2f, 0x33, 0xff, 0x33, 0x34, 0x38, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff, 0x34, 0x35, 0x39, 0xff,\n  0x34, 0x35, 0x39, 0xff, 0x33, 0x34, 0x38, 0xff, 0x2f, 0x2f, 0x33, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x39, 0x32, 0x36, 0xff, 0x44, 0x35, 0x3b, 0xff, 0x43, 0x35, 0x3a, 0xff,\n  0x43, 0x35, 0x3a, 0xff, 0x44, 0x35, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x35, 0x3a, 0xff, 0x42, 0x3b, 0x40, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x46, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x46, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x41, 0x41, 0x46, 0xff, 0x38, 0x38, 0x3c, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2b, 0x2d, 0x31, 0xff, 0x88, 0x4d, 0x56, 0xff, 0xe5, 0x6e, 0x7c, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6b, 0x78, 0xff, 0xd7, 0x9d, 0xa6, 0xff,\n  0xcd, 0xcf, 0xd4, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xd1, 0xd1, 0xd5, 0xff, 0x7e, 0x7e, 0x82, 0xff,\n  0x2b, 0x2b, 0x2f, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2a, 0x2d, 0x30, 0xff, 0x94, 0x52, 0x5b, 0xff,\n  0xfe, 0x76, 0x86, 0xff, 0xfa, 0x75, 0x84, 0xff, 0xfa, 0x75, 0x84, 0xff,\n  0xfa, 0x75, 0x84, 0xff, 0xfa, 0x75, 0x84, 0xff, 0xfa, 0x73, 0x82, 0xff,\n  0xef, 0xac, 0xb6, 0xff, 0xe3, 0xe6, 0xeb, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe7, 0xe7, 0xec, 0xff,\n  0x89, 0x89, 0x8d, 0xff, 0x2b, 0x2b, 0x2f, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2b, 0x2d, 0x31, 0xff,\n  0x88, 0x4d, 0x56, 0xff, 0xe5, 0x6e, 0x7c, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6b, 0x78, 0xff, 0xd7, 0x9d, 0xa6, 0xff, 0xcd, 0xcf, 0xd4, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xd1, 0xd1, 0xd5, 0xff, 0x7e, 0x7e, 0x82, 0xff, 0x2b, 0x2b, 0x2f, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x38, 0x31, 0x36, 0xff, 0x43, 0x34, 0x3a, 0xff,\n  0x43, 0x34, 0x39, 0xff, 0x43, 0x34, 0x39, 0xff, 0x43, 0x34, 0x39, 0xff,\n  0x43, 0x34, 0x39, 0xff, 0x43, 0x34, 0x39, 0xff, 0x41, 0x3a, 0x3f, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff,\n  0x40, 0x41, 0x44, 0xff, 0x41, 0x41, 0x45, 0xff, 0x36, 0x37, 0x3b, 0xff,\n  0x2c, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x37, 0x37, 0x3c, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff,\n  0x40, 0x40, 0x44, 0xff, 0x40, 0x40, 0x44, 0xff, 0x40, 0x3b, 0x43, 0xff,\n  0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff,\n  0x41, 0x37, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x41, 0x3d, 0x44, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x3f, 0x3f, 0x43, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2b, 0x2b, 0x2f, 0xff,\n  0x7e, 0x7e, 0x82, 0xff, 0xd1, 0xd1, 0xd5, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcf, 0xd3, 0xff,\n  0xcf, 0xa7, 0xc5, 0xff, 0xd1, 0x7e, 0xb8, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd0, 0x7e, 0xb7, 0xff, 0xcc, 0xa5, 0xc3, 0xff,\n  0xcf, 0xd0, 0xd4, 0xff, 0xbc, 0xbc, 0xc1, 0xff, 0x3f, 0x3f, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2b, 0x2b, 0x2f, 0xff, 0x89, 0x89, 0x8d, 0xff, 0xe7, 0xe7, 0xec, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe5, 0xe9, 0xff, 0xe6, 0xb8, 0xda, 0xff, 0xe8, 0x8a, 0xcb, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe7, 0x89, 0xca, 0xff,\n  0xe2, 0xb6, 0xd7, 0xff, 0xe5, 0xe7, 0xeb, 0xff, 0xd0, 0xd0, 0xd5, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2b, 0x2b, 0x2f, 0xff, 0x7e, 0x7e, 0x82, 0xff,\n  0xd1, 0xd1, 0xd5, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcf, 0xd3, 0xff, 0xcf, 0xa7, 0xc5, 0xff,\n  0xd1, 0x7e, 0xb8, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd0, 0x7e, 0xb7, 0xff, 0xcc, 0xa5, 0xc3, 0xff, 0xcf, 0xd0, 0xd4, 0xff,\n  0xbc, 0xbc, 0xc1, 0xff, 0x3f, 0x3f, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x38, 0x38, 0x3c, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x41, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x44, 0xff,\n  0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff,\n  0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x41, 0x41, 0x45, 0xff, 0x41, 0x41, 0x46, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff, 0x40, 0x41, 0x45, 0xff,\n  0x40, 0x41, 0x45, 0xff, 0x41, 0x41, 0x46, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x40, 0x41, 0x44, 0xff, 0x40, 0x41, 0x44, 0xff, 0x41, 0x41, 0x45, 0xff,\n  0x42, 0x3d, 0x44, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x41, 0x3d, 0x44, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x3f, 0x3f, 0x43, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2f, 0x2e, 0x32, 0xff, 0x3e, 0x36, 0x3f, 0xff,\n  0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff,\n  0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff,\n  0x41, 0x37, 0x41, 0xff, 0x3e, 0x36, 0x3f, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x38, 0x33, 0x32, 0xff, 0x44, 0x3a, 0x34, 0xff, 0x43, 0x3a, 0x34, 0xff,\n  0x44, 0x3a, 0x34, 0xff, 0x41, 0x39, 0x33, 0xff, 0x2f, 0x2e, 0x31, 0xff,\n  0x36, 0x32, 0x39, 0xff, 0x41, 0x37, 0x41, 0xff, 0x41, 0x37, 0x41, 0xff,\n  0x37, 0x32, 0x39, 0xff, 0x2c, 0x2d, 0x30, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x40, 0x37, 0x41, 0xff,\n  0xbf, 0x77, 0xaa, 0xff, 0xd2, 0x81, 0xba, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd2, 0x81, 0xba, 0xff, 0xbf, 0x77, 0xaa, 0xff,\n  0x3c, 0x35, 0x40, 0xff, 0x8a, 0x64, 0x3d, 0xff, 0xec, 0x9e, 0x4b, 0xff,\n  0xe8, 0x9c, 0x4a, 0xff, 0xea, 0x9c, 0x4a, 0xff, 0xd4, 0x90, 0x47, 0xff,\n  0x3f, 0x38, 0x32, 0xff, 0x7e, 0x56, 0x75, 0xff, 0xd4, 0x82, 0xbb, 0xff,\n  0xd4, 0x82, 0xbb, 0xff, 0x80, 0x57, 0x75, 0xff, 0x2b, 0x2c, 0x2f, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x32, 0x32, 0x36, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x40, 0x40, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x42, 0x38, 0x43, 0xff, 0xd3, 0x81, 0xbb, 0xff, 0xe9, 0x8c, 0xcc, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xe8, 0x8b, 0xcb, 0xff, 0xe9, 0x8c, 0xcc, 0xff,\n  0xd3, 0x81, 0xbb, 0xff, 0x3e, 0x36, 0x42, 0xff, 0x95, 0x6c, 0x3f, 0xff,\n  0xff, 0xad, 0x4e, 0xff, 0xff, 0xab, 0x4d, 0xff, 0xff, 0xac, 0x4e, 0xff,\n  0xe8, 0x9d, 0x4a, 0xff, 0x41, 0x3a, 0x32, 0xff, 0x89, 0x5c, 0x7e, 0xff,\n  0xeb, 0x8d, 0xce, 0xff, 0xeb, 0x8d, 0xce, 0xff, 0x8b, 0x5d, 0x7f, 0xff,\n  0x2a, 0x2c, 0x2f, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x40, 0x37, 0x41, 0xff, 0xbf, 0x77, 0xaa, 0xff,\n  0xd2, 0x81, 0xba, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd2, 0x81, 0xba, 0xff, 0xbf, 0x77, 0xaa, 0xff, 0x3c, 0x35, 0x40, 0xff,\n  0x8a, 0x64, 0x3d, 0xff, 0xec, 0x9e, 0x4b, 0xff, 0xe8, 0x9c, 0x4a, 0xff,\n  0xea, 0x9c, 0x4a, 0xff, 0xd4, 0x90, 0x47, 0xff, 0x3f, 0x38, 0x32, 0xff,\n  0x7e, 0x56, 0x75, 0xff, 0xd4, 0x82, 0xbb, 0xff, 0xd4, 0x82, 0xbb, 0xff,\n  0x80, 0x57, 0x75, 0xff, 0x2b, 0x2c, 0x2f, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x30, 0x2f, 0x34, 0xff,\n  0x40, 0x37, 0x41, 0xff, 0x42, 0x38, 0x43, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x43, 0xff, 0x40, 0x37, 0x41, 0xff,\n  0x30, 0x2f, 0x34, 0xff, 0x39, 0x35, 0x33, 0xff, 0x45, 0x3c, 0x35, 0xff,\n  0x45, 0x3b, 0x35, 0xff, 0x45, 0x3b, 0x35, 0xff, 0x42, 0x3a, 0x35, 0xff,\n  0x30, 0x2f, 0x32, 0xff, 0x38, 0x33, 0x3a, 0xff, 0x42, 0x38, 0x43, 0xff,\n  0x42, 0x38, 0x43, 0xff, 0x38, 0x33, 0x3a, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x32, 0xff,\n  0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff, 0x2c, 0x2d, 0x32, 0xff,\n  0x2d, 0x2d, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2e, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2e, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x38, 0x33, 0x3a, 0xff,\n  0x42, 0x38, 0x43, 0xff, 0x42, 0x38, 0x42, 0xff, 0x42, 0x38, 0x43, 0xff,\n  0x38, 0x33, 0x3a, 0xff, 0x30, 0x2f, 0x33, 0xff, 0x42, 0x35, 0x3a, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x35, 0x3b, 0xff, 0x43, 0x3c, 0x40, 0xff,\n  0x41, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x3f, 0x3f, 0x43, 0xff, 0x30, 0x30, 0x34, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff,\n  0x3e, 0x3e, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2b, 0x2c, 0x2f, 0xff,\n  0x80, 0x57, 0x75, 0xff, 0xd4, 0x82, 0xbb, 0xff, 0xd1, 0x80, 0xb9, 0xff,\n  0xd4, 0x82, 0xbb, 0xff, 0x7e, 0x57, 0x75, 0xff, 0x3e, 0x33, 0x37, 0xff,\n  0xce, 0x66, 0x72, 0xff, 0xe2, 0x6d, 0x7b, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6b, 0x78, 0xff,\n  0xd7, 0x9d, 0xa6, 0xff, 0xcd, 0xcf, 0xd4, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcf, 0xcf, 0xd4, 0xff, 0xbc, 0xbc, 0xc1, 0xff,\n  0x3f, 0x3f, 0x43, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x4f, 0x4f, 0x55, 0xff, 0x53, 0x53, 0x5a, 0xff, 0x53, 0x53, 0x5a, 0xff,\n  0x53, 0x53, 0x5a, 0xff, 0x40, 0x40, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2a, 0x2c, 0x2f, 0xff, 0x8b, 0x5d, 0x7f, 0xff, 0xeb, 0x8d, 0xce, 0xff,\n  0xe8, 0x8b, 0xcb, 0xff, 0xeb, 0x8d, 0xce, 0xff, 0x89, 0x5c, 0x7e, 0xff,\n  0x41, 0x34, 0x38, 0xff, 0xe4, 0x6d, 0x7b, 0xff, 0xfb, 0x76, 0x85, 0xff,\n  0xfa, 0x75, 0x84, 0xff, 0xfa, 0x75, 0x84, 0xff, 0xfa, 0x75, 0x84, 0xff,\n  0xfa, 0x73, 0x82, 0xff, 0xef, 0xac, 0xb6, 0xff, 0xe3, 0xe6, 0xeb, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff,\n  0xe4, 0xe4, 0xe9, 0xff, 0xe4, 0xe4, 0xe9, 0xff, 0xe5, 0xe5, 0xea, 0xff,\n  0xd0, 0xd0, 0xd5, 0xff, 0x42, 0x42, 0x46, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x31, 0x31, 0x36, 0xff, 0x4b, 0x4b, 0x51, 0xff, 0x4e, 0x4e, 0x55, 0xff,\n  0x4e, 0x4e, 0x55, 0xff, 0x4f, 0x4f, 0x55, 0xff, 0x3e, 0x3e, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2b, 0x2c, 0x2f, 0xff, 0x80, 0x57, 0x75, 0xff,\n  0xd4, 0x82, 0xbb, 0xff, 0xd1, 0x80, 0xb9, 0xff, 0xd4, 0x82, 0xbb, 0xff,\n  0x7e, 0x57, 0x75, 0xff, 0x3e, 0x33, 0x37, 0xff, 0xce, 0x66, 0x72, 0xff,\n  0xe2, 0x6d, 0x7b, 0xff, 0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6c, 0x7a, 0xff,\n  0xe1, 0x6c, 0x7a, 0xff, 0xe1, 0x6b, 0x78, 0xff, 0xd7, 0x9d, 0xa6, 0xff,\n  0xcd, 0xcf, 0xd4, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff, 0xcd, 0xcd, 0xd2, 0xff,\n  0xcf, 0xcf, 0xd4, 0xff, 0xbc, 0xbc, 0xc1, 0xff, 0x3f, 0x3f, 0x43, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x31, 0x31, 0x36, 0xff,\n  0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff, 0x32, 0x32, 0x36, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x38, 0x33, 0x3a, 0xff, 0x42, 0x38, 0x43, 0xff, 0x42, 0x38, 0x42, 0xff,\n  0x42, 0x38, 0x43, 0xff, 0x38, 0x33, 0x3a, 0xff, 0x30, 0x2f, 0x33, 0xff,\n  0x42, 0x35, 0x3a, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff,\n  0x44, 0x36, 0x3b, 0xff, 0x44, 0x36, 0x3b, 0xff, 0x44, 0x35, 0x3b, 0xff,\n  0x43, 0x3c, 0x40, 0xff, 0x41, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff,\n  0x42, 0x42, 0x46, 0xff, 0x42, 0x42, 0x46, 0xff, 0x3f, 0x3f, 0x43, 0xff,\n  0x30, 0x30, 0x34, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2e, 0x31, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2d, 0x2e, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff, 0x2d, 0x2d, 0x31, 0xff,\n  0x2d, 0x2d, 0x31, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xe4,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xe4,\n  0x2e, 0x2e, 0x32, 0x6e, 0x2e, 0x2e, 0x32, 0xe4, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff,\n  0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xff, 0x2e, 0x2e, 0x32, 0xe4,\n  0x2e, 0x2e, 0x32, 0x6e\n};\nstatic unsigned int icon_rgba_len = 16384;\n"
  },
  {
    "path": "res.rc",
    "content": "id ICON \"icon.ico\"\n\n"
  },
  {
    "path": "src/api/api.c",
    "content": "#include \"api.h\"\n\n\nint luaopen_system(lua_State *L);\nint luaopen_renderer(lua_State *L);\n\n\nstatic const luaL_Reg libs[] = {\n  { \"system\",    luaopen_system     },\n  { \"renderer\",  luaopen_renderer   },\n  { NULL, NULL }\n};\n\nvoid api_load_libs(lua_State *L) {\n  for (int i = 0; libs[i].name; i++) {\n    luaL_requiref(L, libs[i].name, libs[i].func, 1);\n  }\n}\n"
  },
  {
    "path": "src/api/api.h",
    "content": "#ifndef API_H\n#define API_H\n\n#include \"lib/lua52/lua.h\"\n#include \"lib/lua52/lauxlib.h\"\n#include \"lib/lua52/lualib.h\"\n\n#define API_TYPE_FONT \"Font\"\n\nvoid api_load_libs(lua_State *L);\n\n#endif\n"
  },
  {
    "path": "src/api/renderer.c",
    "content": "#include \"api.h\"\n#include \"renderer.h\"\n#include \"rencache.h\"\n\n\nstatic RenColor checkcolor(lua_State *L, int idx, int def) {\n  RenColor color;\n  if (lua_isnoneornil(L, idx)) {\n    return (RenColor) { def, def, def, 255 };\n  }\n  lua_rawgeti(L, idx, 1);\n  lua_rawgeti(L, idx, 2);\n  lua_rawgeti(L, idx, 3);\n  lua_rawgeti(L, idx, 4);\n  color.r = luaL_checknumber(L, -4);\n  color.g = luaL_checknumber(L, -3);\n  color.b = luaL_checknumber(L, -2);\n  color.a = luaL_optnumber(L, -1, 255);\n  lua_pop(L, 4);\n  return color;\n}\n\n\nstatic int f_show_debug(lua_State *L) {\n  luaL_checkany(L, 1);\n  rencache_show_debug(lua_toboolean(L, 1));\n  return 0;\n}\n\n\nstatic int f_get_size(lua_State *L) {\n  int w, h;\n  ren_get_size(&w, &h);\n  lua_pushnumber(L, w);\n  lua_pushnumber(L, h);\n  return 2;\n}\n\n\nstatic int f_begin_frame(lua_State *L) {\n  rencache_begin_frame();\n  return 0;\n}\n\n\nstatic int f_end_frame(lua_State *L) {\n  rencache_end_frame();\n  return 0;\n}\n\n\nstatic int f_set_clip_rect(lua_State *L) {\n  RenRect rect;\n  rect.x = luaL_checknumber(L, 1);\n  rect.y = luaL_checknumber(L, 2);\n  rect.width = luaL_checknumber(L, 3);\n  rect.height = luaL_checknumber(L, 4);\n  rencache_set_clip_rect(rect);\n  return 0;\n}\n\n\nstatic int f_draw_rect(lua_State *L) {\n  RenRect rect;\n  rect.x = luaL_checknumber(L, 1);\n  rect.y = luaL_checknumber(L, 2);\n  rect.width = luaL_checknumber(L, 3);\n  rect.height = luaL_checknumber(L, 4);\n  RenColor color = checkcolor(L, 5, 255);\n  rencache_draw_rect(rect, color);\n  return 0;\n}\n\n\nstatic int f_draw_text(lua_State *L) {\n  RenFont **font = luaL_checkudata(L, 1, API_TYPE_FONT);\n  const char *text = luaL_checkstring(L, 2);\n  int x = luaL_checknumber(L, 3);\n  int y = luaL_checknumber(L, 4);\n  RenColor color = checkcolor(L, 5, 255);\n  x = rencache_draw_text(*font, text, x, y, color);\n  lua_pushnumber(L, x);\n  return 1;\n}\n\n\nstatic const luaL_Reg lib[] = {\n  { \"show_debug\",    f_show_debug    },\n  { \"get_size\",      f_get_size      },\n  { \"begin_frame\",   f_begin_frame   },\n  { \"end_frame\",     f_end_frame     },\n  { \"set_clip_rect\", f_set_clip_rect },\n  { \"draw_rect\",     f_draw_rect     },\n  { \"draw_text\",     f_draw_text     },\n  { NULL,            NULL            }\n};\n\n\nint luaopen_renderer_font(lua_State *L);\n\nint luaopen_renderer(lua_State *L) {\n  luaL_newlib(L, lib);\n  luaopen_renderer_font(L);\n  lua_setfield(L, -2, \"font\");\n  return 1;\n}\n"
  },
  {
    "path": "src/api/renderer_font.c",
    "content": "#include \"api.h\"\n#include \"renderer.h\"\n#include \"rencache.h\"\n\n\nstatic int f_load(lua_State *L) {\n  const char *filename  = luaL_checkstring(L, 1);\n  float size = luaL_checknumber(L, 2);\n  RenFont **self = lua_newuserdata(L, sizeof(*self));\n  luaL_setmetatable(L, API_TYPE_FONT);\n  *self = ren_load_font(filename, size);\n  if (!*self) { luaL_error(L, \"failed to load font\"); }\n  return 1;\n}\n\n\nstatic int f_set_tab_width(lua_State *L) {\n  RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT);\n  int n = luaL_checknumber(L, 2);\n  ren_set_font_tab_width(*self, n);\n  return 0;\n}\n\n\nstatic int f_gc(lua_State *L) {\n  RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT);\n  if (*self) { rencache_free_font(*self); }\n  return 0;\n}\n\n\nstatic int f_get_width(lua_State *L) {\n  RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT);\n  const char *text = luaL_checkstring(L, 2);\n  lua_pushnumber(L, ren_get_font_width(*self, text) );\n  return 1;\n}\n\n\nstatic int f_get_height(lua_State *L) {\n  RenFont **self = luaL_checkudata(L, 1, API_TYPE_FONT);\n  lua_pushnumber(L, ren_get_font_height(*self) );\n  return 1;\n}\n\n\nstatic const luaL_Reg lib[] = {\n  { \"__gc\",          f_gc            },\n  { \"load\",          f_load          },\n  { \"set_tab_width\", f_set_tab_width },\n  { \"get_width\",     f_get_width     },\n  { \"get_height\",    f_get_height    },\n  { NULL, NULL }\n};\n\nint luaopen_renderer_font(lua_State *L) {\n  luaL_newmetatable(L, API_TYPE_FONT);\n  luaL_setfuncs(L, lib, 0);\n  lua_pushvalue(L, -1);\n  lua_setfield(L, -2, \"__index\");\n  return 1;\n}\n"
  },
  {
    "path": "src/api/system.c",
    "content": "#include <SDL2/SDL.h>\n#include <stdbool.h>\n#include <ctype.h>\n#include <dirent.h>\n#include <unistd.h>\n#include <errno.h>\n#include <sys/stat.h>\n#include \"api.h\"\n#include \"rencache.h\"\n#ifdef _WIN32\n  #include <windows.h>\n#endif\n\nextern SDL_Window *window;\n\n\nstatic const char* button_name(int button) {\n  switch (button) {\n    case 1  : return \"left\";\n    case 2  : return \"middle\";\n    case 3  : return \"right\";\n    default : return \"?\";\n  }\n}\n\n\nstatic char* key_name(char *dst, int sym) {\n  strcpy(dst, SDL_GetKeyName(sym));\n  char *p = dst;\n  while (*p) {\n    *p = tolower(*p);\n    p++;\n  }\n  return dst;\n}\n\n\nstatic int f_poll_event(lua_State *L) {\n  char buf[16];\n  int mx, my, wx, wy;\n  SDL_Event e;\n\ntop:\n  if ( !SDL_PollEvent(&e) ) {\n    return 0;\n  }\n\n  switch (e.type) {\n    case SDL_QUIT:\n      lua_pushstring(L, \"quit\");\n      return 1;\n\n    case SDL_WINDOWEVENT:\n      if (e.window.event == SDL_WINDOWEVENT_RESIZED) {\n        lua_pushstring(L, \"resized\");\n        lua_pushnumber(L, e.window.data1);\n        lua_pushnumber(L, e.window.data2);\n        return 3;\n      } else if (e.window.event == SDL_WINDOWEVENT_EXPOSED) {\n        rencache_invalidate();\n        lua_pushstring(L, \"exposed\");\n        return 1;\n      }\n      /* on some systems, when alt-tabbing to the window SDL will queue up\n      ** several KEYDOWN events for the `tab` key; we flush all keydown\n      ** events on focus so these are discarded */\n      if (e.window.event == SDL_WINDOWEVENT_FOCUS_GAINED) {\n        SDL_FlushEvent(SDL_KEYDOWN);\n      }\n      goto top;\n\n    case SDL_DROPFILE:\n      SDL_GetGlobalMouseState(&mx, &my);\n      SDL_GetWindowPosition(window, &wx, &wy);\n      lua_pushstring(L, \"filedropped\");\n      lua_pushstring(L, e.drop.file);\n      lua_pushnumber(L, mx - wx);\n      lua_pushnumber(L, my - wy);\n      SDL_free(e.drop.file);\n      return 4;\n\n    case SDL_KEYDOWN:\n      lua_pushstring(L, \"keypressed\");\n      lua_pushstring(L, key_name(buf, e.key.keysym.sym));\n      return 2;\n\n    case SDL_KEYUP:\n      lua_pushstring(L, \"keyreleased\");\n      lua_pushstring(L, key_name(buf, e.key.keysym.sym));\n      return 2;\n\n    case SDL_TEXTINPUT:\n      lua_pushstring(L, \"textinput\");\n      lua_pushstring(L, e.text.text);\n      return 2;\n\n    case SDL_MOUSEBUTTONDOWN:\n      if (e.button.button == 1) { SDL_CaptureMouse(1); }\n      lua_pushstring(L, \"mousepressed\");\n      lua_pushstring(L, button_name(e.button.button));\n      lua_pushnumber(L, e.button.x);\n      lua_pushnumber(L, e.button.y);\n      lua_pushnumber(L, e.button.clicks);\n      return 5;\n\n    case SDL_MOUSEBUTTONUP:\n      if (e.button.button == 1) { SDL_CaptureMouse(0); }\n      lua_pushstring(L, \"mousereleased\");\n      lua_pushstring(L, button_name(e.button.button));\n      lua_pushnumber(L, e.button.x);\n      lua_pushnumber(L, e.button.y);\n      return 4;\n\n    case SDL_MOUSEMOTION:\n      lua_pushstring(L, \"mousemoved\");\n      lua_pushnumber(L, e.motion.x);\n      lua_pushnumber(L, e.motion.y);\n      lua_pushnumber(L, e.motion.xrel);\n      lua_pushnumber(L, e.motion.yrel);\n      return 5;\n\n    case SDL_MOUSEWHEEL:\n      lua_pushstring(L, \"mousewheel\");\n      lua_pushnumber(L, e.wheel.y);\n      return 2;\n\n    default:\n      goto top;\n  }\n\n  return 0;\n}\n\n\nstatic int f_wait_event(lua_State *L) {\n  double n = luaL_checknumber(L, 1);\n  lua_pushboolean(L, SDL_WaitEventTimeout(NULL, n * 1000));\n  return 1;\n}\n\n\nstatic SDL_Cursor* cursor_cache[SDL_SYSTEM_CURSOR_HAND + 1];\n\nstatic const char *cursor_opts[] = {\n  \"arrow\",\n  \"ibeam\",\n  \"sizeh\",\n  \"sizev\",\n  \"hand\",\n  NULL\n};\n\nstatic const int cursor_enums[] = {\n  SDL_SYSTEM_CURSOR_ARROW,\n  SDL_SYSTEM_CURSOR_IBEAM,\n  SDL_SYSTEM_CURSOR_SIZEWE,\n  SDL_SYSTEM_CURSOR_SIZENS,\n  SDL_SYSTEM_CURSOR_HAND\n};\n\nstatic int f_set_cursor(lua_State *L) {\n  int opt = luaL_checkoption(L, 1, \"arrow\", cursor_opts);\n  int n = cursor_enums[opt];\n  SDL_Cursor *cursor = cursor_cache[n];\n  if (!cursor) {\n    cursor = SDL_CreateSystemCursor(n);\n    cursor_cache[n] = cursor;\n  }\n  SDL_SetCursor(cursor);\n  return 0;\n}\n\n\nstatic int f_set_window_title(lua_State *L) {\n  const char *title = luaL_checkstring(L, 1);\n  SDL_SetWindowTitle(window, title);\n  return 0;\n}\n\n\nstatic const char *window_opts[] = { \"normal\", \"maximized\", \"fullscreen\", 0 };\nenum { WIN_NORMAL, WIN_MAXIMIZED, WIN_FULLSCREEN };\n\nstatic int f_set_window_mode(lua_State *L) {\n  int n = luaL_checkoption(L, 1, \"normal\", window_opts);\n  SDL_SetWindowFullscreen(window,\n    n == WIN_FULLSCREEN ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);\n  if (n == WIN_NORMAL) { SDL_RestoreWindow(window); }\n  if (n == WIN_MAXIMIZED) { SDL_MaximizeWindow(window); }\n  return 0;\n}\n\n\nstatic int f_window_has_focus(lua_State *L) {\n  unsigned flags = SDL_GetWindowFlags(window);\n  lua_pushboolean(L, flags & SDL_WINDOW_INPUT_FOCUS);\n  return 1;\n}\n\n\nstatic int f_show_confirm_dialog(lua_State *L) {\n  const char *title = luaL_checkstring(L, 1);\n  const char *msg = luaL_checkstring(L, 2);\n\n#if _WIN32\n  int id = MessageBox(0, msg, title, MB_YESNO | MB_ICONWARNING);\n  lua_pushboolean(L, id == IDYES);\n\n#else\n  SDL_MessageBoxButtonData buttons[] = {\n    { SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, 1, \"Yes\" },\n    { SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, 0, \"No\" },\n  };\n  SDL_MessageBoxData data = {\n    .title = title,\n    .message = msg,\n    .numbuttons = 2,\n    .buttons = buttons,\n  };\n  int buttonid;\n  SDL_ShowMessageBox(&data, &buttonid);\n  lua_pushboolean(L, buttonid == 1);\n#endif\n  return 1;\n}\n\n\nstatic int f_chdir(lua_State *L) {\n  const char *path = luaL_checkstring(L, 1);\n  int err = chdir(path);\n  if (err) { luaL_error(L, \"chdir() failed\"); }\n  return 0;\n}\n\n\nstatic int f_list_dir(lua_State *L) {\n  const char *path = luaL_checkstring(L, 1);\n\n  DIR *dir = opendir(path);\n  if (!dir) {\n    lua_pushnil(L);\n    lua_pushstring(L, strerror(errno));\n    return 2;\n  }\n\n  lua_newtable(L);\n  int i = 1;\n  struct dirent *entry;\n  while ( (entry = readdir(dir)) ) {\n    if (strcmp(entry->d_name, \".\" ) == 0) { continue; }\n    if (strcmp(entry->d_name, \"..\") == 0) { continue; }\n    lua_pushstring(L, entry->d_name);\n    lua_rawseti(L, -2, i);\n    i++;\n  }\n\n  closedir(dir);\n  return 1;\n}\n\n\n#ifdef _WIN32\n  #include <windows.h>\n  #define realpath(x, y) _fullpath(y, x, MAX_PATH)\n#endif\n\nstatic int f_absolute_path(lua_State *L) {\n  const char *path = luaL_checkstring(L, 1);\n  char *res = realpath(path, NULL);\n  if (!res) { return 0; }\n  lua_pushstring(L, res);\n  free(res);\n  return 1;\n}\n\n\nstatic int f_get_file_info(lua_State *L) {\n  const char *path = luaL_checkstring(L, 1);\n\n  struct stat s;\n  int err = stat(path, &s);\n  if (err < 0) {\n    lua_pushnil(L);\n    lua_pushstring(L, strerror(errno));\n    return 2;\n  }\n\n  lua_newtable(L);\n  lua_pushnumber(L, s.st_mtime);\n  lua_setfield(L, -2, \"modified\");\n\n  lua_pushnumber(L, s.st_size);\n  lua_setfield(L, -2, \"size\");\n\n  if (S_ISREG(s.st_mode)) {\n    lua_pushstring(L, \"file\");\n  } else if (S_ISDIR(s.st_mode)) {\n    lua_pushstring(L, \"dir\");\n  } else {\n    lua_pushnil(L);\n  }\n  lua_setfield(L, -2, \"type\");\n\n  return 1;\n}\n\n\nstatic int f_get_clipboard(lua_State *L) {\n  char *text = SDL_GetClipboardText();\n  if (!text) { return 0; }\n  lua_pushstring(L, text);\n  SDL_free(text);\n  return 1;\n}\n\n\nstatic int f_set_clipboard(lua_State *L) {\n  const char *text = luaL_checkstring(L, 1);\n  SDL_SetClipboardText(text);\n  return 0;\n}\n\n\nstatic int f_get_time(lua_State *L) {\n  double n = SDL_GetPerformanceCounter() / (double) SDL_GetPerformanceFrequency();\n  lua_pushnumber(L, n);\n  return 1;\n}\n\n\nstatic int f_sleep(lua_State *L) {\n  double n = luaL_checknumber(L, 1);\n  SDL_Delay(n * 1000);\n  return 0;\n}\n\n\nstatic int f_exec(lua_State *L) {\n  size_t len;\n  const char *cmd = luaL_checklstring(L, 1, &len);\n  char *buf = malloc(len + 32);\n  if (!buf) { luaL_error(L, \"buffer allocation failed\"); }\n#if _WIN32\n  sprintf(buf, \"cmd /c \\\"%s\\\"\", cmd);\n  WinExec(buf, SW_HIDE);\n#else\n  sprintf(buf, \"%s &\", cmd);\n  int res = system(buf);\n  (void) res;\n#endif\n  free(buf);\n  return 0;\n}\n\n\nstatic int f_fuzzy_match(lua_State *L) {\n  const char *str = luaL_checkstring(L, 1);\n  const char *ptn = luaL_checkstring(L, 2);\n  int score = 0;\n  int run = 0;\n\n  while (*str && *ptn) {\n    while (*str == ' ') { str++; }\n    while (*ptn == ' ') { ptn++; }\n    if (tolower(*str) == tolower(*ptn)) {\n      score += run * 10 - (*str != *ptn);\n      run++;\n      ptn++;\n    } else {\n      score -= 10;\n      run = 0;\n    }\n    str++;\n  }\n  if (*ptn) { return 0; }\n\n  lua_pushnumber(L, score - (int) strlen(str));\n  return 1;\n}\n\n\nstatic const luaL_Reg lib[] = {\n  { \"poll_event\",          f_poll_event          },\n  { \"wait_event\",          f_wait_event          },\n  { \"set_cursor\",          f_set_cursor          },\n  { \"set_window_title\",    f_set_window_title    },\n  { \"set_window_mode\",     f_set_window_mode     },\n  { \"window_has_focus\",    f_window_has_focus    },\n  { \"show_confirm_dialog\", f_show_confirm_dialog },\n  { \"chdir\",               f_chdir               },\n  { \"list_dir\",            f_list_dir            },\n  { \"absolute_path\",       f_absolute_path       },\n  { \"get_file_info\",       f_get_file_info       },\n  { \"get_clipboard\",       f_get_clipboard       },\n  { \"set_clipboard\",       f_set_clipboard       },\n  { \"get_time\",            f_get_time            },\n  { \"sleep\",               f_sleep               },\n  { \"exec\",                f_exec                },\n  { \"fuzzy_match\",         f_fuzzy_match         },\n  { NULL, NULL }\n};\n\n\nint luaopen_system(lua_State *L) {\n  luaL_newlib(L, lib);\n  return 1;\n}\n"
  },
  {
    "path": "src/lib/lua52/lapi.c",
    "content": "/*\n** $Id: lapi.c,v 2.171.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua API\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdarg.h>\n#include <string.h>\n\n#define lapi_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lapi.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n#include \"lundump.h\"\n#include \"lvm.h\"\n\n\n\nconst char lua_ident[] =\n  \"$LuaVersion: \" LUA_COPYRIGHT \" $\"\n  \"$LuaAuthors: \" LUA_AUTHORS \" $\";\n\n\n/* value at a non-valid index */\n#define NONVALIDVALUE\t\tcast(TValue *, luaO_nilobject)\n\n/* corresponding test */\n#define isvalid(o)\t((o) != luaO_nilobject)\n\n/* test for pseudo index */\n#define ispseudo(i)\t\t((i) <= LUA_REGISTRYINDEX)\n\n/* test for valid but not pseudo index */\n#define isstackindex(i, o)\t(isvalid(o) && !ispseudo(i))\n\n#define api_checkvalidindex(L, o)  api_check(L, isvalid(o), \"invalid index\")\n\n#define api_checkstackindex(L, i, o)  \\\n\tapi_check(L, isstackindex(i, o), \"index not in the stack\")\n\n\nstatic TValue *index2addr (lua_State *L, int idx) {\n  CallInfo *ci = L->ci;\n  if (idx > 0) {\n    TValue *o = ci->func + idx;\n    api_check(L, idx <= ci->top - (ci->func + 1), \"unacceptable index\");\n    if (o >= L->top) return NONVALIDVALUE;\n    else return o;\n  }\n  else if (!ispseudo(idx)) {  /* negative index */\n    api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), \"invalid index\");\n    return L->top + idx;\n  }\n  else if (idx == LUA_REGISTRYINDEX)\n    return &G(L)->l_registry;\n  else {  /* upvalues */\n    idx = LUA_REGISTRYINDEX - idx;\n    api_check(L, idx <= MAXUPVAL + 1, \"upvalue index too large\");\n    if (ttislcf(ci->func))  /* light C function? */\n      return NONVALIDVALUE;  /* it has no upvalues */\n    else {\n      CClosure *func = clCvalue(ci->func);\n      return (idx <= func->nupvalues) ? &func->upvalue[idx-1] : NONVALIDVALUE;\n    }\n  }\n}\n\n\n/*\n** to be called by 'lua_checkstack' in protected mode, to grow stack\n** capturing memory errors\n*/\nstatic void growstack (lua_State *L, void *ud) {\n  int size = *(int *)ud;\n  luaD_growstack(L, size);\n}\n\n\nLUA_API int lua_checkstack (lua_State *L, int size) {\n  int res;\n  CallInfo *ci = L->ci;\n  lua_lock(L);\n  if (L->stack_last - L->top > size)  /* stack large enough? */\n    res = 1;  /* yes; check is OK */\n  else {  /* no; need to grow stack */\n    int inuse = cast_int(L->top - L->stack) + EXTRA_STACK;\n    if (inuse > LUAI_MAXSTACK - size)  /* can grow without overflow? */\n      res = 0;  /* no */\n    else  /* try to grow stack */\n      res = (luaD_rawrunprotected(L, &growstack, &size) == LUA_OK);\n  }\n  if (res && ci->top < L->top + size)\n    ci->top = L->top + size;  /* adjust frame top */\n  lua_unlock(L);\n  return res;\n}\n\n\nLUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {\n  int i;\n  if (from == to) return;\n  lua_lock(to);\n  api_checknelems(from, n);\n  api_check(from, G(from) == G(to), \"moving among independent states\");\n  api_check(from, to->ci->top - to->top >= n, \"not enough elements to move\");\n  from->top -= n;\n  for (i = 0; i < n; i++) {\n    setobj2s(to, to->top++, from->top + i);\n  }\n  lua_unlock(to);\n}\n\n\nLUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) {\n  lua_CFunction old;\n  lua_lock(L);\n  old = G(L)->panic;\n  G(L)->panic = panicf;\n  lua_unlock(L);\n  return old;\n}\n\n\nLUA_API const lua_Number *lua_version (lua_State *L) {\n  static const lua_Number version = LUA_VERSION_NUM;\n  if (L == NULL) return &version;\n  else return G(L)->version;\n}\n\n\n\n/*\n** basic stack manipulation\n*/\n\n\n/*\n** convert an acceptable stack index into an absolute index\n*/\nLUA_API int lua_absindex (lua_State *L, int idx) {\n  return (idx > 0 || ispseudo(idx))\n         ? idx\n         : cast_int(L->top - L->ci->func + idx);\n}\n\n\nLUA_API int lua_gettop (lua_State *L) {\n  return cast_int(L->top - (L->ci->func + 1));\n}\n\n\nLUA_API void lua_settop (lua_State *L, int idx) {\n  StkId func = L->ci->func;\n  lua_lock(L);\n  if (idx >= 0) {\n    api_check(L, idx <= L->stack_last - (func + 1), \"new top too large\");\n    while (L->top < (func + 1) + idx)\n      setnilvalue(L->top++);\n    L->top = (func + 1) + idx;\n  }\n  else {\n    api_check(L, -(idx+1) <= (L->top - (func + 1)), \"invalid new top\");\n    L->top += idx+1;  /* `subtract' index (index is negative) */\n  }\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_remove (lua_State *L, int idx) {\n  StkId p;\n  lua_lock(L);\n  p = index2addr(L, idx);\n  api_checkstackindex(L, idx, p);\n  while (++p < L->top) setobjs2s(L, p-1, p);\n  L->top--;\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_insert (lua_State *L, int idx) {\n  StkId p;\n  StkId q;\n  lua_lock(L);\n  p = index2addr(L, idx);\n  api_checkstackindex(L, idx, p);\n  for (q = L->top; q > p; q--)  /* use L->top as a temporary */\n    setobjs2s(L, q, q - 1);\n  setobjs2s(L, p, L->top);\n  lua_unlock(L);\n}\n\n\nstatic void moveto (lua_State *L, TValue *fr, int idx) {\n  TValue *to = index2addr(L, idx);\n  api_checkvalidindex(L, to);\n  setobj(L, to, fr);\n  if (idx < LUA_REGISTRYINDEX)  /* function upvalue? */\n    luaC_barrier(L, clCvalue(L->ci->func), fr);\n  /* LUA_REGISTRYINDEX does not need gc barrier\n     (collector revisits it before finishing collection) */\n}\n\n\nLUA_API void lua_replace (lua_State *L, int idx) {\n  lua_lock(L);\n  api_checknelems(L, 1);\n  moveto(L, L->top - 1, idx);\n  L->top--;\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_copy (lua_State *L, int fromidx, int toidx) {\n  TValue *fr;\n  lua_lock(L);\n  fr = index2addr(L, fromidx);\n  moveto(L, fr, toidx);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushvalue (lua_State *L, int idx) {\n  lua_lock(L);\n  setobj2s(L, L->top, index2addr(L, idx));\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\n\n/*\n** access functions (stack -> C)\n*/\n\n\nLUA_API int lua_type (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  return (isvalid(o) ? ttypenv(o) : LUA_TNONE);\n}\n\n\nLUA_API const char *lua_typename (lua_State *L, int t) {\n  UNUSED(L);\n  return ttypename(t);\n}\n\n\nLUA_API int lua_iscfunction (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  return (ttislcf(o) || (ttisCclosure(o)));\n}\n\n\nLUA_API int lua_isnumber (lua_State *L, int idx) {\n  TValue n;\n  const TValue *o = index2addr(L, idx);\n  return tonumber(o, &n);\n}\n\n\nLUA_API int lua_isstring (lua_State *L, int idx) {\n  int t = lua_type(L, idx);\n  return (t == LUA_TSTRING || t == LUA_TNUMBER);\n}\n\n\nLUA_API int lua_isuserdata (lua_State *L, int idx) {\n  const TValue *o = index2addr(L, idx);\n  return (ttisuserdata(o) || ttislightuserdata(o));\n}\n\n\nLUA_API int lua_rawequal (lua_State *L, int index1, int index2) {\n  StkId o1 = index2addr(L, index1);\n  StkId o2 = index2addr(L, index2);\n  return (isvalid(o1) && isvalid(o2)) ? luaV_rawequalobj(o1, o2) : 0;\n}\n\n\nLUA_API void lua_arith (lua_State *L, int op) {\n  StkId o1;  /* 1st operand */\n  StkId o2;  /* 2nd operand */\n  lua_lock(L);\n  if (op != LUA_OPUNM) /* all other operations expect two operands */\n    api_checknelems(L, 2);\n  else {  /* for unary minus, add fake 2nd operand */\n    api_checknelems(L, 1);\n    setobjs2s(L, L->top, L->top - 1);\n    L->top++;\n  }\n  o1 = L->top - 2;\n  o2 = L->top - 1;\n  if (ttisnumber(o1) && ttisnumber(o2)) {\n    setnvalue(o1, luaO_arith(op, nvalue(o1), nvalue(o2)));\n  }\n  else\n    luaV_arith(L, o1, o1, o2, cast(TMS, op - LUA_OPADD + TM_ADD));\n  L->top--;\n  lua_unlock(L);\n}\n\n\nLUA_API int lua_compare (lua_State *L, int index1, int index2, int op) {\n  StkId o1, o2;\n  int i = 0;\n  lua_lock(L);  /* may call tag method */\n  o1 = index2addr(L, index1);\n  o2 = index2addr(L, index2);\n  if (isvalid(o1) && isvalid(o2)) {\n    switch (op) {\n      case LUA_OPEQ: i = equalobj(L, o1, o2); break;\n      case LUA_OPLT: i = luaV_lessthan(L, o1, o2); break;\n      case LUA_OPLE: i = luaV_lessequal(L, o1, o2); break;\n      default: api_check(L, 0, \"invalid option\");\n    }\n  }\n  lua_unlock(L);\n  return i;\n}\n\n\nLUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum) {\n  TValue n;\n  const TValue *o = index2addr(L, idx);\n  if (tonumber(o, &n)) {\n    if (isnum) *isnum = 1;\n    return nvalue(o);\n  }\n  else {\n    if (isnum) *isnum = 0;\n    return 0;\n  }\n}\n\n\nLUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *isnum) {\n  TValue n;\n  const TValue *o = index2addr(L, idx);\n  if (tonumber(o, &n)) {\n    lua_Integer res;\n    lua_Number num = nvalue(o);\n    lua_number2integer(res, num);\n    if (isnum) *isnum = 1;\n    return res;\n  }\n  else {\n    if (isnum) *isnum = 0;\n    return 0;\n  }\n}\n\n\nLUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *isnum) {\n  TValue n;\n  const TValue *o = index2addr(L, idx);\n  if (tonumber(o, &n)) {\n    lua_Unsigned res;\n    lua_Number num = nvalue(o);\n    lua_number2unsigned(res, num);\n    if (isnum) *isnum = 1;\n    return res;\n  }\n  else {\n    if (isnum) *isnum = 0;\n    return 0;\n  }\n}\n\n\nLUA_API int lua_toboolean (lua_State *L, int idx) {\n  const TValue *o = index2addr(L, idx);\n  return !l_isfalse(o);\n}\n\n\nLUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) {\n  StkId o = index2addr(L, idx);\n  if (!ttisstring(o)) {\n    lua_lock(L);  /* `luaV_tostring' may create a new string */\n    if (!luaV_tostring(L, o)) {  /* conversion failed? */\n      if (len != NULL) *len = 0;\n      lua_unlock(L);\n      return NULL;\n    }\n    luaC_checkGC(L);\n    o = index2addr(L, idx);  /* previous call may reallocate the stack */\n    lua_unlock(L);\n  }\n  if (len != NULL) *len = tsvalue(o)->len;\n  return svalue(o);\n}\n\n\nLUA_API size_t lua_rawlen (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  switch (ttypenv(o)) {\n    case LUA_TSTRING: return tsvalue(o)->len;\n    case LUA_TUSERDATA: return uvalue(o)->len;\n    case LUA_TTABLE: return luaH_getn(hvalue(o));\n    default: return 0;\n  }\n}\n\n\nLUA_API lua_CFunction lua_tocfunction (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  if (ttislcf(o)) return fvalue(o);\n  else if (ttisCclosure(o))\n    return clCvalue(o)->f;\n  else return NULL;  /* not a C function */\n}\n\n\nLUA_API void *lua_touserdata (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  switch (ttypenv(o)) {\n    case LUA_TUSERDATA: return (rawuvalue(o) + 1);\n    case LUA_TLIGHTUSERDATA: return pvalue(o);\n    default: return NULL;\n  }\n}\n\n\nLUA_API lua_State *lua_tothread (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  return (!ttisthread(o)) ? NULL : thvalue(o);\n}\n\n\nLUA_API const void *lua_topointer (lua_State *L, int idx) {\n  StkId o = index2addr(L, idx);\n  switch (ttype(o)) {\n    case LUA_TTABLE: return hvalue(o);\n    case LUA_TLCL: return clLvalue(o);\n    case LUA_TCCL: return clCvalue(o);\n    case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o)));\n    case LUA_TTHREAD: return thvalue(o);\n    case LUA_TUSERDATA:\n    case LUA_TLIGHTUSERDATA:\n      return lua_touserdata(L, idx);\n    default: return NULL;\n  }\n}\n\n\n\n/*\n** push functions (C -> stack)\n*/\n\n\nLUA_API void lua_pushnil (lua_State *L) {\n  lua_lock(L);\n  setnilvalue(L->top);\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushnumber (lua_State *L, lua_Number n) {\n  lua_lock(L);\n  setnvalue(L->top, n);\n  luai_checknum(L, L->top,\n    luaG_runerror(L, \"C API - attempt to push a signaling NaN\"));\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushinteger (lua_State *L, lua_Integer n) {\n  lua_lock(L);\n  setnvalue(L->top, cast_num(n));\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushunsigned (lua_State *L, lua_Unsigned u) {\n  lua_Number n;\n  lua_lock(L);\n  n = lua_unsigned2number(u);\n  setnvalue(L->top, n);\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API const char *lua_pushlstring (lua_State *L, const char *s, size_t len) {\n  TString *ts;\n  lua_lock(L);\n  luaC_checkGC(L);\n  ts = luaS_newlstr(L, s, len);\n  setsvalue2s(L, L->top, ts);\n  api_incr_top(L);\n  lua_unlock(L);\n  return getstr(ts);\n}\n\n\nLUA_API const char *lua_pushstring (lua_State *L, const char *s) {\n  if (s == NULL) {\n    lua_pushnil(L);\n    return NULL;\n  }\n  else {\n    TString *ts;\n    lua_lock(L);\n    luaC_checkGC(L);\n    ts = luaS_new(L, s);\n    setsvalue2s(L, L->top, ts);\n    api_incr_top(L);\n    lua_unlock(L);\n    return getstr(ts);\n  }\n}\n\n\nLUA_API const char *lua_pushvfstring (lua_State *L, const char *fmt,\n                                      va_list argp) {\n  const char *ret;\n  lua_lock(L);\n  luaC_checkGC(L);\n  ret = luaO_pushvfstring(L, fmt, argp);\n  lua_unlock(L);\n  return ret;\n}\n\n\nLUA_API const char *lua_pushfstring (lua_State *L, const char *fmt, ...) {\n  const char *ret;\n  va_list argp;\n  lua_lock(L);\n  luaC_checkGC(L);\n  va_start(argp, fmt);\n  ret = luaO_pushvfstring(L, fmt, argp);\n  va_end(argp);\n  lua_unlock(L);\n  return ret;\n}\n\n\nLUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {\n  lua_lock(L);\n  if (n == 0) {\n    setfvalue(L->top, fn);\n  }\n  else {\n    Closure *cl;\n    api_checknelems(L, n);\n    api_check(L, n <= MAXUPVAL, \"upvalue index too large\");\n    luaC_checkGC(L);\n    cl = luaF_newCclosure(L, n);\n    cl->c.f = fn;\n    L->top -= n;\n    while (n--)\n      setobj2n(L, &cl->c.upvalue[n], L->top + n);\n    setclCvalue(L, L->top, cl);\n  }\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushboolean (lua_State *L, int b) {\n  lua_lock(L);\n  setbvalue(L->top, (b != 0));  /* ensure that true is 1 */\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_pushlightuserdata (lua_State *L, void *p) {\n  lua_lock(L);\n  setpvalue(L->top, p);\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API int lua_pushthread (lua_State *L) {\n  lua_lock(L);\n  setthvalue(L, L->top, L);\n  api_incr_top(L);\n  lua_unlock(L);\n  return (G(L)->mainthread == L);\n}\n\n\n\n/*\n** get functions (Lua -> stack)\n*/\n\n\nLUA_API void lua_getglobal (lua_State *L, const char *var) {\n  Table *reg = hvalue(&G(L)->l_registry);\n  const TValue *gt;  /* global table */\n  lua_lock(L);\n  gt = luaH_getint(reg, LUA_RIDX_GLOBALS);\n  setsvalue2s(L, L->top++, luaS_new(L, var));\n  luaV_gettable(L, gt, L->top - 1, L->top - 1);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_gettable (lua_State *L, int idx) {\n  StkId t;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  luaV_gettable(L, t, L->top - 1, L->top - 1);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_getfield (lua_State *L, int idx, const char *k) {\n  StkId t;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  setsvalue2s(L, L->top, luaS_new(L, k));\n  api_incr_top(L);\n  luaV_gettable(L, t, L->top - 1, L->top - 1);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawget (lua_State *L, int idx) {\n  StkId t;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  setobj2s(L, L->top - 1, luaH_get(hvalue(t), L->top - 1));\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawgeti (lua_State *L, int idx, int n) {\n  StkId t;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  setobj2s(L, L->top, luaH_getint(hvalue(t), n));\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawgetp (lua_State *L, int idx, const void *p) {\n  StkId t;\n  TValue k;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  setpvalue(&k, cast(void *, p));\n  setobj2s(L, L->top, luaH_get(hvalue(t), &k));\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_createtable (lua_State *L, int narray, int nrec) {\n  Table *t;\n  lua_lock(L);\n  luaC_checkGC(L);\n  t = luaH_new(L);\n  sethvalue(L, L->top, t);\n  api_incr_top(L);\n  if (narray > 0 || nrec > 0)\n    luaH_resize(L, t, narray, nrec);\n  lua_unlock(L);\n}\n\n\nLUA_API int lua_getmetatable (lua_State *L, int objindex) {\n  const TValue *obj;\n  Table *mt = NULL;\n  int res;\n  lua_lock(L);\n  obj = index2addr(L, objindex);\n  switch (ttypenv(obj)) {\n    case LUA_TTABLE:\n      mt = hvalue(obj)->metatable;\n      break;\n    case LUA_TUSERDATA:\n      mt = uvalue(obj)->metatable;\n      break;\n    default:\n      mt = G(L)->mt[ttypenv(obj)];\n      break;\n  }\n  if (mt == NULL)\n    res = 0;\n  else {\n    sethvalue(L, L->top, mt);\n    api_incr_top(L);\n    res = 1;\n  }\n  lua_unlock(L);\n  return res;\n}\n\n\nLUA_API void lua_getuservalue (lua_State *L, int idx) {\n  StkId o;\n  lua_lock(L);\n  o = index2addr(L, idx);\n  api_check(L, ttisuserdata(o), \"userdata expected\");\n  if (uvalue(o)->env) {\n    sethvalue(L, L->top, uvalue(o)->env);\n  } else\n    setnilvalue(L->top);\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\n/*\n** set functions (stack -> Lua)\n*/\n\n\nLUA_API void lua_setglobal (lua_State *L, const char *var) {\n  Table *reg = hvalue(&G(L)->l_registry);\n  const TValue *gt;  /* global table */\n  lua_lock(L);\n  api_checknelems(L, 1);\n  gt = luaH_getint(reg, LUA_RIDX_GLOBALS);\n  setsvalue2s(L, L->top++, luaS_new(L, var));\n  luaV_settable(L, gt, L->top - 1, L->top - 2);\n  L->top -= 2;  /* pop value and key */\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_settable (lua_State *L, int idx) {\n  StkId t;\n  lua_lock(L);\n  api_checknelems(L, 2);\n  t = index2addr(L, idx);\n  luaV_settable(L, t, L->top - 2, L->top - 1);\n  L->top -= 2;  /* pop index and value */\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_setfield (lua_State *L, int idx, const char *k) {\n  StkId t;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  t = index2addr(L, idx);\n  setsvalue2s(L, L->top++, luaS_new(L, k));\n  luaV_settable(L, t, L->top - 1, L->top - 2);\n  L->top -= 2;  /* pop value and key */\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawset (lua_State *L, int idx) {\n  StkId t;\n  lua_lock(L);\n  api_checknelems(L, 2);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  setobj2t(L, luaH_set(L, hvalue(t), L->top-2), L->top-1);\n  invalidateTMcache(hvalue(t));\n  luaC_barrierback(L, gcvalue(t), L->top-1);\n  L->top -= 2;\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawseti (lua_State *L, int idx, int n) {\n  StkId t;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  luaH_setint(L, hvalue(t), n, L->top - 1);\n  luaC_barrierback(L, gcvalue(t), L->top-1);\n  L->top--;\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_rawsetp (lua_State *L, int idx, const void *p) {\n  StkId t;\n  TValue k;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  setpvalue(&k, cast(void *, p));\n  setobj2t(L, luaH_set(L, hvalue(t), &k), L->top - 1);\n  luaC_barrierback(L, gcvalue(t), L->top - 1);\n  L->top--;\n  lua_unlock(L);\n}\n\n\nLUA_API int lua_setmetatable (lua_State *L, int objindex) {\n  TValue *obj;\n  Table *mt;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  obj = index2addr(L, objindex);\n  if (ttisnil(L->top - 1))\n    mt = NULL;\n  else {\n    api_check(L, ttistable(L->top - 1), \"table expected\");\n    mt = hvalue(L->top - 1);\n  }\n  switch (ttypenv(obj)) {\n    case LUA_TTABLE: {\n      hvalue(obj)->metatable = mt;\n      if (mt) {\n        luaC_objbarrierback(L, gcvalue(obj), mt);\n        luaC_checkfinalizer(L, gcvalue(obj), mt);\n      }\n      break;\n    }\n    case LUA_TUSERDATA: {\n      uvalue(obj)->metatable = mt;\n      if (mt) {\n        luaC_objbarrier(L, rawuvalue(obj), mt);\n        luaC_checkfinalizer(L, gcvalue(obj), mt);\n      }\n      break;\n    }\n    default: {\n      G(L)->mt[ttypenv(obj)] = mt;\n      break;\n    }\n  }\n  L->top--;\n  lua_unlock(L);\n  return 1;\n}\n\n\nLUA_API void lua_setuservalue (lua_State *L, int idx) {\n  StkId o;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  o = index2addr(L, idx);\n  api_check(L, ttisuserdata(o), \"userdata expected\");\n  if (ttisnil(L->top - 1))\n    uvalue(o)->env = NULL;\n  else {\n    api_check(L, ttistable(L->top - 1), \"table expected\");\n    uvalue(o)->env = hvalue(L->top - 1);\n    luaC_objbarrier(L, gcvalue(o), hvalue(L->top - 1));\n  }\n  L->top--;\n  lua_unlock(L);\n}\n\n\n/*\n** `load' and `call' functions (run Lua code)\n*/\n\n\n#define checkresults(L,na,nr) \\\n     api_check(L, (nr) == LUA_MULTRET || (L->ci->top - L->top >= (nr) - (na)), \\\n\t\"results from function overflow current stack size\")\n\n\nLUA_API int lua_getctx (lua_State *L, int *ctx) {\n  if (L->ci->callstatus & CIST_YIELDED) {\n    if (ctx) *ctx = L->ci->u.c.ctx;\n    return L->ci->u.c.status;\n  }\n  else return LUA_OK;\n}\n\n\nLUA_API void lua_callk (lua_State *L, int nargs, int nresults, int ctx,\n                        lua_CFunction k) {\n  StkId func;\n  lua_lock(L);\n  api_check(L, k == NULL || !isLua(L->ci),\n    \"cannot use continuations inside hooks\");\n  api_checknelems(L, nargs+1);\n  api_check(L, L->status == LUA_OK, \"cannot do calls on non-normal thread\");\n  checkresults(L, nargs, nresults);\n  func = L->top - (nargs+1);\n  if (k != NULL && L->nny == 0) {  /* need to prepare continuation? */\n    L->ci->u.c.k = k;  /* save continuation */\n    L->ci->u.c.ctx = ctx;  /* save context */\n    luaD_call(L, func, nresults, 1);  /* do the call */\n  }\n  else  /* no continuation or no yieldable */\n    luaD_call(L, func, nresults, 0);  /* just do the call */\n  adjustresults(L, nresults);\n  lua_unlock(L);\n}\n\n\n\n/*\n** Execute a protected call.\n*/\nstruct CallS {  /* data to `f_call' */\n  StkId func;\n  int nresults;\n};\n\n\nstatic void f_call (lua_State *L, void *ud) {\n  struct CallS *c = cast(struct CallS *, ud);\n  luaD_call(L, c->func, c->nresults, 0);\n}\n\n\n\nLUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,\n                        int ctx, lua_CFunction k) {\n  struct CallS c;\n  int status;\n  ptrdiff_t func;\n  lua_lock(L);\n  api_check(L, k == NULL || !isLua(L->ci),\n    \"cannot use continuations inside hooks\");\n  api_checknelems(L, nargs+1);\n  api_check(L, L->status == LUA_OK, \"cannot do calls on non-normal thread\");\n  checkresults(L, nargs, nresults);\n  if (errfunc == 0)\n    func = 0;\n  else {\n    StkId o = index2addr(L, errfunc);\n    api_checkstackindex(L, errfunc, o);\n    func = savestack(L, o);\n  }\n  c.func = L->top - (nargs+1);  /* function to be called */\n  if (k == NULL || L->nny > 0) {  /* no continuation or no yieldable? */\n    c.nresults = nresults;  /* do a 'conventional' protected call */\n    status = luaD_pcall(L, f_call, &c, savestack(L, c.func), func);\n  }\n  else {  /* prepare continuation (call is already protected by 'resume') */\n    CallInfo *ci = L->ci;\n    ci->u.c.k = k;  /* save continuation */\n    ci->u.c.ctx = ctx;  /* save context */\n    /* save information for error recovery */\n    ci->extra = savestack(L, c.func);\n    ci->u.c.old_allowhook = L->allowhook;\n    ci->u.c.old_errfunc = L->errfunc;\n    L->errfunc = func;\n    /* mark that function may do error recovery */\n    ci->callstatus |= CIST_YPCALL;\n    luaD_call(L, c.func, nresults, 1);  /* do the call */\n    ci->callstatus &= ~CIST_YPCALL;\n    L->errfunc = ci->u.c.old_errfunc;\n    status = LUA_OK;  /* if it is here, there were no errors */\n  }\n  adjustresults(L, nresults);\n  lua_unlock(L);\n  return status;\n}\n\n\nLUA_API int lua_load (lua_State *L, lua_Reader reader, void *data,\n                      const char *chunkname, const char *mode) {\n  ZIO z;\n  int status;\n  lua_lock(L);\n  if (!chunkname) chunkname = \"?\";\n  luaZ_init(L, &z, reader, data);\n  status = luaD_protectedparser(L, &z, chunkname, mode);\n  if (status == LUA_OK) {  /* no errors? */\n    LClosure *f = clLvalue(L->top - 1);  /* get newly created function */\n    if (f->nupvalues == 1) {  /* does it have one upvalue? */\n      /* get global table from registry */\n      Table *reg = hvalue(&G(L)->l_registry);\n      const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS);\n      /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */\n      setobj(L, f->upvals[0]->v, gt);\n      luaC_barrier(L, f->upvals[0], gt);\n    }\n  }\n  lua_unlock(L);\n  return status;\n}\n\n\nLUA_API int lua_dump (lua_State *L, lua_Writer writer, void *data) {\n  int status;\n  TValue *o;\n  lua_lock(L);\n  api_checknelems(L, 1);\n  o = L->top - 1;\n  if (isLfunction(o))\n    status = luaU_dump(L, getproto(o), writer, data, 0);\n  else\n    status = 1;\n  lua_unlock(L);\n  return status;\n}\n\n\nLUA_API int lua_status (lua_State *L) {\n  return L->status;\n}\n\n\n/*\n** Garbage-collection function\n*/\n\nLUA_API int lua_gc (lua_State *L, int what, int data) {\n  int res = 0;\n  global_State *g;\n  lua_lock(L);\n  g = G(L);\n  switch (what) {\n    case LUA_GCSTOP: {\n      g->gcrunning = 0;\n      break;\n    }\n    case LUA_GCRESTART: {\n      luaE_setdebt(g, 0);\n      g->gcrunning = 1;\n      break;\n    }\n    case LUA_GCCOLLECT: {\n      luaC_fullgc(L, 0);\n      break;\n    }\n    case LUA_GCCOUNT: {\n      /* GC values are expressed in Kbytes: #bytes/2^10 */\n      res = cast_int(gettotalbytes(g) >> 10);\n      break;\n    }\n    case LUA_GCCOUNTB: {\n      res = cast_int(gettotalbytes(g) & 0x3ff);\n      break;\n    }\n    case LUA_GCSTEP: {\n      if (g->gckind == KGC_GEN) {  /* generational mode? */\n        res = (g->GCestimate == 0);  /* true if it will do major collection */\n        luaC_forcestep(L);  /* do a single step */\n      }\n      else {\n       lu_mem debt = cast(lu_mem, data) * 1024 - GCSTEPSIZE;\n       if (g->gcrunning)\n         debt += g->GCdebt;  /* include current debt */\n       luaE_setdebt(g, debt);\n       luaC_forcestep(L);\n       if (g->gcstate == GCSpause)  /* end of cycle? */\n         res = 1;  /* signal it */\n      }\n      break;\n    }\n    case LUA_GCSETPAUSE: {\n      res = g->gcpause;\n      g->gcpause = data;\n      break;\n    }\n    case LUA_GCSETMAJORINC: {\n      res = g->gcmajorinc;\n      g->gcmajorinc = data;\n      break;\n    }\n    case LUA_GCSETSTEPMUL: {\n      res = g->gcstepmul;\n      g->gcstepmul = data;\n      break;\n    }\n    case LUA_GCISRUNNING: {\n      res = g->gcrunning;\n      break;\n    }\n    case LUA_GCGEN: {  /* change collector to generational mode */\n      luaC_changemode(L, KGC_GEN);\n      break;\n    }\n    case LUA_GCINC: {  /* change collector to incremental mode */\n      luaC_changemode(L, KGC_NORMAL);\n      break;\n    }\n    default: res = -1;  /* invalid option */\n  }\n  lua_unlock(L);\n  return res;\n}\n\n\n\n/*\n** miscellaneous functions\n*/\n\n\nLUA_API int lua_error (lua_State *L) {\n  lua_lock(L);\n  api_checknelems(L, 1);\n  luaG_errormsg(L);\n  /* code unreachable; will unlock when control actually leaves the kernel */\n  return 0;  /* to avoid warnings */\n}\n\n\nLUA_API int lua_next (lua_State *L, int idx) {\n  StkId t;\n  int more;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  api_check(L, ttistable(t), \"table expected\");\n  more = luaH_next(L, hvalue(t), L->top - 1);\n  if (more) {\n    api_incr_top(L);\n  }\n  else  /* no more elements */\n    L->top -= 1;  /* remove key */\n  lua_unlock(L);\n  return more;\n}\n\n\nLUA_API void lua_concat (lua_State *L, int n) {\n  lua_lock(L);\n  api_checknelems(L, n);\n  if (n >= 2) {\n    luaC_checkGC(L);\n    luaV_concat(L, n);\n  }\n  else if (n == 0) {  /* push empty string */\n    setsvalue2s(L, L->top, luaS_newlstr(L, \"\", 0));\n    api_incr_top(L);\n  }\n  /* else n == 1; nothing to do */\n  lua_unlock(L);\n}\n\n\nLUA_API void lua_len (lua_State *L, int idx) {\n  StkId t;\n  lua_lock(L);\n  t = index2addr(L, idx);\n  luaV_objlen(L, L->top, t);\n  api_incr_top(L);\n  lua_unlock(L);\n}\n\n\nLUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud) {\n  lua_Alloc f;\n  lua_lock(L);\n  if (ud) *ud = G(L)->ud;\n  f = G(L)->frealloc;\n  lua_unlock(L);\n  return f;\n}\n\n\nLUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud) {\n  lua_lock(L);\n  G(L)->ud = ud;\n  G(L)->frealloc = f;\n  lua_unlock(L);\n}\n\n\nLUA_API void *lua_newuserdata (lua_State *L, size_t size) {\n  Udata *u;\n  lua_lock(L);\n  luaC_checkGC(L);\n  u = luaS_newudata(L, size, NULL);\n  setuvalue(L, L->top, u);\n  api_incr_top(L);\n  lua_unlock(L);\n  return u + 1;\n}\n\n\n\nstatic const char *aux_upvalue (StkId fi, int n, TValue **val,\n                                GCObject **owner) {\n  switch (ttype(fi)) {\n    case LUA_TCCL: {  /* C closure */\n      CClosure *f = clCvalue(fi);\n      if (!(1 <= n && n <= f->nupvalues)) return NULL;\n      *val = &f->upvalue[n-1];\n      if (owner) *owner = obj2gco(f);\n      return \"\";\n    }\n    case LUA_TLCL: {  /* Lua closure */\n      LClosure *f = clLvalue(fi);\n      TString *name;\n      Proto *p = f->p;\n      if (!(1 <= n && n <= p->sizeupvalues)) return NULL;\n      *val = f->upvals[n-1]->v;\n      if (owner) *owner = obj2gco(f->upvals[n - 1]);\n      name = p->upvalues[n-1].name;\n      return (name == NULL) ? \"\" : getstr(name);\n    }\n    default: return NULL;  /* not a closure */\n  }\n}\n\n\nLUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {\n  const char *name;\n  TValue *val = NULL;  /* to avoid warnings */\n  lua_lock(L);\n  name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL);\n  if (name) {\n    setobj2s(L, L->top, val);\n    api_incr_top(L);\n  }\n  lua_unlock(L);\n  return name;\n}\n\n\nLUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {\n  const char *name;\n  TValue *val = NULL;  /* to avoid warnings */\n  GCObject *owner = NULL;  /* to avoid warnings */\n  StkId fi;\n  lua_lock(L);\n  fi = index2addr(L, funcindex);\n  api_checknelems(L, 1);\n  name = aux_upvalue(fi, n, &val, &owner);\n  if (name) {\n    L->top--;\n    setobj(L, val, L->top);\n    luaC_barrier(L, owner, L->top);\n  }\n  lua_unlock(L);\n  return name;\n}\n\n\nstatic UpVal **getupvalref (lua_State *L, int fidx, int n, LClosure **pf) {\n  LClosure *f;\n  StkId fi = index2addr(L, fidx);\n  api_check(L, ttisLclosure(fi), \"Lua function expected\");\n  f = clLvalue(fi);\n  api_check(L, (1 <= n && n <= f->p->sizeupvalues), \"invalid upvalue index\");\n  if (pf) *pf = f;\n  return &f->upvals[n - 1];  /* get its upvalue pointer */\n}\n\n\nLUA_API void *lua_upvalueid (lua_State *L, int fidx, int n) {\n  StkId fi = index2addr(L, fidx);\n  switch (ttype(fi)) {\n    case LUA_TLCL: {  /* lua closure */\n      return *getupvalref(L, fidx, n, NULL);\n    }\n    case LUA_TCCL: {  /* C closure */\n      CClosure *f = clCvalue(fi);\n      api_check(L, 1 <= n && n <= f->nupvalues, \"invalid upvalue index\");\n      return &f->upvalue[n - 1];\n    }\n    default: {\n      api_check(L, 0, \"closure expected\");\n      return NULL;\n    }\n  }\n}\n\n\nLUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1,\n                                            int fidx2, int n2) {\n  LClosure *f1;\n  UpVal **up1 = getupvalref(L, fidx1, n1, &f1);\n  UpVal **up2 = getupvalref(L, fidx2, n2, NULL);\n  *up1 = *up2;\n  luaC_objbarrier(L, f1, *up2);\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lapi.h",
    "content": "/*\n** $Id: lapi.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions from Lua API\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lapi_h\n#define lapi_h\n\n\n#include \"llimits.h\"\n#include \"lstate.h\"\n\n#define api_incr_top(L)   {L->top++; api_check(L, L->top <= L->ci->top, \\\n\t\t\t\t\"stack overflow\");}\n\n#define adjustresults(L,nres) \\\n    { if ((nres) == LUA_MULTRET && L->ci->top < L->top) L->ci->top = L->top; }\n\n#define api_checknelems(L,n)\tapi_check(L, (n) < (L->top - L->ci->func), \\\n\t\t\t\t  \"not enough elements in the stack\")\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lauxlib.c",
    "content": "/*\n** $Id: lauxlib.c,v 1.248.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions for building Lua libraries\n** See Copyright Notice in lua.h\n*/\n\n\n#include <errno.h>\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n\n/* This file uses only the official API of Lua.\n** Any function declared here could be written as an application function.\n*/\n\n#define lauxlib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n\n\n/*\n** {======================================================\n** Traceback\n** =======================================================\n*/\n\n\n#define LEVELS1\t12\t/* size of the first part of the stack */\n#define LEVELS2\t10\t/* size of the second part of the stack */\n\n\n\n/*\n** search for 'objidx' in table at index -1.\n** return 1 + string at top if find a good name.\n*/\nstatic int findfield (lua_State *L, int objidx, int level) {\n  if (level == 0 || !lua_istable(L, -1))\n    return 0;  /* not found */\n  lua_pushnil(L);  /* start 'next' loop */\n  while (lua_next(L, -2)) {  /* for each pair in table */\n    if (lua_type(L, -2) == LUA_TSTRING) {  /* ignore non-string keys */\n      if (lua_rawequal(L, objidx, -1)) {  /* found object? */\n        lua_pop(L, 1);  /* remove value (but keep name) */\n        return 1;\n      }\n      else if (findfield(L, objidx, level - 1)) {  /* try recursively */\n        lua_remove(L, -2);  /* remove table (but keep name) */\n        lua_pushliteral(L, \".\");\n        lua_insert(L, -2);  /* place '.' between the two names */\n        lua_concat(L, 3);\n        return 1;\n      }\n    }\n    lua_pop(L, 1);  /* remove value */\n  }\n  return 0;  /* not found */\n}\n\n\nstatic int pushglobalfuncname (lua_State *L, lua_Debug *ar) {\n  int top = lua_gettop(L);\n  lua_getinfo(L, \"f\", ar);  /* push function */\n  lua_pushglobaltable(L);\n  if (findfield(L, top + 1, 2)) {\n    lua_copy(L, -1, top + 1);  /* move name to proper place */\n    lua_pop(L, 2);  /* remove pushed values */\n    return 1;\n  }\n  else {\n    lua_settop(L, top);  /* remove function and global table */\n    return 0;\n  }\n}\n\n\nstatic void pushfuncname (lua_State *L, lua_Debug *ar) {\n  if (*ar->namewhat != '\\0')  /* is there a name? */\n    lua_pushfstring(L, \"function \" LUA_QS, ar->name);\n  else if (*ar->what == 'm')  /* main? */\n      lua_pushliteral(L, \"main chunk\");\n  else if (*ar->what == 'C') {\n    if (pushglobalfuncname(L, ar)) {\n      lua_pushfstring(L, \"function \" LUA_QS, lua_tostring(L, -1));\n      lua_remove(L, -2);  /* remove name */\n    }\n    else\n      lua_pushliteral(L, \"?\");\n  }\n  else\n    lua_pushfstring(L, \"function <%s:%d>\", ar->short_src, ar->linedefined);\n}\n\n\nstatic int countlevels (lua_State *L) {\n  lua_Debug ar;\n  int li = 1, le = 1;\n  /* find an upper bound */\n  while (lua_getstack(L, le, &ar)) { li = le; le *= 2; }\n  /* do a binary search */\n  while (li < le) {\n    int m = (li + le)/2;\n    if (lua_getstack(L, m, &ar)) li = m + 1;\n    else le = m;\n  }\n  return le - 1;\n}\n\n\nLUALIB_API void luaL_traceback (lua_State *L, lua_State *L1,\n                                const char *msg, int level) {\n  lua_Debug ar;\n  int top = lua_gettop(L);\n  int numlevels = countlevels(L1);\n  int mark = (numlevels > LEVELS1 + LEVELS2) ? LEVELS1 : 0;\n  if (msg) lua_pushfstring(L, \"%s\\n\", msg);\n  lua_pushliteral(L, \"stack traceback:\");\n  while (lua_getstack(L1, level++, &ar)) {\n    if (level == mark) {  /* too many levels? */\n      lua_pushliteral(L, \"\\n\\t...\");  /* add a '...' */\n      level = numlevels - LEVELS2;  /* and skip to last ones */\n    }\n    else {\n      lua_getinfo(L1, \"Slnt\", &ar);\n      lua_pushfstring(L, \"\\n\\t%s:\", ar.short_src);\n      if (ar.currentline > 0)\n        lua_pushfstring(L, \"%d:\", ar.currentline);\n      lua_pushliteral(L, \" in \");\n      pushfuncname(L, &ar);\n      if (ar.istailcall)\n        lua_pushliteral(L, \"\\n\\t(...tail calls...)\");\n      lua_concat(L, lua_gettop(L) - top);\n    }\n  }\n  lua_concat(L, lua_gettop(L) - top);\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Error-report functions\n** =======================================================\n*/\n\nLUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) {\n  lua_Debug ar;\n  if (!lua_getstack(L, 0, &ar))  /* no stack frame? */\n    return luaL_error(L, \"bad argument #%d (%s)\", narg, extramsg);\n  lua_getinfo(L, \"n\", &ar);\n  if (strcmp(ar.namewhat, \"method\") == 0) {\n    narg--;  /* do not count `self' */\n    if (narg == 0)  /* error is in the self argument itself? */\n      return luaL_error(L, \"calling \" LUA_QS \" on bad self (%s)\",\n                           ar.name, extramsg);\n  }\n  if (ar.name == NULL)\n    ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : \"?\";\n  return luaL_error(L, \"bad argument #%d to \" LUA_QS \" (%s)\",\n                        narg, ar.name, extramsg);\n}\n\n\nstatic int typeerror (lua_State *L, int narg, const char *tname) {\n  const char *msg = lua_pushfstring(L, \"%s expected, got %s\",\n                                    tname, luaL_typename(L, narg));\n  return luaL_argerror(L, narg, msg);\n}\n\n\nstatic void tag_error (lua_State *L, int narg, int tag) {\n  typeerror(L, narg, lua_typename(L, tag));\n}\n\n\nLUALIB_API void luaL_where (lua_State *L, int level) {\n  lua_Debug ar;\n  if (lua_getstack(L, level, &ar)) {  /* check function at level */\n    lua_getinfo(L, \"Sl\", &ar);  /* get info about it */\n    if (ar.currentline > 0) {  /* is there info? */\n      lua_pushfstring(L, \"%s:%d: \", ar.short_src, ar.currentline);\n      return;\n    }\n  }\n  lua_pushliteral(L, \"\");  /* else, no information available... */\n}\n\n\nLUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) {\n  va_list argp;\n  va_start(argp, fmt);\n  luaL_where(L, 1);\n  lua_pushvfstring(L, fmt, argp);\n  va_end(argp);\n  lua_concat(L, 2);\n  return lua_error(L);\n}\n\n\nLUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) {\n  int en = errno;  /* calls to Lua API may change this value */\n  if (stat) {\n    lua_pushboolean(L, 1);\n    return 1;\n  }\n  else {\n    lua_pushnil(L);\n    if (fname)\n      lua_pushfstring(L, \"%s: %s\", fname, strerror(en));\n    else\n      lua_pushstring(L, strerror(en));\n    lua_pushinteger(L, en);\n    return 3;\n  }\n}\n\n\n#if !defined(inspectstat)\t/* { */\n\n#if defined(LUA_USE_POSIX)\n\n#include <sys/wait.h>\n\n/*\n** use appropriate macros to interpret 'pclose' return status\n*/\n#define inspectstat(stat,what)  \\\n   if (WIFEXITED(stat)) { stat = WEXITSTATUS(stat); } \\\n   else if (WIFSIGNALED(stat)) { stat = WTERMSIG(stat); what = \"signal\"; }\n\n#else\n\n#define inspectstat(stat,what)  /* no op */\n\n#endif\n\n#endif\t\t\t\t/* } */\n\n\nLUALIB_API int luaL_execresult (lua_State *L, int stat) {\n  const char *what = \"exit\";  /* type of termination */\n  if (stat == -1)  /* error? */\n    return luaL_fileresult(L, 0, NULL);\n  else {\n    inspectstat(stat, what);  /* interpret result */\n    if (*what == 'e' && stat == 0)  /* successful termination? */\n      lua_pushboolean(L, 1);\n    else\n      lua_pushnil(L);\n    lua_pushstring(L, what);\n    lua_pushinteger(L, stat);\n    return 3;  /* return true/nil,what,code */\n  }\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Userdata's metatable manipulation\n** =======================================================\n*/\n\nLUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) {\n  luaL_getmetatable(L, tname);  /* try to get metatable */\n  if (!lua_isnil(L, -1))  /* name already in use? */\n    return 0;  /* leave previous value on top, but return 0 */\n  lua_pop(L, 1);\n  lua_newtable(L);  /* create metatable */\n  lua_pushvalue(L, -1);\n  lua_setfield(L, LUA_REGISTRYINDEX, tname);  /* registry.name = metatable */\n  return 1;\n}\n\n\nLUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) {\n  luaL_getmetatable(L, tname);\n  lua_setmetatable(L, -2);\n}\n\n\nLUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) {\n  void *p = lua_touserdata(L, ud);\n  if (p != NULL) {  /* value is a userdata? */\n    if (lua_getmetatable(L, ud)) {  /* does it have a metatable? */\n      luaL_getmetatable(L, tname);  /* get correct metatable */\n      if (!lua_rawequal(L, -1, -2))  /* not the same? */\n        p = NULL;  /* value is a userdata with wrong metatable */\n      lua_pop(L, 2);  /* remove both metatables */\n      return p;\n    }\n  }\n  return NULL;  /* value is not a userdata with a metatable */\n}\n\n\nLUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) {\n  void *p = luaL_testudata(L, ud, tname);\n  if (p == NULL) typeerror(L, ud, tname);\n  return p;\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Argument check functions\n** =======================================================\n*/\n\nLUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def,\n                                 const char *const lst[]) {\n  const char *name = (def) ? luaL_optstring(L, narg, def) :\n                             luaL_checkstring(L, narg);\n  int i;\n  for (i=0; lst[i]; i++)\n    if (strcmp(lst[i], name) == 0)\n      return i;\n  return luaL_argerror(L, narg,\n                       lua_pushfstring(L, \"invalid option \" LUA_QS, name));\n}\n\n\nLUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) {\n  /* keep some extra space to run error routines, if needed */\n  const int extra = LUA_MINSTACK;\n  if (!lua_checkstack(L, space + extra)) {\n    if (msg)\n      luaL_error(L, \"stack overflow (%s)\", msg);\n    else\n      luaL_error(L, \"stack overflow\");\n  }\n}\n\n\nLUALIB_API void luaL_checktype (lua_State *L, int narg, int t) {\n  if (lua_type(L, narg) != t)\n    tag_error(L, narg, t);\n}\n\n\nLUALIB_API void luaL_checkany (lua_State *L, int narg) {\n  if (lua_type(L, narg) == LUA_TNONE)\n    luaL_argerror(L, narg, \"value expected\");\n}\n\n\nLUALIB_API const char *luaL_checklstring (lua_State *L, int narg, size_t *len) {\n  const char *s = lua_tolstring(L, narg, len);\n  if (!s) tag_error(L, narg, LUA_TSTRING);\n  return s;\n}\n\n\nLUALIB_API const char *luaL_optlstring (lua_State *L, int narg,\n                                        const char *def, size_t *len) {\n  if (lua_isnoneornil(L, narg)) {\n    if (len)\n      *len = (def ? strlen(def) : 0);\n    return def;\n  }\n  else return luaL_checklstring(L, narg, len);\n}\n\n\nLUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {\n  int isnum;\n  lua_Number d = lua_tonumberx(L, narg, &isnum);\n  if (!isnum)\n    tag_error(L, narg, LUA_TNUMBER);\n  return d;\n}\n\n\nLUALIB_API lua_Number luaL_optnumber (lua_State *L, int narg, lua_Number def) {\n  return luaL_opt(L, luaL_checknumber, narg, def);\n}\n\n\nLUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int narg) {\n  int isnum;\n  lua_Integer d = lua_tointegerx(L, narg, &isnum);\n  if (!isnum)\n    tag_error(L, narg, LUA_TNUMBER);\n  return d;\n}\n\n\nLUALIB_API lua_Unsigned luaL_checkunsigned (lua_State *L, int narg) {\n  int isnum;\n  lua_Unsigned d = lua_tounsignedx(L, narg, &isnum);\n  if (!isnum)\n    tag_error(L, narg, LUA_TNUMBER);\n  return d;\n}\n\n\nLUALIB_API lua_Integer luaL_optinteger (lua_State *L, int narg,\n                                                      lua_Integer def) {\n  return luaL_opt(L, luaL_checkinteger, narg, def);\n}\n\n\nLUALIB_API lua_Unsigned luaL_optunsigned (lua_State *L, int narg,\n                                                        lua_Unsigned def) {\n  return luaL_opt(L, luaL_checkunsigned, narg, def);\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Generic Buffer manipulation\n** =======================================================\n*/\n\n/*\n** check whether buffer is using a userdata on the stack as a temporary\n** buffer\n*/\n#define buffonstack(B)\t((B)->b != (B)->initb)\n\n\n/*\n** returns a pointer to a free area with at least 'sz' bytes\n*/\nLUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) {\n  lua_State *L = B->L;\n  if (B->size - B->n < sz) {  /* not enough space? */\n    char *newbuff;\n    size_t newsize = B->size * 2;  /* double buffer size */\n    if (newsize - B->n < sz)  /* not big enough? */\n      newsize = B->n + sz;\n    if (newsize < B->n || newsize - B->n < sz)\n      luaL_error(L, \"buffer too large\");\n    /* create larger buffer */\n    newbuff = (char *)lua_newuserdata(L, newsize * sizeof(char));\n    /* move content to new buffer */\n    memcpy(newbuff, B->b, B->n * sizeof(char));\n    if (buffonstack(B))\n      lua_remove(L, -2);  /* remove old buffer */\n    B->b = newbuff;\n    B->size = newsize;\n  }\n  return &B->b[B->n];\n}\n\n\nLUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) {\n  char *b = luaL_prepbuffsize(B, l);\n  memcpy(b, s, l * sizeof(char));\n  luaL_addsize(B, l);\n}\n\n\nLUALIB_API void luaL_addstring (luaL_Buffer *B, const char *s) {\n  luaL_addlstring(B, s, strlen(s));\n}\n\n\nLUALIB_API void luaL_pushresult (luaL_Buffer *B) {\n  lua_State *L = B->L;\n  lua_pushlstring(L, B->b, B->n);\n  if (buffonstack(B))\n    lua_remove(L, -2);  /* remove old buffer */\n}\n\n\nLUALIB_API void luaL_pushresultsize (luaL_Buffer *B, size_t sz) {\n  luaL_addsize(B, sz);\n  luaL_pushresult(B);\n}\n\n\nLUALIB_API void luaL_addvalue (luaL_Buffer *B) {\n  lua_State *L = B->L;\n  size_t l;\n  const char *s = lua_tolstring(L, -1, &l);\n  if (buffonstack(B))\n    lua_insert(L, -2);  /* put value below buffer */\n  luaL_addlstring(B, s, l);\n  lua_remove(L, (buffonstack(B)) ? -2 : -1);  /* remove value */\n}\n\n\nLUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) {\n  B->L = L;\n  B->b = B->initb;\n  B->n = 0;\n  B->size = LUAL_BUFFERSIZE;\n}\n\n\nLUALIB_API char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) {\n  luaL_buffinit(L, B);\n  return luaL_prepbuffsize(B, sz);\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Reference system\n** =======================================================\n*/\n\n/* index of free-list header */\n#define freelist\t0\n\n\nLUALIB_API int luaL_ref (lua_State *L, int t) {\n  int ref;\n  if (lua_isnil(L, -1)) {\n    lua_pop(L, 1);  /* remove from stack */\n    return LUA_REFNIL;  /* `nil' has a unique fixed reference */\n  }\n  t = lua_absindex(L, t);\n  lua_rawgeti(L, t, freelist);  /* get first free element */\n  ref = (int)lua_tointeger(L, -1);  /* ref = t[freelist] */\n  lua_pop(L, 1);  /* remove it from stack */\n  if (ref != 0) {  /* any free element? */\n    lua_rawgeti(L, t, ref);  /* remove it from list */\n    lua_rawseti(L, t, freelist);  /* (t[freelist] = t[ref]) */\n  }\n  else  /* no free elements */\n    ref = (int)lua_rawlen(L, t) + 1;  /* get a new reference */\n  lua_rawseti(L, t, ref);\n  return ref;\n}\n\n\nLUALIB_API void luaL_unref (lua_State *L, int t, int ref) {\n  if (ref >= 0) {\n    t = lua_absindex(L, t);\n    lua_rawgeti(L, t, freelist);\n    lua_rawseti(L, t, ref);  /* t[ref] = t[freelist] */\n    lua_pushinteger(L, ref);\n    lua_rawseti(L, t, freelist);  /* t[freelist] = ref */\n  }\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Load functions\n** =======================================================\n*/\n\ntypedef struct LoadF {\n  int n;  /* number of pre-read characters */\n  FILE *f;  /* file being read */\n  char buff[LUAL_BUFFERSIZE];  /* area for reading file */\n} LoadF;\n\n\nstatic const char *getF (lua_State *L, void *ud, size_t *size) {\n  LoadF *lf = (LoadF *)ud;\n  (void)L;  /* not used */\n  if (lf->n > 0) {  /* are there pre-read characters to be read? */\n    *size = lf->n;  /* return them (chars already in buffer) */\n    lf->n = 0;  /* no more pre-read characters */\n  }\n  else {  /* read a block from file */\n    /* 'fread' can return > 0 *and* set the EOF flag. If next call to\n       'getF' called 'fread', it might still wait for user input.\n       The next check avoids this problem. */\n    if (feof(lf->f)) return NULL;\n    *size = fread(lf->buff, 1, sizeof(lf->buff), lf->f);  /* read block */\n  }\n  return lf->buff;\n}\n\n\nstatic int errfile (lua_State *L, const char *what, int fnameindex) {\n  const char *serr = strerror(errno);\n  const char *filename = lua_tostring(L, fnameindex) + 1;\n  lua_pushfstring(L, \"cannot %s %s: %s\", what, filename, serr);\n  lua_remove(L, fnameindex);\n  return LUA_ERRFILE;\n}\n\n\nstatic int skipBOM (LoadF *lf) {\n  const char *p = \"\\xEF\\xBB\\xBF\";  /* Utf8 BOM mark */\n  int c;\n  lf->n = 0;\n  do {\n    c = getc(lf->f);\n    if (c == EOF || c != *(const unsigned char *)p++) return c;\n    lf->buff[lf->n++] = c;  /* to be read by the parser */\n  } while (*p != '\\0');\n  lf->n = 0;  /* prefix matched; discard it */\n  return getc(lf->f);  /* return next character */\n}\n\n\n/*\n** reads the first character of file 'f' and skips an optional BOM mark\n** in its beginning plus its first line if it starts with '#'. Returns\n** true if it skipped the first line.  In any case, '*cp' has the\n** first \"valid\" character of the file (after the optional BOM and\n** a first-line comment).\n*/\nstatic int skipcomment (LoadF *lf, int *cp) {\n  int c = *cp = skipBOM(lf);\n  if (c == '#') {  /* first line is a comment (Unix exec. file)? */\n    do {  /* skip first line */\n      c = getc(lf->f);\n    } while (c != EOF && c != '\\n') ;\n    *cp = getc(lf->f);  /* skip end-of-line, if present */\n    return 1;  /* there was a comment */\n  }\n  else return 0;  /* no comment */\n}\n\n\nLUALIB_API int luaL_loadfilex (lua_State *L, const char *filename,\n                                             const char *mode) {\n  LoadF lf;\n  int status, readstatus;\n  int c;\n  int fnameindex = lua_gettop(L) + 1;  /* index of filename on the stack */\n  if (filename == NULL) {\n    lua_pushliteral(L, \"=stdin\");\n    lf.f = stdin;\n  }\n  else {\n    lua_pushfstring(L, \"@%s\", filename);\n    lf.f = fopen(filename, \"r\");\n    if (lf.f == NULL) return errfile(L, \"open\", fnameindex);\n  }\n  if (skipcomment(&lf, &c))  /* read initial portion */\n    lf.buff[lf.n++] = '\\n';  /* add line to correct line numbers */\n  if (c == LUA_SIGNATURE[0] && filename) {  /* binary file? */\n    lf.f = freopen(filename, \"rb\", lf.f);  /* reopen in binary mode */\n    if (lf.f == NULL) return errfile(L, \"reopen\", fnameindex);\n    skipcomment(&lf, &c);  /* re-read initial portion */\n  }\n  if (c != EOF)\n    lf.buff[lf.n++] = c;  /* 'c' is the first character of the stream */\n  status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);\n  readstatus = ferror(lf.f);\n  if (filename) fclose(lf.f);  /* close file (even in case of errors) */\n  if (readstatus) {\n    lua_settop(L, fnameindex);  /* ignore results from `lua_load' */\n    return errfile(L, \"read\", fnameindex);\n  }\n  lua_remove(L, fnameindex);\n  return status;\n}\n\n\ntypedef struct LoadS {\n  const char *s;\n  size_t size;\n} LoadS;\n\n\nstatic const char *getS (lua_State *L, void *ud, size_t *size) {\n  LoadS *ls = (LoadS *)ud;\n  (void)L;  /* not used */\n  if (ls->size == 0) return NULL;\n  *size = ls->size;\n  ls->size = 0;\n  return ls->s;\n}\n\n\nLUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size,\n                                 const char *name, const char *mode) {\n  LoadS ls;\n  ls.s = buff;\n  ls.size = size;\n  return lua_load(L, getS, &ls, name, mode);\n}\n\n\nLUALIB_API int luaL_loadstring (lua_State *L, const char *s) {\n  return luaL_loadbuffer(L, s, strlen(s), s);\n}\n\n/* }====================================================== */\n\n\n\nLUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) {\n  if (!lua_getmetatable(L, obj))  /* no metatable? */\n    return 0;\n  lua_pushstring(L, event);\n  lua_rawget(L, -2);\n  if (lua_isnil(L, -1)) {\n    lua_pop(L, 2);  /* remove metatable and metafield */\n    return 0;\n  }\n  else {\n    lua_remove(L, -2);  /* remove only metatable */\n    return 1;\n  }\n}\n\n\nLUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) {\n  obj = lua_absindex(L, obj);\n  if (!luaL_getmetafield(L, obj, event))  /* no metafield? */\n    return 0;\n  lua_pushvalue(L, obj);\n  lua_call(L, 1, 1);\n  return 1;\n}\n\n\nLUALIB_API int luaL_len (lua_State *L, int idx) {\n  int l;\n  int isnum;\n  lua_len(L, idx);\n  l = (int)lua_tointegerx(L, -1, &isnum);\n  if (!isnum)\n    luaL_error(L, \"object length is not a number\");\n  lua_pop(L, 1);  /* remove object */\n  return l;\n}\n\n\nLUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {\n  if (!luaL_callmeta(L, idx, \"__tostring\")) {  /* no metafield? */\n    switch (lua_type(L, idx)) {\n      case LUA_TNUMBER:\n      case LUA_TSTRING:\n        lua_pushvalue(L, idx);\n        break;\n      case LUA_TBOOLEAN:\n        lua_pushstring(L, (lua_toboolean(L, idx) ? \"true\" : \"false\"));\n        break;\n      case LUA_TNIL:\n        lua_pushliteral(L, \"nil\");\n        break;\n      default:\n        lua_pushfstring(L, \"%s: %p\", luaL_typename(L, idx),\n                                            lua_topointer(L, idx));\n        break;\n    }\n  }\n  return lua_tolstring(L, -1, len);\n}\n\n\n/*\n** {======================================================\n** Compatibility with 5.1 module functions\n** =======================================================\n*/\n#if defined(LUA_COMPAT_MODULE)\n\nstatic const char *luaL_findtable (lua_State *L, int idx,\n                                   const char *fname, int szhint) {\n  const char *e;\n  if (idx) lua_pushvalue(L, idx);\n  do {\n    e = strchr(fname, '.');\n    if (e == NULL) e = fname + strlen(fname);\n    lua_pushlstring(L, fname, e - fname);\n    lua_rawget(L, -2);\n    if (lua_isnil(L, -1)) {  /* no such field? */\n      lua_pop(L, 1);  /* remove this nil */\n      lua_createtable(L, 0, (*e == '.' ? 1 : szhint)); /* new table for field */\n      lua_pushlstring(L, fname, e - fname);\n      lua_pushvalue(L, -2);\n      lua_settable(L, -4);  /* set new table into field */\n    }\n    else if (!lua_istable(L, -1)) {  /* field has a non-table value? */\n      lua_pop(L, 2);  /* remove table and value */\n      return fname;  /* return problematic part of the name */\n    }\n    lua_remove(L, -2);  /* remove previous table */\n    fname = e + 1;\n  } while (*e == '.');\n  return NULL;\n}\n\n\n/*\n** Count number of elements in a luaL_Reg list.\n*/\nstatic int libsize (const luaL_Reg *l) {\n  int size = 0;\n  for (; l && l->name; l++) size++;\n  return size;\n}\n\n\n/*\n** Find or create a module table with a given name. The function\n** first looks at the _LOADED table and, if that fails, try a\n** global variable with that name. In any case, leaves on the stack\n** the module table.\n*/\nLUALIB_API void luaL_pushmodule (lua_State *L, const char *modname,\n                                 int sizehint) {\n  luaL_findtable(L, LUA_REGISTRYINDEX, \"_LOADED\", 1);  /* get _LOADED table */\n  lua_getfield(L, -1, modname);  /* get _LOADED[modname] */\n  if (!lua_istable(L, -1)) {  /* not found? */\n    lua_pop(L, 1);  /* remove previous result */\n    /* try global variable (and create one if it does not exist) */\n    lua_pushglobaltable(L);\n    if (luaL_findtable(L, 0, modname, sizehint) != NULL)\n      luaL_error(L, \"name conflict for module \" LUA_QS, modname);\n    lua_pushvalue(L, -1);\n    lua_setfield(L, -3, modname);  /* _LOADED[modname] = new table */\n  }\n  lua_remove(L, -2);  /* remove _LOADED table */\n}\n\n\nLUALIB_API void luaL_openlib (lua_State *L, const char *libname,\n                               const luaL_Reg *l, int nup) {\n  luaL_checkversion(L);\n  if (libname) {\n    luaL_pushmodule(L, libname, libsize(l));  /* get/create library table */\n    lua_insert(L, -(nup + 1));  /* move library table to below upvalues */\n  }\n  if (l)\n    luaL_setfuncs(L, l, nup);\n  else\n    lua_pop(L, nup);  /* remove upvalues */\n}\n\n#endif\n/* }====================================================== */\n\n/*\n** set functions from list 'l' into table at top - 'nup'; each\n** function gets the 'nup' elements at the top as upvalues.\n** Returns with only the table at the stack.\n*/\nLUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {\n  luaL_checkversion(L);\n  luaL_checkstack(L, nup, \"too many upvalues\");\n  for (; l->name != NULL; l++) {  /* fill the table with given functions */\n    int i;\n    for (i = 0; i < nup; i++)  /* copy upvalues to the top */\n      lua_pushvalue(L, -nup);\n    lua_pushcclosure(L, l->func, nup);  /* closure with those upvalues */\n    lua_setfield(L, -(nup + 2), l->name);\n  }\n  lua_pop(L, nup);  /* remove upvalues */\n}\n\n\n/*\n** ensure that stack[idx][fname] has a table and push that table\n** into the stack\n*/\nLUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) {\n  lua_getfield(L, idx, fname);\n  if (lua_istable(L, -1)) return 1;  /* table already there */\n  else {\n    lua_pop(L, 1);  /* remove previous result */\n    idx = lua_absindex(L, idx);\n    lua_newtable(L);\n    lua_pushvalue(L, -1);  /* copy to be left at top */\n    lua_setfield(L, idx, fname);  /* assign new table to field */\n    return 0;  /* false, because did not find table there */\n  }\n}\n\n\n/*\n** stripped-down 'require'. Calls 'openf' to open a module,\n** registers the result in 'package.loaded' table and, if 'glb'\n** is true, also registers the result in the global table.\n** Leaves resulting module on the top.\n*/\nLUALIB_API void luaL_requiref (lua_State *L, const char *modname,\n                               lua_CFunction openf, int glb) {\n  lua_pushcfunction(L, openf);\n  lua_pushstring(L, modname);  /* argument to open function */\n  lua_call(L, 1, 1);  /* open module */\n  luaL_getsubtable(L, LUA_REGISTRYINDEX, \"_LOADED\");\n  lua_pushvalue(L, -2);  /* make copy of module (call result) */\n  lua_setfield(L, -2, modname);  /* _LOADED[modname] = module */\n  lua_pop(L, 1);  /* remove _LOADED table */\n  if (glb) {\n    lua_pushvalue(L, -1);  /* copy of 'mod' */\n    lua_setglobal(L, modname);  /* _G[modname] = module */\n  }\n}\n\n\nLUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p,\n                                                               const char *r) {\n  const char *wild;\n  size_t l = strlen(p);\n  luaL_Buffer b;\n  luaL_buffinit(L, &b);\n  while ((wild = strstr(s, p)) != NULL) {\n    luaL_addlstring(&b, s, wild - s);  /* push prefix */\n    luaL_addstring(&b, r);  /* push replacement in place of pattern */\n    s = wild + l;  /* continue after `p' */\n  }\n  luaL_addstring(&b, s);  /* push last suffix */\n  luaL_pushresult(&b);\n  return lua_tostring(L, -1);\n}\n\n\nstatic void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {\n  (void)ud; (void)osize;  /* not used */\n  if (nsize == 0) {\n    free(ptr);\n    return NULL;\n  }\n  else\n    return realloc(ptr, nsize);\n}\n\n\nstatic int panic (lua_State *L) {\n  luai_writestringerror(\"PANIC: unprotected error in call to Lua API (%s)\\n\",\n                   lua_tostring(L, -1));\n  return 0;  /* return to Lua to abort */\n}\n\n\nLUALIB_API lua_State *luaL_newstate (void) {\n  lua_State *L = lua_newstate(l_alloc, NULL);\n  if (L) lua_atpanic(L, &panic);\n  return L;\n}\n\n\nLUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) {\n  const lua_Number *v = lua_version(L);\n  if (v != lua_version(NULL))\n    luaL_error(L, \"multiple Lua VMs detected\");\n  else if (*v != ver)\n    luaL_error(L, \"version mismatch: app. needs %f, Lua core provides %f\",\n                  ver, *v);\n  /* check conversions number -> integer types */\n  lua_pushnumber(L, -(lua_Number)0x1234);\n  if (lua_tointeger(L, -1) != -0x1234 ||\n      lua_tounsigned(L, -1) != (lua_Unsigned)-0x1234)\n    luaL_error(L, \"bad conversion number->int;\"\n                  \" must recompile Lua with proper settings\");\n  lua_pop(L, 1);\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lauxlib.h",
    "content": "/*\n** $Id: lauxlib.h,v 1.120.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions for building Lua libraries\n** See Copyright Notice in lua.h\n*/\n\n\n#ifndef lauxlib_h\n#define lauxlib_h\n\n\n#include <stddef.h>\n#include <stdio.h>\n\n#include \"lua.h\"\n\n\n\n/* extra error code for `luaL_load' */\n#define LUA_ERRFILE     (LUA_ERRERR+1)\n\n\ntypedef struct luaL_Reg {\n  const char *name;\n  lua_CFunction func;\n} luaL_Reg;\n\n\nLUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver);\n#define luaL_checkversion(L)\tluaL_checkversion_(L, LUA_VERSION_NUM)\n\nLUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);\nLUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);\nLUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len);\nLUALIB_API int (luaL_argerror) (lua_State *L, int numarg, const char *extramsg);\nLUALIB_API const char *(luaL_checklstring) (lua_State *L, int numArg,\n                                                          size_t *l);\nLUALIB_API const char *(luaL_optlstring) (lua_State *L, int numArg,\n                                          const char *def, size_t *l);\nLUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int numArg);\nLUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int nArg, lua_Number def);\n\nLUALIB_API lua_Integer (luaL_checkinteger) (lua_State *L, int numArg);\nLUALIB_API lua_Integer (luaL_optinteger) (lua_State *L, int nArg,\n                                          lua_Integer def);\nLUALIB_API lua_Unsigned (luaL_checkunsigned) (lua_State *L, int numArg);\nLUALIB_API lua_Unsigned (luaL_optunsigned) (lua_State *L, int numArg,\n                                            lua_Unsigned def);\n\nLUALIB_API void (luaL_checkstack) (lua_State *L, int sz, const char *msg);\nLUALIB_API void (luaL_checktype) (lua_State *L, int narg, int t);\nLUALIB_API void (luaL_checkany) (lua_State *L, int narg);\n\nLUALIB_API int   (luaL_newmetatable) (lua_State *L, const char *tname);\nLUALIB_API void  (luaL_setmetatable) (lua_State *L, const char *tname);\nLUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname);\nLUALIB_API void *(luaL_checkudata) (lua_State *L, int ud, const char *tname);\n\nLUALIB_API void (luaL_where) (lua_State *L, int lvl);\nLUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);\n\nLUALIB_API int (luaL_checkoption) (lua_State *L, int narg, const char *def,\n                                   const char *const lst[]);\n\nLUALIB_API int (luaL_fileresult) (lua_State *L, int stat, const char *fname);\nLUALIB_API int (luaL_execresult) (lua_State *L, int stat);\n\n/* pre-defined references */\n#define LUA_NOREF       (-2)\n#define LUA_REFNIL      (-1)\n\nLUALIB_API int (luaL_ref) (lua_State *L, int t);\nLUALIB_API void (luaL_unref) (lua_State *L, int t, int ref);\n\nLUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename,\n                                               const char *mode);\n\n#define luaL_loadfile(L,f)\tluaL_loadfilex(L,f,NULL)\n\nLUALIB_API int (luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz,\n                                   const char *name, const char *mode);\nLUALIB_API int (luaL_loadstring) (lua_State *L, const char *s);\n\nLUALIB_API lua_State *(luaL_newstate) (void);\n\nLUALIB_API int (luaL_len) (lua_State *L, int idx);\n\nLUALIB_API const char *(luaL_gsub) (lua_State *L, const char *s, const char *p,\n                                                  const char *r);\n\nLUALIB_API void (luaL_setfuncs) (lua_State *L, const luaL_Reg *l, int nup);\n\nLUALIB_API int (luaL_getsubtable) (lua_State *L, int idx, const char *fname);\n\nLUALIB_API void (luaL_traceback) (lua_State *L, lua_State *L1,\n                                  const char *msg, int level);\n\nLUALIB_API void (luaL_requiref) (lua_State *L, const char *modname,\n                                 lua_CFunction openf, int glb);\n\n/*\n** ===============================================================\n** some useful macros\n** ===============================================================\n*/\n\n\n#define luaL_newlibtable(L,l)\t\\\n  lua_createtable(L, 0, sizeof(l)/sizeof((l)[0]) - 1)\n\n#define luaL_newlib(L,l)\t(luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))\n\n#define luaL_argcheck(L, cond,numarg,extramsg)\t\\\n\t\t((void)((cond) || luaL_argerror(L, (numarg), (extramsg))))\n#define luaL_checkstring(L,n)\t(luaL_checklstring(L, (n), NULL))\n#define luaL_optstring(L,n,d)\t(luaL_optlstring(L, (n), (d), NULL))\n#define luaL_checkint(L,n)\t((int)luaL_checkinteger(L, (n)))\n#define luaL_optint(L,n,d)\t((int)luaL_optinteger(L, (n), (d)))\n#define luaL_checklong(L,n)\t((long)luaL_checkinteger(L, (n)))\n#define luaL_optlong(L,n,d)\t((long)luaL_optinteger(L, (n), (d)))\n\n#define luaL_typename(L,i)\tlua_typename(L, lua_type(L,(i)))\n\n#define luaL_dofile(L, fn) \\\n\t(luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\n#define luaL_dostring(L, s) \\\n\t(luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\n#define luaL_getmetatable(L,n)\t(lua_getfield(L, LUA_REGISTRYINDEX, (n)))\n\n#define luaL_opt(L,f,n,d)\t(lua_isnoneornil(L,(n)) ? (d) : f(L,(n)))\n\n#define luaL_loadbuffer(L,s,sz,n)\tluaL_loadbufferx(L,s,sz,n,NULL)\n\n\n/*\n** {======================================================\n** Generic Buffer manipulation\n** =======================================================\n*/\n\ntypedef struct luaL_Buffer {\n  char *b;  /* buffer address */\n  size_t size;  /* buffer size */\n  size_t n;  /* number of characters in buffer */\n  lua_State *L;\n  char initb[LUAL_BUFFERSIZE];  /* initial buffer */\n} luaL_Buffer;\n\n\n#define luaL_addchar(B,c) \\\n  ((void)((B)->n < (B)->size || luaL_prepbuffsize((B), 1)), \\\n   ((B)->b[(B)->n++] = (c)))\n\n#define luaL_addsize(B,s)\t((B)->n += (s))\n\nLUALIB_API void (luaL_buffinit) (lua_State *L, luaL_Buffer *B);\nLUALIB_API char *(luaL_prepbuffsize) (luaL_Buffer *B, size_t sz);\nLUALIB_API void (luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l);\nLUALIB_API void (luaL_addstring) (luaL_Buffer *B, const char *s);\nLUALIB_API void (luaL_addvalue) (luaL_Buffer *B);\nLUALIB_API void (luaL_pushresult) (luaL_Buffer *B);\nLUALIB_API void (luaL_pushresultsize) (luaL_Buffer *B, size_t sz);\nLUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz);\n\n#define luaL_prepbuffer(B)\tluaL_prepbuffsize(B, LUAL_BUFFERSIZE)\n\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** File handles for IO library\n** =======================================================\n*/\n\n/*\n** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and\n** initial structure 'luaL_Stream' (it may contain other fields\n** after that initial structure).\n*/\n\n#define LUA_FILEHANDLE          \"FILE*\"\n\n\ntypedef struct luaL_Stream {\n  FILE *f;  /* stream (NULL for incompletely created streams) */\n  lua_CFunction closef;  /* to close stream (NULL for closed streams) */\n} luaL_Stream;\n\n/* }====================================================== */\n\n\n\n/* compatibility with old module system */\n#if defined(LUA_COMPAT_MODULE)\n\nLUALIB_API void (luaL_pushmodule) (lua_State *L, const char *modname,\n                                   int sizehint);\nLUALIB_API void (luaL_openlib) (lua_State *L, const char *libname,\n                                const luaL_Reg *l, int nup);\n\n#define luaL_register(L,n,l)\t(luaL_openlib(L,(n),(l),0))\n\n#endif\n\n\n#endif\n\n\n"
  },
  {
    "path": "src/lib/lua52/lbaselib.c",
    "content": "/*\n** $Id: lbaselib.c,v 1.276.1.1 2013/04/12 18:48:47 roberto Exp $\n** Basic library\n** See Copyright Notice in lua.h\n*/\n\n\n\n#include <ctype.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define lbaselib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\nstatic int luaB_print (lua_State *L) {\n  int n = lua_gettop(L);  /* number of arguments */\n  int i;\n  lua_getglobal(L, \"tostring\");\n  for (i=1; i<=n; i++) {\n    const char *s;\n    size_t l;\n    lua_pushvalue(L, -1);  /* function to be called */\n    lua_pushvalue(L, i);   /* value to print */\n    lua_call(L, 1, 1);\n    s = lua_tolstring(L, -1, &l);  /* get result */\n    if (s == NULL)\n      return luaL_error(L,\n         LUA_QL(\"tostring\") \" must return a string to \" LUA_QL(\"print\"));\n    if (i>1) luai_writestring(\"\\t\", 1);\n    luai_writestring(s, l);\n    lua_pop(L, 1);  /* pop result */\n  }\n  luai_writeline();\n  return 0;\n}\n\n\n#define SPACECHARS\t\" \\f\\n\\r\\t\\v\"\n\nstatic int luaB_tonumber (lua_State *L) {\n  if (lua_isnoneornil(L, 2)) {  /* standard conversion */\n    int isnum;\n    lua_Number n = lua_tonumberx(L, 1, &isnum);\n    if (isnum) {\n      lua_pushnumber(L, n);\n      return 1;\n    }  /* else not a number; must be something */\n    luaL_checkany(L, 1);\n  }\n  else {\n    size_t l;\n    const char *s = luaL_checklstring(L, 1, &l);\n    const char *e = s + l;  /* end point for 's' */\n    int base = luaL_checkint(L, 2);\n    int neg = 0;\n    luaL_argcheck(L, 2 <= base && base <= 36, 2, \"base out of range\");\n    s += strspn(s, SPACECHARS);  /* skip initial spaces */\n    if (*s == '-') { s++; neg = 1; }  /* handle signal */\n    else if (*s == '+') s++;\n    if (isalnum((unsigned char)*s)) {\n      lua_Number n = 0;\n      do {\n        int digit = (isdigit((unsigned char)*s)) ? *s - '0'\n                       : toupper((unsigned char)*s) - 'A' + 10;\n        if (digit >= base) break;  /* invalid numeral; force a fail */\n        n = n * (lua_Number)base + (lua_Number)digit;\n        s++;\n      } while (isalnum((unsigned char)*s));\n      s += strspn(s, SPACECHARS);  /* skip trailing spaces */\n      if (s == e) {  /* no invalid trailing characters? */\n        lua_pushnumber(L, (neg) ? -n : n);\n        return 1;\n      }  /* else not a number */\n    }  /* else not a number */\n  }\n  lua_pushnil(L);  /* not a number */\n  return 1;\n}\n\n\nstatic int luaB_error (lua_State *L) {\n  int level = luaL_optint(L, 2, 1);\n  lua_settop(L, 1);\n  if (lua_isstring(L, 1) && level > 0) {  /* add extra information? */\n    luaL_where(L, level);\n    lua_pushvalue(L, 1);\n    lua_concat(L, 2);\n  }\n  return lua_error(L);\n}\n\n\nstatic int luaB_getmetatable (lua_State *L) {\n  luaL_checkany(L, 1);\n  if (!lua_getmetatable(L, 1)) {\n    lua_pushnil(L);\n    return 1;  /* no metatable */\n  }\n  luaL_getmetafield(L, 1, \"__metatable\");\n  return 1;  /* returns either __metatable field (if present) or metatable */\n}\n\n\nstatic int luaB_setmetatable (lua_State *L) {\n  int t = lua_type(L, 2);\n  luaL_checktype(L, 1, LUA_TTABLE);\n  luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,\n                    \"nil or table expected\");\n  if (luaL_getmetafield(L, 1, \"__metatable\"))\n    return luaL_error(L, \"cannot change a protected metatable\");\n  lua_settop(L, 2);\n  lua_setmetatable(L, 1);\n  return 1;\n}\n\n\nstatic int luaB_rawequal (lua_State *L) {\n  luaL_checkany(L, 1);\n  luaL_checkany(L, 2);\n  lua_pushboolean(L, lua_rawequal(L, 1, 2));\n  return 1;\n}\n\n\nstatic int luaB_rawlen (lua_State *L) {\n  int t = lua_type(L, 1);\n  luaL_argcheck(L, t == LUA_TTABLE || t == LUA_TSTRING, 1,\n                   \"table or string expected\");\n  lua_pushinteger(L, lua_rawlen(L, 1));\n  return 1;\n}\n\n\nstatic int luaB_rawget (lua_State *L) {\n  luaL_checktype(L, 1, LUA_TTABLE);\n  luaL_checkany(L, 2);\n  lua_settop(L, 2);\n  lua_rawget(L, 1);\n  return 1;\n}\n\nstatic int luaB_rawset (lua_State *L) {\n  luaL_checktype(L, 1, LUA_TTABLE);\n  luaL_checkany(L, 2);\n  luaL_checkany(L, 3);\n  lua_settop(L, 3);\n  lua_rawset(L, 1);\n  return 1;\n}\n\n\nstatic int luaB_collectgarbage (lua_State *L) {\n  static const char *const opts[] = {\"stop\", \"restart\", \"collect\",\n    \"count\", \"step\", \"setpause\", \"setstepmul\",\n    \"setmajorinc\", \"isrunning\", \"generational\", \"incremental\", NULL};\n  static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT,\n    LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL,\n    LUA_GCSETMAJORINC, LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC};\n  int o = optsnum[luaL_checkoption(L, 1, \"collect\", opts)];\n  int ex = luaL_optint(L, 2, 0);\n  int res = lua_gc(L, o, ex);\n  switch (o) {\n    case LUA_GCCOUNT: {\n      int b = lua_gc(L, LUA_GCCOUNTB, 0);\n      lua_pushnumber(L, res + ((lua_Number)b/1024));\n      lua_pushinteger(L, b);\n      return 2;\n    }\n    case LUA_GCSTEP: case LUA_GCISRUNNING: {\n      lua_pushboolean(L, res);\n      return 1;\n    }\n    default: {\n      lua_pushinteger(L, res);\n      return 1;\n    }\n  }\n}\n\n\nstatic int luaB_type (lua_State *L) {\n  luaL_checkany(L, 1);\n  lua_pushstring(L, luaL_typename(L, 1));\n  return 1;\n}\n\n\nstatic int pairsmeta (lua_State *L, const char *method, int iszero,\n                      lua_CFunction iter) {\n  if (!luaL_getmetafield(L, 1, method)) {  /* no metamethod? */\n    luaL_checktype(L, 1, LUA_TTABLE);  /* argument must be a table */\n    lua_pushcfunction(L, iter);  /* will return generator, */\n    lua_pushvalue(L, 1);  /* state, */\n    if (iszero) lua_pushinteger(L, 0);  /* and initial value */\n    else lua_pushnil(L);\n  }\n  else {\n    lua_pushvalue(L, 1);  /* argument 'self' to metamethod */\n    lua_call(L, 1, 3);  /* get 3 values from metamethod */\n  }\n  return 3;\n}\n\n\nstatic int luaB_next (lua_State *L) {\n  luaL_checktype(L, 1, LUA_TTABLE);\n  lua_settop(L, 2);  /* create a 2nd argument if there isn't one */\n  if (lua_next(L, 1))\n    return 2;\n  else {\n    lua_pushnil(L);\n    return 1;\n  }\n}\n\n\nstatic int luaB_pairs (lua_State *L) {\n  return pairsmeta(L, \"__pairs\", 0, luaB_next);\n}\n\n\nstatic int ipairsaux (lua_State *L) {\n  int i = luaL_checkint(L, 2);\n  luaL_checktype(L, 1, LUA_TTABLE);\n  i++;  /* next value */\n  lua_pushinteger(L, i);\n  lua_rawgeti(L, 1, i);\n  return (lua_isnil(L, -1)) ? 1 : 2;\n}\n\n\nstatic int luaB_ipairs (lua_State *L) {\n  return pairsmeta(L, \"__ipairs\", 1, ipairsaux);\n}\n\n\nstatic int load_aux (lua_State *L, int status, int envidx) {\n  if (status == LUA_OK) {\n    if (envidx != 0) {  /* 'env' parameter? */\n      lua_pushvalue(L, envidx);  /* environment for loaded function */\n      if (!lua_setupvalue(L, -2, 1))  /* set it as 1st upvalue */\n        lua_pop(L, 1);  /* remove 'env' if not used by previous call */\n    }\n    return 1;\n  }\n  else {  /* error (message is on top of the stack) */\n    lua_pushnil(L);\n    lua_insert(L, -2);  /* put before error message */\n    return 2;  /* return nil plus error message */\n  }\n}\n\n\nstatic int luaB_loadfile (lua_State *L) {\n  const char *fname = luaL_optstring(L, 1, NULL);\n  const char *mode = luaL_optstring(L, 2, NULL);\n  int env = (!lua_isnone(L, 3) ? 3 : 0);  /* 'env' index or 0 if no 'env' */\n  int status = luaL_loadfilex(L, fname, mode);\n  return load_aux(L, status, env);\n}\n\n\n/*\n** {======================================================\n** Generic Read function\n** =======================================================\n*/\n\n\n/*\n** reserved slot, above all arguments, to hold a copy of the returned\n** string to avoid it being collected while parsed. 'load' has four\n** optional arguments (chunk, source name, mode, and environment).\n*/\n#define RESERVEDSLOT\t5\n\n\n/*\n** Reader for generic `load' function: `lua_load' uses the\n** stack for internal stuff, so the reader cannot change the\n** stack top. Instead, it keeps its resulting string in a\n** reserved slot inside the stack.\n*/\nstatic const char *generic_reader (lua_State *L, void *ud, size_t *size) {\n  (void)(ud);  /* not used */\n  luaL_checkstack(L, 2, \"too many nested functions\");\n  lua_pushvalue(L, 1);  /* get function */\n  lua_call(L, 0, 1);  /* call it */\n  if (lua_isnil(L, -1)) {\n    lua_pop(L, 1);  /* pop result */\n    *size = 0;\n    return NULL;\n  }\n  else if (!lua_isstring(L, -1))\n    luaL_error(L, \"reader function must return a string\");\n  lua_replace(L, RESERVEDSLOT);  /* save string in reserved slot */\n  return lua_tolstring(L, RESERVEDSLOT, size);\n}\n\n\nstatic int luaB_load (lua_State *L) {\n  int status;\n  size_t l;\n  const char *s = lua_tolstring(L, 1, &l);\n  const char *mode = luaL_optstring(L, 3, \"bt\");\n  int env = (!lua_isnone(L, 4) ? 4 : 0);  /* 'env' index or 0 if no 'env' */\n  if (s != NULL) {  /* loading a string? */\n    const char *chunkname = luaL_optstring(L, 2, s);\n    status = luaL_loadbufferx(L, s, l, chunkname, mode);\n  }\n  else {  /* loading from a reader function */\n    const char *chunkname = luaL_optstring(L, 2, \"=(load)\");\n    luaL_checktype(L, 1, LUA_TFUNCTION);\n    lua_settop(L, RESERVEDSLOT);  /* create reserved slot */\n    status = lua_load(L, generic_reader, NULL, chunkname, mode);\n  }\n  return load_aux(L, status, env);\n}\n\n/* }====================================================== */\n\n\nstatic int dofilecont (lua_State *L) {\n  return lua_gettop(L) - 1;\n}\n\n\nstatic int luaB_dofile (lua_State *L) {\n  const char *fname = luaL_optstring(L, 1, NULL);\n  lua_settop(L, 1);\n  if (luaL_loadfile(L, fname) != LUA_OK)\n    return lua_error(L);\n  lua_callk(L, 0, LUA_MULTRET, 0, dofilecont);\n  return dofilecont(L);\n}\n\n\nstatic int luaB_assert (lua_State *L) {\n  if (!lua_toboolean(L, 1))\n    return luaL_error(L, \"%s\", luaL_optstring(L, 2, \"assertion failed!\"));\n  return lua_gettop(L);\n}\n\n\nstatic int luaB_select (lua_State *L) {\n  int n = lua_gettop(L);\n  if (lua_type(L, 1) == LUA_TSTRING && *lua_tostring(L, 1) == '#') {\n    lua_pushinteger(L, n-1);\n    return 1;\n  }\n  else {\n    int i = luaL_checkint(L, 1);\n    if (i < 0) i = n + i;\n    else if (i > n) i = n;\n    luaL_argcheck(L, 1 <= i, 1, \"index out of range\");\n    return n - i;\n  }\n}\n\n\nstatic int finishpcall (lua_State *L, int status) {\n  if (!lua_checkstack(L, 1)) {  /* no space for extra boolean? */\n    lua_settop(L, 0);  /* create space for return values */\n    lua_pushboolean(L, 0);\n    lua_pushstring(L, \"stack overflow\");\n    return 2;  /* return false, msg */\n  }\n  lua_pushboolean(L, status);  /* first result (status) */\n  lua_replace(L, 1);  /* put first result in first slot */\n  return lua_gettop(L);\n}\n\n\nstatic int pcallcont (lua_State *L) {\n  int status = lua_getctx(L, NULL);\n  return finishpcall(L, (status == LUA_YIELD));\n}\n\n\nstatic int luaB_pcall (lua_State *L) {\n  int status;\n  luaL_checkany(L, 1);\n  lua_pushnil(L);\n  lua_insert(L, 1);  /* create space for status result */\n  status = lua_pcallk(L, lua_gettop(L) - 2, LUA_MULTRET, 0, 0, pcallcont);\n  return finishpcall(L, (status == LUA_OK));\n}\n\n\nstatic int luaB_xpcall (lua_State *L) {\n  int status;\n  int n = lua_gettop(L);\n  luaL_argcheck(L, n >= 2, 2, \"value expected\");\n  lua_pushvalue(L, 1);  /* exchange function... */\n  lua_copy(L, 2, 1);  /* ...and error handler */\n  lua_replace(L, 2);\n  status = lua_pcallk(L, n - 2, LUA_MULTRET, 1, 0, pcallcont);\n  return finishpcall(L, (status == LUA_OK));\n}\n\n\nstatic int luaB_tostring (lua_State *L) {\n  luaL_checkany(L, 1);\n  luaL_tolstring(L, 1, NULL);\n  return 1;\n}\n\n\nstatic const luaL_Reg base_funcs[] = {\n  {\"assert\", luaB_assert},\n  {\"collectgarbage\", luaB_collectgarbage},\n  {\"dofile\", luaB_dofile},\n  {\"error\", luaB_error},\n  {\"getmetatable\", luaB_getmetatable},\n  {\"ipairs\", luaB_ipairs},\n  {\"loadfile\", luaB_loadfile},\n  {\"load\", luaB_load},\n#if defined(LUA_COMPAT_LOADSTRING)\n  {\"loadstring\", luaB_load},\n#endif\n  {\"next\", luaB_next},\n  {\"pairs\", luaB_pairs},\n  {\"pcall\", luaB_pcall},\n  {\"print\", luaB_print},\n  {\"rawequal\", luaB_rawequal},\n  {\"rawlen\", luaB_rawlen},\n  {\"rawget\", luaB_rawget},\n  {\"rawset\", luaB_rawset},\n  {\"select\", luaB_select},\n  {\"setmetatable\", luaB_setmetatable},\n  {\"tonumber\", luaB_tonumber},\n  {\"tostring\", luaB_tostring},\n  {\"type\", luaB_type},\n  {\"xpcall\", luaB_xpcall},\n  {NULL, NULL}\n};\n\n\nLUAMOD_API int luaopen_base (lua_State *L) {\n  /* set global _G */\n  lua_pushglobaltable(L);\n  lua_pushglobaltable(L);\n  lua_setfield(L, -2, \"_G\");\n  /* open lib into global table */\n  luaL_setfuncs(L, base_funcs, 0);\n  lua_pushliteral(L, LUA_VERSION);\n  lua_setfield(L, -2, \"_VERSION\");  /* set global _VERSION */\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lbitlib.c",
    "content": "/*\n** $Id: lbitlib.c,v 1.18.1.2 2013/07/09 18:01:41 roberto Exp $\n** Standard library for bitwise operations\n** See Copyright Notice in lua.h\n*/\n\n#define lbitlib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n/* number of bits to consider in a number */\n#if !defined(LUA_NBITS)\n#define LUA_NBITS\t32\n#endif\n\n\n#define ALLONES\t\t(~(((~(lua_Unsigned)0) << (LUA_NBITS - 1)) << 1))\n\n/* macro to trim extra bits */\n#define trim(x)\t\t((x) & ALLONES)\n\n\n/* builds a number with 'n' ones (1 <= n <= LUA_NBITS) */\n#define mask(n)\t\t(~((ALLONES << 1) << ((n) - 1)))\n\n\ntypedef lua_Unsigned b_uint;\n\n\n\nstatic b_uint andaux (lua_State *L) {\n  int i, n = lua_gettop(L);\n  b_uint r = ~(b_uint)0;\n  for (i = 1; i <= n; i++)\n    r &= luaL_checkunsigned(L, i);\n  return trim(r);\n}\n\n\nstatic int b_and (lua_State *L) {\n  b_uint r = andaux(L);\n  lua_pushunsigned(L, r);\n  return 1;\n}\n\n\nstatic int b_test (lua_State *L) {\n  b_uint r = andaux(L);\n  lua_pushboolean(L, r != 0);\n  return 1;\n}\n\n\nstatic int b_or (lua_State *L) {\n  int i, n = lua_gettop(L);\n  b_uint r = 0;\n  for (i = 1; i <= n; i++)\n    r |= luaL_checkunsigned(L, i);\n  lua_pushunsigned(L, trim(r));\n  return 1;\n}\n\n\nstatic int b_xor (lua_State *L) {\n  int i, n = lua_gettop(L);\n  b_uint r = 0;\n  for (i = 1; i <= n; i++)\n    r ^= luaL_checkunsigned(L, i);\n  lua_pushunsigned(L, trim(r));\n  return 1;\n}\n\n\nstatic int b_not (lua_State *L) {\n  b_uint r = ~luaL_checkunsigned(L, 1);\n  lua_pushunsigned(L, trim(r));\n  return 1;\n}\n\n\nstatic int b_shift (lua_State *L, b_uint r, int i) {\n  if (i < 0) {  /* shift right? */\n    i = -i;\n    r = trim(r);\n    if (i >= LUA_NBITS) r = 0;\n    else r >>= i;\n  }\n  else {  /* shift left */\n    if (i >= LUA_NBITS) r = 0;\n    else r <<= i;\n    r = trim(r);\n  }\n  lua_pushunsigned(L, r);\n  return 1;\n}\n\n\nstatic int b_lshift (lua_State *L) {\n  return b_shift(L, luaL_checkunsigned(L, 1), luaL_checkint(L, 2));\n}\n\n\nstatic int b_rshift (lua_State *L) {\n  return b_shift(L, luaL_checkunsigned(L, 1), -luaL_checkint(L, 2));\n}\n\n\nstatic int b_arshift (lua_State *L) {\n  b_uint r = luaL_checkunsigned(L, 1);\n  int i = luaL_checkint(L, 2);\n  if (i < 0 || !(r & ((b_uint)1 << (LUA_NBITS - 1))))\n    return b_shift(L, r, -i);\n  else {  /* arithmetic shift for 'negative' number */\n    if (i >= LUA_NBITS) r = ALLONES;\n    else\n      r = trim((r >> i) | ~(~(b_uint)0 >> i));  /* add signal bit */\n    lua_pushunsigned(L, r);\n    return 1;\n  }\n}\n\n\nstatic int b_rot (lua_State *L, int i) {\n  b_uint r = luaL_checkunsigned(L, 1);\n  i &= (LUA_NBITS - 1);  /* i = i % NBITS */\n  r = trim(r);\n  if (i != 0)  /* avoid undefined shift of LUA_NBITS when i == 0 */\n    r = (r << i) | (r >> (LUA_NBITS - i));\n  lua_pushunsigned(L, trim(r));\n  return 1;\n}\n\n\nstatic int b_lrot (lua_State *L) {\n  return b_rot(L, luaL_checkint(L, 2));\n}\n\n\nstatic int b_rrot (lua_State *L) {\n  return b_rot(L, -luaL_checkint(L, 2));\n}\n\n\n/*\n** get field and width arguments for field-manipulation functions,\n** checking whether they are valid.\n** ('luaL_error' called without 'return' to avoid later warnings about\n** 'width' being used uninitialized.)\n*/\nstatic int fieldargs (lua_State *L, int farg, int *width) {\n  int f = luaL_checkint(L, farg);\n  int w = luaL_optint(L, farg + 1, 1);\n  luaL_argcheck(L, 0 <= f, farg, \"field cannot be negative\");\n  luaL_argcheck(L, 0 < w, farg + 1, \"width must be positive\");\n  if (f + w > LUA_NBITS)\n    luaL_error(L, \"trying to access non-existent bits\");\n  *width = w;\n  return f;\n}\n\n\nstatic int b_extract (lua_State *L) {\n  int w;\n  b_uint r = luaL_checkunsigned(L, 1);\n  int f = fieldargs(L, 2, &w);\n  r = (r >> f) & mask(w);\n  lua_pushunsigned(L, r);\n  return 1;\n}\n\n\nstatic int b_replace (lua_State *L) {\n  int w;\n  b_uint r = luaL_checkunsigned(L, 1);\n  b_uint v = luaL_checkunsigned(L, 2);\n  int f = fieldargs(L, 3, &w);\n  int m = mask(w);\n  v &= m;  /* erase bits outside given width */\n  r = (r & ~(m << f)) | (v << f);\n  lua_pushunsigned(L, r);\n  return 1;\n}\n\n\nstatic const luaL_Reg bitlib[] = {\n  {\"arshift\", b_arshift},\n  {\"band\", b_and},\n  {\"bnot\", b_not},\n  {\"bor\", b_or},\n  {\"bxor\", b_xor},\n  {\"btest\", b_test},\n  {\"extract\", b_extract},\n  {\"lrotate\", b_lrot},\n  {\"lshift\", b_lshift},\n  {\"replace\", b_replace},\n  {\"rrotate\", b_rrot},\n  {\"rshift\", b_rshift},\n  {NULL, NULL}\n};\n\n\n\nLUAMOD_API int luaopen_bit32 (lua_State *L) {\n  luaL_newlib(L, bitlib);\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lcode.c",
    "content": "/*\n** $Id: lcode.c,v 2.62.1.1 2013/04/12 18:48:47 roberto Exp $\n** Code generator for Lua\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdlib.h>\n\n#define lcode_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lcode.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lgc.h\"\n#include \"llex.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lparser.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"lvm.h\"\n\n\n#define hasjumps(e)\t((e)->t != (e)->f)\n\n\nstatic int isnumeral(expdesc *e) {\n  return (e->k == VKNUM && e->t == NO_JUMP && e->f == NO_JUMP);\n}\n\n\nvoid luaK_nil (FuncState *fs, int from, int n) {\n  Instruction *previous;\n  int l = from + n - 1;  /* last register to set nil */\n  if (fs->pc > fs->lasttarget) {  /* no jumps to current position? */\n    previous = &fs->f->code[fs->pc-1];\n    if (GET_OPCODE(*previous) == OP_LOADNIL) {\n      int pfrom = GETARG_A(*previous);\n      int pl = pfrom + GETARG_B(*previous);\n      if ((pfrom <= from && from <= pl + 1) ||\n          (from <= pfrom && pfrom <= l + 1)) {  /* can connect both? */\n        if (pfrom < from) from = pfrom;  /* from = min(from, pfrom) */\n        if (pl > l) l = pl;  /* l = max(l, pl) */\n        SETARG_A(*previous, from);\n        SETARG_B(*previous, l - from);\n        return;\n      }\n    }  /* else go through */\n  }\n  luaK_codeABC(fs, OP_LOADNIL, from, n - 1, 0);  /* else no optimization */\n}\n\n\nint luaK_jump (FuncState *fs) {\n  int jpc = fs->jpc;  /* save list of jumps to here */\n  int j;\n  fs->jpc = NO_JUMP;\n  j = luaK_codeAsBx(fs, OP_JMP, 0, NO_JUMP);\n  luaK_concat(fs, &j, jpc);  /* keep them on hold */\n  return j;\n}\n\n\nvoid luaK_ret (FuncState *fs, int first, int nret) {\n  luaK_codeABC(fs, OP_RETURN, first, nret+1, 0);\n}\n\n\nstatic int condjump (FuncState *fs, OpCode op, int A, int B, int C) {\n  luaK_codeABC(fs, op, A, B, C);\n  return luaK_jump(fs);\n}\n\n\nstatic void fixjump (FuncState *fs, int pc, int dest) {\n  Instruction *jmp = &fs->f->code[pc];\n  int offset = dest-(pc+1);\n  lua_assert(dest != NO_JUMP);\n  if (abs(offset) > MAXARG_sBx)\n    luaX_syntaxerror(fs->ls, \"control structure too long\");\n  SETARG_sBx(*jmp, offset);\n}\n\n\n/*\n** returns current `pc' and marks it as a jump target (to avoid wrong\n** optimizations with consecutive instructions not in the same basic block).\n*/\nint luaK_getlabel (FuncState *fs) {\n  fs->lasttarget = fs->pc;\n  return fs->pc;\n}\n\n\nstatic int getjump (FuncState *fs, int pc) {\n  int offset = GETARG_sBx(fs->f->code[pc]);\n  if (offset == NO_JUMP)  /* point to itself represents end of list */\n    return NO_JUMP;  /* end of list */\n  else\n    return (pc+1)+offset;  /* turn offset into absolute position */\n}\n\n\nstatic Instruction *getjumpcontrol (FuncState *fs, int pc) {\n  Instruction *pi = &fs->f->code[pc];\n  if (pc >= 1 && testTMode(GET_OPCODE(*(pi-1))))\n    return pi-1;\n  else\n    return pi;\n}\n\n\n/*\n** check whether list has any jump that do not produce a value\n** (or produce an inverted value)\n*/\nstatic int need_value (FuncState *fs, int list) {\n  for (; list != NO_JUMP; list = getjump(fs, list)) {\n    Instruction i = *getjumpcontrol(fs, list);\n    if (GET_OPCODE(i) != OP_TESTSET) return 1;\n  }\n  return 0;  /* not found */\n}\n\n\nstatic int patchtestreg (FuncState *fs, int node, int reg) {\n  Instruction *i = getjumpcontrol(fs, node);\n  if (GET_OPCODE(*i) != OP_TESTSET)\n    return 0;  /* cannot patch other instructions */\n  if (reg != NO_REG && reg != GETARG_B(*i))\n    SETARG_A(*i, reg);\n  else  /* no register to put value or register already has the value */\n    *i = CREATE_ABC(OP_TEST, GETARG_B(*i), 0, GETARG_C(*i));\n\n  return 1;\n}\n\n\nstatic void removevalues (FuncState *fs, int list) {\n  for (; list != NO_JUMP; list = getjump(fs, list))\n      patchtestreg(fs, list, NO_REG);\n}\n\n\nstatic void patchlistaux (FuncState *fs, int list, int vtarget, int reg,\n                          int dtarget) {\n  while (list != NO_JUMP) {\n    int next = getjump(fs, list);\n    if (patchtestreg(fs, list, reg))\n      fixjump(fs, list, vtarget);\n    else\n      fixjump(fs, list, dtarget);  /* jump to default target */\n    list = next;\n  }\n}\n\n\nstatic void dischargejpc (FuncState *fs) {\n  patchlistaux(fs, fs->jpc, fs->pc, NO_REG, fs->pc);\n  fs->jpc = NO_JUMP;\n}\n\n\nvoid luaK_patchlist (FuncState *fs, int list, int target) {\n  if (target == fs->pc)\n    luaK_patchtohere(fs, list);\n  else {\n    lua_assert(target < fs->pc);\n    patchlistaux(fs, list, target, NO_REG, target);\n  }\n}\n\n\nLUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level) {\n  level++;  /* argument is +1 to reserve 0 as non-op */\n  while (list != NO_JUMP) {\n    int next = getjump(fs, list);\n    lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&\n                (GETARG_A(fs->f->code[list]) == 0 ||\n                 GETARG_A(fs->f->code[list]) >= level));\n    SETARG_A(fs->f->code[list], level);\n    list = next;\n  }\n}\n\n\nvoid luaK_patchtohere (FuncState *fs, int list) {\n  luaK_getlabel(fs);\n  luaK_concat(fs, &fs->jpc, list);\n}\n\n\nvoid luaK_concat (FuncState *fs, int *l1, int l2) {\n  if (l2 == NO_JUMP) return;\n  else if (*l1 == NO_JUMP)\n    *l1 = l2;\n  else {\n    int list = *l1;\n    int next;\n    while ((next = getjump(fs, list)) != NO_JUMP)  /* find last element */\n      list = next;\n    fixjump(fs, list, l2);\n  }\n}\n\n\nstatic int luaK_code (FuncState *fs, Instruction i) {\n  Proto *f = fs->f;\n  dischargejpc(fs);  /* `pc' will change */\n  /* put new instruction in code array */\n  luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction,\n                  MAX_INT, \"opcodes\");\n  f->code[fs->pc] = i;\n  /* save corresponding line information */\n  luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int,\n                  MAX_INT, \"opcodes\");\n  f->lineinfo[fs->pc] = fs->ls->lastline;\n  return fs->pc++;\n}\n\n\nint luaK_codeABC (FuncState *fs, OpCode o, int a, int b, int c) {\n  lua_assert(getOpMode(o) == iABC);\n  lua_assert(getBMode(o) != OpArgN || b == 0);\n  lua_assert(getCMode(o) != OpArgN || c == 0);\n  lua_assert(a <= MAXARG_A && b <= MAXARG_B && c <= MAXARG_C);\n  return luaK_code(fs, CREATE_ABC(o, a, b, c));\n}\n\n\nint luaK_codeABx (FuncState *fs, OpCode o, int a, unsigned int bc) {\n  lua_assert(getOpMode(o) == iABx || getOpMode(o) == iAsBx);\n  lua_assert(getCMode(o) == OpArgN);\n  lua_assert(a <= MAXARG_A && bc <= MAXARG_Bx);\n  return luaK_code(fs, CREATE_ABx(o, a, bc));\n}\n\n\nstatic int codeextraarg (FuncState *fs, int a) {\n  lua_assert(a <= MAXARG_Ax);\n  return luaK_code(fs, CREATE_Ax(OP_EXTRAARG, a));\n}\n\n\nint luaK_codek (FuncState *fs, int reg, int k) {\n  if (k <= MAXARG_Bx)\n    return luaK_codeABx(fs, OP_LOADK, reg, k);\n  else {\n    int p = luaK_codeABx(fs, OP_LOADKX, reg, 0);\n    codeextraarg(fs, k);\n    return p;\n  }\n}\n\n\nvoid luaK_checkstack (FuncState *fs, int n) {\n  int newstack = fs->freereg + n;\n  if (newstack > fs->f->maxstacksize) {\n    if (newstack >= MAXSTACK)\n      luaX_syntaxerror(fs->ls, \"function or expression too complex\");\n    fs->f->maxstacksize = cast_byte(newstack);\n  }\n}\n\n\nvoid luaK_reserveregs (FuncState *fs, int n) {\n  luaK_checkstack(fs, n);\n  fs->freereg += n;\n}\n\n\nstatic void freereg (FuncState *fs, int reg) {\n  if (!ISK(reg) && reg >= fs->nactvar) {\n    fs->freereg--;\n    lua_assert(reg == fs->freereg);\n  }\n}\n\n\nstatic void freeexp (FuncState *fs, expdesc *e) {\n  if (e->k == VNONRELOC)\n    freereg(fs, e->u.info);\n}\n\n\nstatic int addk (FuncState *fs, TValue *key, TValue *v) {\n  lua_State *L = fs->ls->L;\n  TValue *idx = luaH_set(L, fs->h, key);\n  Proto *f = fs->f;\n  int k, oldsize;\n  if (ttisnumber(idx)) {\n    lua_Number n = nvalue(idx);\n    lua_number2int(k, n);\n    if (luaV_rawequalobj(&f->k[k], v))\n      return k;\n    /* else may be a collision (e.g., between 0.0 and \"\\0\\0\\0\\0\\0\\0\\0\\0\");\n       go through and create a new entry for this value */\n  }\n  /* constant not found; create a new entry */\n  oldsize = f->sizek;\n  k = fs->nk;\n  /* numerical value does not need GC barrier;\n     table has no metatable, so it does not need to invalidate cache */\n  setnvalue(idx, cast_num(k));\n  luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Ax, \"constants\");\n  while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);\n  setobj(L, &f->k[k], v);\n  fs->nk++;\n  luaC_barrier(L, f, v);\n  return k;\n}\n\n\nint luaK_stringK (FuncState *fs, TString *s) {\n  TValue o;\n  setsvalue(fs->ls->L, &o, s);\n  return addk(fs, &o, &o);\n}\n\n\nint luaK_numberK (FuncState *fs, lua_Number r) {\n  int n;\n  lua_State *L = fs->ls->L;\n  TValue o;\n  setnvalue(&o, r);\n  if (r == 0 || luai_numisnan(NULL, r)) {  /* handle -0 and NaN */\n    /* use raw representation as key to avoid numeric problems */\n    setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r)));\n    n = addk(fs, L->top - 1, &o);\n    L->top--;\n  }\n  else\n    n = addk(fs, &o, &o);  /* regular case */\n  return n;\n}\n\n\nstatic int boolK (FuncState *fs, int b) {\n  TValue o;\n  setbvalue(&o, b);\n  return addk(fs, &o, &o);\n}\n\n\nstatic int nilK (FuncState *fs) {\n  TValue k, v;\n  setnilvalue(&v);\n  /* cannot use nil as key; instead use table itself to represent nil */\n  sethvalue(fs->ls->L, &k, fs->h);\n  return addk(fs, &k, &v);\n}\n\n\nvoid luaK_setreturns (FuncState *fs, expdesc *e, int nresults) {\n  if (e->k == VCALL) {  /* expression is an open function call? */\n    SETARG_C(getcode(fs, e), nresults+1);\n  }\n  else if (e->k == VVARARG) {\n    SETARG_B(getcode(fs, e), nresults+1);\n    SETARG_A(getcode(fs, e), fs->freereg);\n    luaK_reserveregs(fs, 1);\n  }\n}\n\n\nvoid luaK_setoneret (FuncState *fs, expdesc *e) {\n  if (e->k == VCALL) {  /* expression is an open function call? */\n    e->k = VNONRELOC;\n    e->u.info = GETARG_A(getcode(fs, e));\n  }\n  else if (e->k == VVARARG) {\n    SETARG_B(getcode(fs, e), 2);\n    e->k = VRELOCABLE;  /* can relocate its simple result */\n  }\n}\n\n\nvoid luaK_dischargevars (FuncState *fs, expdesc *e) {\n  switch (e->k) {\n    case VLOCAL: {\n      e->k = VNONRELOC;\n      break;\n    }\n    case VUPVAL: {\n      e->u.info = luaK_codeABC(fs, OP_GETUPVAL, 0, e->u.info, 0);\n      e->k = VRELOCABLE;\n      break;\n    }\n    case VINDEXED: {\n      OpCode op = OP_GETTABUP;  /* assume 't' is in an upvalue */\n      freereg(fs, e->u.ind.idx);\n      if (e->u.ind.vt == VLOCAL) {  /* 't' is in a register? */\n        freereg(fs, e->u.ind.t);\n        op = OP_GETTABLE;\n      }\n      e->u.info = luaK_codeABC(fs, op, 0, e->u.ind.t, e->u.ind.idx);\n      e->k = VRELOCABLE;\n      break;\n    }\n    case VVARARG:\n    case VCALL: {\n      luaK_setoneret(fs, e);\n      break;\n    }\n    default: break;  /* there is one value available (somewhere) */\n  }\n}\n\n\nstatic int code_label (FuncState *fs, int A, int b, int jump) {\n  luaK_getlabel(fs);  /* those instructions may be jump targets */\n  return luaK_codeABC(fs, OP_LOADBOOL, A, b, jump);\n}\n\n\nstatic void discharge2reg (FuncState *fs, expdesc *e, int reg) {\n  luaK_dischargevars(fs, e);\n  switch (e->k) {\n    case VNIL: {\n      luaK_nil(fs, reg, 1);\n      break;\n    }\n    case VFALSE: case VTRUE: {\n      luaK_codeABC(fs, OP_LOADBOOL, reg, e->k == VTRUE, 0);\n      break;\n    }\n    case VK: {\n      luaK_codek(fs, reg, e->u.info);\n      break;\n    }\n    case VKNUM: {\n      luaK_codek(fs, reg, luaK_numberK(fs, e->u.nval));\n      break;\n    }\n    case VRELOCABLE: {\n      Instruction *pc = &getcode(fs, e);\n      SETARG_A(*pc, reg);\n      break;\n    }\n    case VNONRELOC: {\n      if (reg != e->u.info)\n        luaK_codeABC(fs, OP_MOVE, reg, e->u.info, 0);\n      break;\n    }\n    default: {\n      lua_assert(e->k == VVOID || e->k == VJMP);\n      return;  /* nothing to do... */\n    }\n  }\n  e->u.info = reg;\n  e->k = VNONRELOC;\n}\n\n\nstatic void discharge2anyreg (FuncState *fs, expdesc *e) {\n  if (e->k != VNONRELOC) {\n    luaK_reserveregs(fs, 1);\n    discharge2reg(fs, e, fs->freereg-1);\n  }\n}\n\n\nstatic void exp2reg (FuncState *fs, expdesc *e, int reg) {\n  discharge2reg(fs, e, reg);\n  if (e->k == VJMP)\n    luaK_concat(fs, &e->t, e->u.info);  /* put this jump in `t' list */\n  if (hasjumps(e)) {\n    int final;  /* position after whole expression */\n    int p_f = NO_JUMP;  /* position of an eventual LOAD false */\n    int p_t = NO_JUMP;  /* position of an eventual LOAD true */\n    if (need_value(fs, e->t) || need_value(fs, e->f)) {\n      int fj = (e->k == VJMP) ? NO_JUMP : luaK_jump(fs);\n      p_f = code_label(fs, reg, 0, 1);\n      p_t = code_label(fs, reg, 1, 0);\n      luaK_patchtohere(fs, fj);\n    }\n    final = luaK_getlabel(fs);\n    patchlistaux(fs, e->f, final, reg, p_f);\n    patchlistaux(fs, e->t, final, reg, p_t);\n  }\n  e->f = e->t = NO_JUMP;\n  e->u.info = reg;\n  e->k = VNONRELOC;\n}\n\n\nvoid luaK_exp2nextreg (FuncState *fs, expdesc *e) {\n  luaK_dischargevars(fs, e);\n  freeexp(fs, e);\n  luaK_reserveregs(fs, 1);\n  exp2reg(fs, e, fs->freereg - 1);\n}\n\n\nint luaK_exp2anyreg (FuncState *fs, expdesc *e) {\n  luaK_dischargevars(fs, e);\n  if (e->k == VNONRELOC) {\n    if (!hasjumps(e)) return e->u.info;  /* exp is already in a register */\n    if (e->u.info >= fs->nactvar) {  /* reg. is not a local? */\n      exp2reg(fs, e, e->u.info);  /* put value on it */\n      return e->u.info;\n    }\n  }\n  luaK_exp2nextreg(fs, e);  /* default */\n  return e->u.info;\n}\n\n\nvoid luaK_exp2anyregup (FuncState *fs, expdesc *e) {\n  if (e->k != VUPVAL || hasjumps(e))\n    luaK_exp2anyreg(fs, e);\n}\n\n\nvoid luaK_exp2val (FuncState *fs, expdesc *e) {\n  if (hasjumps(e))\n    luaK_exp2anyreg(fs, e);\n  else\n    luaK_dischargevars(fs, e);\n}\n\n\nint luaK_exp2RK (FuncState *fs, expdesc *e) {\n  luaK_exp2val(fs, e);\n  switch (e->k) {\n    case VTRUE:\n    case VFALSE:\n    case VNIL: {\n      if (fs->nk <= MAXINDEXRK) {  /* constant fits in RK operand? */\n        e->u.info = (e->k == VNIL) ? nilK(fs) : boolK(fs, (e->k == VTRUE));\n        e->k = VK;\n        return RKASK(e->u.info);\n      }\n      else break;\n    }\n    case VKNUM: {\n      e->u.info = luaK_numberK(fs, e->u.nval);\n      e->k = VK;\n      /* go through */\n    }\n    case VK: {\n      if (e->u.info <= MAXINDEXRK)  /* constant fits in argC? */\n        return RKASK(e->u.info);\n      else break;\n    }\n    default: break;\n  }\n  /* not a constant in the right range: put it in a register */\n  return luaK_exp2anyreg(fs, e);\n}\n\n\nvoid luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) {\n  switch (var->k) {\n    case VLOCAL: {\n      freeexp(fs, ex);\n      exp2reg(fs, ex, var->u.info);\n      return;\n    }\n    case VUPVAL: {\n      int e = luaK_exp2anyreg(fs, ex);\n      luaK_codeABC(fs, OP_SETUPVAL, e, var->u.info, 0);\n      break;\n    }\n    case VINDEXED: {\n      OpCode op = (var->u.ind.vt == VLOCAL) ? OP_SETTABLE : OP_SETTABUP;\n      int e = luaK_exp2RK(fs, ex);\n      luaK_codeABC(fs, op, var->u.ind.t, var->u.ind.idx, e);\n      break;\n    }\n    default: {\n      lua_assert(0);  /* invalid var kind to store */\n      break;\n    }\n  }\n  freeexp(fs, ex);\n}\n\n\nvoid luaK_self (FuncState *fs, expdesc *e, expdesc *key) {\n  int ereg;\n  luaK_exp2anyreg(fs, e);\n  ereg = e->u.info;  /* register where 'e' was placed */\n  freeexp(fs, e);\n  e->u.info = fs->freereg;  /* base register for op_self */\n  e->k = VNONRELOC;\n  luaK_reserveregs(fs, 2);  /* function and 'self' produced by op_self */\n  luaK_codeABC(fs, OP_SELF, e->u.info, ereg, luaK_exp2RK(fs, key));\n  freeexp(fs, key);\n}\n\n\nstatic void invertjump (FuncState *fs, expdesc *e) {\n  Instruction *pc = getjumpcontrol(fs, e->u.info);\n  lua_assert(testTMode(GET_OPCODE(*pc)) && GET_OPCODE(*pc) != OP_TESTSET &&\n                                           GET_OPCODE(*pc) != OP_TEST);\n  SETARG_A(*pc, !(GETARG_A(*pc)));\n}\n\n\nstatic int jumponcond (FuncState *fs, expdesc *e, int cond) {\n  if (e->k == VRELOCABLE) {\n    Instruction ie = getcode(fs, e);\n    if (GET_OPCODE(ie) == OP_NOT) {\n      fs->pc--;  /* remove previous OP_NOT */\n      return condjump(fs, OP_TEST, GETARG_B(ie), 0, !cond);\n    }\n    /* else go through */\n  }\n  discharge2anyreg(fs, e);\n  freeexp(fs, e);\n  return condjump(fs, OP_TESTSET, NO_REG, e->u.info, cond);\n}\n\n\nvoid luaK_goiftrue (FuncState *fs, expdesc *e) {\n  int pc;  /* pc of last jump */\n  luaK_dischargevars(fs, e);\n  switch (e->k) {\n    case VJMP: {\n      invertjump(fs, e);\n      pc = e->u.info;\n      break;\n    }\n    case VK: case VKNUM: case VTRUE: {\n      pc = NO_JUMP;  /* always true; do nothing */\n      break;\n    }\n    default: {\n      pc = jumponcond(fs, e, 0);\n      break;\n    }\n  }\n  luaK_concat(fs, &e->f, pc);  /* insert last jump in `f' list */\n  luaK_patchtohere(fs, e->t);\n  e->t = NO_JUMP;\n}\n\n\nvoid luaK_goiffalse (FuncState *fs, expdesc *e) {\n  int pc;  /* pc of last jump */\n  luaK_dischargevars(fs, e);\n  switch (e->k) {\n    case VJMP: {\n      pc = e->u.info;\n      break;\n    }\n    case VNIL: case VFALSE: {\n      pc = NO_JUMP;  /* always false; do nothing */\n      break;\n    }\n    default: {\n      pc = jumponcond(fs, e, 1);\n      break;\n    }\n  }\n  luaK_concat(fs, &e->t, pc);  /* insert last jump in `t' list */\n  luaK_patchtohere(fs, e->f);\n  e->f = NO_JUMP;\n}\n\n\nstatic void codenot (FuncState *fs, expdesc *e) {\n  luaK_dischargevars(fs, e);\n  switch (e->k) {\n    case VNIL: case VFALSE: {\n      e->k = VTRUE;\n      break;\n    }\n    case VK: case VKNUM: case VTRUE: {\n      e->k = VFALSE;\n      break;\n    }\n    case VJMP: {\n      invertjump(fs, e);\n      break;\n    }\n    case VRELOCABLE:\n    case VNONRELOC: {\n      discharge2anyreg(fs, e);\n      freeexp(fs, e);\n      e->u.info = luaK_codeABC(fs, OP_NOT, 0, e->u.info, 0);\n      e->k = VRELOCABLE;\n      break;\n    }\n    default: {\n      lua_assert(0);  /* cannot happen */\n      break;\n    }\n  }\n  /* interchange true and false lists */\n  { int temp = e->f; e->f = e->t; e->t = temp; }\n  removevalues(fs, e->f);\n  removevalues(fs, e->t);\n}\n\n\nvoid luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {\n  lua_assert(!hasjumps(t));\n  t->u.ind.t = t->u.info;\n  t->u.ind.idx = luaK_exp2RK(fs, k);\n  t->u.ind.vt = (t->k == VUPVAL) ? VUPVAL\n                                 : check_exp(vkisinreg(t->k), VLOCAL);\n  t->k = VINDEXED;\n}\n\n\nstatic int constfolding (OpCode op, expdesc *e1, expdesc *e2) {\n  lua_Number r;\n  if (!isnumeral(e1) || !isnumeral(e2)) return 0;\n  if ((op == OP_DIV || op == OP_MOD) && e2->u.nval == 0)\n    return 0;  /* do not attempt to divide by 0 */\n  r = luaO_arith(op - OP_ADD + LUA_OPADD, e1->u.nval, e2->u.nval);\n  e1->u.nval = r;\n  return 1;\n}\n\n\nstatic void codearith (FuncState *fs, OpCode op,\n                       expdesc *e1, expdesc *e2, int line) {\n  if (constfolding(op, e1, e2))\n    return;\n  else {\n    int o2 = (op != OP_UNM && op != OP_LEN) ? luaK_exp2RK(fs, e2) : 0;\n    int o1 = luaK_exp2RK(fs, e1);\n    if (o1 > o2) {\n      freeexp(fs, e1);\n      freeexp(fs, e2);\n    }\n    else {\n      freeexp(fs, e2);\n      freeexp(fs, e1);\n    }\n    e1->u.info = luaK_codeABC(fs, op, 0, o1, o2);\n    e1->k = VRELOCABLE;\n    luaK_fixline(fs, line);\n  }\n}\n\n\nstatic void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,\n                                                          expdesc *e2) {\n  int o1 = luaK_exp2RK(fs, e1);\n  int o2 = luaK_exp2RK(fs, e2);\n  freeexp(fs, e2);\n  freeexp(fs, e1);\n  if (cond == 0 && op != OP_EQ) {\n    int temp;  /* exchange args to replace by `<' or `<=' */\n    temp = o1; o1 = o2; o2 = temp;  /* o1 <==> o2 */\n    cond = 1;\n  }\n  e1->u.info = condjump(fs, op, cond, o1, o2);\n  e1->k = VJMP;\n}\n\n\nvoid luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {\n  expdesc e2;\n  e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;\n  switch (op) {\n    case OPR_MINUS: {\n      if (isnumeral(e))  /* minus constant? */\n        e->u.nval = luai_numunm(NULL, e->u.nval);  /* fold it */\n      else {\n        luaK_exp2anyreg(fs, e);\n        codearith(fs, OP_UNM, e, &e2, line);\n      }\n      break;\n    }\n    case OPR_NOT: codenot(fs, e); break;\n    case OPR_LEN: {\n      luaK_exp2anyreg(fs, e);  /* cannot operate on constants */\n      codearith(fs, OP_LEN, e, &e2, line);\n      break;\n    }\n    default: lua_assert(0);\n  }\n}\n\n\nvoid luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {\n  switch (op) {\n    case OPR_AND: {\n      luaK_goiftrue(fs, v);\n      break;\n    }\n    case OPR_OR: {\n      luaK_goiffalse(fs, v);\n      break;\n    }\n    case OPR_CONCAT: {\n      luaK_exp2nextreg(fs, v);  /* operand must be on the `stack' */\n      break;\n    }\n    case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:\n    case OPR_MOD: case OPR_POW: {\n      if (!isnumeral(v)) luaK_exp2RK(fs, v);\n      break;\n    }\n    default: {\n      luaK_exp2RK(fs, v);\n      break;\n    }\n  }\n}\n\n\nvoid luaK_posfix (FuncState *fs, BinOpr op,\n                  expdesc *e1, expdesc *e2, int line) {\n  switch (op) {\n    case OPR_AND: {\n      lua_assert(e1->t == NO_JUMP);  /* list must be closed */\n      luaK_dischargevars(fs, e2);\n      luaK_concat(fs, &e2->f, e1->f);\n      *e1 = *e2;\n      break;\n    }\n    case OPR_OR: {\n      lua_assert(e1->f == NO_JUMP);  /* list must be closed */\n      luaK_dischargevars(fs, e2);\n      luaK_concat(fs, &e2->t, e1->t);\n      *e1 = *e2;\n      break;\n    }\n    case OPR_CONCAT: {\n      luaK_exp2val(fs, e2);\n      if (e2->k == VRELOCABLE && GET_OPCODE(getcode(fs, e2)) == OP_CONCAT) {\n        lua_assert(e1->u.info == GETARG_B(getcode(fs, e2))-1);\n        freeexp(fs, e1);\n        SETARG_B(getcode(fs, e2), e1->u.info);\n        e1->k = VRELOCABLE; e1->u.info = e2->u.info;\n      }\n      else {\n        luaK_exp2nextreg(fs, e2);  /* operand must be on the 'stack' */\n        codearith(fs, OP_CONCAT, e1, e2, line);\n      }\n      break;\n    }\n    case OPR_ADD: case OPR_SUB: case OPR_MUL: case OPR_DIV:\n    case OPR_MOD: case OPR_POW: {\n      codearith(fs, cast(OpCode, op - OPR_ADD + OP_ADD), e1, e2, line);\n      break;\n    }\n    case OPR_EQ: case OPR_LT: case OPR_LE: {\n      codecomp(fs, cast(OpCode, op - OPR_EQ + OP_EQ), 1, e1, e2);\n      break;\n    }\n    case OPR_NE: case OPR_GT: case OPR_GE: {\n      codecomp(fs, cast(OpCode, op - OPR_NE + OP_EQ), 0, e1, e2);\n      break;\n    }\n    default: lua_assert(0);\n  }\n}\n\n\nvoid luaK_fixline (FuncState *fs, int line) {\n  fs->f->lineinfo[fs->pc - 1] = line;\n}\n\n\nvoid luaK_setlist (FuncState *fs, int base, int nelems, int tostore) {\n  int c =  (nelems - 1)/LFIELDS_PER_FLUSH + 1;\n  int b = (tostore == LUA_MULTRET) ? 0 : tostore;\n  lua_assert(tostore != 0);\n  if (c <= MAXARG_C)\n    luaK_codeABC(fs, OP_SETLIST, base, b, c);\n  else if (c <= MAXARG_Ax) {\n    luaK_codeABC(fs, OP_SETLIST, base, b, 0);\n    codeextraarg(fs, c);\n  }\n  else\n    luaX_syntaxerror(fs->ls, \"constructor too long\");\n  fs->freereg = base + 1;  /* free registers with list values */\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lcode.h",
    "content": "/*\n** $Id: lcode.h,v 1.58.1.1 2013/04/12 18:48:47 roberto Exp $\n** Code generator for Lua\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lcode_h\n#define lcode_h\n\n#include \"llex.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lparser.h\"\n\n\n/*\n** Marks the end of a patch list. It is an invalid value both as an absolute\n** address, and as a list link (would link an element to itself).\n*/\n#define NO_JUMP (-1)\n\n\n/*\n** grep \"ORDER OPR\" if you change these enums  (ORDER OP)\n*/\ntypedef enum BinOpr {\n  OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW,\n  OPR_CONCAT,\n  OPR_EQ, OPR_LT, OPR_LE,\n  OPR_NE, OPR_GT, OPR_GE,\n  OPR_AND, OPR_OR,\n  OPR_NOBINOPR\n} BinOpr;\n\n\ntypedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;\n\n\n#define getcode(fs,e)\t((fs)->f->code[(e)->u.info])\n\n#define luaK_codeAsBx(fs,o,A,sBx)\tluaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx)\n\n#define luaK_setmultret(fs,e)\tluaK_setreturns(fs, e, LUA_MULTRET)\n\n#define luaK_jumpto(fs,t)\tluaK_patchlist(fs, luaK_jump(fs), t)\n\nLUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);\nLUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);\nLUAI_FUNC int luaK_codek (FuncState *fs, int reg, int k);\nLUAI_FUNC void luaK_fixline (FuncState *fs, int line);\nLUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);\nLUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);\nLUAI_FUNC void luaK_checkstack (FuncState *fs, int n);\nLUAI_FUNC int luaK_stringK (FuncState *fs, TString *s);\nLUAI_FUNC int luaK_numberK (FuncState *fs, lua_Number r);\nLUAI_FUNC void luaK_dischargevars (FuncState *fs, expdesc *e);\nLUAI_FUNC int luaK_exp2anyreg (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_exp2anyregup (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_exp2nextreg (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_exp2val (FuncState *fs, expdesc *e);\nLUAI_FUNC int luaK_exp2RK (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_self (FuncState *fs, expdesc *e, expdesc *key);\nLUAI_FUNC void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k);\nLUAI_FUNC void luaK_goiftrue (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_goiffalse (FuncState *fs, expdesc *e);\nLUAI_FUNC void luaK_storevar (FuncState *fs, expdesc *var, expdesc *e);\nLUAI_FUNC void luaK_setreturns (FuncState *fs, expdesc *e, int nresults);\nLUAI_FUNC void luaK_setoneret (FuncState *fs, expdesc *e);\nLUAI_FUNC int luaK_jump (FuncState *fs);\nLUAI_FUNC void luaK_ret (FuncState *fs, int first, int nret);\nLUAI_FUNC void luaK_patchlist (FuncState *fs, int list, int target);\nLUAI_FUNC void luaK_patchtohere (FuncState *fs, int list);\nLUAI_FUNC void luaK_patchclose (FuncState *fs, int list, int level);\nLUAI_FUNC void luaK_concat (FuncState *fs, int *l1, int l2);\nLUAI_FUNC int luaK_getlabel (FuncState *fs);\nLUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line);\nLUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v);\nLUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1,\n                            expdesc *v2, int line);\nLUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore);\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lcorolib.c",
    "content": "/*\n** $Id: lcorolib.c,v 1.5.1.1 2013/04/12 18:48:47 roberto Exp $\n** Coroutine Library\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdlib.h>\n\n\n#define lcorolib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\nstatic int auxresume (lua_State *L, lua_State *co, int narg) {\n  int status;\n  if (!lua_checkstack(co, narg)) {\n    lua_pushliteral(L, \"too many arguments to resume\");\n    return -1;  /* error flag */\n  }\n  if (lua_status(co) == LUA_OK && lua_gettop(co) == 0) {\n    lua_pushliteral(L, \"cannot resume dead coroutine\");\n    return -1;  /* error flag */\n  }\n  lua_xmove(L, co, narg);\n  status = lua_resume(co, L, narg);\n  if (status == LUA_OK || status == LUA_YIELD) {\n    int nres = lua_gettop(co);\n    if (!lua_checkstack(L, nres + 1)) {\n      lua_pop(co, nres);  /* remove results anyway */\n      lua_pushliteral(L, \"too many results to resume\");\n      return -1;  /* error flag */\n    }\n    lua_xmove(co, L, nres);  /* move yielded values */\n    return nres;\n  }\n  else {\n    lua_xmove(co, L, 1);  /* move error message */\n    return -1;  /* error flag */\n  }\n}\n\n\nstatic int luaB_coresume (lua_State *L) {\n  lua_State *co = lua_tothread(L, 1);\n  int r;\n  luaL_argcheck(L, co, 1, \"coroutine expected\");\n  r = auxresume(L, co, lua_gettop(L) - 1);\n  if (r < 0) {\n    lua_pushboolean(L, 0);\n    lua_insert(L, -2);\n    return 2;  /* return false + error message */\n  }\n  else {\n    lua_pushboolean(L, 1);\n    lua_insert(L, -(r + 1));\n    return r + 1;  /* return true + `resume' returns */\n  }\n}\n\n\nstatic int luaB_auxwrap (lua_State *L) {\n  lua_State *co = lua_tothread(L, lua_upvalueindex(1));\n  int r = auxresume(L, co, lua_gettop(L));\n  if (r < 0) {\n    if (lua_isstring(L, -1)) {  /* error object is a string? */\n      luaL_where(L, 1);  /* add extra info */\n      lua_insert(L, -2);\n      lua_concat(L, 2);\n    }\n    return lua_error(L);  /* propagate error */\n  }\n  return r;\n}\n\n\nstatic int luaB_cocreate (lua_State *L) {\n  lua_State *NL;\n  luaL_checktype(L, 1, LUA_TFUNCTION);\n  NL = lua_newthread(L);\n  lua_pushvalue(L, 1);  /* move function to top */\n  lua_xmove(L, NL, 1);  /* move function from L to NL */\n  return 1;\n}\n\n\nstatic int luaB_cowrap (lua_State *L) {\n  luaB_cocreate(L);\n  lua_pushcclosure(L, luaB_auxwrap, 1);\n  return 1;\n}\n\n\nstatic int luaB_yield (lua_State *L) {\n  return lua_yield(L, lua_gettop(L));\n}\n\n\nstatic int luaB_costatus (lua_State *L) {\n  lua_State *co = lua_tothread(L, 1);\n  luaL_argcheck(L, co, 1, \"coroutine expected\");\n  if (L == co) lua_pushliteral(L, \"running\");\n  else {\n    switch (lua_status(co)) {\n      case LUA_YIELD:\n        lua_pushliteral(L, \"suspended\");\n        break;\n      case LUA_OK: {\n        lua_Debug ar;\n        if (lua_getstack(co, 0, &ar) > 0)  /* does it have frames? */\n          lua_pushliteral(L, \"normal\");  /* it is running */\n        else if (lua_gettop(co) == 0)\n            lua_pushliteral(L, \"dead\");\n        else\n          lua_pushliteral(L, \"suspended\");  /* initial state */\n        break;\n      }\n      default:  /* some error occurred */\n        lua_pushliteral(L, \"dead\");\n        break;\n    }\n  }\n  return 1;\n}\n\n\nstatic int luaB_corunning (lua_State *L) {\n  int ismain = lua_pushthread(L);\n  lua_pushboolean(L, ismain);\n  return 2;\n}\n\n\nstatic const luaL_Reg co_funcs[] = {\n  {\"create\", luaB_cocreate},\n  {\"resume\", luaB_coresume},\n  {\"running\", luaB_corunning},\n  {\"status\", luaB_costatus},\n  {\"wrap\", luaB_cowrap},\n  {\"yield\", luaB_yield},\n  {NULL, NULL}\n};\n\n\n\nLUAMOD_API int luaopen_coroutine (lua_State *L) {\n  luaL_newlib(L, co_funcs);\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lctype.c",
    "content": "/*\n** $Id: lctype.c,v 1.11.1.1 2013/04/12 18:48:47 roberto Exp $\n** 'ctype' functions for Lua\n** See Copyright Notice in lua.h\n*/\n\n#define lctype_c\n#define LUA_CORE\n\n#include \"lctype.h\"\n\n#if !LUA_USE_CTYPE\t/* { */\n\n#include <limits.h>\n\nLUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {\n  0x00,  /* EOZ */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* 0. */\n  0x00,  0x08,  0x08,  0x08,  0x08,  0x08,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* 1. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x0c,  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,\t/* 2. */\n  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,\n  0x16,  0x16,  0x16,  0x16,  0x16,  0x16,  0x16,  0x16,\t/* 3. */\n  0x16,  0x16,  0x04,  0x04,  0x04,  0x04,  0x04,  0x04,\n  0x04,  0x15,  0x15,  0x15,  0x15,  0x15,  0x15,  0x05,\t/* 4. */\n  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,\n  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,\t/* 5. */\n  0x05,  0x05,  0x05,  0x04,  0x04,  0x04,  0x04,  0x05,\n  0x04,  0x15,  0x15,  0x15,  0x15,  0x15,  0x15,  0x05,\t/* 6. */\n  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,\n  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,  0x05,\t/* 7. */\n  0x05,  0x05,  0x05,  0x04,  0x04,  0x04,  0x04,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* 8. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* 9. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* a. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* b. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* c. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* d. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* e. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\t/* f. */\n  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,\n};\n\n#endif\t\t\t/* } */\n"
  },
  {
    "path": "src/lib/lua52/lctype.h",
    "content": "/*\n** $Id: lctype.h,v 1.12.1.1 2013/04/12 18:48:47 roberto Exp $\n** 'ctype' functions for Lua\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lctype_h\n#define lctype_h\n\n#include \"lua.h\"\n\n\n/*\n** WARNING: the functions defined here do not necessarily correspond\n** to the similar functions in the standard C ctype.h. They are\n** optimized for the specific needs of Lua\n*/\n\n#if !defined(LUA_USE_CTYPE)\n\n#if 'A' == 65 && '0' == 48\n/* ASCII case: can use its own tables; faster and fixed */\n#define LUA_USE_CTYPE\t0\n#else\n/* must use standard C ctype */\n#define LUA_USE_CTYPE\t1\n#endif\n\n#endif\n\n\n#if !LUA_USE_CTYPE\t/* { */\n\n#include <limits.h>\n\n#include \"llimits.h\"\n\n\n#define ALPHABIT\t0\n#define DIGITBIT\t1\n#define PRINTBIT\t2\n#define SPACEBIT\t3\n#define XDIGITBIT\t4\n\n\n#define MASK(B)\t\t(1 << (B))\n\n\n/*\n** add 1 to char to allow index -1 (EOZ)\n*/\n#define testprop(c,p)\t(luai_ctype_[(c)+1] & (p))\n\n/*\n** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_'\n*/\n#define lislalpha(c)\ttestprop(c, MASK(ALPHABIT))\n#define lislalnum(c)\ttestprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))\n#define lisdigit(c)\ttestprop(c, MASK(DIGITBIT))\n#define lisspace(c)\ttestprop(c, MASK(SPACEBIT))\n#define lisprint(c)\ttestprop(c, MASK(PRINTBIT))\n#define lisxdigit(c)\ttestprop(c, MASK(XDIGITBIT))\n\n/*\n** this 'ltolower' only works for alphabetic characters\n*/\n#define ltolower(c)\t((c) | ('A' ^ 'a'))\n\n\n/* two more entries for 0 and -1 (EOZ) */\nLUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2];\n\n\n#else\t\t\t/* }{ */\n\n/*\n** use standard C ctypes\n*/\n\n#include <ctype.h>\n\n\n#define lislalpha(c)\t(isalpha(c) || (c) == '_')\n#define lislalnum(c)\t(isalnum(c) || (c) == '_')\n#define lisdigit(c)\t(isdigit(c))\n#define lisspace(c)\t(isspace(c))\n#define lisprint(c)\t(isprint(c))\n#define lisxdigit(c)\t(isxdigit(c))\n\n#define ltolower(c)\t(tolower(c))\n\n#endif\t\t\t/* } */\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/ldblib.c",
    "content": "/*\n** $Id: ldblib.c,v 1.132.1.2 2015/02/19 17:16:55 roberto Exp $\n** Interface from Lua to its debug API\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define ldblib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n#define HOOKKEY\t\t\"_HKEY\"\n\n\nstatic void checkstack (lua_State *L, lua_State *L1, int n) {\n  if (L != L1 && !lua_checkstack(L1, n))\n    luaL_error(L, \"stack overflow\");\n}\n\n\nstatic int db_getregistry (lua_State *L) {\n  lua_pushvalue(L, LUA_REGISTRYINDEX);\n  return 1;\n}\n\n\nstatic int db_getmetatable (lua_State *L) {\n  luaL_checkany(L, 1);\n  if (!lua_getmetatable(L, 1)) {\n    lua_pushnil(L);  /* no metatable */\n  }\n  return 1;\n}\n\n\nstatic int db_setmetatable (lua_State *L) {\n  int t = lua_type(L, 2);\n  luaL_argcheck(L, t == LUA_TNIL || t == LUA_TTABLE, 2,\n                    \"nil or table expected\");\n  lua_settop(L, 2);\n  lua_setmetatable(L, 1);\n  return 1;  /* return 1st argument */\n}\n\n\nstatic int db_getuservalue (lua_State *L) {\n  if (lua_type(L, 1) != LUA_TUSERDATA)\n    lua_pushnil(L);\n  else\n    lua_getuservalue(L, 1);\n  return 1;\n}\n\n\nstatic int db_setuservalue (lua_State *L) {\n  if (lua_type(L, 1) == LUA_TLIGHTUSERDATA)\n    luaL_argerror(L, 1, \"full userdata expected, got light userdata\");\n  luaL_checktype(L, 1, LUA_TUSERDATA);\n  if (!lua_isnoneornil(L, 2))\n    luaL_checktype(L, 2, LUA_TTABLE);\n  lua_settop(L, 2);\n  lua_setuservalue(L, 1);\n  return 1;\n}\n\n\nstatic void settabss (lua_State *L, const char *i, const char *v) {\n  lua_pushstring(L, v);\n  lua_setfield(L, -2, i);\n}\n\n\nstatic void settabsi (lua_State *L, const char *i, int v) {\n  lua_pushinteger(L, v);\n  lua_setfield(L, -2, i);\n}\n\n\nstatic void settabsb (lua_State *L, const char *i, int v) {\n  lua_pushboolean(L, v);\n  lua_setfield(L, -2, i);\n}\n\n\nstatic lua_State *getthread (lua_State *L, int *arg) {\n  if (lua_isthread(L, 1)) {\n    *arg = 1;\n    return lua_tothread(L, 1);\n  }\n  else {\n    *arg = 0;\n    return L;\n  }\n}\n\n\nstatic void treatstackoption (lua_State *L, lua_State *L1, const char *fname) {\n  if (L == L1) {\n    lua_pushvalue(L, -2);\n    lua_remove(L, -3);\n  }\n  else\n    lua_xmove(L1, L, 1);\n  lua_setfield(L, -2, fname);\n}\n\n\nstatic int db_getinfo (lua_State *L) {\n  lua_Debug ar;\n  int arg;\n  lua_State *L1 = getthread(L, &arg);\n  const char *options = luaL_optstring(L, arg+2, \"flnStu\");\n  checkstack(L, L1, 3);\n  if (lua_isnumber(L, arg+1)) {\n    if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) {\n      lua_pushnil(L);  /* level out of range */\n      return 1;\n    }\n  }\n  else if (lua_isfunction(L, arg+1)) {\n    lua_pushfstring(L, \">%s\", options);\n    options = lua_tostring(L, -1);\n    lua_pushvalue(L, arg+1);\n    lua_xmove(L, L1, 1);\n  }\n  else\n    return luaL_argerror(L, arg+1, \"function or level expected\");\n  if (!lua_getinfo(L1, options, &ar))\n    return luaL_argerror(L, arg+2, \"invalid option\");\n  lua_createtable(L, 0, 2);\n  if (strchr(options, 'S')) {\n    settabss(L, \"source\", ar.source);\n    settabss(L, \"short_src\", ar.short_src);\n    settabsi(L, \"linedefined\", ar.linedefined);\n    settabsi(L, \"lastlinedefined\", ar.lastlinedefined);\n    settabss(L, \"what\", ar.what);\n  }\n  if (strchr(options, 'l'))\n    settabsi(L, \"currentline\", ar.currentline);\n  if (strchr(options, 'u')) {\n    settabsi(L, \"nups\", ar.nups);\n    settabsi(L, \"nparams\", ar.nparams);\n    settabsb(L, \"isvararg\", ar.isvararg);\n  }\n  if (strchr(options, 'n')) {\n    settabss(L, \"name\", ar.name);\n    settabss(L, \"namewhat\", ar.namewhat);\n  }\n  if (strchr(options, 't'))\n    settabsb(L, \"istailcall\", ar.istailcall);\n  if (strchr(options, 'L'))\n    treatstackoption(L, L1, \"activelines\");\n  if (strchr(options, 'f'))\n    treatstackoption(L, L1, \"func\");\n  return 1;  /* return table */\n}\n\n\nstatic int db_getlocal (lua_State *L) {\n  int arg;\n  lua_State *L1 = getthread(L, &arg);\n  lua_Debug ar;\n  const char *name;\n  int nvar = luaL_checkint(L, arg+2);  /* local-variable index */\n  if (lua_isfunction(L, arg + 1)) {  /* function argument? */\n    lua_pushvalue(L, arg + 1);  /* push function */\n    lua_pushstring(L, lua_getlocal(L, NULL, nvar));  /* push local name */\n    return 1;\n  }\n  else {  /* stack-level argument */\n    if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar))  /* out of range? */\n      return luaL_argerror(L, arg+1, \"level out of range\");\n    checkstack(L, L1, 1);\n    name = lua_getlocal(L1, &ar, nvar);\n    if (name) {\n      lua_xmove(L1, L, 1);  /* push local value */\n      lua_pushstring(L, name);  /* push name */\n      lua_pushvalue(L, -2);  /* re-order */\n      return 2;\n    }\n    else {\n      lua_pushnil(L);  /* no name (nor value) */\n      return 1;\n    }\n  }\n}\n\n\nstatic int db_setlocal (lua_State *L) {\n  int arg;\n  lua_State *L1 = getthread(L, &arg);\n  lua_Debug ar;\n  if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar))  /* out of range? */\n    return luaL_argerror(L, arg+1, \"level out of range\");\n  luaL_checkany(L, arg+3);\n  lua_settop(L, arg+3);\n  checkstack(L, L1, 1);\n  lua_xmove(L, L1, 1);\n  lua_pushstring(L, lua_setlocal(L1, &ar, luaL_checkint(L, arg+2)));\n  return 1;\n}\n\n\nstatic int auxupvalue (lua_State *L, int get) {\n  const char *name;\n  int n = luaL_checkint(L, 2);\n  luaL_checktype(L, 1, LUA_TFUNCTION);\n  name = get ? lua_getupvalue(L, 1, n) : lua_setupvalue(L, 1, n);\n  if (name == NULL) return 0;\n  lua_pushstring(L, name);\n  lua_insert(L, -(get+1));\n  return get + 1;\n}\n\n\nstatic int db_getupvalue (lua_State *L) {\n  return auxupvalue(L, 1);\n}\n\n\nstatic int db_setupvalue (lua_State *L) {\n  luaL_checkany(L, 3);\n  return auxupvalue(L, 0);\n}\n\n\nstatic int checkupval (lua_State *L, int argf, int argnup) {\n  lua_Debug ar;\n  int nup = luaL_checkint(L, argnup);\n  luaL_checktype(L, argf, LUA_TFUNCTION);\n  lua_pushvalue(L, argf);\n  lua_getinfo(L, \">u\", &ar);\n  luaL_argcheck(L, 1 <= nup && nup <= ar.nups, argnup, \"invalid upvalue index\");\n  return nup;\n}\n\n\nstatic int db_upvalueid (lua_State *L) {\n  int n = checkupval(L, 1, 2);\n  lua_pushlightuserdata(L, lua_upvalueid(L, 1, n));\n  return 1;\n}\n\n\nstatic int db_upvaluejoin (lua_State *L) {\n  int n1 = checkupval(L, 1, 2);\n  int n2 = checkupval(L, 3, 4);\n  luaL_argcheck(L, !lua_iscfunction(L, 1), 1, \"Lua function expected\");\n  luaL_argcheck(L, !lua_iscfunction(L, 3), 3, \"Lua function expected\");\n  lua_upvaluejoin(L, 1, n1, 3, n2);\n  return 0;\n}\n\n\n#define gethooktable(L)\tluaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)\n\n\nstatic void hookf (lua_State *L, lua_Debug *ar) {\n  static const char *const hooknames[] =\n    {\"call\", \"return\", \"line\", \"count\", \"tail call\"};\n  gethooktable(L);\n  lua_pushthread(L);\n  lua_rawget(L, -2);\n  if (lua_isfunction(L, -1)) {\n    lua_pushstring(L, hooknames[(int)ar->event]);\n    if (ar->currentline >= 0)\n      lua_pushinteger(L, ar->currentline);\n    else lua_pushnil(L);\n    lua_assert(lua_getinfo(L, \"lS\", ar));\n    lua_call(L, 2, 0);\n  }\n}\n\n\nstatic int makemask (const char *smask, int count) {\n  int mask = 0;\n  if (strchr(smask, 'c')) mask |= LUA_MASKCALL;\n  if (strchr(smask, 'r')) mask |= LUA_MASKRET;\n  if (strchr(smask, 'l')) mask |= LUA_MASKLINE;\n  if (count > 0) mask |= LUA_MASKCOUNT;\n  return mask;\n}\n\n\nstatic char *unmakemask (int mask, char *smask) {\n  int i = 0;\n  if (mask & LUA_MASKCALL) smask[i++] = 'c';\n  if (mask & LUA_MASKRET) smask[i++] = 'r';\n  if (mask & LUA_MASKLINE) smask[i++] = 'l';\n  smask[i] = '\\0';\n  return smask;\n}\n\n\nstatic int db_sethook (lua_State *L) {\n  int arg, mask, count;\n  lua_Hook func;\n  lua_State *L1 = getthread(L, &arg);\n  if (lua_isnoneornil(L, arg+1)) {\n    lua_settop(L, arg+1);\n    func = NULL; mask = 0; count = 0;  /* turn off hooks */\n  }\n  else {\n    const char *smask = luaL_checkstring(L, arg+2);\n    luaL_checktype(L, arg+1, LUA_TFUNCTION);\n    count = luaL_optint(L, arg+3, 0);\n    func = hookf; mask = makemask(smask, count);\n  }\n  if (gethooktable(L) == 0) {  /* creating hook table? */\n    lua_pushstring(L, \"k\");\n    lua_setfield(L, -2, \"__mode\");  /** hooktable.__mode = \"k\" */\n    lua_pushvalue(L, -1);\n    lua_setmetatable(L, -2);  /* setmetatable(hooktable) = hooktable */\n  }\n  checkstack(L, L1, 1);\n  lua_pushthread(L1); lua_xmove(L1, L, 1);\n  lua_pushvalue(L, arg+1);\n  lua_rawset(L, -3);  /* set new hook */\n  lua_sethook(L1, func, mask, count);  /* set hooks */\n  return 0;\n}\n\n\nstatic int db_gethook (lua_State *L) {\n  int arg;\n  lua_State *L1 = getthread(L, &arg);\n  char buff[5];\n  int mask = lua_gethookmask(L1);\n  lua_Hook hook = lua_gethook(L1);\n  if (hook != NULL && hook != hookf)  /* external hook? */\n    lua_pushliteral(L, \"external hook\");\n  else {\n    gethooktable(L);\n    checkstack(L, L1, 1);\n    lua_pushthread(L1); lua_xmove(L1, L, 1);\n    lua_rawget(L, -2);   /* get hook */\n    lua_remove(L, -2);  /* remove hook table */\n  }\n  lua_pushstring(L, unmakemask(mask, buff));\n  lua_pushinteger(L, lua_gethookcount(L1));\n  return 3;\n}\n\n\nstatic int db_debug (lua_State *L) {\n  for (;;) {\n    char buffer[250];\n    luai_writestringerror(\"%s\", \"lua_debug> \");\n    if (fgets(buffer, sizeof(buffer), stdin) == 0 ||\n        strcmp(buffer, \"cont\\n\") == 0)\n      return 0;\n    if (luaL_loadbuffer(L, buffer, strlen(buffer), \"=(debug command)\") ||\n        lua_pcall(L, 0, 0, 0))\n      luai_writestringerror(\"%s\\n\", lua_tostring(L, -1));\n    lua_settop(L, 0);  /* remove eventual returns */\n  }\n}\n\n\nstatic int db_traceback (lua_State *L) {\n  int arg;\n  lua_State *L1 = getthread(L, &arg);\n  const char *msg = lua_tostring(L, arg + 1);\n  if (msg == NULL && !lua_isnoneornil(L, arg + 1))  /* non-string 'msg'? */\n    lua_pushvalue(L, arg + 1);  /* return it untouched */\n  else {\n    int level = luaL_optint(L, arg + 2, (L == L1) ? 1 : 0);\n    luaL_traceback(L, L1, msg, level);\n  }\n  return 1;\n}\n\n\nstatic const luaL_Reg dblib[] = {\n  {\"debug\", db_debug},\n  {\"getuservalue\", db_getuservalue},\n  {\"gethook\", db_gethook},\n  {\"getinfo\", db_getinfo},\n  {\"getlocal\", db_getlocal},\n  {\"getregistry\", db_getregistry},\n  {\"getmetatable\", db_getmetatable},\n  {\"getupvalue\", db_getupvalue},\n  {\"upvaluejoin\", db_upvaluejoin},\n  {\"upvalueid\", db_upvalueid},\n  {\"setuservalue\", db_setuservalue},\n  {\"sethook\", db_sethook},\n  {\"setlocal\", db_setlocal},\n  {\"setmetatable\", db_setmetatable},\n  {\"setupvalue\", db_setupvalue},\n  {\"traceback\", db_traceback},\n  {NULL, NULL}\n};\n\n\nLUAMOD_API int luaopen_debug (lua_State *L) {\n  luaL_newlib(L, dblib);\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/ldebug.c",
    "content": "/*\n** $Id: ldebug.c,v 2.90.1.4 2015/02/19 17:05:13 roberto Exp $\n** Debug Interface\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdarg.h>\n#include <stddef.h>\n#include <string.h>\n\n\n#define ldebug_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lapi.h\"\n#include \"lcode.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n#include \"lvm.h\"\n\n\n\n#define noLuaClosure(f)\t\t((f) == NULL || (f)->c.tt == LUA_TCCL)\n\n\nstatic const char *getfuncname (lua_State *L, CallInfo *ci, const char **name);\n\n\nstatic int currentpc (CallInfo *ci) {\n  lua_assert(isLua(ci));\n  return pcRel(ci->u.l.savedpc, ci_func(ci)->p);\n}\n\n\nstatic int currentline (CallInfo *ci) {\n  return getfuncline(ci_func(ci)->p, currentpc(ci));\n}\n\n\nstatic void swapextra (lua_State *L) {\n  if (L->status == LUA_YIELD) {\n    CallInfo *ci = L->ci;  /* get function that yielded */\n    StkId temp = ci->func;  /* exchange its 'func' and 'extra' values */\n    ci->func = restorestack(L, ci->extra);\n    ci->extra = savestack(L, temp);\n  }\n}\n\n\n/*\n** this function can be called asynchronous (e.g. during a signal)\n*/\nLUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {\n  if (func == NULL || mask == 0) {  /* turn off hooks? */\n    mask = 0;\n    func = NULL;\n  }\n  if (isLua(L->ci))\n    L->oldpc = L->ci->u.l.savedpc;\n  L->hook = func;\n  L->basehookcount = count;\n  resethookcount(L);\n  L->hookmask = cast_byte(mask);\n  return 1;\n}\n\n\nLUA_API lua_Hook lua_gethook (lua_State *L) {\n  return L->hook;\n}\n\n\nLUA_API int lua_gethookmask (lua_State *L) {\n  return L->hookmask;\n}\n\n\nLUA_API int lua_gethookcount (lua_State *L) {\n  return L->basehookcount;\n}\n\n\nLUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {\n  int status;\n  CallInfo *ci;\n  if (level < 0) return 0;  /* invalid (negative) level */\n  lua_lock(L);\n  for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)\n    level--;\n  if (level == 0 && ci != &L->base_ci) {  /* level found? */\n    status = 1;\n    ar->i_ci = ci;\n  }\n  else status = 0;  /* no such level */\n  lua_unlock(L);\n  return status;\n}\n\n\nstatic const char *upvalname (Proto *p, int uv) {\n  TString *s = check_exp(uv < p->sizeupvalues, p->upvalues[uv].name);\n  if (s == NULL) return \"?\";\n  else return getstr(s);\n}\n\n\nstatic const char *findvararg (CallInfo *ci, int n, StkId *pos) {\n  int nparams = clLvalue(ci->func)->p->numparams;\n  if (n >= ci->u.l.base - ci->func - nparams)\n    return NULL;  /* no such vararg */\n  else {\n    *pos = ci->func + nparams + n;\n    return \"(*vararg)\";  /* generic name for any vararg */\n  }\n}\n\n\nstatic const char *findlocal (lua_State *L, CallInfo *ci, int n,\n                              StkId *pos) {\n  const char *name = NULL;\n  StkId base;\n  if (isLua(ci)) {\n    if (n < 0)  /* access to vararg values? */\n      return findvararg(ci, -n, pos);\n    else {\n      base = ci->u.l.base;\n      name = luaF_getlocalname(ci_func(ci)->p, n, currentpc(ci));\n    }\n  }\n  else\n    base = ci->func + 1;\n  if (name == NULL) {  /* no 'standard' name? */\n    StkId limit = (ci == L->ci) ? L->top : ci->next->func;\n    if (limit - base >= n && n > 0)  /* is 'n' inside 'ci' stack? */\n      name = \"(*temporary)\";  /* generic name for any valid slot */\n    else\n      return NULL;  /* no name */\n  }\n  *pos = base + (n - 1);\n  return name;\n}\n\n\nLUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n) {\n  const char *name;\n  lua_lock(L);\n  swapextra(L);\n  if (ar == NULL) {  /* information about non-active function? */\n    if (!isLfunction(L->top - 1))  /* not a Lua function? */\n      name = NULL;\n    else  /* consider live variables at function start (parameters) */\n      name = luaF_getlocalname(clLvalue(L->top - 1)->p, n, 0);\n  }\n  else {  /* active function; get information through 'ar' */\n    StkId pos = 0;  /* to avoid warnings */\n    name = findlocal(L, ar->i_ci, n, &pos);\n    if (name) {\n      setobj2s(L, L->top, pos);\n      api_incr_top(L);\n    }\n  }\n  swapextra(L);\n  lua_unlock(L);\n  return name;\n}\n\n\nLUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) {\n  StkId pos = 0;  /* to avoid warnings */\n  const char *name;\n  lua_lock(L);\n  swapextra(L);\n  name = findlocal(L, ar->i_ci, n, &pos);\n  if (name)\n    setobjs2s(L, pos, L->top - 1);\n  L->top--;  /* pop value */\n  swapextra(L);\n  lua_unlock(L);\n  return name;\n}\n\n\nstatic void funcinfo (lua_Debug *ar, Closure *cl) {\n  if (noLuaClosure(cl)) {\n    ar->source = \"=[C]\";\n    ar->linedefined = -1;\n    ar->lastlinedefined = -1;\n    ar->what = \"C\";\n  }\n  else {\n    Proto *p = cl->l.p;\n    ar->source = p->source ? getstr(p->source) : \"=?\";\n    ar->linedefined = p->linedefined;\n    ar->lastlinedefined = p->lastlinedefined;\n    ar->what = (ar->linedefined == 0) ? \"main\" : \"Lua\";\n  }\n  luaO_chunkid(ar->short_src, ar->source, LUA_IDSIZE);\n}\n\n\nstatic void collectvalidlines (lua_State *L, Closure *f) {\n  if (noLuaClosure(f)) {\n    setnilvalue(L->top);\n    api_incr_top(L);\n  }\n  else {\n    int i;\n    TValue v;\n    int *lineinfo = f->l.p->lineinfo;\n    Table *t = luaH_new(L);  /* new table to store active lines */\n    sethvalue(L, L->top, t);  /* push it on stack */\n    api_incr_top(L);\n    setbvalue(&v, 1);  /* boolean 'true' to be the value of all indices */\n    for (i = 0; i < f->l.p->sizelineinfo; i++)  /* for all lines with code */\n      luaH_setint(L, t, lineinfo[i], &v);  /* table[line] = true */\n  }\n}\n\n\nstatic int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,\n                       Closure *f, CallInfo *ci) {\n  int status = 1;\n  for (; *what; what++) {\n    switch (*what) {\n      case 'S': {\n        funcinfo(ar, f);\n        break;\n      }\n      case 'l': {\n        ar->currentline = (ci && isLua(ci)) ? currentline(ci) : -1;\n        break;\n      }\n      case 'u': {\n        ar->nups = (f == NULL) ? 0 : f->c.nupvalues;\n        if (noLuaClosure(f)) {\n          ar->isvararg = 1;\n          ar->nparams = 0;\n        }\n        else {\n          ar->isvararg = f->l.p->is_vararg;\n          ar->nparams = f->l.p->numparams;\n        }\n        break;\n      }\n      case 't': {\n        ar->istailcall = (ci) ? ci->callstatus & CIST_TAIL : 0;\n        break;\n      }\n      case 'n': {\n        /* calling function is a known Lua function? */\n        if (ci && !(ci->callstatus & CIST_TAIL) && isLua(ci->previous))\n          ar->namewhat = getfuncname(L, ci->previous, &ar->name);\n        else\n          ar->namewhat = NULL;\n        if (ar->namewhat == NULL) {\n          ar->namewhat = \"\";  /* not found */\n          ar->name = NULL;\n        }\n        break;\n      }\n      case 'L':\n      case 'f':  /* handled by lua_getinfo */\n        break;\n      default: status = 0;  /* invalid option */\n    }\n  }\n  return status;\n}\n\n\nLUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {\n  int status;\n  Closure *cl;\n  CallInfo *ci;\n  StkId func;\n  lua_lock(L);\n  swapextra(L);\n  if (*what == '>') {\n    ci = NULL;\n    func = L->top - 1;\n    api_check(L, ttisfunction(func), \"function expected\");\n    what++;  /* skip the '>' */\n    L->top--;  /* pop function */\n  }\n  else {\n    ci = ar->i_ci;\n    func = ci->func;\n    lua_assert(ttisfunction(ci->func));\n  }\n  cl = ttisclosure(func) ? clvalue(func) : NULL;\n  status = auxgetinfo(L, what, ar, cl, ci);\n  if (strchr(what, 'f')) {\n    setobjs2s(L, L->top, func);\n    api_incr_top(L);\n  }\n  swapextra(L);\n  if (strchr(what, 'L'))\n    collectvalidlines(L, cl);\n  lua_unlock(L);\n  return status;\n}\n\n\n/*\n** {======================================================\n** Symbolic Execution\n** =======================================================\n*/\n\nstatic const char *getobjname (Proto *p, int lastpc, int reg,\n                               const char **name);\n\n\n/*\n** find a \"name\" for the RK value 'c'\n*/\nstatic void kname (Proto *p, int pc, int c, const char **name) {\n  if (ISK(c)) {  /* is 'c' a constant? */\n    TValue *kvalue = &p->k[INDEXK(c)];\n    if (ttisstring(kvalue)) {  /* literal constant? */\n      *name = svalue(kvalue);  /* it is its own name */\n      return;\n    }\n    /* else no reasonable name found */\n  }\n  else {  /* 'c' is a register */\n    const char *what = getobjname(p, pc, c, name); /* search for 'c' */\n    if (what && *what == 'c') {  /* found a constant name? */\n      return;  /* 'name' already filled */\n    }\n    /* else no reasonable name found */\n  }\n  *name = \"?\";  /* no reasonable name found */\n}\n\n\nstatic int filterpc (int pc, int jmptarget) {\n  if (pc < jmptarget)  /* is code conditional (inside a jump)? */\n    return -1;  /* cannot know who sets that register */\n  else return pc;  /* current position sets that register */\n}\n\n\n/*\n** try to find last instruction before 'lastpc' that modified register 'reg'\n*/\nstatic int findsetreg (Proto *p, int lastpc, int reg) {\n  int pc;\n  int setreg = -1;  /* keep last instruction that changed 'reg' */\n  int jmptarget = 0;  /* any code before this address is conditional */\n  for (pc = 0; pc < lastpc; pc++) {\n    Instruction i = p->code[pc];\n    OpCode op = GET_OPCODE(i);\n    int a = GETARG_A(i);\n    switch (op) {\n      case OP_LOADNIL: {\n        int b = GETARG_B(i);\n        if (a <= reg && reg <= a + b)  /* set registers from 'a' to 'a+b' */\n          setreg = filterpc(pc, jmptarget);\n        break;\n      }\n      case OP_TFORCALL: {\n        if (reg >= a + 2)  /* affect all regs above its base */\n          setreg = filterpc(pc, jmptarget);\n        break;\n      }\n      case OP_CALL:\n      case OP_TAILCALL: {\n        if (reg >= a)  /* affect all registers above base */\n          setreg = filterpc(pc, jmptarget);\n        break;\n      }\n      case OP_JMP: {\n        int b = GETARG_sBx(i);\n        int dest = pc + 1 + b;\n        /* jump is forward and do not skip `lastpc'? */\n        if (pc < dest && dest <= lastpc) {\n          if (dest > jmptarget)\n            jmptarget = dest;  /* update 'jmptarget' */\n        }\n        break;\n      }\n      case OP_TEST: {\n        if (reg == a)  /* jumped code can change 'a' */\n          setreg = filterpc(pc, jmptarget);\n        break;\n      }\n      default:\n        if (testAMode(op) && reg == a)  /* any instruction that set A */\n          setreg = filterpc(pc, jmptarget);\n        break;\n    }\n  }\n  return setreg;\n}\n\n\nstatic const char *getobjname (Proto *p, int lastpc, int reg,\n                               const char **name) {\n  int pc;\n  *name = luaF_getlocalname(p, reg + 1, lastpc);\n  if (*name)  /* is a local? */\n    return \"local\";\n  /* else try symbolic execution */\n  pc = findsetreg(p, lastpc, reg);\n  if (pc != -1) {  /* could find instruction? */\n    Instruction i = p->code[pc];\n    OpCode op = GET_OPCODE(i);\n    switch (op) {\n      case OP_MOVE: {\n        int b = GETARG_B(i);  /* move from 'b' to 'a' */\n        if (b < GETARG_A(i))\n          return getobjname(p, pc, b, name);  /* get name for 'b' */\n        break;\n      }\n      case OP_GETTABUP:\n      case OP_GETTABLE: {\n        int k = GETARG_C(i);  /* key index */\n        int t = GETARG_B(i);  /* table index */\n        const char *vn = (op == OP_GETTABLE)  /* name of indexed variable */\n                         ? luaF_getlocalname(p, t + 1, pc)\n                         : upvalname(p, t);\n        kname(p, pc, k, name);\n        return (vn && strcmp(vn, LUA_ENV) == 0) ? \"global\" : \"field\";\n      }\n      case OP_GETUPVAL: {\n        *name = upvalname(p, GETARG_B(i));\n        return \"upvalue\";\n      }\n      case OP_LOADK:\n      case OP_LOADKX: {\n        int b = (op == OP_LOADK) ? GETARG_Bx(i)\n                                 : GETARG_Ax(p->code[pc + 1]);\n        if (ttisstring(&p->k[b])) {\n          *name = svalue(&p->k[b]);\n          return \"constant\";\n        }\n        break;\n      }\n      case OP_SELF: {\n        int k = GETARG_C(i);  /* key index */\n        kname(p, pc, k, name);\n        return \"method\";\n      }\n      default: break;  /* go through to return NULL */\n    }\n  }\n  return NULL;  /* could not find reasonable name */\n}\n\n\nstatic const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {\n  TMS tm;\n  Proto *p = ci_func(ci)->p;  /* calling function */\n  int pc = currentpc(ci);  /* calling instruction index */\n  Instruction i = p->code[pc];  /* calling instruction */\n  switch (GET_OPCODE(i)) {\n    case OP_CALL:\n    case OP_TAILCALL:  /* get function name */\n      return getobjname(p, pc, GETARG_A(i), name);\n    case OP_TFORCALL: {  /* for iterator */\n      *name = \"for iterator\";\n       return \"for iterator\";\n    }\n    /* all other instructions can call only through metamethods */\n    case OP_SELF:\n    case OP_GETTABUP:\n    case OP_GETTABLE: tm = TM_INDEX; break;\n    case OP_SETTABUP:\n    case OP_SETTABLE: tm = TM_NEWINDEX; break;\n    case OP_EQ: tm = TM_EQ; break;\n    case OP_ADD: tm = TM_ADD; break;\n    case OP_SUB: tm = TM_SUB; break;\n    case OP_MUL: tm = TM_MUL; break;\n    case OP_DIV: tm = TM_DIV; break;\n    case OP_MOD: tm = TM_MOD; break;\n    case OP_POW: tm = TM_POW; break;\n    case OP_UNM: tm = TM_UNM; break;\n    case OP_LEN: tm = TM_LEN; break;\n    case OP_LT: tm = TM_LT; break;\n    case OP_LE: tm = TM_LE; break;\n    case OP_CONCAT: tm = TM_CONCAT; break;\n    default:\n      return NULL;  /* else no useful name can be found */\n  }\n  *name = getstr(G(L)->tmname[tm]);\n  return \"metamethod\";\n}\n\n/* }====================================================== */\n\n\n\n/*\n** only ANSI way to check whether a pointer points to an array\n** (used only for error messages, so efficiency is not a big concern)\n*/\nstatic int isinstack (CallInfo *ci, const TValue *o) {\n  StkId p;\n  for (p = ci->u.l.base; p < ci->top; p++)\n    if (o == p) return 1;\n  return 0;\n}\n\n\nstatic const char *getupvalname (CallInfo *ci, const TValue *o,\n                                 const char **name) {\n  LClosure *c = ci_func(ci);\n  int i;\n  for (i = 0; i < c->nupvalues; i++) {\n    if (c->upvals[i]->v == o) {\n      *name = upvalname(c->p, i);\n      return \"upvalue\";\n    }\n  }\n  return NULL;\n}\n\n\nl_noret luaG_typeerror (lua_State *L, const TValue *o, const char *op) {\n  CallInfo *ci = L->ci;\n  const char *name = NULL;\n  const char *t = objtypename(o);\n  const char *kind = NULL;\n  if (isLua(ci)) {\n    kind = getupvalname(ci, o, &name);  /* check whether 'o' is an upvalue */\n    if (!kind && isinstack(ci, o))  /* no? try a register */\n      kind = getobjname(ci_func(ci)->p, currentpc(ci),\n                        cast_int(o - ci->u.l.base), &name);\n  }\n  if (kind)\n    luaG_runerror(L, \"attempt to %s %s \" LUA_QS \" (a %s value)\",\n                op, kind, name, t);\n  else\n    luaG_runerror(L, \"attempt to %s a %s value\", op, t);\n}\n\n\nl_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) {\n  if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;\n  lua_assert(!ttisstring(p1) && !ttisnumber(p1));\n  luaG_typeerror(L, p1, \"concatenate\");\n}\n\n\nl_noret luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) {\n  TValue temp;\n  if (luaV_tonumber(p1, &temp) == NULL)\n    p2 = p1;  /* first operand is wrong */\n  luaG_typeerror(L, p2, \"perform arithmetic on\");\n}\n\n\nl_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) {\n  const char *t1 = objtypename(p1);\n  const char *t2 = objtypename(p2);\n  if (t1 == t2)\n    luaG_runerror(L, \"attempt to compare two %s values\", t1);\n  else\n    luaG_runerror(L, \"attempt to compare %s with %s\", t1, t2);\n}\n\n\nstatic void addinfo (lua_State *L, const char *msg) {\n  CallInfo *ci = L->ci;\n  if (isLua(ci)) {  /* is Lua code? */\n    char buff[LUA_IDSIZE];  /* add file:line information */\n    int line = currentline(ci);\n    TString *src = ci_func(ci)->p->source;\n    if (src)\n      luaO_chunkid(buff, getstr(src), LUA_IDSIZE);\n    else {  /* no source available; use \"?\" instead */\n      buff[0] = '?'; buff[1] = '\\0';\n    }\n    luaO_pushfstring(L, \"%s:%d: %s\", buff, line, msg);\n  }\n}\n\n\nl_noret luaG_errormsg (lua_State *L) {\n  if (L->errfunc != 0) {  /* is there an error handling function? */\n    StkId errfunc = restorestack(L, L->errfunc);\n    if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR);\n    setobjs2s(L, L->top, L->top - 1);  /* move argument */\n    setobjs2s(L, L->top - 1, errfunc);  /* push function */\n    L->top++;\n    luaD_call(L, L->top - 2, 1, 0);  /* call it */\n  }\n  luaD_throw(L, LUA_ERRRUN);\n}\n\n\nl_noret luaG_runerror (lua_State *L, const char *fmt, ...) {\n  va_list argp;\n  va_start(argp, fmt);\n  addinfo(L, luaO_pushvfstring(L, fmt, argp));\n  va_end(argp);\n  luaG_errormsg(L);\n}\n\n"
  },
  {
    "path": "src/lib/lua52/ldebug.h",
    "content": "/*\n** $Id: ldebug.h,v 2.7.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions from Debug Interface module\n** See Copyright Notice in lua.h\n*/\n\n#ifndef ldebug_h\n#define ldebug_h\n\n\n#include \"lstate.h\"\n\n\n#define pcRel(pc, p)\t(cast(int, (pc) - (p)->code) - 1)\n\n#define getfuncline(f,pc)\t(((f)->lineinfo) ? (f)->lineinfo[pc] : 0)\n\n#define resethookcount(L)\t(L->hookcount = L->basehookcount)\n\n/* Active Lua function (given call info) */\n#define ci_func(ci)\t\t(clLvalue((ci)->func))\n\n\nLUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,\n                                                const char *opname);\nLUAI_FUNC l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2);\nLUAI_FUNC l_noret luaG_aritherror (lua_State *L, const TValue *p1,\n                                                 const TValue *p2);\nLUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,\n                                                 const TValue *p2);\nLUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);\nLUAI_FUNC l_noret luaG_errormsg (lua_State *L);\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/ldo.c",
    "content": "/*\n** $Id: ldo.c,v 2.108.1.3 2013/11/08 18:22:50 roberto Exp $\n** Stack and Call structure of Lua\n** See Copyright Notice in lua.h\n*/\n\n\n#include <setjmp.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define ldo_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lapi.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lparser.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n#include \"lundump.h\"\n#include \"lvm.h\"\n#include \"lzio.h\"\n\n\n\n\n/*\n** {======================================================\n** Error-recovery functions\n** =======================================================\n*/\n\n/*\n** LUAI_THROW/LUAI_TRY define how Lua does exception handling. By\n** default, Lua handles errors with exceptions when compiling as\n** C++ code, with _longjmp/_setjmp when asked to use them, and with\n** longjmp/setjmp otherwise.\n*/\n#if !defined(LUAI_THROW)\n\n#if defined(__cplusplus) && !defined(LUA_USE_LONGJMP)\n/* C++ exceptions */\n#define LUAI_THROW(L,c)\t\tthrow(c)\n#define LUAI_TRY(L,c,a) \\\n\ttry { a } catch(...) { if ((c)->status == 0) (c)->status = -1; }\n#define luai_jmpbuf\t\tint  /* dummy variable */\n\n#elif defined(LUA_USE_ULONGJMP)\n/* in Unix, try _longjmp/_setjmp (more efficient) */\n#define LUAI_THROW(L,c)\t\t_longjmp((c)->b, 1)\n#define LUAI_TRY(L,c,a)\t\tif (_setjmp((c)->b) == 0) { a }\n#define luai_jmpbuf\t\tjmp_buf\n\n#else\n/* default handling with long jumps */\n#define LUAI_THROW(L,c)\t\tlongjmp((c)->b, 1)\n#define LUAI_TRY(L,c,a)\t\tif (setjmp((c)->b) == 0) { a }\n#define luai_jmpbuf\t\tjmp_buf\n\n#endif\n\n#endif\n\n\n\n/* chain list of long jump buffers */\nstruct lua_longjmp {\n  struct lua_longjmp *previous;\n  luai_jmpbuf b;\n  volatile int status;  /* error code */\n};\n\n\nstatic void seterrorobj (lua_State *L, int errcode, StkId oldtop) {\n  switch (errcode) {\n    case LUA_ERRMEM: {  /* memory error? */\n      setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */\n      break;\n    }\n    case LUA_ERRERR: {\n      setsvalue2s(L, oldtop, luaS_newliteral(L, \"error in error handling\"));\n      break;\n    }\n    default: {\n      setobjs2s(L, oldtop, L->top - 1);  /* error message on current top */\n      break;\n    }\n  }\n  L->top = oldtop + 1;\n}\n\n\nl_noret luaD_throw (lua_State *L, int errcode) {\n  if (L->errorJmp) {  /* thread has an error handler? */\n    L->errorJmp->status = errcode;  /* set status */\n    LUAI_THROW(L, L->errorJmp);  /* jump to it */\n  }\n  else {  /* thread has no error handler */\n    L->status = cast_byte(errcode);  /* mark it as dead */\n    if (G(L)->mainthread->errorJmp) {  /* main thread has a handler? */\n      setobjs2s(L, G(L)->mainthread->top++, L->top - 1);  /* copy error obj. */\n      luaD_throw(G(L)->mainthread, errcode);  /* re-throw in main thread */\n    }\n    else {  /* no handler at all; abort */\n      if (G(L)->panic) {  /* panic function? */\n        lua_unlock(L);\n        G(L)->panic(L);  /* call it (last chance to jump out) */\n      }\n      abort();\n    }\n  }\n}\n\n\nint luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {\n  unsigned short oldnCcalls = L->nCcalls;\n  struct lua_longjmp lj;\n  lj.status = LUA_OK;\n  lj.previous = L->errorJmp;  /* chain new error handler */\n  L->errorJmp = &lj;\n  LUAI_TRY(L, &lj,\n    (*f)(L, ud);\n  );\n  L->errorJmp = lj.previous;  /* restore old error handler */\n  L->nCcalls = oldnCcalls;\n  return lj.status;\n}\n\n/* }====================================================== */\n\n\nstatic void correctstack (lua_State *L, TValue *oldstack) {\n  CallInfo *ci;\n  GCObject *up;\n  L->top = (L->top - oldstack) + L->stack;\n  for (up = L->openupval; up != NULL; up = up->gch.next)\n    gco2uv(up)->v = (gco2uv(up)->v - oldstack) + L->stack;\n  for (ci = L->ci; ci != NULL; ci = ci->previous) {\n    ci->top = (ci->top - oldstack) + L->stack;\n    ci->func = (ci->func - oldstack) + L->stack;\n    if (isLua(ci))\n      ci->u.l.base = (ci->u.l.base - oldstack) + L->stack;\n  }\n}\n\n\n/* some space for error handling */\n#define ERRORSTACKSIZE\t(LUAI_MAXSTACK + 200)\n\n\nvoid luaD_reallocstack (lua_State *L, int newsize) {\n  TValue *oldstack = L->stack;\n  int lim = L->stacksize;\n  lua_assert(newsize <= LUAI_MAXSTACK || newsize == ERRORSTACKSIZE);\n  lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK);\n  luaM_reallocvector(L, L->stack, L->stacksize, newsize, TValue);\n  for (; lim < newsize; lim++)\n    setnilvalue(L->stack + lim); /* erase new segment */\n  L->stacksize = newsize;\n  L->stack_last = L->stack + newsize - EXTRA_STACK;\n  correctstack(L, oldstack);\n}\n\n\nvoid luaD_growstack (lua_State *L, int n) {\n  int size = L->stacksize;\n  if (size > LUAI_MAXSTACK)  /* error after extra size? */\n    luaD_throw(L, LUA_ERRERR);\n  else {\n    int needed = cast_int(L->top - L->stack) + n + EXTRA_STACK;\n    int newsize = 2 * size;\n    if (newsize > LUAI_MAXSTACK) newsize = LUAI_MAXSTACK;\n    if (newsize < needed) newsize = needed;\n    if (newsize > LUAI_MAXSTACK) {  /* stack overflow? */\n      luaD_reallocstack(L, ERRORSTACKSIZE);\n      luaG_runerror(L, \"stack overflow\");\n    }\n    else\n      luaD_reallocstack(L, newsize);\n  }\n}\n\n\nstatic int stackinuse (lua_State *L) {\n  CallInfo *ci;\n  StkId lim = L->top;\n  for (ci = L->ci; ci != NULL; ci = ci->previous) {\n    lua_assert(ci->top <= L->stack_last);\n    if (lim < ci->top) lim = ci->top;\n  }\n  return cast_int(lim - L->stack) + 1;  /* part of stack in use */\n}\n\n\nvoid luaD_shrinkstack (lua_State *L) {\n  int inuse = stackinuse(L);\n  int goodsize = inuse + (inuse / 8) + 2*EXTRA_STACK;\n  if (goodsize > LUAI_MAXSTACK) goodsize = LUAI_MAXSTACK;\n  if (inuse > LUAI_MAXSTACK ||  /* handling stack overflow? */\n      goodsize >= L->stacksize)  /* would grow instead of shrink? */\n    condmovestack(L);  /* don't change stack (change only for debugging) */\n  else\n    luaD_reallocstack(L, goodsize);  /* shrink it */\n}\n\n\nvoid luaD_hook (lua_State *L, int event, int line) {\n  lua_Hook hook = L->hook;\n  if (hook && L->allowhook) {\n    CallInfo *ci = L->ci;\n    ptrdiff_t top = savestack(L, L->top);\n    ptrdiff_t ci_top = savestack(L, ci->top);\n    lua_Debug ar;\n    ar.event = event;\n    ar.currentline = line;\n    ar.i_ci = ci;\n    luaD_checkstack(L, LUA_MINSTACK);  /* ensure minimum stack size */\n    ci->top = L->top + LUA_MINSTACK;\n    lua_assert(ci->top <= L->stack_last);\n    L->allowhook = 0;  /* cannot call hooks inside a hook */\n    ci->callstatus |= CIST_HOOKED;\n    lua_unlock(L);\n    (*hook)(L, &ar);\n    lua_lock(L);\n    lua_assert(!L->allowhook);\n    L->allowhook = 1;\n    ci->top = restorestack(L, ci_top);\n    L->top = restorestack(L, top);\n    ci->callstatus &= ~CIST_HOOKED;\n  }\n}\n\n\nstatic void callhook (lua_State *L, CallInfo *ci) {\n  int hook = LUA_HOOKCALL;\n  ci->u.l.savedpc++;  /* hooks assume 'pc' is already incremented */\n  if (isLua(ci->previous) &&\n      GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) {\n    ci->callstatus |= CIST_TAIL;\n    hook = LUA_HOOKTAILCALL;\n  }\n  luaD_hook(L, hook, -1);\n  ci->u.l.savedpc--;  /* correct 'pc' */\n}\n\n\nstatic StkId adjust_varargs (lua_State *L, Proto *p, int actual) {\n  int i;\n  int nfixargs = p->numparams;\n  StkId base, fixed;\n  lua_assert(actual >= nfixargs);\n  /* move fixed parameters to final position */\n  luaD_checkstack(L, p->maxstacksize);  /* check again for new 'base' */\n  fixed = L->top - actual;  /* first fixed argument */\n  base = L->top;  /* final position of first argument */\n  for (i=0; i<nfixargs; i++) {\n    setobjs2s(L, L->top++, fixed + i);\n    setnilvalue(fixed + i);\n  }\n  return base;\n}\n\n\nstatic StkId tryfuncTM (lua_State *L, StkId func) {\n  const TValue *tm = luaT_gettmbyobj(L, func, TM_CALL);\n  StkId p;\n  ptrdiff_t funcr = savestack(L, func);\n  if (!ttisfunction(tm))\n    luaG_typeerror(L, func, \"call\");\n  /* Open a hole inside the stack at `func' */\n  for (p = L->top; p > func; p--) setobjs2s(L, p, p-1);\n  incr_top(L);\n  func = restorestack(L, funcr);  /* previous call may change stack */\n  setobj2s(L, func, tm);  /* tag method is the new function to be called */\n  return func;\n}\n\n\n\n#define next_ci(L) (L->ci = (L->ci->next ? L->ci->next : luaE_extendCI(L)))\n\n\n/*\n** returns true if function has been executed (C function)\n*/\nint luaD_precall (lua_State *L, StkId func, int nresults) {\n  lua_CFunction f;\n  CallInfo *ci;\n  int n;  /* number of arguments (Lua) or returns (C) */\n  ptrdiff_t funcr = savestack(L, func);\n  switch (ttype(func)) {\n    case LUA_TLCF:  /* light C function */\n      f = fvalue(func);\n      goto Cfunc;\n    case LUA_TCCL: {  /* C closure */\n      f = clCvalue(func)->f;\n     Cfunc:\n      luaD_checkstack(L, LUA_MINSTACK);  /* ensure minimum stack size */\n      ci = next_ci(L);  /* now 'enter' new function */\n      ci->nresults = nresults;\n      ci->func = restorestack(L, funcr);\n      ci->top = L->top + LUA_MINSTACK;\n      lua_assert(ci->top <= L->stack_last);\n      ci->callstatus = 0;\n      luaC_checkGC(L);  /* stack grow uses memory */\n      if (L->hookmask & LUA_MASKCALL)\n        luaD_hook(L, LUA_HOOKCALL, -1);\n      lua_unlock(L);\n      n = (*f)(L);  /* do the actual call */\n      lua_lock(L);\n      api_checknelems(L, n);\n      luaD_poscall(L, L->top - n);\n      return 1;\n    }\n    case LUA_TLCL: {  /* Lua function: prepare its call */\n      StkId base;\n      Proto *p = clLvalue(func)->p;\n      n = cast_int(L->top - func) - 1;  /* number of real arguments */\n      luaD_checkstack(L, p->maxstacksize);\n      for (; n < p->numparams; n++)\n        setnilvalue(L->top++);  /* complete missing arguments */\n      if (!p->is_vararg) {\n        func = restorestack(L, funcr);\n        base = func + 1;\n      }\n      else {\n        base = adjust_varargs(L, p, n);\n        func = restorestack(L, funcr);  /* previous call can change stack */\n      }\n      ci = next_ci(L);  /* now 'enter' new function */\n      ci->nresults = nresults;\n      ci->func = func;\n      ci->u.l.base = base;\n      ci->top = base + p->maxstacksize;\n      lua_assert(ci->top <= L->stack_last);\n      ci->u.l.savedpc = p->code;  /* starting point */\n      ci->callstatus = CIST_LUA;\n      L->top = ci->top;\n      luaC_checkGC(L);  /* stack grow uses memory */\n      if (L->hookmask & LUA_MASKCALL)\n        callhook(L, ci);\n      return 0;\n    }\n    default: {  /* not a function */\n      func = tryfuncTM(L, func);  /* retry with 'function' tag method */\n      return luaD_precall(L, func, nresults);  /* now it must be a function */\n    }\n  }\n}\n\n\nint luaD_poscall (lua_State *L, StkId firstResult) {\n  StkId res;\n  int wanted, i;\n  CallInfo *ci = L->ci;\n  if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) {\n    if (L->hookmask & LUA_MASKRET) {\n      ptrdiff_t fr = savestack(L, firstResult);  /* hook may change stack */\n      luaD_hook(L, LUA_HOOKRET, -1);\n      firstResult = restorestack(L, fr);\n    }\n    L->oldpc = ci->previous->u.l.savedpc;  /* 'oldpc' for caller function */\n  }\n  res = ci->func;  /* res == final position of 1st result */\n  wanted = ci->nresults;\n  L->ci = ci = ci->previous;  /* back to caller */\n  /* move results to correct place */\n  for (i = wanted; i != 0 && firstResult < L->top; i--)\n    setobjs2s(L, res++, firstResult++);\n  while (i-- > 0)\n    setnilvalue(res++);\n  L->top = res;\n  return (wanted - LUA_MULTRET);  /* 0 iff wanted == LUA_MULTRET */\n}\n\n\n/*\n** Call a function (C or Lua). The function to be called is at *func.\n** The arguments are on the stack, right after the function.\n** When returns, all the results are on the stack, starting at the original\n** function position.\n*/\nvoid luaD_call (lua_State *L, StkId func, int nResults, int allowyield) {\n  if (++L->nCcalls >= LUAI_MAXCCALLS) {\n    if (L->nCcalls == LUAI_MAXCCALLS)\n      luaG_runerror(L, \"C stack overflow\");\n    else if (L->nCcalls >= (LUAI_MAXCCALLS + (LUAI_MAXCCALLS>>3)))\n      luaD_throw(L, LUA_ERRERR);  /* error while handing stack error */\n  }\n  if (!allowyield) L->nny++;\n  if (!luaD_precall(L, func, nResults))  /* is a Lua function? */\n    luaV_execute(L);  /* call it */\n  if (!allowyield) L->nny--;\n  L->nCcalls--;\n}\n\n\nstatic void finishCcall (lua_State *L) {\n  CallInfo *ci = L->ci;\n  int n;\n  lua_assert(ci->u.c.k != NULL);  /* must have a continuation */\n  lua_assert(L->nny == 0);\n  if (ci->callstatus & CIST_YPCALL) {  /* was inside a pcall? */\n    ci->callstatus &= ~CIST_YPCALL;  /* finish 'lua_pcall' */\n    L->errfunc = ci->u.c.old_errfunc;\n  }\n  /* finish 'lua_callk'/'lua_pcall' */\n  adjustresults(L, ci->nresults);\n  /* call continuation function */\n  if (!(ci->callstatus & CIST_STAT))  /* no call status? */\n    ci->u.c.status = LUA_YIELD;  /* 'default' status */\n  lua_assert(ci->u.c.status != LUA_OK);\n  ci->callstatus = (ci->callstatus & ~(CIST_YPCALL | CIST_STAT)) | CIST_YIELDED;\n  lua_unlock(L);\n  n = (*ci->u.c.k)(L);\n  lua_lock(L);\n  api_checknelems(L, n);\n  /* finish 'luaD_precall' */\n  luaD_poscall(L, L->top - n);\n}\n\n\nstatic void unroll (lua_State *L, void *ud) {\n  UNUSED(ud);\n  for (;;) {\n    if (L->ci == &L->base_ci)  /* stack is empty? */\n      return;  /* coroutine finished normally */\n    if (!isLua(L->ci))  /* C function? */\n      finishCcall(L);\n    else {  /* Lua function */\n      luaV_finishOp(L);  /* finish interrupted instruction */\n      luaV_execute(L);  /* execute down to higher C 'boundary' */\n    }\n  }\n}\n\n\n/*\n** check whether thread has a suspended protected call\n*/\nstatic CallInfo *findpcall (lua_State *L) {\n  CallInfo *ci;\n  for (ci = L->ci; ci != NULL; ci = ci->previous) {  /* search for a pcall */\n    if (ci->callstatus & CIST_YPCALL)\n      return ci;\n  }\n  return NULL;  /* no pending pcall */\n}\n\n\nstatic int recover (lua_State *L, int status) {\n  StkId oldtop;\n  CallInfo *ci = findpcall(L);\n  if (ci == NULL) return 0;  /* no recovery point */\n  /* \"finish\" luaD_pcall */\n  oldtop = restorestack(L, ci->extra);\n  luaF_close(L, oldtop);\n  seterrorobj(L, status, oldtop);\n  L->ci = ci;\n  L->allowhook = ci->u.c.old_allowhook;\n  L->nny = 0;  /* should be zero to be yieldable */\n  luaD_shrinkstack(L);\n  L->errfunc = ci->u.c.old_errfunc;\n  ci->callstatus |= CIST_STAT;  /* call has error status */\n  ci->u.c.status = status;  /* (here it is) */\n  return 1;  /* continue running the coroutine */\n}\n\n\n/*\n** signal an error in the call to 'resume', not in the execution of the\n** coroutine itself. (Such errors should not be handled by any coroutine\n** error handler and should not kill the coroutine.)\n*/\nstatic l_noret resume_error (lua_State *L, const char *msg, StkId firstArg) {\n  L->top = firstArg;  /* remove args from the stack */\n  setsvalue2s(L, L->top, luaS_new(L, msg));  /* push error message */\n  api_incr_top(L);\n  luaD_throw(L, -1);  /* jump back to 'lua_resume' */\n}\n\n\n/*\n** do the work for 'lua_resume' in protected mode\n*/\nstatic void resume (lua_State *L, void *ud) {\n  int nCcalls = L->nCcalls;\n  StkId firstArg = cast(StkId, ud);\n  CallInfo *ci = L->ci;\n  if (nCcalls >= LUAI_MAXCCALLS)\n    resume_error(L, \"C stack overflow\", firstArg);\n  if (L->status == LUA_OK) {  /* may be starting a coroutine */\n    if (ci != &L->base_ci)  /* not in base level? */\n      resume_error(L, \"cannot resume non-suspended coroutine\", firstArg);\n    /* coroutine is in base level; start running it */\n    if (!luaD_precall(L, firstArg - 1, LUA_MULTRET))  /* Lua function? */\n      luaV_execute(L);  /* call it */\n  }\n  else if (L->status != LUA_YIELD)\n    resume_error(L, \"cannot resume dead coroutine\", firstArg);\n  else {  /* resuming from previous yield */\n    L->status = LUA_OK;\n    ci->func = restorestack(L, ci->extra);\n    if (isLua(ci))  /* yielded inside a hook? */\n      luaV_execute(L);  /* just continue running Lua code */\n    else {  /* 'common' yield */\n      if (ci->u.c.k != NULL) {  /* does it have a continuation? */\n        int n;\n        ci->u.c.status = LUA_YIELD;  /* 'default' status */\n        ci->callstatus |= CIST_YIELDED;\n        lua_unlock(L);\n        n = (*ci->u.c.k)(L);  /* call continuation */\n        lua_lock(L);\n        api_checknelems(L, n);\n        firstArg = L->top - n;  /* yield results come from continuation */\n      }\n      luaD_poscall(L, firstArg);  /* finish 'luaD_precall' */\n    }\n    unroll(L, NULL);\n  }\n  lua_assert(nCcalls == L->nCcalls);\n}\n\n\nLUA_API int lua_resume (lua_State *L, lua_State *from, int nargs) {\n  int status;\n  int oldnny = L->nny;  /* save 'nny' */\n  lua_lock(L);\n  luai_userstateresume(L, nargs);\n  L->nCcalls = (from) ? from->nCcalls + 1 : 1;\n  L->nny = 0;  /* allow yields */\n  api_checknelems(L, (L->status == LUA_OK) ? nargs + 1 : nargs);\n  status = luaD_rawrunprotected(L, resume, L->top - nargs);\n  if (status == -1)  /* error calling 'lua_resume'? */\n    status = LUA_ERRRUN;\n  else {  /* yield or regular error */\n    while (status != LUA_OK && status != LUA_YIELD) {  /* error? */\n      if (recover(L, status))  /* recover point? */\n        status = luaD_rawrunprotected(L, unroll, NULL);  /* run continuation */\n      else {  /* unrecoverable error */\n        L->status = cast_byte(status);  /* mark thread as `dead' */\n        seterrorobj(L, status, L->top);\n        L->ci->top = L->top;\n        break;\n      }\n    }\n    lua_assert(status == L->status);\n  }\n  L->nny = oldnny;  /* restore 'nny' */\n  L->nCcalls--;\n  lua_assert(L->nCcalls == ((from) ? from->nCcalls : 0));\n  lua_unlock(L);\n  return status;\n}\n\n\nLUA_API int lua_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction k) {\n  CallInfo *ci = L->ci;\n  luai_userstateyield(L, nresults);\n  lua_lock(L);\n  api_checknelems(L, nresults);\n  if (L->nny > 0) {\n    if (L != G(L)->mainthread)\n      luaG_runerror(L, \"attempt to yield across a C-call boundary\");\n    else\n      luaG_runerror(L, \"attempt to yield from outside a coroutine\");\n  }\n  L->status = LUA_YIELD;\n  ci->extra = savestack(L, ci->func);  /* save current 'func' */\n  if (isLua(ci)) {  /* inside a hook? */\n    api_check(L, k == NULL, \"hooks cannot continue after yielding\");\n  }\n  else {\n    if ((ci->u.c.k = k) != NULL)  /* is there a continuation? */\n      ci->u.c.ctx = ctx;  /* save context */\n    ci->func = L->top - nresults - 1;  /* protect stack below results */\n    luaD_throw(L, LUA_YIELD);\n  }\n  lua_assert(ci->callstatus & CIST_HOOKED);  /* must be inside a hook */\n  lua_unlock(L);\n  return 0;  /* return to 'luaD_hook' */\n}\n\n\nint luaD_pcall (lua_State *L, Pfunc func, void *u,\n                ptrdiff_t old_top, ptrdiff_t ef) {\n  int status;\n  CallInfo *old_ci = L->ci;\n  lu_byte old_allowhooks = L->allowhook;\n  unsigned short old_nny = L->nny;\n  ptrdiff_t old_errfunc = L->errfunc;\n  L->errfunc = ef;\n  status = luaD_rawrunprotected(L, func, u);\n  if (status != LUA_OK) {  /* an error occurred? */\n    StkId oldtop = restorestack(L, old_top);\n    luaF_close(L, oldtop);  /* close possible pending closures */\n    seterrorobj(L, status, oldtop);\n    L->ci = old_ci;\n    L->allowhook = old_allowhooks;\n    L->nny = old_nny;\n    luaD_shrinkstack(L);\n  }\n  L->errfunc = old_errfunc;\n  return status;\n}\n\n\n\n/*\n** Execute a protected parser.\n*/\nstruct SParser {  /* data to `f_parser' */\n  ZIO *z;\n  Mbuffer buff;  /* dynamic structure used by the scanner */\n  Dyndata dyd;  /* dynamic structures used by the parser */\n  const char *mode;\n  const char *name;\n};\n\n\nstatic void checkmode (lua_State *L, const char *mode, const char *x) {\n  if (mode && strchr(mode, x[0]) == NULL) {\n    luaO_pushfstring(L,\n       \"attempt to load a %s chunk (mode is \" LUA_QS \")\", x, mode);\n    luaD_throw(L, LUA_ERRSYNTAX);\n  }\n}\n\n\nstatic void f_parser (lua_State *L, void *ud) {\n  int i;\n  Closure *cl;\n  struct SParser *p = cast(struct SParser *, ud);\n  int c = zgetc(p->z);  /* read first character */\n  if (c == LUA_SIGNATURE[0]) {\n    checkmode(L, p->mode, \"binary\");\n    cl = luaU_undump(L, p->z, &p->buff, p->name);\n  }\n  else {\n    checkmode(L, p->mode, \"text\");\n    cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);\n  }\n  lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues);\n  for (i = 0; i < cl->l.nupvalues; i++) {  /* initialize upvalues */\n    UpVal *up = luaF_newupval(L);\n    cl->l.upvals[i] = up;\n    luaC_objbarrier(L, cl, up);\n  }\n}\n\n\nint luaD_protectedparser (lua_State *L, ZIO *z, const char *name,\n                                        const char *mode) {\n  struct SParser p;\n  int status;\n  L->nny++;  /* cannot yield during parsing */\n  p.z = z; p.name = name; p.mode = mode;\n  p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;\n  p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;\n  p.dyd.label.arr = NULL; p.dyd.label.size = 0;\n  luaZ_initbuffer(L, &p.buff);\n  status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);\n  luaZ_freebuffer(L, &p.buff);\n  luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);\n  luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);\n  luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);\n  L->nny--;\n  return status;\n}\n\n\n"
  },
  {
    "path": "src/lib/lua52/ldo.h",
    "content": "/*\n** $Id: ldo.h,v 2.20.1.1 2013/04/12 18:48:47 roberto Exp $\n** Stack and Call structure of Lua\n** See Copyright Notice in lua.h\n*/\n\n#ifndef ldo_h\n#define ldo_h\n\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lzio.h\"\n\n\n#define luaD_checkstack(L,n)\tif (L->stack_last - L->top <= (n)) \\\n\t\t\t\t    luaD_growstack(L, n); else condmovestack(L);\n\n\n#define incr_top(L) {L->top++; luaD_checkstack(L,0);}\n\n#define savestack(L,p)\t\t((char *)(p) - (char *)L->stack)\n#define restorestack(L,n)\t((TValue *)((char *)L->stack + (n)))\n\n\n/* type of protected functions, to be ran by `runprotected' */\ntypedef void (*Pfunc) (lua_State *L, void *ud);\n\nLUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,\n                                                  const char *mode);\nLUAI_FUNC void luaD_hook (lua_State *L, int event, int line);\nLUAI_FUNC int luaD_precall (lua_State *L, StkId func, int nresults);\nLUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults,\n                                        int allowyield);\nLUAI_FUNC int luaD_pcall (lua_State *L, Pfunc func, void *u,\n                                        ptrdiff_t oldtop, ptrdiff_t ef);\nLUAI_FUNC int luaD_poscall (lua_State *L, StkId firstResult);\nLUAI_FUNC void luaD_reallocstack (lua_State *L, int newsize);\nLUAI_FUNC void luaD_growstack (lua_State *L, int n);\nLUAI_FUNC void luaD_shrinkstack (lua_State *L);\n\nLUAI_FUNC l_noret luaD_throw (lua_State *L, int errcode);\nLUAI_FUNC int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud);\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/ldump.c",
    "content": "/*\n** $Id: ldump.c,v 2.17.1.1 2013/04/12 18:48:47 roberto Exp $\n** save precompiled Lua chunks\n** See Copyright Notice in lua.h\n*/\n\n#include <stddef.h>\n\n#define ldump_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lundump.h\"\n\ntypedef struct {\n lua_State* L;\n lua_Writer writer;\n void* data;\n int strip;\n int status;\n} DumpState;\n\n#define DumpMem(b,n,size,D)\tDumpBlock(b,(n)*(size),D)\n#define DumpVar(x,D)\t\tDumpMem(&x,1,sizeof(x),D)\n\nstatic void DumpBlock(const void* b, size_t size, DumpState* D)\n{\n if (D->status==0)\n {\n  lua_unlock(D->L);\n  D->status=(*D->writer)(D->L,b,size,D->data);\n  lua_lock(D->L);\n }\n}\n\nstatic void DumpChar(int y, DumpState* D)\n{\n char x=(char)y;\n DumpVar(x,D);\n}\n\nstatic void DumpInt(int x, DumpState* D)\n{\n DumpVar(x,D);\n}\n\nstatic void DumpNumber(lua_Number x, DumpState* D)\n{\n DumpVar(x,D);\n}\n\nstatic void DumpVector(const void* b, int n, size_t size, DumpState* D)\n{\n DumpInt(n,D);\n DumpMem(b,n,size,D);\n}\n\nstatic void DumpString(const TString* s, DumpState* D)\n{\n if (s==NULL)\n {\n  size_t size=0;\n  DumpVar(size,D);\n }\n else\n {\n  size_t size=s->tsv.len+1;\t\t/* include trailing '\\0' */\n  DumpVar(size,D);\n  DumpBlock(getstr(s),size*sizeof(char),D);\n }\n}\n\n#define DumpCode(f,D)\t DumpVector(f->code,f->sizecode,sizeof(Instruction),D)\n\nstatic void DumpFunction(const Proto* f, DumpState* D);\n\nstatic void DumpConstants(const Proto* f, DumpState* D)\n{\n int i,n=f->sizek;\n DumpInt(n,D);\n for (i=0; i<n; i++)\n {\n  const TValue* o=&f->k[i];\n  DumpChar(ttypenv(o),D);\n  switch (ttypenv(o))\n  {\n   case LUA_TNIL:\n\tbreak;\n   case LUA_TBOOLEAN:\n\tDumpChar(bvalue(o),D);\n\tbreak;\n   case LUA_TNUMBER:\n\tDumpNumber(nvalue(o),D);\n\tbreak;\n   case LUA_TSTRING:\n\tDumpString(rawtsvalue(o),D);\n\tbreak;\n    default: lua_assert(0);\n  }\n }\n n=f->sizep;\n DumpInt(n,D);\n for (i=0; i<n; i++) DumpFunction(f->p[i],D);\n}\n\nstatic void DumpUpvalues(const Proto* f, DumpState* D)\n{\n int i,n=f->sizeupvalues;\n DumpInt(n,D);\n for (i=0; i<n; i++)\n {\n  DumpChar(f->upvalues[i].instack,D);\n  DumpChar(f->upvalues[i].idx,D);\n }\n}\n\nstatic void DumpDebug(const Proto* f, DumpState* D)\n{\n int i,n;\n DumpString((D->strip) ? NULL : f->source,D);\n n= (D->strip) ? 0 : f->sizelineinfo;\n DumpVector(f->lineinfo,n,sizeof(int),D);\n n= (D->strip) ? 0 : f->sizelocvars;\n DumpInt(n,D);\n for (i=0; i<n; i++)\n {\n  DumpString(f->locvars[i].varname,D);\n  DumpInt(f->locvars[i].startpc,D);\n  DumpInt(f->locvars[i].endpc,D);\n }\n n= (D->strip) ? 0 : f->sizeupvalues;\n DumpInt(n,D);\n for (i=0; i<n; i++) DumpString(f->upvalues[i].name,D);\n}\n\nstatic void DumpFunction(const Proto* f, DumpState* D)\n{\n DumpInt(f->linedefined,D);\n DumpInt(f->lastlinedefined,D);\n DumpChar(f->numparams,D);\n DumpChar(f->is_vararg,D);\n DumpChar(f->maxstacksize,D);\n DumpCode(f,D);\n DumpConstants(f,D);\n DumpUpvalues(f,D);\n DumpDebug(f,D);\n}\n\nstatic void DumpHeader(DumpState* D)\n{\n lu_byte h[LUAC_HEADERSIZE];\n luaU_header(h);\n DumpBlock(h,LUAC_HEADERSIZE,D);\n}\n\n/*\n** dump Lua function as precompiled chunk\n*/\nint luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip)\n{\n DumpState D;\n D.L=L;\n D.writer=w;\n D.data=data;\n D.strip=strip;\n D.status=0;\n DumpHeader(&D);\n DumpFunction(f,&D);\n return D.status;\n}\n"
  },
  {
    "path": "src/lib/lua52/lfunc.c",
    "content": "/*\n** $Id: lfunc.c,v 2.30.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions to manipulate prototypes and closures\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stddef.h>\n\n#define lfunc_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n\n\n\nClosure *luaF_newCclosure (lua_State *L, int n) {\n  Closure *c = &luaC_newobj(L, LUA_TCCL, sizeCclosure(n), NULL, 0)->cl;\n  c->c.nupvalues = cast_byte(n);\n  return c;\n}\n\n\nClosure *luaF_newLclosure (lua_State *L, int n) {\n  Closure *c = &luaC_newobj(L, LUA_TLCL, sizeLclosure(n), NULL, 0)->cl;\n  c->l.p = NULL;\n  c->l.nupvalues = cast_byte(n);\n  while (n--) c->l.upvals[n] = NULL;\n  return c;\n}\n\n\nUpVal *luaF_newupval (lua_State *L) {\n  UpVal *uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), NULL, 0)->uv;\n  uv->v = &uv->u.value;\n  setnilvalue(uv->v);\n  return uv;\n}\n\n\nUpVal *luaF_findupval (lua_State *L, StkId level) {\n  global_State *g = G(L);\n  GCObject **pp = &L->openupval;\n  UpVal *p;\n  UpVal *uv;\n  while (*pp != NULL && (p = gco2uv(*pp))->v >= level) {\n    GCObject *o = obj2gco(p);\n    lua_assert(p->v != &p->u.value);\n    lua_assert(!isold(o) || isold(obj2gco(L)));\n    if (p->v == level) {  /* found a corresponding upvalue? */\n      if (isdead(g, o))  /* is it dead? */\n        changewhite(o);  /* resurrect it */\n      return p;\n    }\n    pp = &p->next;\n  }\n  /* not found: create a new one */\n  uv = &luaC_newobj(L, LUA_TUPVAL, sizeof(UpVal), pp, 0)->uv;\n  uv->v = level;  /* current value lives in the stack */\n  uv->u.l.prev = &g->uvhead;  /* double link it in `uvhead' list */\n  uv->u.l.next = g->uvhead.u.l.next;\n  uv->u.l.next->u.l.prev = uv;\n  g->uvhead.u.l.next = uv;\n  lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv);\n  return uv;\n}\n\n\nstatic void unlinkupval (UpVal *uv) {\n  lua_assert(uv->u.l.next->u.l.prev == uv && uv->u.l.prev->u.l.next == uv);\n  uv->u.l.next->u.l.prev = uv->u.l.prev;  /* remove from `uvhead' list */\n  uv->u.l.prev->u.l.next = uv->u.l.next;\n}\n\n\nvoid luaF_freeupval (lua_State *L, UpVal *uv) {\n  if (uv->v != &uv->u.value)  /* is it open? */\n    unlinkupval(uv);  /* remove from open list */\n  luaM_free(L, uv);  /* free upvalue */\n}\n\n\nvoid luaF_close (lua_State *L, StkId level) {\n  UpVal *uv;\n  global_State *g = G(L);\n  while (L->openupval != NULL && (uv = gco2uv(L->openupval))->v >= level) {\n    GCObject *o = obj2gco(uv);\n    lua_assert(!isblack(o) && uv->v != &uv->u.value);\n    L->openupval = uv->next;  /* remove from `open' list */\n    if (isdead(g, o))\n      luaF_freeupval(L, uv);  /* free upvalue */\n    else {\n      unlinkupval(uv);  /* remove upvalue from 'uvhead' list */\n      setobj(L, &uv->u.value, uv->v);  /* move value to upvalue slot */\n      uv->v = &uv->u.value;  /* now current value lives here */\n      gch(o)->next = g->allgc;  /* link upvalue into 'allgc' list */\n      g->allgc = o;\n      luaC_checkupvalcolor(g, uv);\n    }\n  }\n}\n\n\nProto *luaF_newproto (lua_State *L) {\n  Proto *f = &luaC_newobj(L, LUA_TPROTO, sizeof(Proto), NULL, 0)->p;\n  f->k = NULL;\n  f->sizek = 0;\n  f->p = NULL;\n  f->sizep = 0;\n  f->code = NULL;\n  f->cache = NULL;\n  f->sizecode = 0;\n  f->lineinfo = NULL;\n  f->sizelineinfo = 0;\n  f->upvalues = NULL;\n  f->sizeupvalues = 0;\n  f->numparams = 0;\n  f->is_vararg = 0;\n  f->maxstacksize = 0;\n  f->locvars = NULL;\n  f->sizelocvars = 0;\n  f->linedefined = 0;\n  f->lastlinedefined = 0;\n  f->source = NULL;\n  return f;\n}\n\n\nvoid luaF_freeproto (lua_State *L, Proto *f) {\n  luaM_freearray(L, f->code, f->sizecode);\n  luaM_freearray(L, f->p, f->sizep);\n  luaM_freearray(L, f->k, f->sizek);\n  luaM_freearray(L, f->lineinfo, f->sizelineinfo);\n  luaM_freearray(L, f->locvars, f->sizelocvars);\n  luaM_freearray(L, f->upvalues, f->sizeupvalues);\n  luaM_free(L, f);\n}\n\n\n/*\n** Look for n-th local variable at line `line' in function `func'.\n** Returns NULL if not found.\n*/\nconst char *luaF_getlocalname (const Proto *f, int local_number, int pc) {\n  int i;\n  for (i = 0; i<f->sizelocvars && f->locvars[i].startpc <= pc; i++) {\n    if (pc < f->locvars[i].endpc) {  /* is variable active? */\n      local_number--;\n      if (local_number == 0)\n        return getstr(f->locvars[i].varname);\n    }\n  }\n  return NULL;  /* not found */\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lfunc.h",
    "content": "/*\n** $Id: lfunc.h,v 2.8.1.1 2013/04/12 18:48:47 roberto Exp $\n** Auxiliary functions to manipulate prototypes and closures\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lfunc_h\n#define lfunc_h\n\n\n#include \"lobject.h\"\n\n\n#define sizeCclosure(n)\t(cast(int, sizeof(CClosure)) + \\\n                         cast(int, sizeof(TValue)*((n)-1)))\n\n#define sizeLclosure(n)\t(cast(int, sizeof(LClosure)) + \\\n                         cast(int, sizeof(TValue *)*((n)-1)))\n\n\nLUAI_FUNC Proto *luaF_newproto (lua_State *L);\nLUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems);\nLUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems);\nLUAI_FUNC UpVal *luaF_newupval (lua_State *L);\nLUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);\nLUAI_FUNC void luaF_close (lua_State *L, StkId level);\nLUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);\nLUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv);\nLUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number,\n                                         int pc);\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lgc.c",
    "content": "/*\n** $Id: lgc.c,v 2.140.1.3 2014/09/01 16:55:08 roberto Exp $\n** Garbage Collector\n** See Copyright Notice in lua.h\n*/\n\n#include <string.h>\n\n#define lgc_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n\n\n\n/*\n** cost of sweeping one element (the size of a small object divided\n** by some adjust for the sweep speed)\n*/\n#define GCSWEEPCOST\t((sizeof(TString) + 4) / 4)\n\n/* maximum number of elements to sweep in each single step */\n#define GCSWEEPMAX\t(cast_int((GCSTEPSIZE / GCSWEEPCOST) / 4))\n\n/* maximum number of finalizers to call in each GC step */\n#define GCFINALIZENUM\t4\n\n\n/*\n** macro to adjust 'stepmul': 'stepmul' is actually used like\n** 'stepmul / STEPMULADJ' (value chosen by tests)\n*/\n#define STEPMULADJ\t\t200\n\n\n/*\n** macro to adjust 'pause': 'pause' is actually used like\n** 'pause / PAUSEADJ' (value chosen by tests)\n*/\n#define PAUSEADJ\t\t100\n\n\n/*\n** 'makewhite' erases all color bits plus the old bit and then\n** sets only the current white bit\n*/\n#define maskcolors\t(~(bit2mask(BLACKBIT, OLDBIT) | WHITEBITS))\n#define makewhite(g,x)\t\\\n (gch(x)->marked = cast_byte((gch(x)->marked & maskcolors) | luaC_white(g)))\n\n#define white2gray(x)\tresetbits(gch(x)->marked, WHITEBITS)\n#define black2gray(x)\tresetbit(gch(x)->marked, BLACKBIT)\n\n\n#define isfinalized(x)\t\ttestbit(gch(x)->marked, FINALIZEDBIT)\n\n#define checkdeadkey(n)\tlua_assert(!ttisdeadkey(gkey(n)) || ttisnil(gval(n)))\n\n\n#define checkconsistency(obj)  \\\n  lua_longassert(!iscollectable(obj) || righttt(obj))\n\n\n#define markvalue(g,o) { checkconsistency(o); \\\n  if (valiswhite(o)) reallymarkobject(g,gcvalue(o)); }\n\n#define markobject(g,t) { if ((t) && iswhite(obj2gco(t))) \\\n\t\treallymarkobject(g, obj2gco(t)); }\n\nstatic void reallymarkobject (global_State *g, GCObject *o);\n\n\n/*\n** {======================================================\n** Generic functions\n** =======================================================\n*/\n\n\n/*\n** one after last element in a hash array\n*/\n#define gnodelast(h)\tgnode(h, cast(size_t, sizenode(h)))\n\n\n/*\n** link table 'h' into list pointed by 'p'\n*/\n#define linktable(h,p)\t((h)->gclist = *(p), *(p) = obj2gco(h))\n\n\n/*\n** if key is not marked, mark its entry as dead (therefore removing it\n** from the table)\n*/\nstatic void removeentry (Node *n) {\n  lua_assert(ttisnil(gval(n)));\n  if (valiswhite(gkey(n)))\n    setdeadvalue(gkey(n));  /* unused and unmarked key; remove it */\n}\n\n\n/*\n** tells whether a key or value can be cleared from a weak\n** table. Non-collectable objects are never removed from weak\n** tables. Strings behave as `values', so are never removed too. for\n** other objects: if really collected, cannot keep them; for objects\n** being finalized, keep them in keys, but not in values\n*/\nstatic int iscleared (global_State *g, const TValue *o) {\n  if (!iscollectable(o)) return 0;\n  else if (ttisstring(o)) {\n    markobject(g, rawtsvalue(o));  /* strings are `values', so are never weak */\n    return 0;\n  }\n  else return iswhite(gcvalue(o));\n}\n\n\n/*\n** barrier that moves collector forward, that is, mark the white object\n** being pointed by a black object.\n*/\nvoid luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v) {\n  global_State *g = G(L);\n  lua_assert(isblack(o) && iswhite(v) && !isdead(g, v) && !isdead(g, o));\n  lua_assert(g->gcstate != GCSpause);\n  lua_assert(gch(o)->tt != LUA_TTABLE);\n  if (keepinvariantout(g))  /* must keep invariant? */\n    reallymarkobject(g, v);  /* restore invariant */\n  else {  /* sweep phase */\n    lua_assert(issweepphase(g));\n    makewhite(g, o);  /* mark main obj. as white to avoid other barriers */\n  }\n}\n\n\n/*\n** barrier that moves collector backward, that is, mark the black object\n** pointing to a white object as gray again. (Current implementation\n** only works for tables; access to 'gclist' is not uniform across\n** different types.)\n*/\nvoid luaC_barrierback_ (lua_State *L, GCObject *o) {\n  global_State *g = G(L);\n  lua_assert(isblack(o) && !isdead(g, o) && gch(o)->tt == LUA_TTABLE);\n  black2gray(o);  /* make object gray (again) */\n  gco2t(o)->gclist = g->grayagain;\n  g->grayagain = o;\n}\n\n\n/*\n** barrier for prototypes. When creating first closure (cache is\n** NULL), use a forward barrier; this may be the only closure of the\n** prototype (if it is a \"regular\" function, with a single instance)\n** and the prototype may be big, so it is better to avoid traversing\n** it again. Otherwise, use a backward barrier, to avoid marking all\n** possible instances.\n*/\nLUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c) {\n  global_State *g = G(L);\n  lua_assert(isblack(obj2gco(p)));\n  if (p->cache == NULL) {  /* first time? */\n    luaC_objbarrier(L, p, c);\n  }\n  else {  /* use a backward barrier */\n    black2gray(obj2gco(p));  /* make prototype gray (again) */\n    p->gclist = g->grayagain;\n    g->grayagain = obj2gco(p);\n  }\n}\n\n\n/*\n** check color (and invariants) for an upvalue that was closed,\n** i.e., moved into the 'allgc' list\n*/\nvoid luaC_checkupvalcolor (global_State *g, UpVal *uv) {\n  GCObject *o = obj2gco(uv);\n  lua_assert(!isblack(o));  /* open upvalues are never black */\n  if (isgray(o)) {\n    if (keepinvariant(g)) {\n      resetoldbit(o);  /* see MOVE OLD rule */\n      gray2black(o);  /* it is being visited now */\n      markvalue(g, uv->v);\n    }\n    else {\n      lua_assert(issweepphase(g));\n      makewhite(g, o);\n    }\n  }\n}\n\n\n/*\n** create a new collectable object (with given type and size) and link\n** it to '*list'. 'offset' tells how many bytes to allocate before the\n** object itself (used only by states).\n*/\nGCObject *luaC_newobj (lua_State *L, int tt, size_t sz, GCObject **list,\n                       int offset) {\n  global_State *g = G(L);\n  char *raw = cast(char *, luaM_newobject(L, novariant(tt), sz));\n  GCObject *o = obj2gco(raw + offset);\n  if (list == NULL)\n    list = &g->allgc;  /* standard list for collectable objects */\n  gch(o)->marked = luaC_white(g);\n  gch(o)->tt = tt;\n  gch(o)->next = *list;\n  *list = o;\n  return o;\n}\n\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** Mark functions\n** =======================================================\n*/\n\n\n/*\n** mark an object. Userdata, strings, and closed upvalues are visited\n** and turned black here. Other objects are marked gray and added\n** to appropriate list to be visited (and turned black) later. (Open\n** upvalues are already linked in 'headuv' list.)\n*/\nstatic void reallymarkobject (global_State *g, GCObject *o) {\n  lu_mem size;\n  white2gray(o);\n  switch (gch(o)->tt) {\n    case LUA_TSHRSTR:\n    case LUA_TLNGSTR: {\n      size = sizestring(gco2ts(o));\n      break;  /* nothing else to mark; make it black */\n    }\n    case LUA_TUSERDATA: {\n      Table *mt = gco2u(o)->metatable;\n      markobject(g, mt);\n      markobject(g, gco2u(o)->env);\n      size = sizeudata(gco2u(o));\n      break;\n    }\n    case LUA_TUPVAL: {\n      UpVal *uv = gco2uv(o);\n      markvalue(g, uv->v);\n      if (uv->v != &uv->u.value)  /* open? */\n        return;  /* open upvalues remain gray */\n      size = sizeof(UpVal);\n      break;\n    }\n    case LUA_TLCL: {\n      gco2lcl(o)->gclist = g->gray;\n      g->gray = o;\n      return;\n    }\n    case LUA_TCCL: {\n      gco2ccl(o)->gclist = g->gray;\n      g->gray = o;\n      return;\n    }\n    case LUA_TTABLE: {\n      linktable(gco2t(o), &g->gray);\n      return;\n    }\n    case LUA_TTHREAD: {\n      gco2th(o)->gclist = g->gray;\n      g->gray = o;\n      return;\n    }\n    case LUA_TPROTO: {\n      gco2p(o)->gclist = g->gray;\n      g->gray = o;\n      return;\n    }\n    default: lua_assert(0); return;\n  }\n  gray2black(o);\n  g->GCmemtrav += size;\n}\n\n\n/*\n** mark metamethods for basic types\n*/\nstatic void markmt (global_State *g) {\n  int i;\n  for (i=0; i < LUA_NUMTAGS; i++)\n    markobject(g, g->mt[i]);\n}\n\n\n/*\n** mark all objects in list of being-finalized\n*/\nstatic void markbeingfnz (global_State *g) {\n  GCObject *o;\n  for (o = g->tobefnz; o != NULL; o = gch(o)->next) {\n    makewhite(g, o);\n    reallymarkobject(g, o);\n  }\n}\n\n\n/*\n** mark all values stored in marked open upvalues. (See comment in\n** 'lstate.h'.)\n*/\nstatic void remarkupvals (global_State *g) {\n  UpVal *uv;\n  for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) {\n    if (isgray(obj2gco(uv)))\n      markvalue(g, uv->v);\n  }\n}\n\n\n/*\n** mark root set and reset all gray lists, to start a new\n** incremental (or full) collection\n*/\nstatic void restartcollection (global_State *g) {\n  g->gray = g->grayagain = NULL;\n  g->weak = g->allweak = g->ephemeron = NULL;\n  markobject(g, g->mainthread);\n  markvalue(g, &g->l_registry);\n  markmt(g);\n  markbeingfnz(g);  /* mark any finalizing object left from previous cycle */\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Traverse functions\n** =======================================================\n*/\n\nstatic void traverseweakvalue (global_State *g, Table *h) {\n  Node *n, *limit = gnodelast(h);\n  /* if there is array part, assume it may have white values (do not\n     traverse it just to check) */\n  int hasclears = (h->sizearray > 0);\n  for (n = gnode(h, 0); n < limit; n++) {\n    checkdeadkey(n);\n    if (ttisnil(gval(n)))  /* entry is empty? */\n      removeentry(n);  /* remove it */\n    else {\n      lua_assert(!ttisnil(gkey(n)));\n      markvalue(g, gkey(n));  /* mark key */\n      if (!hasclears && iscleared(g, gval(n)))  /* is there a white value? */\n        hasclears = 1;  /* table will have to be cleared */\n    }\n  }\n  if (hasclears)\n    linktable(h, &g->weak);  /* has to be cleared later */\n  else  /* no white values */\n    linktable(h, &g->grayagain);  /* no need to clean */\n}\n\n\nstatic int traverseephemeron (global_State *g, Table *h) {\n  int marked = 0;  /* true if an object is marked in this traversal */\n  int hasclears = 0;  /* true if table has white keys */\n  int prop = 0;  /* true if table has entry \"white-key -> white-value\" */\n  Node *n, *limit = gnodelast(h);\n  int i;\n  /* traverse array part (numeric keys are 'strong') */\n  for (i = 0; i < h->sizearray; i++) {\n    if (valiswhite(&h->array[i])) {\n      marked = 1;\n      reallymarkobject(g, gcvalue(&h->array[i]));\n    }\n  }\n  /* traverse hash part */\n  for (n = gnode(h, 0); n < limit; n++) {\n    checkdeadkey(n);\n    if (ttisnil(gval(n)))  /* entry is empty? */\n      removeentry(n);  /* remove it */\n    else if (iscleared(g, gkey(n))) {  /* key is not marked (yet)? */\n      hasclears = 1;  /* table must be cleared */\n      if (valiswhite(gval(n)))  /* value not marked yet? */\n        prop = 1;  /* must propagate again */\n    }\n    else if (valiswhite(gval(n))) {  /* value not marked yet? */\n      marked = 1;\n      reallymarkobject(g, gcvalue(gval(n)));  /* mark it now */\n    }\n  }\n  if (g->gcstate != GCSatomic || prop)\n    linktable(h, &g->ephemeron);  /* have to propagate again */\n  else if (hasclears)  /* does table have white keys? */\n    linktable(h, &g->allweak);  /* may have to clean white keys */\n  else  /* no white keys */\n    linktable(h, &g->grayagain);  /* no need to clean */\n  return marked;\n}\n\n\nstatic void traversestrongtable (global_State *g, Table *h) {\n  Node *n, *limit = gnodelast(h);\n  int i;\n  for (i = 0; i < h->sizearray; i++)  /* traverse array part */\n    markvalue(g, &h->array[i]);\n  for (n = gnode(h, 0); n < limit; n++) {  /* traverse hash part */\n    checkdeadkey(n);\n    if (ttisnil(gval(n)))  /* entry is empty? */\n      removeentry(n);  /* remove it */\n    else {\n      lua_assert(!ttisnil(gkey(n)));\n      markvalue(g, gkey(n));  /* mark key */\n      markvalue(g, gval(n));  /* mark value */\n    }\n  }\n}\n\n\nstatic lu_mem traversetable (global_State *g, Table *h) {\n  const char *weakkey, *weakvalue;\n  const TValue *mode = gfasttm(g, h->metatable, TM_MODE);\n  markobject(g, h->metatable);\n  if (mode && ttisstring(mode) &&  /* is there a weak mode? */\n      ((weakkey = strchr(svalue(mode), 'k')),\n       (weakvalue = strchr(svalue(mode), 'v')),\n       (weakkey || weakvalue))) {  /* is really weak? */\n    black2gray(obj2gco(h));  /* keep table gray */\n    if (!weakkey)  /* strong keys? */\n      traverseweakvalue(g, h);\n    else if (!weakvalue)  /* strong values? */\n      traverseephemeron(g, h);\n    else  /* all weak */\n      linktable(h, &g->allweak);  /* nothing to traverse now */\n  }\n  else  /* not weak */\n    traversestrongtable(g, h);\n  return sizeof(Table) + sizeof(TValue) * h->sizearray +\n                         sizeof(Node) * cast(size_t, sizenode(h));\n}\n\n\nstatic int traverseproto (global_State *g, Proto *f) {\n  int i;\n  if (f->cache && iswhite(obj2gco(f->cache)))\n    f->cache = NULL;  /* allow cache to be collected */\n  markobject(g, f->source);\n  for (i = 0; i < f->sizek; i++)  /* mark literals */\n    markvalue(g, &f->k[i]);\n  for (i = 0; i < f->sizeupvalues; i++)  /* mark upvalue names */\n    markobject(g, f->upvalues[i].name);\n  for (i = 0; i < f->sizep; i++)  /* mark nested protos */\n    markobject(g, f->p[i]);\n  for (i = 0; i < f->sizelocvars; i++)  /* mark local-variable names */\n    markobject(g, f->locvars[i].varname);\n  return sizeof(Proto) + sizeof(Instruction) * f->sizecode +\n                         sizeof(Proto *) * f->sizep +\n                         sizeof(TValue) * f->sizek +\n                         sizeof(int) * f->sizelineinfo +\n                         sizeof(LocVar) * f->sizelocvars +\n                         sizeof(Upvaldesc) * f->sizeupvalues;\n}\n\n\nstatic lu_mem traverseCclosure (global_State *g, CClosure *cl) {\n  int i;\n  for (i = 0; i < cl->nupvalues; i++)  /* mark its upvalues */\n    markvalue(g, &cl->upvalue[i]);\n  return sizeCclosure(cl->nupvalues);\n}\n\nstatic lu_mem traverseLclosure (global_State *g, LClosure *cl) {\n  int i;\n  markobject(g, cl->p);  /* mark its prototype */\n  for (i = 0; i < cl->nupvalues; i++)  /* mark its upvalues */\n    markobject(g, cl->upvals[i]);\n  return sizeLclosure(cl->nupvalues);\n}\n\n\nstatic lu_mem traversestack (global_State *g, lua_State *th) {\n  int n = 0;\n  StkId o = th->stack;\n  if (o == NULL)\n    return 1;  /* stack not completely built yet */\n  for (; o < th->top; o++)  /* mark live elements in the stack */\n    markvalue(g, o);\n  if (g->gcstate == GCSatomic) {  /* final traversal? */\n    StkId lim = th->stack + th->stacksize;  /* real end of stack */\n    for (; o < lim; o++)  /* clear not-marked stack slice */\n      setnilvalue(o);\n  }\n  else {  /* count call infos to compute size */\n    CallInfo *ci;\n    for (ci = &th->base_ci; ci != th->ci; ci = ci->next)\n      n++;\n  }\n  return sizeof(lua_State) + sizeof(TValue) * th->stacksize +\n         sizeof(CallInfo) * n;\n}\n\n\n/*\n** traverse one gray object, turning it to black (except for threads,\n** which are always gray).\n*/\nstatic void propagatemark (global_State *g) {\n  lu_mem size;\n  GCObject *o = g->gray;\n  lua_assert(isgray(o));\n  gray2black(o);\n  switch (gch(o)->tt) {\n    case LUA_TTABLE: {\n      Table *h = gco2t(o);\n      g->gray = h->gclist;  /* remove from 'gray' list */\n      size = traversetable(g, h);\n      break;\n    }\n    case LUA_TLCL: {\n      LClosure *cl = gco2lcl(o);\n      g->gray = cl->gclist;  /* remove from 'gray' list */\n      size = traverseLclosure(g, cl);\n      break;\n    }\n    case LUA_TCCL: {\n      CClosure *cl = gco2ccl(o);\n      g->gray = cl->gclist;  /* remove from 'gray' list */\n      size = traverseCclosure(g, cl);\n      break;\n    }\n    case LUA_TTHREAD: {\n      lua_State *th = gco2th(o);\n      g->gray = th->gclist;  /* remove from 'gray' list */\n      th->gclist = g->grayagain;\n      g->grayagain = o;  /* insert into 'grayagain' list */\n      black2gray(o);\n      size = traversestack(g, th);\n      break;\n    }\n    case LUA_TPROTO: {\n      Proto *p = gco2p(o);\n      g->gray = p->gclist;  /* remove from 'gray' list */\n      size = traverseproto(g, p);\n      break;\n    }\n    default: lua_assert(0); return;\n  }\n  g->GCmemtrav += size;\n}\n\n\nstatic void propagateall (global_State *g) {\n  while (g->gray) propagatemark(g);\n}\n\n\nstatic void propagatelist (global_State *g, GCObject *l) {\n  lua_assert(g->gray == NULL);  /* no grays left */\n  g->gray = l;\n  propagateall(g);  /* traverse all elements from 'l' */\n}\n\n/*\n** retraverse all gray lists. Because tables may be reinserted in other\n** lists when traversed, traverse the original lists to avoid traversing\n** twice the same table (which is not wrong, but inefficient)\n*/\nstatic void retraversegrays (global_State *g) {\n  GCObject *weak = g->weak;  /* save original lists */\n  GCObject *grayagain = g->grayagain;\n  GCObject *ephemeron = g->ephemeron;\n  g->weak = g->grayagain = g->ephemeron = NULL;\n  propagateall(g);  /* traverse main gray list */\n  propagatelist(g, grayagain);\n  propagatelist(g, weak);\n  propagatelist(g, ephemeron);\n}\n\n\nstatic void convergeephemerons (global_State *g) {\n  int changed;\n  do {\n    GCObject *w;\n    GCObject *next = g->ephemeron;  /* get ephemeron list */\n    g->ephemeron = NULL;  /* tables will return to this list when traversed */\n    changed = 0;\n    while ((w = next) != NULL) {\n      next = gco2t(w)->gclist;\n      if (traverseephemeron(g, gco2t(w))) {  /* traverse marked some value? */\n        propagateall(g);  /* propagate changes */\n        changed = 1;  /* will have to revisit all ephemeron tables */\n      }\n    }\n  } while (changed);\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Sweep Functions\n** =======================================================\n*/\n\n\n/*\n** clear entries with unmarked keys from all weaktables in list 'l' up\n** to element 'f'\n*/\nstatic void clearkeys (global_State *g, GCObject *l, GCObject *f) {\n  for (; l != f; l = gco2t(l)->gclist) {\n    Table *h = gco2t(l);\n    Node *n, *limit = gnodelast(h);\n    for (n = gnode(h, 0); n < limit; n++) {\n      if (!ttisnil(gval(n)) && (iscleared(g, gkey(n)))) {\n        setnilvalue(gval(n));  /* remove value ... */\n        removeentry(n);  /* and remove entry from table */\n      }\n    }\n  }\n}\n\n\n/*\n** clear entries with unmarked values from all weaktables in list 'l' up\n** to element 'f'\n*/\nstatic void clearvalues (global_State *g, GCObject *l, GCObject *f) {\n  for (; l != f; l = gco2t(l)->gclist) {\n    Table *h = gco2t(l);\n    Node *n, *limit = gnodelast(h);\n    int i;\n    for (i = 0; i < h->sizearray; i++) {\n      TValue *o = &h->array[i];\n      if (iscleared(g, o))  /* value was collected? */\n        setnilvalue(o);  /* remove value */\n    }\n    for (n = gnode(h, 0); n < limit; n++) {\n      if (!ttisnil(gval(n)) && iscleared(g, gval(n))) {\n        setnilvalue(gval(n));  /* remove value ... */\n        removeentry(n);  /* and remove entry from table */\n      }\n    }\n  }\n}\n\n\nstatic void freeobj (lua_State *L, GCObject *o) {\n  switch (gch(o)->tt) {\n    case LUA_TPROTO: luaF_freeproto(L, gco2p(o)); break;\n    case LUA_TLCL: {\n      luaM_freemem(L, o, sizeLclosure(gco2lcl(o)->nupvalues));\n      break;\n    }\n    case LUA_TCCL: {\n      luaM_freemem(L, o, sizeCclosure(gco2ccl(o)->nupvalues));\n      break;\n    }\n    case LUA_TUPVAL: luaF_freeupval(L, gco2uv(o)); break;\n    case LUA_TTABLE: luaH_free(L, gco2t(o)); break;\n    case LUA_TTHREAD: luaE_freethread(L, gco2th(o)); break;\n    case LUA_TUSERDATA: luaM_freemem(L, o, sizeudata(gco2u(o))); break;\n    case LUA_TSHRSTR:\n      G(L)->strt.nuse--;\n      /* go through */\n    case LUA_TLNGSTR: {\n      luaM_freemem(L, o, sizestring(gco2ts(o)));\n      break;\n    }\n    default: lua_assert(0);\n  }\n}\n\n\n#define sweepwholelist(L,p)\tsweeplist(L,p,MAX_LUMEM)\nstatic GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count);\n\n\n/*\n** sweep the (open) upvalues of a thread and resize its stack and\n** list of call-info structures.\n*/\nstatic void sweepthread (lua_State *L, lua_State *L1) {\n  if (L1->stack == NULL) return;  /* stack not completely built yet */\n  sweepwholelist(L, &L1->openupval);  /* sweep open upvalues */\n  luaE_freeCI(L1);  /* free extra CallInfo slots */\n  /* should not change the stack during an emergency gc cycle */\n  if (G(L)->gckind != KGC_EMERGENCY)\n    luaD_shrinkstack(L1);\n}\n\n\n/*\n** sweep at most 'count' elements from a list of GCObjects erasing dead\n** objects, where a dead (not alive) object is one marked with the \"old\"\n** (non current) white and not fixed.\n** In non-generational mode, change all non-dead objects back to white,\n** preparing for next collection cycle.\n** In generational mode, keep black objects black, and also mark them as\n** old; stop when hitting an old object, as all objects after that\n** one will be old too.\n** When object is a thread, sweep its list of open upvalues too.\n*/\nstatic GCObject **sweeplist (lua_State *L, GCObject **p, lu_mem count) {\n  global_State *g = G(L);\n  int ow = otherwhite(g);\n  int toclear, toset;  /* bits to clear and to set in all live objects */\n  int tostop;  /* stop sweep when this is true */\n  if (isgenerational(g)) {  /* generational mode? */\n    toclear = ~0;  /* clear nothing */\n    toset = bitmask(OLDBIT);  /* set the old bit of all surviving objects */\n    tostop = bitmask(OLDBIT);  /* do not sweep old generation */\n  }\n  else {  /* normal mode */\n    toclear = maskcolors;  /* clear all color bits + old bit */\n    toset = luaC_white(g);  /* make object white */\n    tostop = 0;  /* do not stop */\n  }\n  while (*p != NULL && count-- > 0) {\n    GCObject *curr = *p;\n    int marked = gch(curr)->marked;\n    if (isdeadm(ow, marked)) {  /* is 'curr' dead? */\n      *p = gch(curr)->next;  /* remove 'curr' from list */\n      freeobj(L, curr);  /* erase 'curr' */\n    }\n    else {\n      if (testbits(marked, tostop))\n        return NULL;  /* stop sweeping this list */\n      if (gch(curr)->tt == LUA_TTHREAD)\n        sweepthread(L, gco2th(curr));  /* sweep thread's upvalues */\n      /* update marks */\n      gch(curr)->marked = cast_byte((marked & toclear) | toset);\n      p = &gch(curr)->next;  /* go to next element */\n    }\n  }\n  return (*p == NULL) ? NULL : p;\n}\n\n\n/*\n** sweep a list until a live object (or end of list)\n*/\nstatic GCObject **sweeptolive (lua_State *L, GCObject **p, int *n) {\n  GCObject ** old = p;\n  int i = 0;\n  do {\n    i++;\n    p = sweeplist(L, p, 1);\n  } while (p == old);\n  if (n) *n += i;\n  return p;\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** Finalization\n** =======================================================\n*/\n\nstatic void checkSizes (lua_State *L) {\n  global_State *g = G(L);\n  if (g->gckind != KGC_EMERGENCY) {  /* do not change sizes in emergency */\n    int hs = g->strt.size / 2;  /* half the size of the string table */\n    if (g->strt.nuse < cast(lu_int32, hs))  /* using less than that half? */\n      luaS_resize(L, hs);  /* halve its size */\n    luaZ_freebuffer(L, &g->buff);  /* free concatenation buffer */\n  }\n}\n\n\nstatic GCObject *udata2finalize (global_State *g) {\n  GCObject *o = g->tobefnz;  /* get first element */\n  lua_assert(isfinalized(o));\n  g->tobefnz = gch(o)->next;  /* remove it from 'tobefnz' list */\n  gch(o)->next = g->allgc;  /* return it to 'allgc' list */\n  g->allgc = o;\n  resetbit(gch(o)->marked, SEPARATED);  /* mark that it is not in 'tobefnz' */\n  lua_assert(!isold(o));  /* see MOVE OLD rule */\n  if (!keepinvariantout(g))  /* not keeping invariant? */\n    makewhite(g, o);  /* \"sweep\" object */\n  return o;\n}\n\n\nstatic void dothecall (lua_State *L, void *ud) {\n  UNUSED(ud);\n  luaD_call(L, L->top - 2, 0, 0);\n}\n\n\nstatic void GCTM (lua_State *L, int propagateerrors) {\n  global_State *g = G(L);\n  const TValue *tm;\n  TValue v;\n  setgcovalue(L, &v, udata2finalize(g));\n  tm = luaT_gettmbyobj(L, &v, TM_GC);\n  if (tm != NULL && ttisfunction(tm)) {  /* is there a finalizer? */\n    int status;\n    lu_byte oldah = L->allowhook;\n    int running  = g->gcrunning;\n    L->allowhook = 0;  /* stop debug hooks during GC metamethod */\n    g->gcrunning = 0;  /* avoid GC steps */\n    setobj2s(L, L->top, tm);  /* push finalizer... */\n    setobj2s(L, L->top + 1, &v);  /* ... and its argument */\n    L->top += 2;  /* and (next line) call the finalizer */\n    status = luaD_pcall(L, dothecall, NULL, savestack(L, L->top - 2), 0);\n    L->allowhook = oldah;  /* restore hooks */\n    g->gcrunning = running;  /* restore state */\n    if (status != LUA_OK && propagateerrors) {  /* error while running __gc? */\n      if (status == LUA_ERRRUN) {  /* is there an error object? */\n        const char *msg = (ttisstring(L->top - 1))\n                            ? svalue(L->top - 1)\n                            : \"no message\";\n        luaO_pushfstring(L, \"error in __gc metamethod (%s)\", msg);\n        status = LUA_ERRGCMM;  /* error in __gc metamethod */\n      }\n      luaD_throw(L, status);  /* re-throw error */\n    }\n  }\n}\n\n\n/*\n** move all unreachable objects (or 'all' objects) that need\n** finalization from list 'finobj' to list 'tobefnz' (to be finalized)\n*/\nstatic void separatetobefnz (lua_State *L, int all) {\n  global_State *g = G(L);\n  GCObject **p = &g->finobj;\n  GCObject *curr;\n  GCObject **lastnext = &g->tobefnz;\n  /* find last 'next' field in 'tobefnz' list (to add elements in its end) */\n  while (*lastnext != NULL)\n    lastnext = &gch(*lastnext)->next;\n  while ((curr = *p) != NULL) {  /* traverse all finalizable objects */\n    lua_assert(!isfinalized(curr));\n    lua_assert(testbit(gch(curr)->marked, SEPARATED));\n    if (!(iswhite(curr) || all))  /* not being collected? */\n      p = &gch(curr)->next;  /* don't bother with it */\n    else {\n      l_setbit(gch(curr)->marked, FINALIZEDBIT); /* won't be finalized again */\n      *p = gch(curr)->next;  /* remove 'curr' from 'finobj' list */\n      gch(curr)->next = *lastnext;  /* link at the end of 'tobefnz' list */\n      *lastnext = curr;\n      lastnext = &gch(curr)->next;\n    }\n  }\n}\n\n\n/*\n** if object 'o' has a finalizer, remove it from 'allgc' list (must\n** search the list to find it) and link it in 'finobj' list.\n*/\nvoid luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt) {\n  global_State *g = G(L);\n  if (testbit(gch(o)->marked, SEPARATED) || /* obj. is already separated... */\n      isfinalized(o) ||                           /* ... or is finalized... */\n      gfasttm(g, mt, TM_GC) == NULL)                /* or has no finalizer? */\n    return;  /* nothing to be done */\n  else {  /* move 'o' to 'finobj' list */\n    GCObject **p;\n    GCheader *ho = gch(o);\n    if (g->sweepgc == &ho->next) {  /* avoid removing current sweep object */\n      lua_assert(issweepphase(g));\n      g->sweepgc = sweeptolive(L, g->sweepgc, NULL);\n    }\n    /* search for pointer pointing to 'o' */\n    for (p = &g->allgc; *p != o; p = &gch(*p)->next) { /* empty */ }\n    *p = ho->next;  /* remove 'o' from root list */\n    ho->next = g->finobj;  /* link it in list 'finobj' */\n    g->finobj = o;\n    l_setbit(ho->marked, SEPARATED);  /* mark it as such */\n    if (!keepinvariantout(g))  /* not keeping invariant? */\n      makewhite(g, o);  /* \"sweep\" object */\n    else\n      resetoldbit(o);  /* see MOVE OLD rule */\n  }\n}\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** GC control\n** =======================================================\n*/\n\n\n/*\n** set a reasonable \"time\" to wait before starting a new GC cycle;\n** cycle will start when memory use hits threshold\n*/\nstatic void setpause (global_State *g, l_mem estimate) {\n  l_mem debt, threshold;\n  estimate = estimate / PAUSEADJ;  /* adjust 'estimate' */\n  threshold = (g->gcpause < MAX_LMEM / estimate)  /* overflow? */\n            ? estimate * g->gcpause  /* no overflow */\n            : MAX_LMEM;  /* overflow; truncate to maximum */\n  debt = -cast(l_mem, threshold - gettotalbytes(g));\n  luaE_setdebt(g, debt);\n}\n\n\n#define sweepphases  \\\n\t(bitmask(GCSsweepstring) | bitmask(GCSsweepudata) | bitmask(GCSsweep))\n\n\n/*\n** enter first sweep phase (strings) and prepare pointers for other\n** sweep phases.  The calls to 'sweeptolive' make pointers point to an\n** object inside the list (instead of to the header), so that the real\n** sweep do not need to skip objects created between \"now\" and the start\n** of the real sweep.\n** Returns how many objects it swept.\n*/\nstatic int entersweep (lua_State *L) {\n  global_State *g = G(L);\n  int n = 0;\n  g->gcstate = GCSsweepstring;\n  lua_assert(g->sweepgc == NULL && g->sweepfin == NULL);\n  /* prepare to sweep strings, finalizable objects, and regular objects */\n  g->sweepstrgc = 0;\n  g->sweepfin = sweeptolive(L, &g->finobj, &n);\n  g->sweepgc = sweeptolive(L, &g->allgc, &n);\n  return n;\n}\n\n\n/*\n** change GC mode\n*/\nvoid luaC_changemode (lua_State *L, int mode) {\n  global_State *g = G(L);\n  if (mode == g->gckind) return;  /* nothing to change */\n  if (mode == KGC_GEN) {  /* change to generational mode */\n    /* make sure gray lists are consistent */\n    luaC_runtilstate(L, bitmask(GCSpropagate));\n    g->GCestimate = gettotalbytes(g);\n    g->gckind = KGC_GEN;\n  }\n  else {  /* change to incremental mode */\n    /* sweep all objects to turn them back to white\n       (as white has not changed, nothing extra will be collected) */\n    g->gckind = KGC_NORMAL;\n    entersweep(L);\n    luaC_runtilstate(L, ~sweepphases);\n  }\n}\n\n\n/*\n** call all pending finalizers\n*/\nstatic void callallpendingfinalizers (lua_State *L, int propagateerrors) {\n  global_State *g = G(L);\n  while (g->tobefnz) {\n    resetoldbit(g->tobefnz);\n    GCTM(L, propagateerrors);\n  }\n}\n\n\nvoid luaC_freeallobjects (lua_State *L) {\n  global_State *g = G(L);\n  int i;\n  separatetobefnz(L, 1);  /* separate all objects with finalizers */\n  lua_assert(g->finobj == NULL);\n  callallpendingfinalizers(L, 0);\n  g->currentwhite = WHITEBITS; /* this \"white\" makes all objects look dead */\n  g->gckind = KGC_NORMAL;\n  sweepwholelist(L, &g->finobj);  /* finalizers can create objs. in 'finobj' */\n  sweepwholelist(L, &g->allgc);\n  for (i = 0; i < g->strt.size; i++)  /* free all string lists */\n    sweepwholelist(L, &g->strt.hash[i]);\n  lua_assert(g->strt.nuse == 0);\n}\n\n\nstatic l_mem atomic (lua_State *L) {\n  global_State *g = G(L);\n  l_mem work = -cast(l_mem, g->GCmemtrav);  /* start counting work */\n  GCObject *origweak, *origall;\n  lua_assert(!iswhite(obj2gco(g->mainthread)));\n  markobject(g, L);  /* mark running thread */\n  /* registry and global metatables may be changed by API */\n  markvalue(g, &g->l_registry);\n  markmt(g);  /* mark basic metatables */\n  /* remark occasional upvalues of (maybe) dead threads */\n  remarkupvals(g);\n  propagateall(g);  /* propagate changes */\n  work += g->GCmemtrav;  /* stop counting (do not (re)count grays) */\n  /* traverse objects caught by write barrier and by 'remarkupvals' */\n  retraversegrays(g);\n  work -= g->GCmemtrav;  /* restart counting */\n  convergeephemerons(g);\n  /* at this point, all strongly accessible objects are marked. */\n  /* clear values from weak tables, before checking finalizers */\n  clearvalues(g, g->weak, NULL);\n  clearvalues(g, g->allweak, NULL);\n  origweak = g->weak; origall = g->allweak;\n  work += g->GCmemtrav;  /* stop counting (objects being finalized) */\n  separatetobefnz(L, 0);  /* separate objects to be finalized */\n  markbeingfnz(g);  /* mark objects that will be finalized */\n  propagateall(g);  /* remark, to propagate `preserveness' */\n  work -= g->GCmemtrav;  /* restart counting */\n  convergeephemerons(g);\n  /* at this point, all resurrected objects are marked. */\n  /* remove dead objects from weak tables */\n  clearkeys(g, g->ephemeron, NULL);  /* clear keys from all ephemeron tables */\n  clearkeys(g, g->allweak, NULL);  /* clear keys from all allweak tables */\n  /* clear values from resurrected weak tables */\n  clearvalues(g, g->weak, origweak);\n  clearvalues(g, g->allweak, origall);\n  g->currentwhite = cast_byte(otherwhite(g));  /* flip current white */\n  work += g->GCmemtrav;  /* complete counting */\n  return work;  /* estimate of memory marked by 'atomic' */\n}\n\n\nstatic lu_mem singlestep (lua_State *L) {\n  global_State *g = G(L);\n  switch (g->gcstate) {\n    case GCSpause: {\n      /* start to count memory traversed */\n      g->GCmemtrav = g->strt.size * sizeof(GCObject*);\n      lua_assert(!isgenerational(g));\n      restartcollection(g);\n      g->gcstate = GCSpropagate;\n      return g->GCmemtrav;\n    }\n    case GCSpropagate: {\n      if (g->gray) {\n        lu_mem oldtrav = g->GCmemtrav;\n        propagatemark(g);\n        return g->GCmemtrav - oldtrav;  /* memory traversed in this step */\n      }\n      else {  /* no more `gray' objects */\n        lu_mem work;\n        int sw;\n        g->gcstate = GCSatomic;  /* finish mark phase */\n        g->GCestimate = g->GCmemtrav;  /* save what was counted */;\n        work = atomic(L);  /* add what was traversed by 'atomic' */\n        g->GCestimate += work;  /* estimate of total memory traversed */ \n        sw = entersweep(L);\n        return work + sw * GCSWEEPCOST;\n      }\n    }\n    case GCSsweepstring: {\n      int i;\n      for (i = 0; i < GCSWEEPMAX && g->sweepstrgc + i < g->strt.size; i++)\n        sweepwholelist(L, &g->strt.hash[g->sweepstrgc + i]);\n      g->sweepstrgc += i;\n      if (g->sweepstrgc >= g->strt.size)  /* no more strings to sweep? */\n        g->gcstate = GCSsweepudata;\n      return i * GCSWEEPCOST;\n    }\n    case GCSsweepudata: {\n      if (g->sweepfin) {\n        g->sweepfin = sweeplist(L, g->sweepfin, GCSWEEPMAX);\n        return GCSWEEPMAX*GCSWEEPCOST;\n      }\n      else {\n        g->gcstate = GCSsweep;\n        return 0;\n      }\n    }\n    case GCSsweep: {\n      if (g->sweepgc) {\n        g->sweepgc = sweeplist(L, g->sweepgc, GCSWEEPMAX);\n        return GCSWEEPMAX*GCSWEEPCOST;\n      }\n      else {\n        /* sweep main thread */\n        GCObject *mt = obj2gco(g->mainthread);\n        sweeplist(L, &mt, 1);\n        checkSizes(L);\n        g->gcstate = GCSpause;  /* finish collection */\n        return GCSWEEPCOST;\n      }\n    }\n    default: lua_assert(0); return 0;\n  }\n}\n\n\n/*\n** advances the garbage collector until it reaches a state allowed\n** by 'statemask'\n*/\nvoid luaC_runtilstate (lua_State *L, int statesmask) {\n  global_State *g = G(L);\n  while (!testbit(statesmask, g->gcstate))\n    singlestep(L);\n}\n\n\nstatic void generationalcollection (lua_State *L) {\n  global_State *g = G(L);\n  lua_assert(g->gcstate == GCSpropagate);\n  if (g->GCestimate == 0) {  /* signal for another major collection? */\n    luaC_fullgc(L, 0);  /* perform a full regular collection */\n    g->GCestimate = gettotalbytes(g);  /* update control */\n  }\n  else {\n    lu_mem estimate = g->GCestimate;\n    luaC_runtilstate(L, bitmask(GCSpause));  /* run complete (minor) cycle */\n    g->gcstate = GCSpropagate;  /* skip restart */\n    if (gettotalbytes(g) > (estimate / 100) * g->gcmajorinc)\n      g->GCestimate = 0;  /* signal for a major collection */\n    else\n      g->GCestimate = estimate;  /* keep estimate from last major coll. */\n\n  }\n  setpause(g, gettotalbytes(g));\n  lua_assert(g->gcstate == GCSpropagate);\n}\n\n\nstatic void incstep (lua_State *L) {\n  global_State *g = G(L);\n  l_mem debt = g->GCdebt;\n  int stepmul = g->gcstepmul;\n  if (stepmul < 40) stepmul = 40;  /* avoid ridiculous low values (and 0) */\n  /* convert debt from Kb to 'work units' (avoid zero debt and overflows) */\n  debt = (debt / STEPMULADJ) + 1;\n  debt = (debt < MAX_LMEM / stepmul) ? debt * stepmul : MAX_LMEM;\n  do {  /* always perform at least one single step */\n    lu_mem work = singlestep(L);  /* do some work */\n    debt -= work;\n  } while (debt > -GCSTEPSIZE && g->gcstate != GCSpause);\n  if (g->gcstate == GCSpause)\n    setpause(g, g->GCestimate);  /* pause until next cycle */\n  else {\n    debt = (debt / stepmul) * STEPMULADJ;  /* convert 'work units' to Kb */\n    luaE_setdebt(g, debt);\n  }\n}\n\n\n/*\n** performs a basic GC step\n*/\nvoid luaC_forcestep (lua_State *L) {\n  global_State *g = G(L);\n  int i;\n  if (isgenerational(g)) generationalcollection(L);\n  else incstep(L);\n  /* run a few finalizers (or all of them at the end of a collect cycle) */\n  for (i = 0; g->tobefnz && (i < GCFINALIZENUM || g->gcstate == GCSpause); i++)\n    GCTM(L, 1);  /* call one finalizer */\n}\n\n\n/*\n** performs a basic GC step only if collector is running\n*/\nvoid luaC_step (lua_State *L) {\n  global_State *g = G(L);\n  if (g->gcrunning) luaC_forcestep(L);\n  else luaE_setdebt(g, -GCSTEPSIZE);  /* avoid being called too often */\n}\n\n\n\n/*\n** performs a full GC cycle; if \"isemergency\", does not call\n** finalizers (which could change stack positions)\n*/\nvoid luaC_fullgc (lua_State *L, int isemergency) {\n  global_State *g = G(L);\n  int origkind = g->gckind;\n  lua_assert(origkind != KGC_EMERGENCY);\n  if (isemergency)  /* do not run finalizers during emergency GC */\n    g->gckind = KGC_EMERGENCY;\n  else {\n    g->gckind = KGC_NORMAL;\n    callallpendingfinalizers(L, 1);\n  }\n  if (keepinvariant(g)) {  /* may there be some black objects? */\n    /* must sweep all objects to turn them back to white\n       (as white has not changed, nothing will be collected) */\n    entersweep(L);\n  }\n  /* finish any pending sweep phase to start a new cycle */\n  luaC_runtilstate(L, bitmask(GCSpause));\n  luaC_runtilstate(L, ~bitmask(GCSpause));  /* start new collection */\n  luaC_runtilstate(L, bitmask(GCSpause));  /* run entire collection */\n  if (origkind == KGC_GEN) {  /* generational mode? */\n    /* generational mode must be kept in propagate phase */\n    luaC_runtilstate(L, bitmask(GCSpropagate));\n  }\n  g->gckind = origkind;\n  setpause(g, gettotalbytes(g));\n  if (!isemergency)   /* do not run finalizers during emergency GC */\n    callallpendingfinalizers(L, 1);\n}\n\n/* }====================================================== */\n\n\n"
  },
  {
    "path": "src/lib/lua52/lgc.h",
    "content": "/*\n** $Id: lgc.h,v 2.58.1.1 2013/04/12 18:48:47 roberto Exp $\n** Garbage Collector\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lgc_h\n#define lgc_h\n\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n\n/*\n** Collectable objects may have one of three colors: white, which\n** means the object is not marked; gray, which means the\n** object is marked, but its references may be not marked; and\n** black, which means that the object and all its references are marked.\n** The main invariant of the garbage collector, while marking objects,\n** is that a black object can never point to a white one. Moreover,\n** any gray object must be in a \"gray list\" (gray, grayagain, weak,\n** allweak, ephemeron) so that it can be visited again before finishing\n** the collection cycle. These lists have no meaning when the invariant\n** is not being enforced (e.g., sweep phase).\n*/\n\n\n\n/* how much to allocate before next GC step */\n#if !defined(GCSTEPSIZE)\n/* ~100 small strings */\n#define GCSTEPSIZE\t(cast_int(100 * sizeof(TString)))\n#endif\n\n\n/*\n** Possible states of the Garbage Collector\n*/\n#define GCSpropagate\t0\n#define GCSatomic\t1\n#define GCSsweepstring\t2\n#define GCSsweepudata\t3\n#define GCSsweep\t4\n#define GCSpause\t5\n\n\n#define issweepphase(g)  \\\n\t(GCSsweepstring <= (g)->gcstate && (g)->gcstate <= GCSsweep)\n\n#define isgenerational(g)\t((g)->gckind == KGC_GEN)\n\n/*\n** macros to tell when main invariant (white objects cannot point to black\n** ones) must be kept. During a non-generational collection, the sweep\n** phase may break the invariant, as objects turned white may point to\n** still-black objects. The invariant is restored when sweep ends and\n** all objects are white again. During a generational collection, the\n** invariant must be kept all times.\n*/\n\n#define keepinvariant(g)\t(isgenerational(g) || g->gcstate <= GCSatomic)\n\n\n/*\n** Outside the collector, the state in generational mode is kept in\n** 'propagate', so 'keepinvariant' is always true.\n*/\n#define keepinvariantout(g)  \\\n  check_exp(g->gcstate == GCSpropagate || !isgenerational(g),  \\\n            g->gcstate <= GCSatomic)\n\n\n/*\n** some useful bit tricks\n*/\n#define resetbits(x,m)\t\t((x) &= cast(lu_byte, ~(m)))\n#define setbits(x,m)\t\t((x) |= (m))\n#define testbits(x,m)\t\t((x) & (m))\n#define bitmask(b)\t\t(1<<(b))\n#define bit2mask(b1,b2)\t\t(bitmask(b1) | bitmask(b2))\n#define l_setbit(x,b)\t\tsetbits(x, bitmask(b))\n#define resetbit(x,b)\t\tresetbits(x, bitmask(b))\n#define testbit(x,b)\t\ttestbits(x, bitmask(b))\n\n\n/* Layout for bit use in `marked' field: */\n#define WHITE0BIT\t0  /* object is white (type 0) */\n#define WHITE1BIT\t1  /* object is white (type 1) */\n#define BLACKBIT\t2  /* object is black */\n#define FINALIZEDBIT\t3  /* object has been separated for finalization */\n#define SEPARATED\t4  /* object is in 'finobj' list or in 'tobefnz' */\n#define FIXEDBIT\t5  /* object is fixed (should not be collected) */\n#define OLDBIT\t\t6  /* object is old (only in generational mode) */\n/* bit 7 is currently used by tests (luaL_checkmemory) */\n\n#define WHITEBITS\tbit2mask(WHITE0BIT, WHITE1BIT)\n\n\n#define iswhite(x)      testbits((x)->gch.marked, WHITEBITS)\n#define isblack(x)      testbit((x)->gch.marked, BLACKBIT)\n#define isgray(x)  /* neither white nor black */  \\\n\t(!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))\n\n#define isold(x)\ttestbit((x)->gch.marked, OLDBIT)\n\n/* MOVE OLD rule: whenever an object is moved to the beginning of\n   a GC list, its old bit must be cleared */\n#define resetoldbit(o)\tresetbit((o)->gch.marked, OLDBIT)\n\n#define otherwhite(g)\t(g->currentwhite ^ WHITEBITS)\n#define isdeadm(ow,m)\t(!(((m) ^ WHITEBITS) & (ow)))\n#define isdead(g,v)\tisdeadm(otherwhite(g), (v)->gch.marked)\n\n#define changewhite(x)\t((x)->gch.marked ^= WHITEBITS)\n#define gray2black(x)\tl_setbit((x)->gch.marked, BLACKBIT)\n\n#define valiswhite(x)\t(iscollectable(x) && iswhite(gcvalue(x)))\n\n#define luaC_white(g)\tcast(lu_byte, (g)->currentwhite & WHITEBITS)\n\n\n#define luaC_condGC(L,c) \\\n\t{if (G(L)->GCdebt > 0) {c;}; condchangemem(L);}\n#define luaC_checkGC(L)\t\tluaC_condGC(L, luaC_step(L);)\n\n\n#define luaC_barrier(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p)))  \\\n\tluaC_barrier_(L,obj2gco(p),gcvalue(v)); }\n\n#define luaC_barrierback(L,p,v) { if (valiswhite(v) && isblack(obj2gco(p)))  \\\n\tluaC_barrierback_(L,p); }\n\n#define luaC_objbarrier(L,p,o)  \\\n\t{ if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) \\\n\t\tluaC_barrier_(L,obj2gco(p),obj2gco(o)); }\n\n#define luaC_objbarrierback(L,p,o)  \\\n   { if (iswhite(obj2gco(o)) && isblack(obj2gco(p))) luaC_barrierback_(L,p); }\n\n#define luaC_barrierproto(L,p,c) \\\n   { if (isblack(obj2gco(p))) luaC_barrierproto_(L,p,c); }\n\nLUAI_FUNC void luaC_freeallobjects (lua_State *L);\nLUAI_FUNC void luaC_step (lua_State *L);\nLUAI_FUNC void luaC_forcestep (lua_State *L);\nLUAI_FUNC void luaC_runtilstate (lua_State *L, int statesmask);\nLUAI_FUNC void luaC_fullgc (lua_State *L, int isemergency);\nLUAI_FUNC GCObject *luaC_newobj (lua_State *L, int tt, size_t sz,\n                                 GCObject **list, int offset);\nLUAI_FUNC void luaC_barrier_ (lua_State *L, GCObject *o, GCObject *v);\nLUAI_FUNC void luaC_barrierback_ (lua_State *L, GCObject *o);\nLUAI_FUNC void luaC_barrierproto_ (lua_State *L, Proto *p, Closure *c);\nLUAI_FUNC void luaC_checkfinalizer (lua_State *L, GCObject *o, Table *mt);\nLUAI_FUNC void luaC_checkupvalcolor (global_State *g, UpVal *uv);\nLUAI_FUNC void luaC_changemode (lua_State *L, int mode);\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/linit.c",
    "content": "/*\n** $Id: linit.c,v 1.32.1.1 2013/04/12 18:48:47 roberto Exp $\n** Initialization of libraries for lua.c and other clients\n** See Copyright Notice in lua.h\n*/\n\n\n/*\n** If you embed Lua in your program and need to open the standard\n** libraries, call luaL_openlibs in your program. If you need a\n** different set of libraries, copy this file to your project and edit\n** it to suit your needs.\n*/\n\n\n#define linit_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lualib.h\"\n#include \"lauxlib.h\"\n\n\n/*\n** these libs are loaded by lua.c and are readily available to any Lua\n** program\n*/\nstatic const luaL_Reg loadedlibs[] = {\n  {\"_G\", luaopen_base},\n  {LUA_LOADLIBNAME, luaopen_package},\n  {LUA_COLIBNAME, luaopen_coroutine},\n  {LUA_TABLIBNAME, luaopen_table},\n  {LUA_IOLIBNAME, luaopen_io},\n  {LUA_OSLIBNAME, luaopen_os},\n  {LUA_STRLIBNAME, luaopen_string},\n  {LUA_BITLIBNAME, luaopen_bit32},\n  {LUA_MATHLIBNAME, luaopen_math},\n  {LUA_DBLIBNAME, luaopen_debug},\n  {NULL, NULL}\n};\n\n\n/*\n** these libs are preloaded and must be required before used\n*/\nstatic const luaL_Reg preloadedlibs[] = {\n  {NULL, NULL}\n};\n\n\nLUALIB_API void luaL_openlibs (lua_State *L) {\n  const luaL_Reg *lib;\n  /* call open functions from 'loadedlibs' and set results to global table */\n  for (lib = loadedlibs; lib->func; lib++) {\n    luaL_requiref(L, lib->name, lib->func, 1);\n    lua_pop(L, 1);  /* remove lib */\n  }\n  /* add open functions from 'preloadedlibs' into 'package.preload' table */\n  luaL_getsubtable(L, LUA_REGISTRYINDEX, \"_PRELOAD\");\n  for (lib = preloadedlibs; lib->func; lib++) {\n    lua_pushcfunction(L, lib->func);\n    lua_setfield(L, -2, lib->name);\n  }\n  lua_pop(L, 1);  /* remove _PRELOAD table */\n}\n\n"
  },
  {
    "path": "src/lib/lua52/liolib.c",
    "content": "/*\n** $Id: liolib.c,v 2.112.1.1 2013/04/12 18:48:47 roberto Exp $\n** Standard I/O (and system) library\n** See Copyright Notice in lua.h\n*/\n\n\n/*\n** This definition must come before the inclusion of 'stdio.h'; it\n** should not affect non-POSIX systems\n*/\n#if !defined(_FILE_OFFSET_BITS)\n#define\t_LARGEFILE_SOURCE\t1\n#define _FILE_OFFSET_BITS\t64\n#endif\n\n\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define liolib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n#if !defined(lua_checkmode)\n\n/*\n** Check whether 'mode' matches '[rwa]%+?b?'.\n** Change this macro to accept other modes for 'fopen' besides\n** the standard ones.\n*/\n#define lua_checkmode(mode) \\\n\t(*mode != '\\0' && strchr(\"rwa\", *(mode++)) != NULL &&\t\\\n\t(*mode != '+' || ++mode) &&  /* skip if char is '+' */\t\\\n\t(*mode != 'b' || ++mode) &&  /* skip if char is 'b' */\t\\\n\t(*mode == '\\0'))\n\n#endif\n\n/*\n** {======================================================\n** lua_popen spawns a new process connected to the current\n** one through the file streams.\n** =======================================================\n*/\n\n#if !defined(lua_popen)\t/* { */\n\n#if defined(LUA_USE_POPEN)\t/* { */\n\n#define lua_popen(L,c,m)\t((void)L, fflush(NULL), popen(c,m))\n#define lua_pclose(L,file)\t((void)L, pclose(file))\n\n#elif defined(LUA_WIN)\t\t/* }{ */\n\n#define lua_popen(L,c,m)\t\t((void)L, _popen(c,m))\n#define lua_pclose(L,file)\t\t((void)L, _pclose(file))\n\n\n#else\t\t\t\t/* }{ */\n\n#define lua_popen(L,c,m)\t\t((void)((void)c, m),  \\\n\t\tluaL_error(L, LUA_QL(\"popen\") \" not supported\"), (FILE*)0)\n#define lua_pclose(L,file)\t\t((void)((void)L, file), -1)\n\n\n#endif\t\t\t\t/* } */\n\n#endif\t\t\t/* } */\n\n/* }====================================================== */\n\n\n/*\n** {======================================================\n** lua_fseek: configuration for longer offsets\n** =======================================================\n*/\n\n#if !defined(lua_fseek)\t&& !defined(LUA_ANSI)\t/* { */\n\n#if defined(LUA_USE_POSIX)\t/* { */\n\n#define l_fseek(f,o,w)\t\tfseeko(f,o,w)\n#define l_ftell(f)\t\tftello(f)\n#define l_seeknum\t\toff_t\n\n#elif defined(LUA_WIN) && !defined(_CRTIMP_TYPEINFO) \\\n   && defined(_MSC_VER) && (_MSC_VER >= 1400)\t/* }{ */\n/* Windows (but not DDK) and Visual C++ 2005 or higher */\n\n#define l_fseek(f,o,w)\t\t_fseeki64(f,o,w)\n#define l_ftell(f)\t\t_ftelli64(f)\n#define l_seeknum\t\t__int64\n\n#endif\t/* } */\n\n#endif\t\t\t/* } */\n\n\n#if !defined(l_fseek)\t\t/* default definitions */\n#define l_fseek(f,o,w)\t\tfseek(f,o,w)\n#define l_ftell(f)\t\tftell(f)\n#define l_seeknum\t\tlong\n#endif\n\n/* }====================================================== */\n\n\n#define IO_PREFIX\t\"_IO_\"\n#define IO_INPUT\t(IO_PREFIX \"input\")\n#define IO_OUTPUT\t(IO_PREFIX \"output\")\n\n\ntypedef luaL_Stream LStream;\n\n\n#define tolstream(L)\t((LStream *)luaL_checkudata(L, 1, LUA_FILEHANDLE))\n\n#define isclosed(p)\t((p)->closef == NULL)\n\n\nstatic int io_type (lua_State *L) {\n  LStream *p;\n  luaL_checkany(L, 1);\n  p = (LStream *)luaL_testudata(L, 1, LUA_FILEHANDLE);\n  if (p == NULL)\n    lua_pushnil(L);  /* not a file */\n  else if (isclosed(p))\n    lua_pushliteral(L, \"closed file\");\n  else\n    lua_pushliteral(L, \"file\");\n  return 1;\n}\n\n\nstatic int f_tostring (lua_State *L) {\n  LStream *p = tolstream(L);\n  if (isclosed(p))\n    lua_pushliteral(L, \"file (closed)\");\n  else\n    lua_pushfstring(L, \"file (%p)\", p->f);\n  return 1;\n}\n\n\nstatic FILE *tofile (lua_State *L) {\n  LStream *p = tolstream(L);\n  if (isclosed(p))\n    luaL_error(L, \"attempt to use a closed file\");\n  lua_assert(p->f);\n  return p->f;\n}\n\n\n/*\n** When creating file handles, always creates a `closed' file handle\n** before opening the actual file; so, if there is a memory error, the\n** file is not left opened.\n*/\nstatic LStream *newprefile (lua_State *L) {\n  LStream *p = (LStream *)lua_newuserdata(L, sizeof(LStream));\n  p->closef = NULL;  /* mark file handle as 'closed' */\n  luaL_setmetatable(L, LUA_FILEHANDLE);\n  return p;\n}\n\n\nstatic int aux_close (lua_State *L) {\n  LStream *p = tolstream(L);\n  lua_CFunction cf = p->closef;\n  p->closef = NULL;  /* mark stream as closed */\n  return (*cf)(L);  /* close it */\n}\n\n\nstatic int io_close (lua_State *L) {\n  if (lua_isnone(L, 1))  /* no argument? */\n    lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT);  /* use standard output */\n  tofile(L);  /* make sure argument is an open stream */\n  return aux_close(L);\n}\n\n\nstatic int f_gc (lua_State *L) {\n  LStream *p = tolstream(L);\n  if (!isclosed(p) && p->f != NULL)\n    aux_close(L);  /* ignore closed and incompletely open files */\n  return 0;\n}\n\n\n/*\n** function to close regular files\n*/\nstatic int io_fclose (lua_State *L) {\n  LStream *p = tolstream(L);\n  int res = fclose(p->f);\n  return luaL_fileresult(L, (res == 0), NULL);\n}\n\n\nstatic LStream *newfile (lua_State *L) {\n  LStream *p = newprefile(L);\n  p->f = NULL;\n  p->closef = &io_fclose;\n  return p;\n}\n\n\nstatic void opencheck (lua_State *L, const char *fname, const char *mode) {\n  LStream *p = newfile(L);\n  p->f = fopen(fname, mode);\n  if (p->f == NULL)\n    luaL_error(L, \"cannot open file \" LUA_QS \" (%s)\", fname, strerror(errno));\n}\n\n\nstatic int io_open (lua_State *L) {\n  const char *filename = luaL_checkstring(L, 1);\n  const char *mode = luaL_optstring(L, 2, \"r\");\n  LStream *p = newfile(L);\n  const char *md = mode;  /* to traverse/check mode */\n  luaL_argcheck(L, lua_checkmode(md), 2, \"invalid mode\");\n  p->f = fopen(filename, mode);\n  return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;\n}\n\n\n/*\n** function to close 'popen' files\n*/\nstatic int io_pclose (lua_State *L) {\n  LStream *p = tolstream(L);\n  return luaL_execresult(L, lua_pclose(L, p->f));\n}\n\n\nstatic int io_popen (lua_State *L) {\n  const char *filename = luaL_checkstring(L, 1);\n  const char *mode = luaL_optstring(L, 2, \"r\");\n  LStream *p = newprefile(L);\n  p->f = lua_popen(L, filename, mode);\n  p->closef = &io_pclose;\n  return (p->f == NULL) ? luaL_fileresult(L, 0, filename) : 1;\n}\n\n\nstatic int io_tmpfile (lua_State *L) {\n  LStream *p = newfile(L);\n  p->f = tmpfile();\n  return (p->f == NULL) ? luaL_fileresult(L, 0, NULL) : 1;\n}\n\n\nstatic FILE *getiofile (lua_State *L, const char *findex) {\n  LStream *p;\n  lua_getfield(L, LUA_REGISTRYINDEX, findex);\n  p = (LStream *)lua_touserdata(L, -1);\n  if (isclosed(p))\n    luaL_error(L, \"standard %s file is closed\", findex + strlen(IO_PREFIX));\n  return p->f;\n}\n\n\nstatic int g_iofile (lua_State *L, const char *f, const char *mode) {\n  if (!lua_isnoneornil(L, 1)) {\n    const char *filename = lua_tostring(L, 1);\n    if (filename)\n      opencheck(L, filename, mode);\n    else {\n      tofile(L);  /* check that it's a valid file handle */\n      lua_pushvalue(L, 1);\n    }\n    lua_setfield(L, LUA_REGISTRYINDEX, f);\n  }\n  /* return current value */\n  lua_getfield(L, LUA_REGISTRYINDEX, f);\n  return 1;\n}\n\n\nstatic int io_input (lua_State *L) {\n  return g_iofile(L, IO_INPUT, \"r\");\n}\n\n\nstatic int io_output (lua_State *L) {\n  return g_iofile(L, IO_OUTPUT, \"w\");\n}\n\n\nstatic int io_readline (lua_State *L);\n\n\nstatic void aux_lines (lua_State *L, int toclose) {\n  int i;\n  int n = lua_gettop(L) - 1;  /* number of arguments to read */\n  /* ensure that arguments will fit here and into 'io_readline' stack */\n  luaL_argcheck(L, n <= LUA_MINSTACK - 3, LUA_MINSTACK - 3, \"too many options\");\n  lua_pushvalue(L, 1);  /* file handle */\n  lua_pushinteger(L, n);  /* number of arguments to read */\n  lua_pushboolean(L, toclose);  /* close/not close file when finished */\n  for (i = 1; i <= n; i++) lua_pushvalue(L, i + 1);  /* copy arguments */\n  lua_pushcclosure(L, io_readline, 3 + n);\n}\n\n\nstatic int f_lines (lua_State *L) {\n  tofile(L);  /* check that it's a valid file handle */\n  aux_lines(L, 0);\n  return 1;\n}\n\n\nstatic int io_lines (lua_State *L) {\n  int toclose;\n  if (lua_isnone(L, 1)) lua_pushnil(L);  /* at least one argument */\n  if (lua_isnil(L, 1)) {  /* no file name? */\n    lua_getfield(L, LUA_REGISTRYINDEX, IO_INPUT);  /* get default input */\n    lua_replace(L, 1);  /* put it at index 1 */\n    tofile(L);  /* check that it's a valid file handle */\n    toclose = 0;  /* do not close it after iteration */\n  }\n  else {  /* open a new file */\n    const char *filename = luaL_checkstring(L, 1);\n    opencheck(L, filename, \"r\");\n    lua_replace(L, 1);  /* put file at index 1 */\n    toclose = 1;  /* close it after iteration */\n  }\n  aux_lines(L, toclose);\n  return 1;\n}\n\n\n/*\n** {======================================================\n** READ\n** =======================================================\n*/\n\n\nstatic int read_number (lua_State *L, FILE *f) {\n  lua_Number d;\n  if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {\n    lua_pushnumber(L, d);\n    return 1;\n  }\n  else {\n   lua_pushnil(L);  /* \"result\" to be removed */\n   return 0;  /* read fails */\n  }\n}\n\n\nstatic int test_eof (lua_State *L, FILE *f) {\n  int c = getc(f);\n  ungetc(c, f);\n  lua_pushlstring(L, NULL, 0);\n  return (c != EOF);\n}\n\n\nstatic int read_line (lua_State *L, FILE *f, int chop) {\n  luaL_Buffer b;\n  luaL_buffinit(L, &b);\n  for (;;) {\n    size_t l;\n    char *p = luaL_prepbuffer(&b);\n    if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) {  /* eof? */\n      luaL_pushresult(&b);  /* close buffer */\n      return (lua_rawlen(L, -1) > 0);  /* check whether read something */\n    }\n    l = strlen(p);\n    if (l == 0 || p[l-1] != '\\n')\n      luaL_addsize(&b, l);\n    else {\n      luaL_addsize(&b, l - chop);  /* chop 'eol' if needed */\n      luaL_pushresult(&b);  /* close buffer */\n      return 1;  /* read at least an `eol' */\n    }\n  }\n}\n\n\n#define MAX_SIZE_T\t(~(size_t)0)\n\nstatic void read_all (lua_State *L, FILE *f) {\n  size_t rlen = LUAL_BUFFERSIZE;  /* how much to read in each cycle */\n  luaL_Buffer b;\n  luaL_buffinit(L, &b);\n  for (;;) {\n    char *p = luaL_prepbuffsize(&b, rlen);\n    size_t nr = fread(p, sizeof(char), rlen, f);\n    luaL_addsize(&b, nr);\n    if (nr < rlen) break;  /* eof? */\n    else if (rlen <= (MAX_SIZE_T / 4))  /* avoid buffers too large */\n      rlen *= 2;  /* double buffer size at each iteration */\n  }\n  luaL_pushresult(&b);  /* close buffer */\n}\n\n\nstatic int read_chars (lua_State *L, FILE *f, size_t n) {\n  size_t nr;  /* number of chars actually read */\n  char *p;\n  luaL_Buffer b;\n  luaL_buffinit(L, &b);\n  p = luaL_prepbuffsize(&b, n);  /* prepare buffer to read whole block */\n  nr = fread(p, sizeof(char), n, f);  /* try to read 'n' chars */\n  luaL_addsize(&b, nr);\n  luaL_pushresult(&b);  /* close buffer */\n  return (nr > 0);  /* true iff read something */\n}\n\n\nstatic int g_read (lua_State *L, FILE *f, int first) {\n  int nargs = lua_gettop(L) - 1;\n  int success;\n  int n;\n  clearerr(f);\n  if (nargs == 0) {  /* no arguments? */\n    success = read_line(L, f, 1);\n    n = first+1;  /* to return 1 result */\n  }\n  else {  /* ensure stack space for all results and for auxlib's buffer */\n    luaL_checkstack(L, nargs+LUA_MINSTACK, \"too many arguments\");\n    success = 1;\n    for (n = first; nargs-- && success; n++) {\n      if (lua_type(L, n) == LUA_TNUMBER) {\n        size_t l = (size_t)lua_tointeger(L, n);\n        success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l);\n      }\n      else {\n        const char *p = lua_tostring(L, n);\n        luaL_argcheck(L, p && p[0] == '*', n, \"invalid option\");\n        switch (p[1]) {\n          case 'n':  /* number */\n            success = read_number(L, f);\n            break;\n          case 'l':  /* line */\n            success = read_line(L, f, 1);\n            break;\n          case 'L':  /* line with end-of-line */\n            success = read_line(L, f, 0);\n            break;\n          case 'a':  /* file */\n            read_all(L, f);  /* read entire file */\n            success = 1; /* always success */\n            break;\n          default:\n            return luaL_argerror(L, n, \"invalid format\");\n        }\n      }\n    }\n  }\n  if (ferror(f))\n    return luaL_fileresult(L, 0, NULL);\n  if (!success) {\n    lua_pop(L, 1);  /* remove last result */\n    lua_pushnil(L);  /* push nil instead */\n  }\n  return n - first;\n}\n\n\nstatic int io_read (lua_State *L) {\n  return g_read(L, getiofile(L, IO_INPUT), 1);\n}\n\n\nstatic int f_read (lua_State *L) {\n  return g_read(L, tofile(L), 2);\n}\n\n\nstatic int io_readline (lua_State *L) {\n  LStream *p = (LStream *)lua_touserdata(L, lua_upvalueindex(1));\n  int i;\n  int n = (int)lua_tointeger(L, lua_upvalueindex(2));\n  if (isclosed(p))  /* file is already closed? */\n    return luaL_error(L, \"file is already closed\");\n  lua_settop(L , 1);\n  for (i = 1; i <= n; i++)  /* push arguments to 'g_read' */\n    lua_pushvalue(L, lua_upvalueindex(3 + i));\n  n = g_read(L, p->f, 2);  /* 'n' is number of results */\n  lua_assert(n > 0);  /* should return at least a nil */\n  if (!lua_isnil(L, -n))  /* read at least one value? */\n    return n;  /* return them */\n  else {  /* first result is nil: EOF or error */\n    if (n > 1) {  /* is there error information? */\n      /* 2nd result is error message */\n      return luaL_error(L, \"%s\", lua_tostring(L, -n + 1));\n    }\n    if (lua_toboolean(L, lua_upvalueindex(3))) {  /* generator created file? */\n      lua_settop(L, 0);\n      lua_pushvalue(L, lua_upvalueindex(1));\n      aux_close(L);  /* close it */\n    }\n    return 0;\n  }\n}\n\n/* }====================================================== */\n\n\nstatic int g_write (lua_State *L, FILE *f, int arg) {\n  int nargs = lua_gettop(L) - arg;\n  int status = 1;\n  for (; nargs--; arg++) {\n    if (lua_type(L, arg) == LUA_TNUMBER) {\n      /* optimization: could be done exactly as for strings */\n      status = status &&\n          fprintf(f, LUA_NUMBER_FMT, lua_tonumber(L, arg)) > 0;\n    }\n    else {\n      size_t l;\n      const char *s = luaL_checklstring(L, arg, &l);\n      status = status && (fwrite(s, sizeof(char), l, f) == l);\n    }\n  }\n  if (status) return 1;  /* file handle already on stack top */\n  else return luaL_fileresult(L, status, NULL);\n}\n\n\nstatic int io_write (lua_State *L) {\n  return g_write(L, getiofile(L, IO_OUTPUT), 1);\n}\n\n\nstatic int f_write (lua_State *L) {\n  FILE *f = tofile(L);\n  lua_pushvalue(L, 1);  /* push file at the stack top (to be returned) */\n  return g_write(L, f, 2);\n}\n\n\nstatic int f_seek (lua_State *L) {\n  static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END};\n  static const char *const modenames[] = {\"set\", \"cur\", \"end\", NULL};\n  FILE *f = tofile(L);\n  int op = luaL_checkoption(L, 2, \"cur\", modenames);\n  lua_Number p3 = luaL_optnumber(L, 3, 0);\n  l_seeknum offset = (l_seeknum)p3;\n  luaL_argcheck(L, (lua_Number)offset == p3, 3,\n                  \"not an integer in proper range\");\n  op = l_fseek(f, offset, mode[op]);\n  if (op)\n    return luaL_fileresult(L, 0, NULL);  /* error */\n  else {\n    lua_pushnumber(L, (lua_Number)l_ftell(f));\n    return 1;\n  }\n}\n\n\nstatic int f_setvbuf (lua_State *L) {\n  static const int mode[] = {_IONBF, _IOFBF, _IOLBF};\n  static const char *const modenames[] = {\"no\", \"full\", \"line\", NULL};\n  FILE *f = tofile(L);\n  int op = luaL_checkoption(L, 2, NULL, modenames);\n  lua_Integer sz = luaL_optinteger(L, 3, LUAL_BUFFERSIZE);\n  int res = setvbuf(f, NULL, mode[op], sz);\n  return luaL_fileresult(L, res == 0, NULL);\n}\n\n\n\nstatic int io_flush (lua_State *L) {\n  return luaL_fileresult(L, fflush(getiofile(L, IO_OUTPUT)) == 0, NULL);\n}\n\n\nstatic int f_flush (lua_State *L) {\n  return luaL_fileresult(L, fflush(tofile(L)) == 0, NULL);\n}\n\n\n/*\n** functions for 'io' library\n*/\nstatic const luaL_Reg iolib[] = {\n  {\"close\", io_close},\n  {\"flush\", io_flush},\n  {\"input\", io_input},\n  {\"lines\", io_lines},\n  {\"open\", io_open},\n  {\"output\", io_output},\n  {\"popen\", io_popen},\n  {\"read\", io_read},\n  {\"tmpfile\", io_tmpfile},\n  {\"type\", io_type},\n  {\"write\", io_write},\n  {NULL, NULL}\n};\n\n\n/*\n** methods for file handles\n*/\nstatic const luaL_Reg flib[] = {\n  {\"close\", io_close},\n  {\"flush\", f_flush},\n  {\"lines\", f_lines},\n  {\"read\", f_read},\n  {\"seek\", f_seek},\n  {\"setvbuf\", f_setvbuf},\n  {\"write\", f_write},\n  {\"__gc\", f_gc},\n  {\"__tostring\", f_tostring},\n  {NULL, NULL}\n};\n\n\nstatic void createmeta (lua_State *L) {\n  luaL_newmetatable(L, LUA_FILEHANDLE);  /* create metatable for file handles */\n  lua_pushvalue(L, -1);  /* push metatable */\n  lua_setfield(L, -2, \"__index\");  /* metatable.__index = metatable */\n  luaL_setfuncs(L, flib, 0);  /* add file methods to new metatable */\n  lua_pop(L, 1);  /* pop new metatable */\n}\n\n\n/*\n** function to (not) close the standard files stdin, stdout, and stderr\n*/\nstatic int io_noclose (lua_State *L) {\n  LStream *p = tolstream(L);\n  p->closef = &io_noclose;  /* keep file opened */\n  lua_pushnil(L);\n  lua_pushliteral(L, \"cannot close standard file\");\n  return 2;\n}\n\n\nstatic void createstdfile (lua_State *L, FILE *f, const char *k,\n                           const char *fname) {\n  LStream *p = newprefile(L);\n  p->f = f;\n  p->closef = &io_noclose;\n  if (k != NULL) {\n    lua_pushvalue(L, -1);\n    lua_setfield(L, LUA_REGISTRYINDEX, k);  /* add file to registry */\n  }\n  lua_setfield(L, -2, fname);  /* add file to module */\n}\n\n\nLUAMOD_API int luaopen_io (lua_State *L) {\n  luaL_newlib(L, iolib);  /* new module */\n  createmeta(L);\n  /* create (and set) default files */\n  createstdfile(L, stdin, IO_INPUT, \"stdin\");\n  createstdfile(L, stdout, IO_OUTPUT, \"stdout\");\n  createstdfile(L, stderr, NULL, \"stderr\");\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/llex.c",
    "content": "/*\n** $Id: llex.c,v 2.63.1.3 2015/02/09 17:56:34 roberto Exp $\n** Lexical Analyzer\n** See Copyright Notice in lua.h\n*/\n\n\n#include <locale.h>\n#include <string.h>\n\n#define llex_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lctype.h\"\n#include \"ldo.h\"\n#include \"llex.h\"\n#include \"lobject.h\"\n#include \"lparser.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"lzio.h\"\n\n\n\n#define next(ls) (ls->current = zgetc(ls->z))\n\n\n\n#define currIsNewline(ls)\t(ls->current == '\\n' || ls->current == '\\r')\n\n\n/* ORDER RESERVED */\nstatic const char *const luaX_tokens [] = {\n    \"and\", \"break\", \"do\", \"else\", \"elseif\",\n    \"end\", \"false\", \"for\", \"function\", \"goto\", \"if\",\n    \"in\", \"local\", \"nil\", \"not\", \"or\", \"repeat\",\n    \"return\", \"then\", \"true\", \"until\", \"while\",\n    \"..\", \"...\", \"==\", \">=\", \"<=\", \"~=\", \"::\", \"<eof>\",\n    \"<number>\", \"<name>\", \"<string>\"\n};\n\n\n#define save_and_next(ls) (save(ls, ls->current), next(ls))\n\n\nstatic l_noret lexerror (LexState *ls, const char *msg, int token);\n\n\nstatic void save (LexState *ls, int c) {\n  Mbuffer *b = ls->buff;\n  if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) {\n    size_t newsize;\n    if (luaZ_sizebuffer(b) >= MAX_SIZET/2)\n      lexerror(ls, \"lexical element too long\", 0);\n    newsize = luaZ_sizebuffer(b) * 2;\n    luaZ_resizebuffer(ls->L, b, newsize);\n  }\n  b->buffer[luaZ_bufflen(b)++] = cast(char, c);\n}\n\n\nvoid luaX_init (lua_State *L) {\n  int i;\n  for (i=0; i<NUM_RESERVED; i++) {\n    TString *ts = luaS_new(L, luaX_tokens[i]);\n    luaS_fix(ts);  /* reserved words are never collected */\n    ts->tsv.extra = cast_byte(i+1);  /* reserved word */\n  }\n}\n\n\nconst char *luaX_token2str (LexState *ls, int token) {\n  if (token < FIRST_RESERVED) {  /* single-byte symbols? */\n    lua_assert(token == cast(unsigned char, token));\n    return (lisprint(token)) ? luaO_pushfstring(ls->L, LUA_QL(\"%c\"), token) :\n                              luaO_pushfstring(ls->L, \"char(%d)\", token);\n  }\n  else {\n    const char *s = luaX_tokens[token - FIRST_RESERVED];\n    if (token < TK_EOS)  /* fixed format (symbols and reserved words)? */\n      return luaO_pushfstring(ls->L, LUA_QS, s);\n    else  /* names, strings, and numerals */\n      return s;\n  }\n}\n\n\nstatic const char *txtToken (LexState *ls, int token) {\n  switch (token) {\n    case TK_NAME:\n    case TK_STRING:\n    case TK_NUMBER:\n      save(ls, '\\0');\n      return luaO_pushfstring(ls->L, LUA_QS, luaZ_buffer(ls->buff));\n    default:\n      return luaX_token2str(ls, token);\n  }\n}\n\n\nstatic l_noret lexerror (LexState *ls, const char *msg, int token) {\n  char buff[LUA_IDSIZE];\n  luaO_chunkid(buff, getstr(ls->source), LUA_IDSIZE);\n  msg = luaO_pushfstring(ls->L, \"%s:%d: %s\", buff, ls->linenumber, msg);\n  if (token)\n    luaO_pushfstring(ls->L, \"%s near %s\", msg, txtToken(ls, token));\n  luaD_throw(ls->L, LUA_ERRSYNTAX);\n}\n\n\nl_noret luaX_syntaxerror (LexState *ls, const char *msg) {\n  lexerror(ls, msg, ls->t.token);\n}\n\n\n/*\n** creates a new string and anchors it in function's table so that\n** it will not be collected until the end of the function's compilation\n** (by that time it should be anchored in function's prototype)\n*/\nTString *luaX_newstring (LexState *ls, const char *str, size_t l) {\n  lua_State *L = ls->L;\n  TValue *o;  /* entry for `str' */\n  TString *ts = luaS_newlstr(L, str, l);  /* create new string */\n  setsvalue2s(L, L->top++, ts);  /* temporarily anchor it in stack */\n  o = luaH_set(L, ls->fs->h, L->top - 1);\n  if (ttisnil(o)) {  /* not in use yet? (see 'addK') */\n    /* boolean value does not need GC barrier;\n       table has no metatable, so it does not need to invalidate cache */\n    setbvalue(o, 1);  /* t[string] = true */\n    luaC_checkGC(L);\n  }\n  else {  /* string already present */\n    ts = rawtsvalue(keyfromval(o));  /* re-use value previously stored */\n  }\n  L->top--;  /* remove string from stack */\n  return ts;\n}\n\n\n/*\n** increment line number and skips newline sequence (any of\n** \\n, \\r, \\n\\r, or \\r\\n)\n*/\nstatic void inclinenumber (LexState *ls) {\n  int old = ls->current;\n  lua_assert(currIsNewline(ls));\n  next(ls);  /* skip `\\n' or `\\r' */\n  if (currIsNewline(ls) && ls->current != old)\n    next(ls);  /* skip `\\n\\r' or `\\r\\n' */\n  if (++ls->linenumber >= MAX_INT)\n    lexerror(ls, \"chunk has too many lines\", 0);\n}\n\n\nvoid luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source,\n                    int firstchar) {\n  ls->decpoint = '.';\n  ls->L = L;\n  ls->current = firstchar;\n  ls->lookahead.token = TK_EOS;  /* no look-ahead token */\n  ls->z = z;\n  ls->fs = NULL;\n  ls->linenumber = 1;\n  ls->lastline = 1;\n  ls->source = source;\n  ls->envn = luaS_new(L, LUA_ENV);  /* create env name */\n  luaS_fix(ls->envn);  /* never collect this name */\n  luaZ_resizebuffer(ls->L, ls->buff, LUA_MINBUFFER);  /* initialize buffer */\n}\n\n\n\n/*\n** =======================================================\n** LEXICAL ANALYZER\n** =======================================================\n*/\n\n\n\nstatic int check_next (LexState *ls, const char *set) {\n  if (ls->current == '\\0' || !strchr(set, ls->current))\n    return 0;\n  save_and_next(ls);\n  return 1;\n}\n\n\n/*\n** change all characters 'from' in buffer to 'to'\n*/\nstatic void buffreplace (LexState *ls, char from, char to) {\n  size_t n = luaZ_bufflen(ls->buff);\n  char *p = luaZ_buffer(ls->buff);\n  while (n--)\n    if (p[n] == from) p[n] = to;\n}\n\n\n#if !defined(getlocaledecpoint)\n#define getlocaledecpoint()\t(localeconv()->decimal_point[0])\n#endif\n\n\n#define buff2d(b,e)\tluaO_str2d(luaZ_buffer(b), luaZ_bufflen(b) - 1, e)\n\n/*\n** in case of format error, try to change decimal point separator to\n** the one defined in the current locale and check again\n*/\nstatic void trydecpoint (LexState *ls, SemInfo *seminfo) {\n  char old = ls->decpoint;\n  ls->decpoint = getlocaledecpoint();\n  buffreplace(ls, old, ls->decpoint);  /* try new decimal separator */\n  if (!buff2d(ls->buff, &seminfo->r)) {\n    /* format error with correct decimal point: no more options */\n    buffreplace(ls, ls->decpoint, '.');  /* undo change (for error message) */\n    lexerror(ls, \"malformed number\", TK_NUMBER);\n  }\n}\n\n\n/* LUA_NUMBER */\n/*\n** this function is quite liberal in what it accepts, as 'luaO_str2d'\n** will reject ill-formed numerals.\n*/\nstatic void read_numeral (LexState *ls, SemInfo *seminfo) {\n  const char *expo = \"Ee\";\n  int first = ls->current;\n  lua_assert(lisdigit(ls->current));\n  save_and_next(ls);\n  if (first == '0' && check_next(ls, \"Xx\"))  /* hexadecimal? */\n    expo = \"Pp\";\n  for (;;) {\n    if (check_next(ls, expo))  /* exponent part? */\n      check_next(ls, \"+-\");  /* optional exponent sign */\n    if (lisxdigit(ls->current) || ls->current == '.')\n      save_and_next(ls);\n    else  break;\n  }\n  save(ls, '\\0');\n  buffreplace(ls, '.', ls->decpoint);  /* follow locale for decimal point */\n  if (!buff2d(ls->buff, &seminfo->r))  /* format error? */\n    trydecpoint(ls, seminfo); /* try to update decimal point separator */\n}\n\n\n/*\n** skip a sequence '[=*[' or ']=*]' and return its number of '='s or\n** -1 if sequence is malformed\n*/\nstatic int skip_sep (LexState *ls) {\n  int count = 0;\n  int s = ls->current;\n  lua_assert(s == '[' || s == ']');\n  save_and_next(ls);\n  while (ls->current == '=') {\n    save_and_next(ls);\n    count++;\n  }\n  return (ls->current == s) ? count : (-count) - 1;\n}\n\n\nstatic void read_long_string (LexState *ls, SemInfo *seminfo, int sep) {\n  save_and_next(ls);  /* skip 2nd `[' */\n  if (currIsNewline(ls))  /* string starts with a newline? */\n    inclinenumber(ls);  /* skip it */\n  for (;;) {\n    switch (ls->current) {\n      case EOZ:\n        lexerror(ls, (seminfo) ? \"unfinished long string\" :\n                                 \"unfinished long comment\", TK_EOS);\n        break;  /* to avoid warnings */\n      case ']': {\n        if (skip_sep(ls) == sep) {\n          save_and_next(ls);  /* skip 2nd `]' */\n          goto endloop;\n        }\n        break;\n      }\n      case '\\n': case '\\r': {\n        save(ls, '\\n');\n        inclinenumber(ls);\n        if (!seminfo) luaZ_resetbuffer(ls->buff);  /* avoid wasting space */\n        break;\n      }\n      default: {\n        if (seminfo) save_and_next(ls);\n        else next(ls);\n      }\n    }\n  } endloop:\n  if (seminfo)\n    seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + (2 + sep),\n                                     luaZ_bufflen(ls->buff) - 2*(2 + sep));\n}\n\n\nstatic void escerror (LexState *ls, int *c, int n, const char *msg) {\n  int i;\n  luaZ_resetbuffer(ls->buff);  /* prepare error message */\n  save(ls, '\\\\');\n  for (i = 0; i < n && c[i] != EOZ; i++)\n    save(ls, c[i]);\n  lexerror(ls, msg, TK_STRING);\n}\n\n\nstatic int readhexaesc (LexState *ls) {\n  int c[3], i;  /* keep input for error message */\n  int r = 0;  /* result accumulator */\n  c[0] = 'x';  /* for error message */\n  for (i = 1; i < 3; i++) {  /* read two hexadecimal digits */\n    c[i] = next(ls);\n    if (!lisxdigit(c[i]))\n      escerror(ls, c, i + 1, \"hexadecimal digit expected\");\n    r = (r << 4) + luaO_hexavalue(c[i]);\n  }\n  return r;\n}\n\n\nstatic int readdecesc (LexState *ls) {\n  int c[3], i;\n  int r = 0;  /* result accumulator */\n  for (i = 0; i < 3 && lisdigit(ls->current); i++) {  /* read up to 3 digits */\n    c[i] = ls->current;\n    r = 10*r + c[i] - '0';\n    next(ls);\n  }\n  if (r > UCHAR_MAX)\n    escerror(ls, c, i, \"decimal escape too large\");\n  return r;\n}\n\n\nstatic void read_string (LexState *ls, int del, SemInfo *seminfo) {\n  save_and_next(ls);  /* keep delimiter (for error messages) */\n  while (ls->current != del) {\n    switch (ls->current) {\n      case EOZ:\n        lexerror(ls, \"unfinished string\", TK_EOS);\n        break;  /* to avoid warnings */\n      case '\\n':\n      case '\\r':\n        lexerror(ls, \"unfinished string\", TK_STRING);\n        break;  /* to avoid warnings */\n      case '\\\\': {  /* escape sequences */\n        int c;  /* final character to be saved */\n        next(ls);  /* do not save the `\\' */\n        switch (ls->current) {\n          case 'a': c = '\\a'; goto read_save;\n          case 'b': c = '\\b'; goto read_save;\n          case 'f': c = '\\f'; goto read_save;\n          case 'n': c = '\\n'; goto read_save;\n          case 'r': c = '\\r'; goto read_save;\n          case 't': c = '\\t'; goto read_save;\n          case 'v': c = '\\v'; goto read_save;\n          case 'x': c = readhexaesc(ls); goto read_save;\n          case '\\n': case '\\r':\n            inclinenumber(ls); c = '\\n'; goto only_save;\n          case '\\\\': case '\\\"': case '\\'':\n            c = ls->current; goto read_save;\n          case EOZ: goto no_save;  /* will raise an error next loop */\n          case 'z': {  /* zap following span of spaces */\n            next(ls);  /* skip the 'z' */\n            while (lisspace(ls->current)) {\n              if (currIsNewline(ls)) inclinenumber(ls);\n              else next(ls);\n            }\n            goto no_save;\n          }\n          default: {\n            if (!lisdigit(ls->current))\n              escerror(ls, &ls->current, 1, \"invalid escape sequence\");\n            /* digital escape \\ddd */\n            c = readdecesc(ls);\n            goto only_save;\n          }\n        }\n       read_save: next(ls);  /* read next character */\n       only_save: save(ls, c);  /* save 'c' */\n       no_save: break;\n      }\n      default:\n        save_and_next(ls);\n    }\n  }\n  save_and_next(ls);  /* skip delimiter */\n  seminfo->ts = luaX_newstring(ls, luaZ_buffer(ls->buff) + 1,\n                                   luaZ_bufflen(ls->buff) - 2);\n}\n\n\nstatic int llex (LexState *ls, SemInfo *seminfo) {\n  luaZ_resetbuffer(ls->buff);\n  for (;;) {\n    switch (ls->current) {\n      case '\\n': case '\\r': {  /* line breaks */\n        inclinenumber(ls);\n        break;\n      }\n      case ' ': case '\\f': case '\\t': case '\\v': {  /* spaces */\n        next(ls);\n        break;\n      }\n      case '-': {  /* '-' or '--' (comment) */\n        next(ls);\n        if (ls->current != '-') return '-';\n        /* else is a comment */\n        next(ls);\n        if (ls->current == '[') {  /* long comment? */\n          int sep = skip_sep(ls);\n          luaZ_resetbuffer(ls->buff);  /* `skip_sep' may dirty the buffer */\n          if (sep >= 0) {\n            read_long_string(ls, NULL, sep);  /* skip long comment */\n            luaZ_resetbuffer(ls->buff);  /* previous call may dirty the buff. */\n            break;\n          }\n        }\n        /* else short comment */\n        while (!currIsNewline(ls) && ls->current != EOZ)\n          next(ls);  /* skip until end of line (or end of file) */\n        break;\n      }\n      case '[': {  /* long string or simply '[' */\n        int sep = skip_sep(ls);\n        if (sep >= 0) {\n          read_long_string(ls, seminfo, sep);\n          return TK_STRING;\n        }\n        else if (sep == -1) return '[';\n        else lexerror(ls, \"invalid long string delimiter\", TK_STRING);\n      }\n      case '=': {\n        next(ls);\n        if (ls->current != '=') return '=';\n        else { next(ls); return TK_EQ; }\n      }\n      case '<': {\n        next(ls);\n        if (ls->current != '=') return '<';\n        else { next(ls); return TK_LE; }\n      }\n      case '>': {\n        next(ls);\n        if (ls->current != '=') return '>';\n        else { next(ls); return TK_GE; }\n      }\n      case '~': {\n        next(ls);\n        if (ls->current != '=') return '~';\n        else { next(ls); return TK_NE; }\n      }\n      case ':': {\n        next(ls);\n        if (ls->current != ':') return ':';\n        else { next(ls); return TK_DBCOLON; }\n      }\n      case '\"': case '\\'': {  /* short literal strings */\n        read_string(ls, ls->current, seminfo);\n        return TK_STRING;\n      }\n      case '.': {  /* '.', '..', '...', or number */\n        save_and_next(ls);\n        if (check_next(ls, \".\")) {\n          if (check_next(ls, \".\"))\n            return TK_DOTS;   /* '...' */\n          else return TK_CONCAT;   /* '..' */\n        }\n        else if (!lisdigit(ls->current)) return '.';\n        /* else go through */\n      }\n      case '0': case '1': case '2': case '3': case '4':\n      case '5': case '6': case '7': case '8': case '9': {\n        read_numeral(ls, seminfo);\n        return TK_NUMBER;\n      }\n      case EOZ: {\n        return TK_EOS;\n      }\n      default: {\n        if (lislalpha(ls->current)) {  /* identifier or reserved word? */\n          TString *ts;\n          do {\n            save_and_next(ls);\n          } while (lislalnum(ls->current));\n          ts = luaX_newstring(ls, luaZ_buffer(ls->buff),\n                                  luaZ_bufflen(ls->buff));\n          seminfo->ts = ts;\n          if (isreserved(ts))  /* reserved word? */\n            return ts->tsv.extra - 1 + FIRST_RESERVED;\n          else {\n            return TK_NAME;\n          }\n        }\n        else {  /* single-char tokens (+ - / ...) */\n          int c = ls->current;\n          next(ls);\n          return c;\n        }\n      }\n    }\n  }\n}\n\n\nvoid luaX_next (LexState *ls) {\n  ls->lastline = ls->linenumber;\n  if (ls->lookahead.token != TK_EOS) {  /* is there a look-ahead token? */\n    ls->t = ls->lookahead;  /* use this one */\n    ls->lookahead.token = TK_EOS;  /* and discharge it */\n  }\n  else\n    ls->t.token = llex(ls, &ls->t.seminfo);  /* read next token */\n}\n\n\nint luaX_lookahead (LexState *ls) {\n  lua_assert(ls->lookahead.token == TK_EOS);\n  ls->lookahead.token = llex(ls, &ls->lookahead.seminfo);\n  return ls->lookahead.token;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/llex.h",
    "content": "/*\n** $Id: llex.h,v 1.72.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lexical Analyzer\n** See Copyright Notice in lua.h\n*/\n\n#ifndef llex_h\n#define llex_h\n\n#include \"lobject.h\"\n#include \"lzio.h\"\n\n\n#define FIRST_RESERVED\t257\n\n\n\n/*\n* WARNING: if you change the order of this enumeration,\n* grep \"ORDER RESERVED\"\n*/\nenum RESERVED {\n  /* terminal symbols denoted by reserved words */\n  TK_AND = FIRST_RESERVED, TK_BREAK,\n  TK_DO, TK_ELSE, TK_ELSEIF, TK_END, TK_FALSE, TK_FOR, TK_FUNCTION,\n  TK_GOTO, TK_IF, TK_IN, TK_LOCAL, TK_NIL, TK_NOT, TK_OR, TK_REPEAT,\n  TK_RETURN, TK_THEN, TK_TRUE, TK_UNTIL, TK_WHILE,\n  /* other terminal symbols */\n  TK_CONCAT, TK_DOTS, TK_EQ, TK_GE, TK_LE, TK_NE, TK_DBCOLON, TK_EOS,\n  TK_NUMBER, TK_NAME, TK_STRING\n};\n\n/* number of reserved words */\n#define NUM_RESERVED\t(cast(int, TK_WHILE-FIRST_RESERVED+1))\n\n\ntypedef union {\n  lua_Number r;\n  TString *ts;\n} SemInfo;  /* semantics information */\n\n\ntypedef struct Token {\n  int token;\n  SemInfo seminfo;\n} Token;\n\n\n/* state of the lexer plus state of the parser when shared by all\n   functions */\ntypedef struct LexState {\n  int current;  /* current character (charint) */\n  int linenumber;  /* input line counter */\n  int lastline;  /* line of last token `consumed' */\n  Token t;  /* current token */\n  Token lookahead;  /* look ahead token */\n  struct FuncState *fs;  /* current function (parser) */\n  struct lua_State *L;\n  ZIO *z;  /* input stream */\n  Mbuffer *buff;  /* buffer for tokens */\n  struct Dyndata *dyd;  /* dynamic structures used by the parser */\n  TString *source;  /* current source name */\n  TString *envn;  /* environment variable name */\n  char decpoint;  /* locale decimal point */\n} LexState;\n\n\nLUAI_FUNC void luaX_init (lua_State *L);\nLUAI_FUNC void luaX_setinput (lua_State *L, LexState *ls, ZIO *z,\n                              TString *source, int firstchar);\nLUAI_FUNC TString *luaX_newstring (LexState *ls, const char *str, size_t l);\nLUAI_FUNC void luaX_next (LexState *ls);\nLUAI_FUNC int luaX_lookahead (LexState *ls);\nLUAI_FUNC l_noret luaX_syntaxerror (LexState *ls, const char *s);\nLUAI_FUNC const char *luaX_token2str (LexState *ls, int token);\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/llimits.h",
    "content": "/*\n** $Id: llimits.h,v 1.103.1.1 2013/04/12 18:48:47 roberto Exp $\n** Limits, basic types, and some other `installation-dependent' definitions\n** See Copyright Notice in lua.h\n*/\n\n#ifndef llimits_h\n#define llimits_h\n\n\n#include <limits.h>\n#include <stddef.h>\n\n\n#include \"lua.h\"\n\n\ntypedef unsigned LUA_INT32 lu_int32;\n\ntypedef LUAI_UMEM lu_mem;\n\ntypedef LUAI_MEM l_mem;\n\n\n\n/* chars used as small naturals (so that `char' is reserved for characters) */\ntypedef unsigned char lu_byte;\n\n\n#define MAX_SIZET\t((size_t)(~(size_t)0)-2)\n\n#define MAX_LUMEM\t((lu_mem)(~(lu_mem)0)-2)\n\n#define MAX_LMEM\t((l_mem) ((MAX_LUMEM >> 1) - 2))\n\n\n#define MAX_INT (INT_MAX-2)  /* maximum value of an int (-2 for safety) */\n\n/*\n** conversion of pointer to integer\n** this is for hashing only; there is no problem if the integer\n** cannot hold the whole pointer value\n*/\n#define IntPoint(p)  ((unsigned int)(lu_mem)(p))\n\n\n\n/* type to ensure maximum alignment */\n#if !defined(LUAI_USER_ALIGNMENT_T)\n#define LUAI_USER_ALIGNMENT_T\tunion { double u; void *s; long l; }\n#endif\n\ntypedef LUAI_USER_ALIGNMENT_T L_Umaxalign;\n\n\n/* result of a `usual argument conversion' over lua_Number */\ntypedef LUAI_UACNUMBER l_uacNumber;\n\n\n/* internal assertions for in-house debugging */\n#if defined(lua_assert)\n#define check_exp(c,e)\t\t(lua_assert(c), (e))\n/* to avoid problems with conditions too long */\n#define lua_longassert(c)\t{ if (!(c)) lua_assert(0); }\n#else\n#define lua_assert(c)\t\t((void)0)\n#define check_exp(c,e)\t\t(e)\n#define lua_longassert(c)\t((void)0)\n#endif\n\n/*\n** assertion for checking API calls\n*/\n#if !defined(luai_apicheck)\n\n#if defined(LUA_USE_APICHECK)\n#include <assert.h>\n#define luai_apicheck(L,e)\tassert(e)\n#else\n#define luai_apicheck(L,e)\tlua_assert(e)\n#endif\n\n#endif\n\n#define api_check(l,e,msg)\tluai_apicheck(l,(e) && msg)\n\n\n#if !defined(UNUSED)\n#define UNUSED(x)\t((void)(x))\t/* to avoid warnings */\n#endif\n\n\n#define cast(t, exp)\t((t)(exp))\n\n#define cast_byte(i)\tcast(lu_byte, (i))\n#define cast_num(i)\tcast(lua_Number, (i))\n#define cast_int(i)\tcast(int, (i))\n#define cast_uchar(i)\tcast(unsigned char, (i))\n\n\n/*\n** non-return type\n*/\n#if defined(__GNUC__)\n#define l_noret\t\tvoid __attribute__((noreturn))\n#elif defined(_MSC_VER)\n#define l_noret\t\tvoid __declspec(noreturn)\n#else\n#define l_noret\t\tvoid\n#endif\n\n\n\n/*\n** maximum depth for nested C calls and syntactical nested non-terminals\n** in a program. (Value must fit in an unsigned short int.)\n*/\n#if !defined(LUAI_MAXCCALLS)\n#define LUAI_MAXCCALLS\t\t200\n#endif\n\n/*\n** maximum number of upvalues in a closure (both C and Lua). (Value\n** must fit in an unsigned char.)\n*/\n#define MAXUPVAL\tUCHAR_MAX\n\n\n/*\n** type for virtual-machine instructions\n** must be an unsigned with (at least) 4 bytes (see details in lopcodes.h)\n*/\ntypedef lu_int32 Instruction;\n\n\n\n/* maximum stack for a Lua function */\n#define MAXSTACK\t250\n\n\n\n/* minimum size for the string table (must be power of 2) */\n#if !defined(MINSTRTABSIZE)\n#define MINSTRTABSIZE\t32\n#endif\n\n\n/* minimum size for string buffer */\n#if !defined(LUA_MINBUFFER)\n#define LUA_MINBUFFER\t32\n#endif\n\n\n#if !defined(lua_lock)\n#define lua_lock(L)     ((void) 0)\n#define lua_unlock(L)   ((void) 0)\n#endif\n\n#if !defined(luai_threadyield)\n#define luai_threadyield(L)     {lua_unlock(L); lua_lock(L);}\n#endif\n\n\n/*\n** these macros allow user-specific actions on threads when you defined\n** LUAI_EXTRASPACE and need to do something extra when a thread is\n** created/deleted/resumed/yielded.\n*/\n#if !defined(luai_userstateopen)\n#define luai_userstateopen(L)\t\t((void)L)\n#endif\n\n#if !defined(luai_userstateclose)\n#define luai_userstateclose(L)\t\t((void)L)\n#endif\n\n#if !defined(luai_userstatethread)\n#define luai_userstatethread(L,L1)\t((void)L)\n#endif\n\n#if !defined(luai_userstatefree)\n#define luai_userstatefree(L,L1)\t((void)L)\n#endif\n\n#if !defined(luai_userstateresume)\n#define luai_userstateresume(L,n)       ((void)L)\n#endif\n\n#if !defined(luai_userstateyield)\n#define luai_userstateyield(L,n)        ((void)L)\n#endif\n\n/*\n** lua_number2int is a macro to convert lua_Number to int.\n** lua_number2integer is a macro to convert lua_Number to lua_Integer.\n** lua_number2unsigned is a macro to convert a lua_Number to a lua_Unsigned.\n** lua_unsigned2number is a macro to convert a lua_Unsigned to a lua_Number.\n** luai_hashnum is a macro to hash a lua_Number value into an integer.\n** The hash must be deterministic and give reasonable values for\n** both small and large values (outside the range of integers).\n*/\n\n#if defined(MS_ASMTRICK) || defined(LUA_MSASMTRICK)\t/* { */\n/* trick with Microsoft assembler for X86 */\n\n#define lua_number2int(i,n)  __asm {__asm fld n   __asm fistp i}\n#define lua_number2integer(i,n)\t\tlua_number2int(i, n)\n#define lua_number2unsigned(i,n)  \\\n  {__int64 l; __asm {__asm fld n   __asm fistp l} i = (unsigned int)l;}\n\n\n#elif defined(LUA_IEEE754TRICK)\t\t/* }{ */\n/* the next trick should work on any machine using IEEE754 with\n   a 32-bit int type */\n\nunion luai_Cast { double l_d; LUA_INT32 l_p[2]; };\n\n#if !defined(LUA_IEEEENDIAN)\t/* { */\n#define LUAI_EXTRAIEEE\t\\\n  static const union luai_Cast ieeeendian = {-(33.0 + 6755399441055744.0)};\n#define LUA_IEEEENDIANLOC\t(ieeeendian.l_p[1] == 33)\n#else\n#define LUA_IEEEENDIANLOC\tLUA_IEEEENDIAN\n#define LUAI_EXTRAIEEE\t\t/* empty */\n#endif\t\t\t\t/* } */\n\n#define lua_number2int32(i,n,t) \\\n  { LUAI_EXTRAIEEE \\\n    volatile union luai_Cast u; u.l_d = (n) + 6755399441055744.0; \\\n    (i) = (t)u.l_p[LUA_IEEEENDIANLOC]; }\n\n#define luai_hashnum(i,n)  \\\n  { volatile union luai_Cast u; u.l_d = (n) + 1.0;  /* avoid -0 */ \\\n    (i) = u.l_p[0]; (i) += u.l_p[1]; }  /* add double bits for his hash */\n\n#define lua_number2int(i,n)\t\tlua_number2int32(i, n, int)\n#define lua_number2unsigned(i,n)\tlua_number2int32(i, n, lua_Unsigned)\n\n/* the trick can be expanded to lua_Integer when it is a 32-bit value */\n#if defined(LUA_IEEELL)\n#define lua_number2integer(i,n)\t\tlua_number2int32(i, n, lua_Integer)\n#endif\n\n#endif\t\t\t\t/* } */\n\n\n/* the following definitions always work, but may be slow */\n\n#if !defined(lua_number2int)\n#define lua_number2int(i,n)\t((i)=(int)(n))\n#endif\n\n#if !defined(lua_number2integer)\n#define lua_number2integer(i,n)\t((i)=(lua_Integer)(n))\n#endif\n\n#if !defined(lua_number2unsigned)\t/* { */\n/* the following definition assures proper modulo behavior */\n#if defined(LUA_NUMBER_DOUBLE) || defined(LUA_NUMBER_FLOAT)\n#include <math.h>\n#define SUPUNSIGNED\t((lua_Number)(~(lua_Unsigned)0) + 1)\n#define lua_number2unsigned(i,n)  \\\n\t((i)=(lua_Unsigned)((n) - floor((n)/SUPUNSIGNED)*SUPUNSIGNED))\n#else\n#define lua_number2unsigned(i,n)\t((i)=(lua_Unsigned)(n))\n#endif\n#endif\t\t\t\t/* } */\n\n\n#if !defined(lua_unsigned2number)\n/* on several machines, coercion from unsigned to double is slow,\n   so it may be worth to avoid */\n#define lua_unsigned2number(u)  \\\n    (((u) <= (lua_Unsigned)INT_MAX) ? (lua_Number)(int)(u) : (lua_Number)(u))\n#endif\n\n\n\n#if defined(ltable_c) && !defined(luai_hashnum)\n\n#include <float.h>\n#include <math.h>\n\n#define luai_hashnum(i,n) { int e;  \\\n  n = l_mathop(frexp)(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP);  \\\n  lua_number2int(i, n); i += e; }\n\n#endif\n\n\n\n/*\n** macro to control inclusion of some hard tests on stack reallocation\n*/\n#if !defined(HARDSTACKTESTS)\n#define condmovestack(L)\t((void)0)\n#else\n/* realloc stack keeping its size */\n#define condmovestack(L)\tluaD_reallocstack((L), (L)->stacksize)\n#endif\n\n#if !defined(HARDMEMTESTS)\n#define condchangemem(L)\tcondmovestack(L)\n#else\n#define condchangemem(L)  \\\n\t((void)(!(G(L)->gcrunning) || (luaC_fullgc(L, 0), 1)))\n#endif\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lmathlib.c",
    "content": "/*\n** $Id: lmathlib.c,v 1.83.1.1 2013/04/12 18:48:47 roberto Exp $\n** Standard mathematical library\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdlib.h>\n#include <math.h>\n\n#define lmathlib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n#undef PI\n#define PI\t((lua_Number)(3.1415926535897932384626433832795))\n#define RADIANS_PER_DEGREE\t((lua_Number)(PI/180.0))\n\n\n\nstatic int math_abs (lua_State *L) {\n  lua_pushnumber(L, l_mathop(fabs)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_sin (lua_State *L) {\n  lua_pushnumber(L, l_mathop(sin)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_sinh (lua_State *L) {\n  lua_pushnumber(L, l_mathop(sinh)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_cos (lua_State *L) {\n  lua_pushnumber(L, l_mathop(cos)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_cosh (lua_State *L) {\n  lua_pushnumber(L, l_mathop(cosh)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_tan (lua_State *L) {\n  lua_pushnumber(L, l_mathop(tan)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_tanh (lua_State *L) {\n  lua_pushnumber(L, l_mathop(tanh)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_asin (lua_State *L) {\n  lua_pushnumber(L, l_mathop(asin)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_acos (lua_State *L) {\n  lua_pushnumber(L, l_mathop(acos)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_atan (lua_State *L) {\n  lua_pushnumber(L, l_mathop(atan)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_atan2 (lua_State *L) {\n  lua_pushnumber(L, l_mathop(atan2)(luaL_checknumber(L, 1),\n                                luaL_checknumber(L, 2)));\n  return 1;\n}\n\nstatic int math_ceil (lua_State *L) {\n  lua_pushnumber(L, l_mathop(ceil)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_floor (lua_State *L) {\n  lua_pushnumber(L, l_mathop(floor)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_fmod (lua_State *L) {\n  lua_pushnumber(L, l_mathop(fmod)(luaL_checknumber(L, 1),\n                               luaL_checknumber(L, 2)));\n  return 1;\n}\n\nstatic int math_modf (lua_State *L) {\n  lua_Number ip;\n  lua_Number fp = l_mathop(modf)(luaL_checknumber(L, 1), &ip);\n  lua_pushnumber(L, ip);\n  lua_pushnumber(L, fp);\n  return 2;\n}\n\nstatic int math_sqrt (lua_State *L) {\n  lua_pushnumber(L, l_mathop(sqrt)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_pow (lua_State *L) {\n  lua_Number x = luaL_checknumber(L, 1);\n  lua_Number y = luaL_checknumber(L, 2);\n  lua_pushnumber(L, l_mathop(pow)(x, y));\n  return 1;\n}\n\nstatic int math_log (lua_State *L) {\n  lua_Number x = luaL_checknumber(L, 1);\n  lua_Number res;\n  if (lua_isnoneornil(L, 2))\n    res = l_mathop(log)(x);\n  else {\n    lua_Number base = luaL_checknumber(L, 2);\n    if (base == (lua_Number)10.0) res = l_mathop(log10)(x);\n    else res = l_mathop(log)(x)/l_mathop(log)(base);\n  }\n  lua_pushnumber(L, res);\n  return 1;\n}\n\n#if defined(LUA_COMPAT_LOG10)\nstatic int math_log10 (lua_State *L) {\n  lua_pushnumber(L, l_mathop(log10)(luaL_checknumber(L, 1)));\n  return 1;\n}\n#endif\n\nstatic int math_exp (lua_State *L) {\n  lua_pushnumber(L, l_mathop(exp)(luaL_checknumber(L, 1)));\n  return 1;\n}\n\nstatic int math_deg (lua_State *L) {\n  lua_pushnumber(L, luaL_checknumber(L, 1)/RADIANS_PER_DEGREE);\n  return 1;\n}\n\nstatic int math_rad (lua_State *L) {\n  lua_pushnumber(L, luaL_checknumber(L, 1)*RADIANS_PER_DEGREE);\n  return 1;\n}\n\nstatic int math_frexp (lua_State *L) {\n  int e;\n  lua_pushnumber(L, l_mathop(frexp)(luaL_checknumber(L, 1), &e));\n  lua_pushinteger(L, e);\n  return 2;\n}\n\nstatic int math_ldexp (lua_State *L) {\n  lua_Number x = luaL_checknumber(L, 1);\n  int ep = luaL_checkint(L, 2);\n  lua_pushnumber(L, l_mathop(ldexp)(x, ep));\n  return 1;\n}\n\n\n\nstatic int math_min (lua_State *L) {\n  int n = lua_gettop(L);  /* number of arguments */\n  lua_Number dmin = luaL_checknumber(L, 1);\n  int i;\n  for (i=2; i<=n; i++) {\n    lua_Number d = luaL_checknumber(L, i);\n    if (d < dmin)\n      dmin = d;\n  }\n  lua_pushnumber(L, dmin);\n  return 1;\n}\n\n\nstatic int math_max (lua_State *L) {\n  int n = lua_gettop(L);  /* number of arguments */\n  lua_Number dmax = luaL_checknumber(L, 1);\n  int i;\n  for (i=2; i<=n; i++) {\n    lua_Number d = luaL_checknumber(L, i);\n    if (d > dmax)\n      dmax = d;\n  }\n  lua_pushnumber(L, dmax);\n  return 1;\n}\n\n\nstatic int math_random (lua_State *L) {\n  /* the `%' avoids the (rare) case of r==1, and is needed also because on\n     some systems (SunOS!) `rand()' may return a value larger than RAND_MAX */\n  lua_Number r = (lua_Number)(rand()%RAND_MAX) / (lua_Number)RAND_MAX;\n  switch (lua_gettop(L)) {  /* check number of arguments */\n    case 0: {  /* no arguments */\n      lua_pushnumber(L, r);  /* Number between 0 and 1 */\n      break;\n    }\n    case 1: {  /* only upper limit */\n      lua_Number u = luaL_checknumber(L, 1);\n      luaL_argcheck(L, (lua_Number)1.0 <= u, 1, \"interval is empty\");\n      lua_pushnumber(L, l_mathop(floor)(r*u) + (lua_Number)(1.0));  /* [1, u] */\n      break;\n    }\n    case 2: {  /* lower and upper limits */\n      lua_Number l = luaL_checknumber(L, 1);\n      lua_Number u = luaL_checknumber(L, 2);\n      luaL_argcheck(L, l <= u, 2, \"interval is empty\");\n      lua_pushnumber(L, l_mathop(floor)(r*(u-l+1)) + l);  /* [l, u] */\n      break;\n    }\n    default: return luaL_error(L, \"wrong number of arguments\");\n  }\n  return 1;\n}\n\n\nstatic int math_randomseed (lua_State *L) {\n  srand(luaL_checkunsigned(L, 1));\n  (void)rand(); /* discard first value to avoid undesirable correlations */\n  return 0;\n}\n\n\nstatic const luaL_Reg mathlib[] = {\n  {\"abs\",   math_abs},\n  {\"acos\",  math_acos},\n  {\"asin\",  math_asin},\n  {\"atan2\", math_atan2},\n  {\"atan\",  math_atan},\n  {\"ceil\",  math_ceil},\n  {\"cosh\",   math_cosh},\n  {\"cos\",   math_cos},\n  {\"deg\",   math_deg},\n  {\"exp\",   math_exp},\n  {\"floor\", math_floor},\n  {\"fmod\",   math_fmod},\n  {\"frexp\", math_frexp},\n  {\"ldexp\", math_ldexp},\n#if defined(LUA_COMPAT_LOG10)\n  {\"log10\", math_log10},\n#endif\n  {\"log\",   math_log},\n  {\"max\",   math_max},\n  {\"min\",   math_min},\n  {\"modf\",   math_modf},\n  {\"pow\",   math_pow},\n  {\"rad\",   math_rad},\n  {\"random\",     math_random},\n  {\"randomseed\", math_randomseed},\n  {\"sinh\",   math_sinh},\n  {\"sin\",   math_sin},\n  {\"sqrt\",  math_sqrt},\n  {\"tanh\",   math_tanh},\n  {\"tan\",   math_tan},\n  {NULL, NULL}\n};\n\n\n/*\n** Open math library\n*/\nLUAMOD_API int luaopen_math (lua_State *L) {\n  luaL_newlib(L, mathlib);\n  lua_pushnumber(L, PI);\n  lua_setfield(L, -2, \"pi\");\n  lua_pushnumber(L, HUGE_VAL);\n  lua_setfield(L, -2, \"huge\");\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lmem.c",
    "content": "/*\n** $Id: lmem.c,v 1.84.1.1 2013/04/12 18:48:47 roberto Exp $\n** Interface to Memory Manager\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stddef.h>\n\n#define lmem_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n\n\n\n/*\n** About the realloc function:\n** void * frealloc (void *ud, void *ptr, size_t osize, size_t nsize);\n** (`osize' is the old size, `nsize' is the new size)\n**\n** * frealloc(ud, NULL, x, s) creates a new block of size `s' (no\n** matter 'x').\n**\n** * frealloc(ud, p, x, 0) frees the block `p'\n** (in this specific case, frealloc must return NULL);\n** particularly, frealloc(ud, NULL, 0, 0) does nothing\n** (which is equivalent to free(NULL) in ANSI C)\n**\n** frealloc returns NULL if it cannot create or reallocate the area\n** (any reallocation to an equal or smaller size cannot fail!)\n*/\n\n\n\n#define MINSIZEARRAY\t4\n\n\nvoid *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems,\n                     int limit, const char *what) {\n  void *newblock;\n  int newsize;\n  if (*size >= limit/2) {  /* cannot double it? */\n    if (*size >= limit)  /* cannot grow even a little? */\n      luaG_runerror(L, \"too many %s (limit is %d)\", what, limit);\n    newsize = limit;  /* still have at least one free place */\n  }\n  else {\n    newsize = (*size)*2;\n    if (newsize < MINSIZEARRAY)\n      newsize = MINSIZEARRAY;  /* minimum size */\n  }\n  newblock = luaM_reallocv(L, block, *size, newsize, size_elems);\n  *size = newsize;  /* update only when everything else is OK */\n  return newblock;\n}\n\n\nl_noret luaM_toobig (lua_State *L) {\n  luaG_runerror(L, \"memory allocation error: block too big\");\n}\n\n\n\n/*\n** generic allocation routine.\n*/\nvoid *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) {\n  void *newblock;\n  global_State *g = G(L);\n  size_t realosize = (block) ? osize : 0;\n  lua_assert((realosize == 0) == (block == NULL));\n#if defined(HARDMEMTESTS)\n  if (nsize > realosize && g->gcrunning)\n    luaC_fullgc(L, 1);  /* force a GC whenever possible */\n#endif\n  newblock = (*g->frealloc)(g->ud, block, osize, nsize);\n  if (newblock == NULL && nsize > 0) {\n    api_check(L, nsize > realosize,\n                 \"realloc cannot fail when shrinking a block\");\n    if (g->gcrunning) {\n      luaC_fullgc(L, 1);  /* try to free some memory... */\n      newblock = (*g->frealloc)(g->ud, block, osize, nsize);  /* try again */\n    }\n    if (newblock == NULL)\n      luaD_throw(L, LUA_ERRMEM);\n  }\n  lua_assert((nsize == 0) == (newblock == NULL));\n  g->GCdebt = (g->GCdebt + nsize) - realosize;\n  return newblock;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lmem.h",
    "content": "/*\n** $Id: lmem.h,v 1.40.1.1 2013/04/12 18:48:47 roberto Exp $\n** Interface to Memory Manager\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lmem_h\n#define lmem_h\n\n\n#include <stddef.h>\n\n#include \"llimits.h\"\n#include \"lua.h\"\n\n\n/*\n** This macro avoids the runtime division MAX_SIZET/(e), as 'e' is\n** always constant.\n** The macro is somewhat complex to avoid warnings:\n** +1 avoids warnings of \"comparison has constant result\";\n** cast to 'void' avoids warnings of \"value unused\".\n*/\n#define luaM_reallocv(L,b,on,n,e) \\\n  (cast(void, \\\n     (cast(size_t, (n)+1) > MAX_SIZET/(e)) ? (luaM_toobig(L), 0) : 0), \\\n   luaM_realloc_(L, (b), (on)*(e), (n)*(e)))\n\n#define luaM_freemem(L, b, s)\tluaM_realloc_(L, (b), (s), 0)\n#define luaM_free(L, b)\t\tluaM_realloc_(L, (b), sizeof(*(b)), 0)\n#define luaM_freearray(L, b, n)   luaM_reallocv(L, (b), n, 0, sizeof((b)[0]))\n\n#define luaM_malloc(L,s)\tluaM_realloc_(L, NULL, 0, (s))\n#define luaM_new(L,t)\t\tcast(t *, luaM_malloc(L, sizeof(t)))\n#define luaM_newvector(L,n,t) \\\n\t\tcast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t)))\n\n#define luaM_newobject(L,tag,s)\tluaM_realloc_(L, NULL, tag, (s))\n\n#define luaM_growvector(L,v,nelems,size,t,limit,e) \\\n          if ((nelems)+1 > (size)) \\\n            ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e)))\n\n#define luaM_reallocvector(L, v,oldn,n,t) \\\n   ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t))))\n\nLUAI_FUNC l_noret luaM_toobig (lua_State *L);\n\n/* not to be called directly */\nLUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,\n                                                          size_t size);\nLUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,\n                               size_t size_elem, int limit,\n                               const char *what);\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/loadlib.c",
    "content": "/*\n** $Id: loadlib.c,v 1.111.1.1 2013/04/12 18:48:47 roberto Exp $\n** Dynamic library loader for Lua\n** See Copyright Notice in lua.h\n**\n** This module contains an implementation of loadlib for Unix systems\n** that have dlfcn, an implementation for Windows, and a stub for other\n** systems.\n*/\n\n\n/*\n** if needed, includes windows header before everything else\n*/\n#if defined(_WIN32)\n#include <windows.h>\n#endif\n\n\n#include <stdlib.h>\n#include <string.h>\n\n\n#define loadlib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n/*\n** LUA_PATH and LUA_CPATH are the names of the environment\n** variables that Lua check to set its paths.\n*/\n#if !defined(LUA_PATH)\n#define LUA_PATH\t\"LUA_PATH\"\n#endif\n\n#if !defined(LUA_CPATH)\n#define LUA_CPATH\t\"LUA_CPATH\"\n#endif\n\n#define LUA_PATHSUFFIX\t\t\"_\" LUA_VERSION_MAJOR \"_\" LUA_VERSION_MINOR\n\n#define LUA_PATHVERSION\t\tLUA_PATH LUA_PATHSUFFIX\n#define LUA_CPATHVERSION\tLUA_CPATH LUA_PATHSUFFIX\n\n/*\n** LUA_PATH_SEP is the character that separates templates in a path.\n** LUA_PATH_MARK is the string that marks the substitution points in a\n** template.\n** LUA_EXEC_DIR in a Windows path is replaced by the executable's\n** directory.\n** LUA_IGMARK is a mark to ignore all before it when building the\n** luaopen_ function name.\n*/\n#if !defined (LUA_PATH_SEP)\n#define LUA_PATH_SEP\t\t\";\"\n#endif\n#if !defined (LUA_PATH_MARK)\n#define LUA_PATH_MARK\t\t\"?\"\n#endif\n#if !defined (LUA_EXEC_DIR)\n#define LUA_EXEC_DIR\t\t\"!\"\n#endif\n#if !defined (LUA_IGMARK)\n#define LUA_IGMARK\t\t\"-\"\n#endif\n\n\n/*\n** LUA_CSUBSEP is the character that replaces dots in submodule names\n** when searching for a C loader.\n** LUA_LSUBSEP is the character that replaces dots in submodule names\n** when searching for a Lua loader.\n*/\n#if !defined(LUA_CSUBSEP)\n#define LUA_CSUBSEP\t\tLUA_DIRSEP\n#endif\n\n#if !defined(LUA_LSUBSEP)\n#define LUA_LSUBSEP\t\tLUA_DIRSEP\n#endif\n\n\n/* prefix for open functions in C libraries */\n#define LUA_POF\t\t\"luaopen_\"\n\n/* separator for open functions in C libraries */\n#define LUA_OFSEP\t\"_\"\n\n\n/* table (in the registry) that keeps handles for all loaded C libraries */\n#define CLIBS\t\t\"_CLIBS\"\n\n#define LIB_FAIL\t\"open\"\n\n\n/* error codes for ll_loadfunc */\n#define ERRLIB\t\t1\n#define ERRFUNC\t\t2\n\n#define setprogdir(L)\t\t((void)0)\n\n\n/*\n** system-dependent functions\n*/\nstatic void ll_unloadlib (void *lib);\nstatic void *ll_load (lua_State *L, const char *path, int seeglb);\nstatic lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym);\n\n\n\n#if defined(LUA_USE_DLOPEN)\n/*\n** {========================================================================\n** This is an implementation of loadlib based on the dlfcn interface.\n** The dlfcn interface is available in Linux, SunOS, Solaris, IRIX, FreeBSD,\n** NetBSD, AIX 4.2, HPUX 11, and  probably most other Unix flavors, at least\n** as an emulation layer on top of native functions.\n** =========================================================================\n*/\n\n#include <dlfcn.h>\n\nstatic void ll_unloadlib (void *lib) {\n  dlclose(lib);\n}\n\n\nstatic void *ll_load (lua_State *L, const char *path, int seeglb) {\n  void *lib = dlopen(path, RTLD_NOW | (seeglb ? RTLD_GLOBAL : RTLD_LOCAL));\n  if (lib == NULL) lua_pushstring(L, dlerror());\n  return lib;\n}\n\n\nstatic lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {\n  lua_CFunction f = (lua_CFunction)dlsym(lib, sym);\n  if (f == NULL) lua_pushstring(L, dlerror());\n  return f;\n}\n\n/* }====================================================== */\n\n\n\n#elif defined(LUA_DL_DLL)\n/*\n** {======================================================================\n** This is an implementation of loadlib for Windows using native functions.\n** =======================================================================\n*/\n\n#undef setprogdir\n\n/*\n** optional flags for LoadLibraryEx\n*/\n#if !defined(LUA_LLE_FLAGS)\n#define LUA_LLE_FLAGS\t0\n#endif\n\n\nstatic void setprogdir (lua_State *L) {\n  char buff[MAX_PATH + 1];\n  char *lb;\n  DWORD nsize = sizeof(buff)/sizeof(char);\n  DWORD n = GetModuleFileNameA(NULL, buff, nsize);\n  if (n == 0 || n == nsize || (lb = strrchr(buff, '\\\\')) == NULL)\n    luaL_error(L, \"unable to get ModuleFileName\");\n  else {\n    *lb = '\\0';\n    luaL_gsub(L, lua_tostring(L, -1), LUA_EXEC_DIR, buff);\n    lua_remove(L, -2);  /* remove original string */\n  }\n}\n\n\nstatic void pusherror (lua_State *L) {\n  int error = GetLastError();\n  char buffer[128];\n  if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,\n      NULL, error, 0, buffer, sizeof(buffer)/sizeof(char), NULL))\n    lua_pushstring(L, buffer);\n  else\n    lua_pushfstring(L, \"system error %d\\n\", error);\n}\n\nstatic void ll_unloadlib (void *lib) {\n  FreeLibrary((HMODULE)lib);\n}\n\n\nstatic void *ll_load (lua_State *L, const char *path, int seeglb) {\n  HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS);\n  (void)(seeglb);  /* not used: symbols are 'global' by default */\n  if (lib == NULL) pusherror(L);\n  return lib;\n}\n\n\nstatic lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {\n  lua_CFunction f = (lua_CFunction)GetProcAddress((HMODULE)lib, sym);\n  if (f == NULL) pusherror(L);\n  return f;\n}\n\n/* }====================================================== */\n\n\n#else\n/*\n** {======================================================\n** Fallback for other systems\n** =======================================================\n*/\n\n#undef LIB_FAIL\n#define LIB_FAIL\t\"absent\"\n\n\n#define DLMSG\t\"dynamic libraries not enabled; check your Lua installation\"\n\n\nstatic void ll_unloadlib (void *lib) {\n  (void)(lib);  /* not used */\n}\n\n\nstatic void *ll_load (lua_State *L, const char *path, int seeglb) {\n  (void)(path); (void)(seeglb);  /* not used */\n  lua_pushliteral(L, DLMSG);\n  return NULL;\n}\n\n\nstatic lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {\n  (void)(lib); (void)(sym);  /* not used */\n  lua_pushliteral(L, DLMSG);\n  return NULL;\n}\n\n/* }====================================================== */\n#endif\n\n\nstatic void *ll_checkclib (lua_State *L, const char *path) {\n  void *plib;\n  lua_getfield(L, LUA_REGISTRYINDEX, CLIBS);\n  lua_getfield(L, -1, path);\n  plib = lua_touserdata(L, -1);  /* plib = CLIBS[path] */\n  lua_pop(L, 2);  /* pop CLIBS table and 'plib' */\n  return plib;\n}\n\n\nstatic void ll_addtoclib (lua_State *L, const char *path, void *plib) {\n  lua_getfield(L, LUA_REGISTRYINDEX, CLIBS);\n  lua_pushlightuserdata(L, plib);\n  lua_pushvalue(L, -1);\n  lua_setfield(L, -3, path);  /* CLIBS[path] = plib */\n  lua_rawseti(L, -2, luaL_len(L, -2) + 1);  /* CLIBS[#CLIBS + 1] = plib */\n  lua_pop(L, 1);  /* pop CLIBS table */\n}\n\n\n/*\n** __gc tag method for CLIBS table: calls 'll_unloadlib' for all lib\n** handles in list CLIBS\n*/\nstatic int gctm (lua_State *L) {\n  int n = luaL_len(L, 1);\n  for (; n >= 1; n--) {  /* for each handle, in reverse order */\n    lua_rawgeti(L, 1, n);  /* get handle CLIBS[n] */\n    ll_unloadlib(lua_touserdata(L, -1));\n    lua_pop(L, 1);  /* pop handle */\n  }\n  return 0;\n}\n\n\nstatic int ll_loadfunc (lua_State *L, const char *path, const char *sym) {\n  void *reg = ll_checkclib(L, path);  /* check loaded C libraries */\n  if (reg == NULL) {  /* must load library? */\n    reg = ll_load(L, path, *sym == '*');\n    if (reg == NULL) return ERRLIB;  /* unable to load library */\n    ll_addtoclib(L, path, reg);\n  }\n  if (*sym == '*') {  /* loading only library (no function)? */\n    lua_pushboolean(L, 1);  /* return 'true' */\n    return 0;  /* no errors */\n  }\n  else {\n    lua_CFunction f = ll_sym(L, reg, sym);\n    if (f == NULL)\n      return ERRFUNC;  /* unable to find function */\n    lua_pushcfunction(L, f);  /* else create new function */\n    return 0;  /* no errors */\n  }\n}\n\n\nstatic int ll_loadlib (lua_State *L) {\n  const char *path = luaL_checkstring(L, 1);\n  const char *init = luaL_checkstring(L, 2);\n  int stat = ll_loadfunc(L, path, init);\n  if (stat == 0)  /* no errors? */\n    return 1;  /* return the loaded function */\n  else {  /* error; error message is on stack top */\n    lua_pushnil(L);\n    lua_insert(L, -2);\n    lua_pushstring(L, (stat == ERRLIB) ?  LIB_FAIL : \"init\");\n    return 3;  /* return nil, error message, and where */\n  }\n}\n\n\n\n/*\n** {======================================================\n** 'require' function\n** =======================================================\n*/\n\n\nstatic int readable (const char *filename) {\n  FILE *f = fopen(filename, \"r\");  /* try to open file */\n  if (f == NULL) return 0;  /* open failed */\n  fclose(f);\n  return 1;\n}\n\n\nstatic const char *pushnexttemplate (lua_State *L, const char *path) {\n  const char *l;\n  while (*path == *LUA_PATH_SEP) path++;  /* skip separators */\n  if (*path == '\\0') return NULL;  /* no more templates */\n  l = strchr(path, *LUA_PATH_SEP);  /* find next separator */\n  if (l == NULL) l = path + strlen(path);\n  lua_pushlstring(L, path, l - path);  /* template */\n  return l;\n}\n\n\nstatic const char *searchpath (lua_State *L, const char *name,\n                                             const char *path,\n                                             const char *sep,\n                                             const char *dirsep) {\n  luaL_Buffer msg;  /* to build error message */\n  luaL_buffinit(L, &msg);\n  if (*sep != '\\0')  /* non-empty separator? */\n    name = luaL_gsub(L, name, sep, dirsep);  /* replace it by 'dirsep' */\n  while ((path = pushnexttemplate(L, path)) != NULL) {\n    const char *filename = luaL_gsub(L, lua_tostring(L, -1),\n                                     LUA_PATH_MARK, name);\n    lua_remove(L, -2);  /* remove path template */\n    if (readable(filename))  /* does file exist and is readable? */\n      return filename;  /* return that file name */\n    lua_pushfstring(L, \"\\n\\tno file \" LUA_QS, filename);\n    lua_remove(L, -2);  /* remove file name */\n    luaL_addvalue(&msg);  /* concatenate error msg. entry */\n  }\n  luaL_pushresult(&msg);  /* create error message */\n  return NULL;  /* not found */\n}\n\n\nstatic int ll_searchpath (lua_State *L) {\n  const char *f = searchpath(L, luaL_checkstring(L, 1),\n                                luaL_checkstring(L, 2),\n                                luaL_optstring(L, 3, \".\"),\n                                luaL_optstring(L, 4, LUA_DIRSEP));\n  if (f != NULL) return 1;\n  else {  /* error message is on top of the stack */\n    lua_pushnil(L);\n    lua_insert(L, -2);\n    return 2;  /* return nil + error message */\n  }\n}\n\n\nstatic const char *findfile (lua_State *L, const char *name,\n                                           const char *pname,\n                                           const char *dirsep) {\n  const char *path;\n  lua_getfield(L, lua_upvalueindex(1), pname);\n  path = lua_tostring(L, -1);\n  if (path == NULL)\n    luaL_error(L, LUA_QL(\"package.%s\") \" must be a string\", pname);\n  return searchpath(L, name, path, \".\", dirsep);\n}\n\n\nstatic int checkload (lua_State *L, int stat, const char *filename) {\n  if (stat) {  /* module loaded successfully? */\n    lua_pushstring(L, filename);  /* will be 2nd argument to module */\n    return 2;  /* return open function and file name */\n  }\n  else\n    return luaL_error(L, \"error loading module \" LUA_QS\n                         \" from file \" LUA_QS \":\\n\\t%s\",\n                          lua_tostring(L, 1), filename, lua_tostring(L, -1));\n}\n\n\nstatic int searcher_Lua (lua_State *L) {\n  const char *filename;\n  const char *name = luaL_checkstring(L, 1);\n  filename = findfile(L, name, \"path\", LUA_LSUBSEP);\n  if (filename == NULL) return 1;  /* module not found in this path */\n  return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename);\n}\n\n\nstatic int loadfunc (lua_State *L, const char *filename, const char *modname) {\n  const char *funcname;\n  const char *mark;\n  modname = luaL_gsub(L, modname, \".\", LUA_OFSEP);\n  mark = strchr(modname, *LUA_IGMARK);\n  if (mark) {\n    int stat;\n    funcname = lua_pushlstring(L, modname, mark - modname);\n    funcname = lua_pushfstring(L, LUA_POF\"%s\", funcname);\n    stat = ll_loadfunc(L, filename, funcname);\n    if (stat != ERRFUNC) return stat;\n    modname = mark + 1;  /* else go ahead and try old-style name */\n  }\n  funcname = lua_pushfstring(L, LUA_POF\"%s\", modname);\n  return ll_loadfunc(L, filename, funcname);\n}\n\n\nstatic int searcher_C (lua_State *L) {\n  const char *name = luaL_checkstring(L, 1);\n  const char *filename = findfile(L, name, \"cpath\", LUA_CSUBSEP);\n  if (filename == NULL) return 1;  /* module not found in this path */\n  return checkload(L, (loadfunc(L, filename, name) == 0), filename);\n}\n\n\nstatic int searcher_Croot (lua_State *L) {\n  const char *filename;\n  const char *name = luaL_checkstring(L, 1);\n  const char *p = strchr(name, '.');\n  int stat;\n  if (p == NULL) return 0;  /* is root */\n  lua_pushlstring(L, name, p - name);\n  filename = findfile(L, lua_tostring(L, -1), \"cpath\", LUA_CSUBSEP);\n  if (filename == NULL) return 1;  /* root not found */\n  if ((stat = loadfunc(L, filename, name)) != 0) {\n    if (stat != ERRFUNC)\n      return checkload(L, 0, filename);  /* real error */\n    else {  /* open function not found */\n      lua_pushfstring(L, \"\\n\\tno module \" LUA_QS \" in file \" LUA_QS,\n                         name, filename);\n      return 1;\n    }\n  }\n  lua_pushstring(L, filename);  /* will be 2nd argument to module */\n  return 2;\n}\n\n\nstatic int searcher_preload (lua_State *L) {\n  const char *name = luaL_checkstring(L, 1);\n  lua_getfield(L, LUA_REGISTRYINDEX, \"_PRELOAD\");\n  lua_getfield(L, -1, name);\n  if (lua_isnil(L, -1))  /* not found? */\n    lua_pushfstring(L, \"\\n\\tno field package.preload['%s']\", name);\n  return 1;\n}\n\n\nstatic void findloader (lua_State *L, const char *name) {\n  int i;\n  luaL_Buffer msg;  /* to build error message */\n  luaL_buffinit(L, &msg);\n  lua_getfield(L, lua_upvalueindex(1), \"searchers\");  /* will be at index 3 */\n  if (!lua_istable(L, 3))\n    luaL_error(L, LUA_QL(\"package.searchers\") \" must be a table\");\n  /*  iterate over available searchers to find a loader */\n  for (i = 1; ; i++) {\n    lua_rawgeti(L, 3, i);  /* get a searcher */\n    if (lua_isnil(L, -1)) {  /* no more searchers? */\n      lua_pop(L, 1);  /* remove nil */\n      luaL_pushresult(&msg);  /* create error message */\n      luaL_error(L, \"module \" LUA_QS \" not found:%s\",\n                    name, lua_tostring(L, -1));\n    }\n    lua_pushstring(L, name);\n    lua_call(L, 1, 2);  /* call it */\n    if (lua_isfunction(L, -2))  /* did it find a loader? */\n      return;  /* module loader found */\n    else if (lua_isstring(L, -2)) {  /* searcher returned error message? */\n      lua_pop(L, 1);  /* remove extra return */\n      luaL_addvalue(&msg);  /* concatenate error message */\n    }\n    else\n      lua_pop(L, 2);  /* remove both returns */\n  }\n}\n\n\nstatic int ll_require (lua_State *L) {\n  const char *name = luaL_checkstring(L, 1);\n  lua_settop(L, 1);  /* _LOADED table will be at index 2 */\n  lua_getfield(L, LUA_REGISTRYINDEX, \"_LOADED\");\n  lua_getfield(L, 2, name);  /* _LOADED[name] */\n  if (lua_toboolean(L, -1))  /* is it there? */\n    return 1;  /* package is already loaded */\n  /* else must load package */\n  lua_pop(L, 1);  /* remove 'getfield' result */\n  findloader(L, name);\n  lua_pushstring(L, name);  /* pass name as argument to module loader */\n  lua_insert(L, -2);  /* name is 1st argument (before search data) */\n  lua_call(L, 2, 1);  /* run loader to load module */\n  if (!lua_isnil(L, -1))  /* non-nil return? */\n    lua_setfield(L, 2, name);  /* _LOADED[name] = returned value */\n  lua_getfield(L, 2, name);\n  if (lua_isnil(L, -1)) {   /* module did not set a value? */\n    lua_pushboolean(L, 1);  /* use true as result */\n    lua_pushvalue(L, -1);  /* extra copy to be returned */\n    lua_setfield(L, 2, name);  /* _LOADED[name] = true */\n  }\n  return 1;\n}\n\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** 'module' function\n** =======================================================\n*/\n#if defined(LUA_COMPAT_MODULE)\n\n/*\n** changes the environment variable of calling function\n*/\nstatic void set_env (lua_State *L) {\n  lua_Debug ar;\n  if (lua_getstack(L, 1, &ar) == 0 ||\n      lua_getinfo(L, \"f\", &ar) == 0 ||  /* get calling function */\n      lua_iscfunction(L, -1))\n    luaL_error(L, LUA_QL(\"module\") \" not called from a Lua function\");\n  lua_pushvalue(L, -2);  /* copy new environment table to top */\n  lua_setupvalue(L, -2, 1);\n  lua_pop(L, 1);  /* remove function */\n}\n\n\nstatic void dooptions (lua_State *L, int n) {\n  int i;\n  for (i = 2; i <= n; i++) {\n    if (lua_isfunction(L, i)) {  /* avoid 'calling' extra info. */\n      lua_pushvalue(L, i);  /* get option (a function) */\n      lua_pushvalue(L, -2);  /* module */\n      lua_call(L, 1, 0);\n    }\n  }\n}\n\n\nstatic void modinit (lua_State *L, const char *modname) {\n  const char *dot;\n  lua_pushvalue(L, -1);\n  lua_setfield(L, -2, \"_M\");  /* module._M = module */\n  lua_pushstring(L, modname);\n  lua_setfield(L, -2, \"_NAME\");\n  dot = strrchr(modname, '.');  /* look for last dot in module name */\n  if (dot == NULL) dot = modname;\n  else dot++;\n  /* set _PACKAGE as package name (full module name minus last part) */\n  lua_pushlstring(L, modname, dot - modname);\n  lua_setfield(L, -2, \"_PACKAGE\");\n}\n\n\nstatic int ll_module (lua_State *L) {\n  const char *modname = luaL_checkstring(L, 1);\n  int lastarg = lua_gettop(L);  /* last parameter */\n  luaL_pushmodule(L, modname, 1);  /* get/create module table */\n  /* check whether table already has a _NAME field */\n  lua_getfield(L, -1, \"_NAME\");\n  if (!lua_isnil(L, -1))  /* is table an initialized module? */\n    lua_pop(L, 1);\n  else {  /* no; initialize it */\n    lua_pop(L, 1);\n    modinit(L, modname);\n  }\n  lua_pushvalue(L, -1);\n  set_env(L);\n  dooptions(L, lastarg);\n  return 1;\n}\n\n\nstatic int ll_seeall (lua_State *L) {\n  luaL_checktype(L, 1, LUA_TTABLE);\n  if (!lua_getmetatable(L, 1)) {\n    lua_createtable(L, 0, 1); /* create new metatable */\n    lua_pushvalue(L, -1);\n    lua_setmetatable(L, 1);\n  }\n  lua_pushglobaltable(L);\n  lua_setfield(L, -2, \"__index\");  /* mt.__index = _G */\n  return 0;\n}\n\n#endif\n/* }====================================================== */\n\n\n\n/* auxiliary mark (for internal use) */\n#define AUXMARK\t\t\"\\1\"\n\n\n/*\n** return registry.LUA_NOENV as a boolean\n*/\nstatic int noenv (lua_State *L) {\n  int b;\n  lua_getfield(L, LUA_REGISTRYINDEX, \"LUA_NOENV\");\n  b = lua_toboolean(L, -1);\n  lua_pop(L, 1);  /* remove value */\n  return b;\n}\n\n\nstatic void setpath (lua_State *L, const char *fieldname, const char *envname1,\n                                   const char *envname2, const char *def) {\n  const char *path = getenv(envname1);\n  if (path == NULL)  /* no environment variable? */\n    path = getenv(envname2);  /* try alternative name */\n  if (path == NULL || noenv(L))  /* no environment variable? */\n    lua_pushstring(L, def);  /* use default */\n  else {\n    /* replace \";;\" by \";AUXMARK;\" and then AUXMARK by default path */\n    path = luaL_gsub(L, path, LUA_PATH_SEP LUA_PATH_SEP,\n                              LUA_PATH_SEP AUXMARK LUA_PATH_SEP);\n    luaL_gsub(L, path, AUXMARK, def);\n    lua_remove(L, -2);\n  }\n  setprogdir(L);\n  lua_setfield(L, -2, fieldname);\n}\n\n\nstatic const luaL_Reg pk_funcs[] = {\n  {\"loadlib\", ll_loadlib},\n  {\"searchpath\", ll_searchpath},\n#if defined(LUA_COMPAT_MODULE)\n  {\"seeall\", ll_seeall},\n#endif\n  {NULL, NULL}\n};\n\n\nstatic const luaL_Reg ll_funcs[] = {\n#if defined(LUA_COMPAT_MODULE)\n  {\"module\", ll_module},\n#endif\n  {\"require\", ll_require},\n  {NULL, NULL}\n};\n\n\nstatic void createsearcherstable (lua_State *L) {\n  static const lua_CFunction searchers[] =\n    {searcher_preload, searcher_Lua, searcher_C, searcher_Croot, NULL};\n  int i;\n  /* create 'searchers' table */\n  lua_createtable(L, sizeof(searchers)/sizeof(searchers[0]) - 1, 0);\n  /* fill it with pre-defined searchers */\n  for (i=0; searchers[i] != NULL; i++) {\n    lua_pushvalue(L, -2);  /* set 'package' as upvalue for all searchers */\n    lua_pushcclosure(L, searchers[i], 1);\n    lua_rawseti(L, -2, i+1);\n  }\n}\n\n\nLUAMOD_API int luaopen_package (lua_State *L) {\n  /* create table CLIBS to keep track of loaded C libraries */\n  luaL_getsubtable(L, LUA_REGISTRYINDEX, CLIBS);\n  lua_createtable(L, 0, 1);  /* metatable for CLIBS */\n  lua_pushcfunction(L, gctm);\n  lua_setfield(L, -2, \"__gc\");  /* set finalizer for CLIBS table */\n  lua_setmetatable(L, -2);\n  /* create `package' table */\n  luaL_newlib(L, pk_funcs);\n  createsearcherstable(L);\n#if defined(LUA_COMPAT_LOADERS)\n  lua_pushvalue(L, -1);  /* make a copy of 'searchers' table */\n  lua_setfield(L, -3, \"loaders\");  /* put it in field `loaders' */\n#endif\n  lua_setfield(L, -2, \"searchers\");  /* put it in field 'searchers' */\n  /* set field 'path' */\n  setpath(L, \"path\", LUA_PATHVERSION, LUA_PATH, LUA_PATH_DEFAULT);\n  /* set field 'cpath' */\n  setpath(L, \"cpath\", LUA_CPATHVERSION, LUA_CPATH, LUA_CPATH_DEFAULT);\n  /* store config information */\n  lua_pushliteral(L, LUA_DIRSEP \"\\n\" LUA_PATH_SEP \"\\n\" LUA_PATH_MARK \"\\n\"\n                     LUA_EXEC_DIR \"\\n\" LUA_IGMARK \"\\n\");\n  lua_setfield(L, -2, \"config\");\n  /* set field `loaded' */\n  luaL_getsubtable(L, LUA_REGISTRYINDEX, \"_LOADED\");\n  lua_setfield(L, -2, \"loaded\");\n  /* set field `preload' */\n  luaL_getsubtable(L, LUA_REGISTRYINDEX, \"_PRELOAD\");\n  lua_setfield(L, -2, \"preload\");\n  lua_pushglobaltable(L);\n  lua_pushvalue(L, -2);  /* set 'package' as upvalue for next lib */\n  luaL_setfuncs(L, ll_funcs, 1);  /* open lib into global table */\n  lua_pop(L, 1);  /* pop global table */\n  return 1;  /* return 'package' table */\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lobject.c",
    "content": "/*\n** $Id: lobject.c,v 2.58.1.1 2013/04/12 18:48:47 roberto Exp $\n** Some generic functions over Lua objects\n** See Copyright Notice in lua.h\n*/\n\n#include <stdarg.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define lobject_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lctype.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"lvm.h\"\n\n\n\nLUAI_DDEF const TValue luaO_nilobject_ = {NILCONSTANT};\n\n\n/*\n** converts an integer to a \"floating point byte\", represented as\n** (eeeeexxx), where the real value is (1xxx) * 2^(eeeee - 1) if\n** eeeee != 0 and (xxx) otherwise.\n*/\nint luaO_int2fb (unsigned int x) {\n  int e = 0;  /* exponent */\n  if (x < 8) return x;\n  while (x >= 0x10) {\n    x = (x+1) >> 1;\n    e++;\n  }\n  return ((e+1) << 3) | (cast_int(x) - 8);\n}\n\n\n/* converts back */\nint luaO_fb2int (int x) {\n  int e = (x >> 3) & 0x1f;\n  if (e == 0) return x;\n  else return ((x & 7) + 8) << (e - 1);\n}\n\n\nint luaO_ceillog2 (unsigned int x) {\n  static const lu_byte log_2[256] = {\n    0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,\n    6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,\n    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,\n    7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,\n    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,\n    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,\n    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,\n    8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8\n  };\n  int l = 0;\n  x--;\n  while (x >= 256) { l += 8; x >>= 8; }\n  return l + log_2[x];\n}\n\n\nlua_Number luaO_arith (int op, lua_Number v1, lua_Number v2) {\n  switch (op) {\n    case LUA_OPADD: return luai_numadd(NULL, v1, v2);\n    case LUA_OPSUB: return luai_numsub(NULL, v1, v2);\n    case LUA_OPMUL: return luai_nummul(NULL, v1, v2);\n    case LUA_OPDIV: return luai_numdiv(NULL, v1, v2);\n    case LUA_OPMOD: return luai_nummod(NULL, v1, v2);\n    case LUA_OPPOW: return luai_numpow(NULL, v1, v2);\n    case LUA_OPUNM: return luai_numunm(NULL, v1);\n    default: lua_assert(0); return 0;\n  }\n}\n\n\nint luaO_hexavalue (int c) {\n  if (lisdigit(c)) return c - '0';\n  else return ltolower(c) - 'a' + 10;\n}\n\n\n#if !defined(lua_strx2number)\n\n#include <math.h>\n\n\nstatic int isneg (const char **s) {\n  if (**s == '-') { (*s)++; return 1; }\n  else if (**s == '+') (*s)++;\n  return 0;\n}\n\n\nstatic lua_Number readhexa (const char **s, lua_Number r, int *count) {\n  for (; lisxdigit(cast_uchar(**s)); (*s)++) {  /* read integer part */\n    r = (r * cast_num(16.0)) + cast_num(luaO_hexavalue(cast_uchar(**s)));\n    (*count)++;\n  }\n  return r;\n}\n\n\n/*\n** convert an hexadecimal numeric string to a number, following\n** C99 specification for 'strtod'\n*/\nstatic lua_Number lua_strx2number (const char *s, char **endptr) {\n  lua_Number r = 0.0;\n  int e = 0, i = 0;\n  int neg = 0;  /* 1 if number is negative */\n  *endptr = cast(char *, s);  /* nothing is valid yet */\n  while (lisspace(cast_uchar(*s))) s++;  /* skip initial spaces */\n  neg = isneg(&s);  /* check signal */\n  if (!(*s == '0' && (*(s + 1) == 'x' || *(s + 1) == 'X')))  /* check '0x' */\n    return 0.0;  /* invalid format (no '0x') */\n  s += 2;  /* skip '0x' */\n  r = readhexa(&s, r, &i);  /* read integer part */\n  if (*s == '.') {\n    s++;  /* skip dot */\n    r = readhexa(&s, r, &e);  /* read fractional part */\n  }\n  if (i == 0 && e == 0)\n    return 0.0;  /* invalid format (no digit) */\n  e *= -4;  /* each fractional digit divides value by 2^-4 */\n  *endptr = cast(char *, s);  /* valid up to here */\n  if (*s == 'p' || *s == 'P') {  /* exponent part? */\n    int exp1 = 0;\n    int neg1;\n    s++;  /* skip 'p' */\n    neg1 = isneg(&s);  /* signal */\n    if (!lisdigit(cast_uchar(*s)))\n      goto ret;  /* must have at least one digit */\n    while (lisdigit(cast_uchar(*s)))  /* read exponent */\n      exp1 = exp1 * 10 + *(s++) - '0';\n    if (neg1) exp1 = -exp1;\n    e += exp1;\n  }\n  *endptr = cast(char *, s);  /* valid up to here */\n ret:\n  if (neg) r = -r;\n  return l_mathop(ldexp)(r, e);\n}\n\n#endif\n\n\nint luaO_str2d (const char *s, size_t len, lua_Number *result) {\n  char *endptr;\n  if (strpbrk(s, \"nN\"))  /* reject 'inf' and 'nan' */\n    return 0;\n  else if (strpbrk(s, \"xX\"))  /* hexa? */\n    *result = lua_strx2number(s, &endptr);\n  else\n    *result = lua_str2number(s, &endptr);\n  if (endptr == s) return 0;  /* nothing recognized */\n  while (lisspace(cast_uchar(*endptr))) endptr++;\n  return (endptr == s + len);  /* OK if no trailing characters */\n}\n\n\n\nstatic void pushstr (lua_State *L, const char *str, size_t l) {\n  setsvalue2s(L, L->top++, luaS_newlstr(L, str, l));\n}\n\n\n/* this function handles only `%d', `%c', %f, %p, and `%s' formats */\nconst char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {\n  int n = 0;\n  for (;;) {\n    const char *e = strchr(fmt, '%');\n    if (e == NULL) break;\n    luaD_checkstack(L, 2);  /* fmt + item */\n    pushstr(L, fmt, e - fmt);\n    switch (*(e+1)) {\n      case 's': {\n        const char *s = va_arg(argp, char *);\n        if (s == NULL) s = \"(null)\";\n        pushstr(L, s, strlen(s));\n        break;\n      }\n      case 'c': {\n        char buff;\n        buff = cast(char, va_arg(argp, int));\n        pushstr(L, &buff, 1);\n        break;\n      }\n      case 'd': {\n        setnvalue(L->top++, cast_num(va_arg(argp, int)));\n        break;\n      }\n      case 'f': {\n        setnvalue(L->top++, cast_num(va_arg(argp, l_uacNumber)));\n        break;\n      }\n      case 'p': {\n        char buff[4*sizeof(void *) + 8]; /* should be enough space for a `%p' */\n        int l = sprintf(buff, \"%p\", va_arg(argp, void *));\n        pushstr(L, buff, l);\n        break;\n      }\n      case '%': {\n        pushstr(L, \"%\", 1);\n        break;\n      }\n      default: {\n        luaG_runerror(L,\n            \"invalid option \" LUA_QL(\"%%%c\") \" to \" LUA_QL(\"lua_pushfstring\"),\n            *(e + 1));\n      }\n    }\n    n += 2;\n    fmt = e+2;\n  }\n  luaD_checkstack(L, 1);\n  pushstr(L, fmt, strlen(fmt));\n  if (n > 0) luaV_concat(L, n + 1);\n  return svalue(L->top - 1);\n}\n\n\nconst char *luaO_pushfstring (lua_State *L, const char *fmt, ...) {\n  const char *msg;\n  va_list argp;\n  va_start(argp, fmt);\n  msg = luaO_pushvfstring(L, fmt, argp);\n  va_end(argp);\n  return msg;\n}\n\n\n/* number of chars of a literal string without the ending \\0 */\n#define LL(x)\t(sizeof(x)/sizeof(char) - 1)\n\n#define RETS\t\"...\"\n#define PRE\t\"[string \\\"\"\n#define POS\t\"\\\"]\"\n\n#define addstr(a,b,l)\t( memcpy(a,b,(l) * sizeof(char)), a += (l) )\n\nvoid luaO_chunkid (char *out, const char *source, size_t bufflen) {\n  size_t l = strlen(source);\n  if (*source == '=') {  /* 'literal' source */\n    if (l <= bufflen)  /* small enough? */\n      memcpy(out, source + 1, l * sizeof(char));\n    else {  /* truncate it */\n      addstr(out, source + 1, bufflen - 1);\n      *out = '\\0';\n    }\n  }\n  else if (*source == '@') {  /* file name */\n    if (l <= bufflen)  /* small enough? */\n      memcpy(out, source + 1, l * sizeof(char));\n    else {  /* add '...' before rest of name */\n      addstr(out, RETS, LL(RETS));\n      bufflen -= LL(RETS);\n      memcpy(out, source + 1 + l - bufflen, bufflen * sizeof(char));\n    }\n  }\n  else {  /* string; format as [string \"source\"] */\n    const char *nl = strchr(source, '\\n');  /* find first new line (if any) */\n    addstr(out, PRE, LL(PRE));  /* add prefix */\n    bufflen -= LL(PRE RETS POS) + 1;  /* save space for prefix+suffix+'\\0' */\n    if (l < bufflen && nl == NULL) {  /* small one-line source? */\n      addstr(out, source, l);  /* keep it */\n    }\n    else {\n      if (nl != NULL) l = nl - source;  /* stop at first newline */\n      if (l > bufflen) l = bufflen;\n      addstr(out, source, l);\n      addstr(out, RETS, LL(RETS));\n    }\n    memcpy(out, POS, (LL(POS) + 1) * sizeof(char));\n  }\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lobject.h",
    "content": "/*\n** $Id: lobject.h,v 2.71.1.2 2014/05/07 14:14:58 roberto Exp $\n** Type definitions for Lua objects\n** See Copyright Notice in lua.h\n*/\n\n\n#ifndef lobject_h\n#define lobject_h\n\n\n#include <stdarg.h>\n\n\n#include \"llimits.h\"\n#include \"lua.h\"\n\n\n/*\n** Extra tags for non-values\n*/\n#define LUA_TPROTO\tLUA_NUMTAGS\n#define LUA_TUPVAL\t(LUA_NUMTAGS+1)\n#define LUA_TDEADKEY\t(LUA_NUMTAGS+2)\n\n/*\n** number of all possible tags (including LUA_TNONE but excluding DEADKEY)\n*/\n#define LUA_TOTALTAGS\t(LUA_TUPVAL+2)\n\n\n/*\n** tags for Tagged Values have the following use of bits:\n** bits 0-3: actual tag (a LUA_T* value)\n** bits 4-5: variant bits\n** bit 6: whether value is collectable\n*/\n\n#define VARBITS\t\t(3 << 4)\n\n\n/*\n** LUA_TFUNCTION variants:\n** 0 - Lua function\n** 1 - light C function\n** 2 - regular C function (closure)\n*/\n\n/* Variant tags for functions */\n#define LUA_TLCL\t(LUA_TFUNCTION | (0 << 4))  /* Lua closure */\n#define LUA_TLCF\t(LUA_TFUNCTION | (1 << 4))  /* light C function */\n#define LUA_TCCL\t(LUA_TFUNCTION | (2 << 4))  /* C closure */\n\n\n/* Variant tags for strings */\n#define LUA_TSHRSTR\t(LUA_TSTRING | (0 << 4))  /* short strings */\n#define LUA_TLNGSTR\t(LUA_TSTRING | (1 << 4))  /* long strings */\n\n\n/* Bit mark for collectable types */\n#define BIT_ISCOLLECTABLE\t(1 << 6)\n\n/* mark a tag as collectable */\n#define ctb(t)\t\t\t((t) | BIT_ISCOLLECTABLE)\n\n\n/*\n** Union of all collectable objects\n*/\ntypedef union GCObject GCObject;\n\n\n/*\n** Common Header for all collectable objects (in macro form, to be\n** included in other objects)\n*/\n#define CommonHeader\tGCObject *next; lu_byte tt; lu_byte marked\n\n\n/*\n** Common header in struct form\n*/\ntypedef struct GCheader {\n  CommonHeader;\n} GCheader;\n\n\n\n/*\n** Union of all Lua values\n*/\ntypedef union Value Value;\n\n\n#define numfield\tlua_Number n;    /* numbers */\n\n\n\n/*\n** Tagged Values. This is the basic representation of values in Lua,\n** an actual value plus a tag with its type.\n*/\n\n#define TValuefields\tValue value_; int tt_\n\ntypedef struct lua_TValue TValue;\n\n\n/* macro defining a nil value */\n#define NILCONSTANT\t{NULL}, LUA_TNIL\n\n\n#define val_(o)\t\t((o)->value_)\n#define num_(o)\t\t(val_(o).n)\n\n\n/* raw type tag of a TValue */\n#define rttype(o)\t((o)->tt_)\n\n/* tag with no variants (bits 0-3) */\n#define novariant(x)\t((x) & 0x0F)\n\n/* type tag of a TValue (bits 0-3 for tags + variant bits 4-5) */\n#define ttype(o)\t(rttype(o) & 0x3F)\n\n/* type tag of a TValue with no variants (bits 0-3) */\n#define ttypenv(o)\t(novariant(rttype(o)))\n\n\n/* Macros to test type */\n#define checktag(o,t)\t\t(rttype(o) == (t))\n#define checktype(o,t)\t\t(ttypenv(o) == (t))\n#define ttisnumber(o)\t\tchecktag((o), LUA_TNUMBER)\n#define ttisnil(o)\t\tchecktag((o), LUA_TNIL)\n#define ttisboolean(o)\t\tchecktag((o), LUA_TBOOLEAN)\n#define ttislightuserdata(o)\tchecktag((o), LUA_TLIGHTUSERDATA)\n#define ttisstring(o)\t\tchecktype((o), LUA_TSTRING)\n#define ttisshrstring(o)\tchecktag((o), ctb(LUA_TSHRSTR))\n#define ttislngstring(o)\tchecktag((o), ctb(LUA_TLNGSTR))\n#define ttistable(o)\t\tchecktag((o), ctb(LUA_TTABLE))\n#define ttisfunction(o)\t\tchecktype(o, LUA_TFUNCTION)\n#define ttisclosure(o)\t\t((rttype(o) & 0x1F) == LUA_TFUNCTION)\n#define ttisCclosure(o)\t\tchecktag((o), ctb(LUA_TCCL))\n#define ttisLclosure(o)\t\tchecktag((o), ctb(LUA_TLCL))\n#define ttislcf(o)\t\tchecktag((o), LUA_TLCF)\n#define ttisuserdata(o)\t\tchecktag((o), ctb(LUA_TUSERDATA))\n#define ttisthread(o)\t\tchecktag((o), ctb(LUA_TTHREAD))\n#define ttisdeadkey(o)\t\tchecktag((o), LUA_TDEADKEY)\n\n#define ttisequal(o1,o2)\t(rttype(o1) == rttype(o2))\n\n/* Macros to access values */\n#define nvalue(o)\tcheck_exp(ttisnumber(o), num_(o))\n#define gcvalue(o)\tcheck_exp(iscollectable(o), val_(o).gc)\n#define pvalue(o)\tcheck_exp(ttislightuserdata(o), val_(o).p)\n#define rawtsvalue(o)\tcheck_exp(ttisstring(o), &val_(o).gc->ts)\n#define tsvalue(o)\t(&rawtsvalue(o)->tsv)\n#define rawuvalue(o)\tcheck_exp(ttisuserdata(o), &val_(o).gc->u)\n#define uvalue(o)\t(&rawuvalue(o)->uv)\n#define clvalue(o)\tcheck_exp(ttisclosure(o), &val_(o).gc->cl)\n#define clLvalue(o)\tcheck_exp(ttisLclosure(o), &val_(o).gc->cl.l)\n#define clCvalue(o)\tcheck_exp(ttisCclosure(o), &val_(o).gc->cl.c)\n#define fvalue(o)\tcheck_exp(ttislcf(o), val_(o).f)\n#define hvalue(o)\tcheck_exp(ttistable(o), &val_(o).gc->h)\n#define bvalue(o)\tcheck_exp(ttisboolean(o), val_(o).b)\n#define thvalue(o)\tcheck_exp(ttisthread(o), &val_(o).gc->th)\n/* a dead value may get the 'gc' field, but cannot access its contents */\n#define deadvalue(o)\tcheck_exp(ttisdeadkey(o), cast(void *, val_(o).gc))\n\n#define l_isfalse(o)\t(ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0))\n\n\n#define iscollectable(o)\t(rttype(o) & BIT_ISCOLLECTABLE)\n\n\n/* Macros for internal tests */\n#define righttt(obj)\t\t(ttype(obj) == gcvalue(obj)->gch.tt)\n\n#define checkliveness(g,obj) \\\n\tlua_longassert(!iscollectable(obj) || \\\n\t\t\t(righttt(obj) && !isdead(g,gcvalue(obj))))\n\n\n/* Macros to set values */\n#define settt_(o,t)\t((o)->tt_=(t))\n\n#define setnvalue(obj,x) \\\n  { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); }\n\n#define setnilvalue(obj) settt_(obj, LUA_TNIL)\n\n#define setfvalue(obj,x) \\\n  { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); }\n\n#define setpvalue(obj,x) \\\n  { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); }\n\n#define setbvalue(obj,x) \\\n  { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); }\n\n#define setgcovalue(L,obj,x) \\\n  { TValue *io=(obj); GCObject *i_g=(x); \\\n    val_(io).gc=i_g; settt_(io, ctb(gch(i_g)->tt)); }\n\n#define setsvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    TString *x_ = (x); \\\n    val_(io).gc=cast(GCObject *, x_); settt_(io, ctb(x_->tsv.tt)); \\\n    checkliveness(G(L),io); }\n\n#define setuvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TUSERDATA)); \\\n    checkliveness(G(L),io); }\n\n#define setthvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTHREAD)); \\\n    checkliveness(G(L),io); }\n\n#define setclLvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TLCL)); \\\n    checkliveness(G(L),io); }\n\n#define setclCvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TCCL)); \\\n    checkliveness(G(L),io); }\n\n#define sethvalue(L,obj,x) \\\n  { TValue *io=(obj); \\\n    val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTABLE)); \\\n    checkliveness(G(L),io); }\n\n#define setdeadvalue(obj)\tsettt_(obj, LUA_TDEADKEY)\n\n\n\n#define setobj(L,obj1,obj2) \\\n\t{ const TValue *io2=(obj2); TValue *io1=(obj1); \\\n\t  io1->value_ = io2->value_; io1->tt_ = io2->tt_; \\\n\t  checkliveness(G(L),io1); }\n\n\n/*\n** different types of assignments, according to destination\n*/\n\n/* from stack to (same) stack */\n#define setobjs2s\tsetobj\n/* to stack (not from same stack) */\n#define setobj2s\tsetobj\n#define setsvalue2s\tsetsvalue\n#define sethvalue2s\tsethvalue\n#define setptvalue2s\tsetptvalue\n/* from table to same table */\n#define setobjt2t\tsetobj\n/* to table */\n#define setobj2t\tsetobj\n/* to new object */\n#define setobj2n\tsetobj\n#define setsvalue2n\tsetsvalue\n\n\n/* check whether a number is valid (useful only for NaN trick) */\n#define luai_checknum(L,o,c)\t{ /* empty */ }\n\n\n/*\n** {======================================================\n** NaN Trick\n** =======================================================\n*/\n#if defined(LUA_NANTRICK)\n\n/*\n** numbers are represented in the 'd_' field. All other values have the\n** value (NNMARK | tag) in 'tt__'. A number with such pattern would be\n** a \"signaled NaN\", which is never generated by regular operations by\n** the CPU (nor by 'strtod')\n*/\n\n/* allows for external implementation for part of the trick */\n#if !defined(NNMARK)\t/* { */\n\n\n#if !defined(LUA_IEEEENDIAN)\n#error option 'LUA_NANTRICK' needs 'LUA_IEEEENDIAN'\n#endif\n\n\n#define NNMARK\t\t0x7FF7A500\n#define NNMASK\t\t0x7FFFFF00\n\n#undef TValuefields\n#undef NILCONSTANT\n\n#if (LUA_IEEEENDIAN == 0)\t/* { */\n\n/* little endian */\n#define TValuefields  \\\n\tunion { struct { Value v__; int tt__; } i; double d__; } u\n#define NILCONSTANT\t{{{NULL}, tag2tt(LUA_TNIL)}}\n/* field-access macros */\n#define v_(o)\t\t((o)->u.i.v__)\n#define d_(o)\t\t((o)->u.d__)\n#define tt_(o)\t\t((o)->u.i.tt__)\n\n#else\t\t\t\t/* }{ */\n\n/* big endian */\n#define TValuefields  \\\n\tunion { struct { int tt__; Value v__; } i; double d__; } u\n#define NILCONSTANT\t{{tag2tt(LUA_TNIL), {NULL}}}\n/* field-access macros */\n#define v_(o)\t\t((o)->u.i.v__)\n#define d_(o)\t\t((o)->u.d__)\n#define tt_(o)\t\t((o)->u.i.tt__)\n\n#endif\t\t\t\t/* } */\n\n#endif\t\t\t/* } */\n\n\n/* correspondence with standard representation */\n#undef val_\n#define val_(o)\t\tv_(o)\n#undef num_\n#define num_(o)\t\td_(o)\n\n\n#undef numfield\n#define numfield\t/* no such field; numbers are the entire struct */\n\n/* basic check to distinguish numbers from non-numbers */\n#undef ttisnumber\n#define ttisnumber(o)\t((tt_(o) & NNMASK) != NNMARK)\n\n#define tag2tt(t)\t(NNMARK | (t))\n\n#undef rttype\n#define rttype(o)\t(ttisnumber(o) ? LUA_TNUMBER : tt_(o) & 0xff)\n\n#undef settt_\n#define settt_(o,t)\t(tt_(o) = tag2tt(t))\n\n#undef setnvalue\n#define setnvalue(obj,x) \\\n\t{ TValue *io_=(obj); num_(io_)=(x); lua_assert(ttisnumber(io_)); }\n\n#undef setobj\n#define setobj(L,obj1,obj2) \\\n\t{ const TValue *o2_=(obj2); TValue *o1_=(obj1); \\\n\t  o1_->u = o2_->u; \\\n\t  checkliveness(G(L),o1_); }\n\n\n/*\n** these redefinitions are not mandatory, but these forms are more efficient\n*/\n\n#undef checktag\n#undef checktype\n#define checktag(o,t)\t(tt_(o) == tag2tt(t))\n#define checktype(o,t)\t(ctb(tt_(o) | VARBITS) == ctb(tag2tt(t) | VARBITS))\n\n#undef ttisequal\n#define ttisequal(o1,o2)  \\\n\t(ttisnumber(o1) ? ttisnumber(o2) : (tt_(o1) == tt_(o2)))\n\n\n#undef luai_checknum\n#define luai_checknum(L,o,c)\t{ if (!ttisnumber(o)) c; }\n\n#endif\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** types and prototypes\n** =======================================================\n*/\n\n\nunion Value {\n  GCObject *gc;    /* collectable objects */\n  void *p;         /* light userdata */\n  int b;           /* booleans */\n  lua_CFunction f; /* light C functions */\n  numfield         /* numbers */\n};\n\n\nstruct lua_TValue {\n  TValuefields;\n};\n\n\ntypedef TValue *StkId;  /* index to stack elements */\n\n\n\n\n/*\n** Header for string value; string bytes follow the end of this structure\n*/\ntypedef union TString {\n  L_Umaxalign dummy;  /* ensures maximum alignment for strings */\n  struct {\n    CommonHeader;\n    lu_byte extra;  /* reserved words for short strings; \"has hash\" for longs */\n    unsigned int hash;\n    size_t len;  /* number of characters in string */\n  } tsv;\n} TString;\n\n\n/* get the actual string (array of bytes) from a TString */\n#define getstr(ts)\tcast(const char *, (ts) + 1)\n\n/* get the actual string (array of bytes) from a Lua value */\n#define svalue(o)       getstr(rawtsvalue(o))\n\n\n/*\n** Header for userdata; memory area follows the end of this structure\n*/\ntypedef union Udata {\n  L_Umaxalign dummy;  /* ensures maximum alignment for `local' udata */\n  struct {\n    CommonHeader;\n    struct Table *metatable;\n    struct Table *env;\n    size_t len;  /* number of bytes */\n  } uv;\n} Udata;\n\n\n\n/*\n** Description of an upvalue for function prototypes\n*/\ntypedef struct Upvaldesc {\n  TString *name;  /* upvalue name (for debug information) */\n  lu_byte instack;  /* whether it is in stack */\n  lu_byte idx;  /* index of upvalue (in stack or in outer function's list) */\n} Upvaldesc;\n\n\n/*\n** Description of a local variable for function prototypes\n** (used for debug information)\n*/\ntypedef struct LocVar {\n  TString *varname;\n  int startpc;  /* first point where variable is active */\n  int endpc;    /* first point where variable is dead */\n} LocVar;\n\n\n/*\n** Function Prototypes\n*/\ntypedef struct Proto {\n  CommonHeader;\n  TValue *k;  /* constants used by the function */\n  Instruction *code;\n  struct Proto **p;  /* functions defined inside the function */\n  int *lineinfo;  /* map from opcodes to source lines (debug information) */\n  LocVar *locvars;  /* information about local variables (debug information) */\n  Upvaldesc *upvalues;  /* upvalue information */\n  union Closure *cache;  /* last created closure with this prototype */\n  TString  *source;  /* used for debug information */\n  int sizeupvalues;  /* size of 'upvalues' */\n  int sizek;  /* size of `k' */\n  int sizecode;\n  int sizelineinfo;\n  int sizep;  /* size of `p' */\n  int sizelocvars;\n  int linedefined;\n  int lastlinedefined;\n  GCObject *gclist;\n  lu_byte numparams;  /* number of fixed parameters */\n  lu_byte is_vararg;\n  lu_byte maxstacksize;  /* maximum stack used by this function */\n} Proto;\n\n\n\n/*\n** Lua Upvalues\n*/\ntypedef struct UpVal {\n  CommonHeader;\n  TValue *v;  /* points to stack or to its own value */\n  union {\n    TValue value;  /* the value (when closed) */\n    struct {  /* double linked list (when open) */\n      struct UpVal *prev;\n      struct UpVal *next;\n    } l;\n  } u;\n} UpVal;\n\n\n/*\n** Closures\n*/\n\n#define ClosureHeader \\\n\tCommonHeader; lu_byte nupvalues; GCObject *gclist\n\ntypedef struct CClosure {\n  ClosureHeader;\n  lua_CFunction f;\n  TValue upvalue[1];  /* list of upvalues */\n} CClosure;\n\n\ntypedef struct LClosure {\n  ClosureHeader;\n  struct Proto *p;\n  UpVal *upvals[1];  /* list of upvalues */\n} LClosure;\n\n\ntypedef union Closure {\n  CClosure c;\n  LClosure l;\n} Closure;\n\n\n#define isLfunction(o)\tttisLclosure(o)\n\n#define getproto(o)\t(clLvalue(o)->p)\n\n\n/*\n** Tables\n*/\n\ntypedef union TKey {\n  struct {\n    TValuefields;\n    struct Node *next;  /* for chaining */\n  } nk;\n  TValue tvk;\n} TKey;\n\n\ntypedef struct Node {\n  TValue i_val;\n  TKey i_key;\n} Node;\n\n\ntypedef struct Table {\n  CommonHeader;\n  lu_byte flags;  /* 1<<p means tagmethod(p) is not present */\n  lu_byte lsizenode;  /* log2 of size of `node' array */\n  int sizearray;  /* size of `array' array */\n  TValue *array;  /* array part */\n  Node *node;\n  Node *lastfree;  /* any free position is before this position */\n  struct Table *metatable;\n  GCObject *gclist;\n} Table;\n\n\n\n/*\n** `module' operation for hashing (size is always a power of 2)\n*/\n#define lmod(s,size) \\\n\t(check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))))\n\n\n#define twoto(x)\t(1<<(x))\n#define sizenode(t)\t(twoto((t)->lsizenode))\n\n\n/*\n** (address of) a fixed nil value\n*/\n#define luaO_nilobject\t\t(&luaO_nilobject_)\n\n\nLUAI_DDEC const TValue luaO_nilobject_;\n\n\nLUAI_FUNC int luaO_int2fb (unsigned int x);\nLUAI_FUNC int luaO_fb2int (int x);\nLUAI_FUNC int luaO_ceillog2 (unsigned int x);\nLUAI_FUNC lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2);\nLUAI_FUNC int luaO_str2d (const char *s, size_t len, lua_Number *result);\nLUAI_FUNC int luaO_hexavalue (int c);\nLUAI_FUNC const char *luaO_pushvfstring (lua_State *L, const char *fmt,\n                                                       va_list argp);\nLUAI_FUNC const char *luaO_pushfstring (lua_State *L, const char *fmt, ...);\nLUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len);\n\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/lopcodes.c",
    "content": "/*\n** $Id: lopcodes.c,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $\n** Opcodes for Lua virtual machine\n** See Copyright Notice in lua.h\n*/\n\n\n#define lopcodes_c\n#define LUA_CORE\n\n\n#include \"lopcodes.h\"\n\n\n/* ORDER OP */\n\nLUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {\n  \"MOVE\",\n  \"LOADK\",\n  \"LOADKX\",\n  \"LOADBOOL\",\n  \"LOADNIL\",\n  \"GETUPVAL\",\n  \"GETTABUP\",\n  \"GETTABLE\",\n  \"SETTABUP\",\n  \"SETUPVAL\",\n  \"SETTABLE\",\n  \"NEWTABLE\",\n  \"SELF\",\n  \"ADD\",\n  \"SUB\",\n  \"MUL\",\n  \"DIV\",\n  \"MOD\",\n  \"POW\",\n  \"UNM\",\n  \"NOT\",\n  \"LEN\",\n  \"CONCAT\",\n  \"JMP\",\n  \"EQ\",\n  \"LT\",\n  \"LE\",\n  \"TEST\",\n  \"TESTSET\",\n  \"CALL\",\n  \"TAILCALL\",\n  \"RETURN\",\n  \"FORLOOP\",\n  \"FORPREP\",\n  \"TFORCALL\",\n  \"TFORLOOP\",\n  \"SETLIST\",\n  \"CLOSURE\",\n  \"VARARG\",\n  \"EXTRAARG\",\n  NULL\n};\n\n\n#define opmode(t,a,b,c,m) (((t)<<7) | ((a)<<6) | ((b)<<4) | ((c)<<2) | (m))\n\nLUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {\n/*       T  A    B       C     mode\t\t   opcode\t*/\n  opmode(0, 1, OpArgR, OpArgN, iABC)\t\t/* OP_MOVE */\n ,opmode(0, 1, OpArgK, OpArgN, iABx)\t\t/* OP_LOADK */\n ,opmode(0, 1, OpArgN, OpArgN, iABx)\t\t/* OP_LOADKX */\n ,opmode(0, 1, OpArgU, OpArgU, iABC)\t\t/* OP_LOADBOOL */\n ,opmode(0, 1, OpArgU, OpArgN, iABC)\t\t/* OP_LOADNIL */\n ,opmode(0, 1, OpArgU, OpArgN, iABC)\t\t/* OP_GETUPVAL */\n ,opmode(0, 1, OpArgU, OpArgK, iABC)\t\t/* OP_GETTABUP */\n ,opmode(0, 1, OpArgR, OpArgK, iABC)\t\t/* OP_GETTABLE */\n ,opmode(0, 0, OpArgK, OpArgK, iABC)\t\t/* OP_SETTABUP */\n ,opmode(0, 0, OpArgU, OpArgN, iABC)\t\t/* OP_SETUPVAL */\n ,opmode(0, 0, OpArgK, OpArgK, iABC)\t\t/* OP_SETTABLE */\n ,opmode(0, 1, OpArgU, OpArgU, iABC)\t\t/* OP_NEWTABLE */\n ,opmode(0, 1, OpArgR, OpArgK, iABC)\t\t/* OP_SELF */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_ADD */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_SUB */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_MUL */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_DIV */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_MOD */\n ,opmode(0, 1, OpArgK, OpArgK, iABC)\t\t/* OP_POW */\n ,opmode(0, 1, OpArgR, OpArgN, iABC)\t\t/* OP_UNM */\n ,opmode(0, 1, OpArgR, OpArgN, iABC)\t\t/* OP_NOT */\n ,opmode(0, 1, OpArgR, OpArgN, iABC)\t\t/* OP_LEN */\n ,opmode(0, 1, OpArgR, OpArgR, iABC)\t\t/* OP_CONCAT */\n ,opmode(0, 0, OpArgR, OpArgN, iAsBx)\t\t/* OP_JMP */\n ,opmode(1, 0, OpArgK, OpArgK, iABC)\t\t/* OP_EQ */\n ,opmode(1, 0, OpArgK, OpArgK, iABC)\t\t/* OP_LT */\n ,opmode(1, 0, OpArgK, OpArgK, iABC)\t\t/* OP_LE */\n ,opmode(1, 0, OpArgN, OpArgU, iABC)\t\t/* OP_TEST */\n ,opmode(1, 1, OpArgR, OpArgU, iABC)\t\t/* OP_TESTSET */\n ,opmode(0, 1, OpArgU, OpArgU, iABC)\t\t/* OP_CALL */\n ,opmode(0, 1, OpArgU, OpArgU, iABC)\t\t/* OP_TAILCALL */\n ,opmode(0, 0, OpArgU, OpArgN, iABC)\t\t/* OP_RETURN */\n ,opmode(0, 1, OpArgR, OpArgN, iAsBx)\t\t/* OP_FORLOOP */\n ,opmode(0, 1, OpArgR, OpArgN, iAsBx)\t\t/* OP_FORPREP */\n ,opmode(0, 0, OpArgN, OpArgU, iABC)\t\t/* OP_TFORCALL */\n ,opmode(0, 1, OpArgR, OpArgN, iAsBx)\t\t/* OP_TFORLOOP */\n ,opmode(0, 0, OpArgU, OpArgU, iABC)\t\t/* OP_SETLIST */\n ,opmode(0, 1, OpArgU, OpArgN, iABx)\t\t/* OP_CLOSURE */\n ,opmode(0, 1, OpArgU, OpArgN, iABC)\t\t/* OP_VARARG */\n ,opmode(0, 0, OpArgU, OpArgU, iAx)\t\t/* OP_EXTRAARG */\n};\n\n"
  },
  {
    "path": "src/lib/lua52/lopcodes.h",
    "content": "/*\n** $Id: lopcodes.h,v 1.142.1.2 2014/10/20 18:32:09 roberto Exp $\n** Opcodes for Lua virtual machine\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lopcodes_h\n#define lopcodes_h\n\n#include \"llimits.h\"\n\n\n/*===========================================================================\n  We assume that instructions are unsigned numbers.\n  All instructions have an opcode in the first 6 bits.\n  Instructions can have the following fields:\n\t`A' : 8 bits\n\t`B' : 9 bits\n\t`C' : 9 bits\n\t'Ax' : 26 bits ('A', 'B', and 'C' together)\n\t`Bx' : 18 bits (`B' and `C' together)\n\t`sBx' : signed Bx\n\n  A signed argument is represented in excess K; that is, the number\n  value is the unsigned value minus K. K is exactly the maximum value\n  for that argument (so that -max is represented by 0, and +max is\n  represented by 2*max), which is half the maximum for the corresponding\n  unsigned argument.\n===========================================================================*/\n\n\nenum OpMode {iABC, iABx, iAsBx, iAx};  /* basic instruction format */\n\n\n/*\n** size and position of opcode arguments.\n*/\n#define SIZE_C\t\t9\n#define SIZE_B\t\t9\n#define SIZE_Bx\t\t(SIZE_C + SIZE_B)\n#define SIZE_A\t\t8\n#define SIZE_Ax\t\t(SIZE_C + SIZE_B + SIZE_A)\n\n#define SIZE_OP\t\t6\n\n#define POS_OP\t\t0\n#define POS_A\t\t(POS_OP + SIZE_OP)\n#define POS_C\t\t(POS_A + SIZE_A)\n#define POS_B\t\t(POS_C + SIZE_C)\n#define POS_Bx\t\tPOS_C\n#define POS_Ax\t\tPOS_A\n\n\n/*\n** limits for opcode arguments.\n** we use (signed) int to manipulate most arguments,\n** so they must fit in LUAI_BITSINT-1 bits (-1 for sign)\n*/\n#if SIZE_Bx < LUAI_BITSINT-1\n#define MAXARG_Bx        ((1<<SIZE_Bx)-1)\n#define MAXARG_sBx        (MAXARG_Bx>>1)         /* `sBx' is signed */\n#else\n#define MAXARG_Bx        MAX_INT\n#define MAXARG_sBx        MAX_INT\n#endif\n\n#if SIZE_Ax < LUAI_BITSINT-1\n#define MAXARG_Ax\t((1<<SIZE_Ax)-1)\n#else\n#define MAXARG_Ax\tMAX_INT\n#endif\n\n\n#define MAXARG_A        ((1<<SIZE_A)-1)\n#define MAXARG_B        ((1<<SIZE_B)-1)\n#define MAXARG_C        ((1<<SIZE_C)-1)\n\n\n/* creates a mask with `n' 1 bits at position `p' */\n#define MASK1(n,p)\t((~((~(Instruction)0)<<(n)))<<(p))\n\n/* creates a mask with `n' 0 bits at position `p' */\n#define MASK0(n,p)\t(~MASK1(n,p))\n\n/*\n** the following macros help to manipulate instructions\n*/\n\n#define GET_OPCODE(i)\t(cast(OpCode, ((i)>>POS_OP) & MASK1(SIZE_OP,0)))\n#define SET_OPCODE(i,o)\t((i) = (((i)&MASK0(SIZE_OP,POS_OP)) | \\\n\t\t((cast(Instruction, o)<<POS_OP)&MASK1(SIZE_OP,POS_OP))))\n\n#define getarg(i,pos,size)\t(cast(int, ((i)>>pos) & MASK1(size,0)))\n#define setarg(i,v,pos,size)\t((i) = (((i)&MASK0(size,pos)) | \\\n                ((cast(Instruction, v)<<pos)&MASK1(size,pos))))\n\n#define GETARG_A(i)\tgetarg(i, POS_A, SIZE_A)\n#define SETARG_A(i,v)\tsetarg(i, v, POS_A, SIZE_A)\n\n#define GETARG_B(i)\tgetarg(i, POS_B, SIZE_B)\n#define SETARG_B(i,v)\tsetarg(i, v, POS_B, SIZE_B)\n\n#define GETARG_C(i)\tgetarg(i, POS_C, SIZE_C)\n#define SETARG_C(i,v)\tsetarg(i, v, POS_C, SIZE_C)\n\n#define GETARG_Bx(i)\tgetarg(i, POS_Bx, SIZE_Bx)\n#define SETARG_Bx(i,v)\tsetarg(i, v, POS_Bx, SIZE_Bx)\n\n#define GETARG_Ax(i)\tgetarg(i, POS_Ax, SIZE_Ax)\n#define SETARG_Ax(i,v)\tsetarg(i, v, POS_Ax, SIZE_Ax)\n\n#define GETARG_sBx(i)\t(GETARG_Bx(i)-MAXARG_sBx)\n#define SETARG_sBx(i,b)\tSETARG_Bx((i),cast(unsigned int, (b)+MAXARG_sBx))\n\n\n#define CREATE_ABC(o,a,b,c)\t((cast(Instruction, o)<<POS_OP) \\\n\t\t\t| (cast(Instruction, a)<<POS_A) \\\n\t\t\t| (cast(Instruction, b)<<POS_B) \\\n\t\t\t| (cast(Instruction, c)<<POS_C))\n\n#define CREATE_ABx(o,a,bc)\t((cast(Instruction, o)<<POS_OP) \\\n\t\t\t| (cast(Instruction, a)<<POS_A) \\\n\t\t\t| (cast(Instruction, bc)<<POS_Bx))\n\n#define CREATE_Ax(o,a)\t\t((cast(Instruction, o)<<POS_OP) \\\n\t\t\t| (cast(Instruction, a)<<POS_Ax))\n\n\n/*\n** Macros to operate RK indices\n*/\n\n/* this bit 1 means constant (0 means register) */\n#define BITRK\t\t(1 << (SIZE_B - 1))\n\n/* test whether value is a constant */\n#define ISK(x)\t\t((x) & BITRK)\n\n/* gets the index of the constant */\n#define INDEXK(r)\t((int)(r) & ~BITRK)\n\n#define MAXINDEXRK\t(BITRK - 1)\n\n/* code a constant index as a RK value */\n#define RKASK(x)\t((x) | BITRK)\n\n\n/*\n** invalid register that fits in 8 bits\n*/\n#define NO_REG\t\tMAXARG_A\n\n\n/*\n** R(x) - register\n** Kst(x) - constant (in constant table)\n** RK(x) == if ISK(x) then Kst(INDEXK(x)) else R(x)\n*/\n\n\n/*\n** grep \"ORDER OP\" if you change these enums\n*/\n\ntypedef enum {\n/*----------------------------------------------------------------------\nname\t\targs\tdescription\n------------------------------------------------------------------------*/\nOP_MOVE,/*\tA B\tR(A) := R(B)\t\t\t\t\t*/\nOP_LOADK,/*\tA Bx\tR(A) := Kst(Bx)\t\t\t\t\t*/\nOP_LOADKX,/*\tA \tR(A) := Kst(extra arg)\t\t\t\t*/\nOP_LOADBOOL,/*\tA B C\tR(A) := (Bool)B; if (C) pc++\t\t\t*/\nOP_LOADNIL,/*\tA B\tR(A), R(A+1), ..., R(A+B) := nil\t\t*/\nOP_GETUPVAL,/*\tA B\tR(A) := UpValue[B]\t\t\t\t*/\n\nOP_GETTABUP,/*\tA B C\tR(A) := UpValue[B][RK(C)]\t\t\t*/\nOP_GETTABLE,/*\tA B C\tR(A) := R(B)[RK(C)]\t\t\t\t*/\n\nOP_SETTABUP,/*\tA B C\tUpValue[A][RK(B)] := RK(C)\t\t\t*/\nOP_SETUPVAL,/*\tA B\tUpValue[B] := R(A)\t\t\t\t*/\nOP_SETTABLE,/*\tA B C\tR(A)[RK(B)] := RK(C)\t\t\t\t*/\n\nOP_NEWTABLE,/*\tA B C\tR(A) := {} (size = B,C)\t\t\t\t*/\n\nOP_SELF,/*\tA B C\tR(A+1) := R(B); R(A) := R(B)[RK(C)]\t\t*/\n\nOP_ADD,/*\tA B C\tR(A) := RK(B) + RK(C)\t\t\t\t*/\nOP_SUB,/*\tA B C\tR(A) := RK(B) - RK(C)\t\t\t\t*/\nOP_MUL,/*\tA B C\tR(A) := RK(B) * RK(C)\t\t\t\t*/\nOP_DIV,/*\tA B C\tR(A) := RK(B) / RK(C)\t\t\t\t*/\nOP_MOD,/*\tA B C\tR(A) := RK(B) % RK(C)\t\t\t\t*/\nOP_POW,/*\tA B C\tR(A) := RK(B) ^ RK(C)\t\t\t\t*/\nOP_UNM,/*\tA B\tR(A) := -R(B)\t\t\t\t\t*/\nOP_NOT,/*\tA B\tR(A) := not R(B)\t\t\t\t*/\nOP_LEN,/*\tA B\tR(A) := length of R(B)\t\t\t\t*/\n\nOP_CONCAT,/*\tA B C\tR(A) := R(B).. ... ..R(C)\t\t\t*/\n\nOP_JMP,/*\tA sBx\tpc+=sBx; if (A) close all upvalues >= R(A - 1)\t*/\nOP_EQ,/*\tA B C\tif ((RK(B) == RK(C)) ~= A) then pc++\t\t*/\nOP_LT,/*\tA B C\tif ((RK(B) <  RK(C)) ~= A) then pc++\t\t*/\nOP_LE,/*\tA B C\tif ((RK(B) <= RK(C)) ~= A) then pc++\t\t*/\n\nOP_TEST,/*\tA C\tif not (R(A) <=> C) then pc++\t\t\t*/\nOP_TESTSET,/*\tA B C\tif (R(B) <=> C) then R(A) := R(B) else pc++\t*/\n\nOP_CALL,/*\tA B C\tR(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */\nOP_TAILCALL,/*\tA B C\treturn R(A)(R(A+1), ... ,R(A+B-1))\t\t*/\nOP_RETURN,/*\tA B\treturn R(A), ... ,R(A+B-2)\t(see note)\t*/\n\nOP_FORLOOP,/*\tA sBx\tR(A)+=R(A+2);\n\t\t\tif R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/\nOP_FORPREP,/*\tA sBx\tR(A)-=R(A+2); pc+=sBx\t\t\t\t*/\n\nOP_TFORCALL,/*\tA C\tR(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));\t*/\nOP_TFORLOOP,/*\tA sBx\tif R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/\n\nOP_SETLIST,/*\tA B C\tR(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B\t*/\n\nOP_CLOSURE,/*\tA Bx\tR(A) := closure(KPROTO[Bx])\t\t\t*/\n\nOP_VARARG,/*\tA B\tR(A), R(A+1), ..., R(A+B-2) = vararg\t\t*/\n\nOP_EXTRAARG/*\tAx\textra (larger) argument for previous opcode\t*/\n} OpCode;\n\n\n#define NUM_OPCODES\t(cast(int, OP_EXTRAARG) + 1)\n\n\n\n/*===========================================================================\n  Notes:\n  (*) In OP_CALL, if (B == 0) then B = top. If (C == 0), then `top' is\n  set to last_result+1, so next open instruction (OP_CALL, OP_RETURN,\n  OP_SETLIST) may use `top'.\n\n  (*) In OP_VARARG, if (B == 0) then use actual number of varargs and\n  set top (like in OP_CALL with C == 0).\n\n  (*) In OP_RETURN, if (B == 0) then return up to `top'.\n\n  (*) In OP_SETLIST, if (B == 0) then B = `top'; if (C == 0) then next\n  'instruction' is EXTRAARG(real C).\n\n  (*) In OP_LOADKX, the next 'instruction' is always EXTRAARG.\n\n  (*) For comparisons, A specifies what condition the test should accept\n  (true or false).\n\n  (*) All `skips' (pc++) assume that next instruction is a jump.\n\n===========================================================================*/\n\n\n/*\n** masks for instruction properties. The format is:\n** bits 0-1: op mode\n** bits 2-3: C arg mode\n** bits 4-5: B arg mode\n** bit 6: instruction set register A\n** bit 7: operator is a test (next instruction must be a jump)\n*/\n\nenum OpArgMask {\n  OpArgN,  /* argument is not used */\n  OpArgU,  /* argument is used */\n  OpArgR,  /* argument is a register or a jump offset */\n  OpArgK   /* argument is a constant or register/constant */\n};\n\nLUAI_DDEC const lu_byte luaP_opmodes[NUM_OPCODES];\n\n#define getOpMode(m)\t(cast(enum OpMode, luaP_opmodes[m] & 3))\n#define getBMode(m)\t(cast(enum OpArgMask, (luaP_opmodes[m] >> 4) & 3))\n#define getCMode(m)\t(cast(enum OpArgMask, (luaP_opmodes[m] >> 2) & 3))\n#define testAMode(m)\t(luaP_opmodes[m] & (1 << 6))\n#define testTMode(m)\t(luaP_opmodes[m] & (1 << 7))\n\n\nLUAI_DDEC const char *const luaP_opnames[NUM_OPCODES+1];  /* opcode names */\n\n\n/* number of list items to accumulate before a SETLIST instruction */\n#define LFIELDS_PER_FLUSH\t50\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/loslib.c",
    "content": "/*\n** $Id: loslib.c,v 1.40.1.1 2013/04/12 18:48:47 roberto Exp $\n** Standard Operating System library\n** See Copyright Notice in lua.h\n*/\n\n\n#include <errno.h>\n#include <locale.h>\n#include <stdlib.h>\n#include <string.h>\n#include <time.h>\n\n#define loslib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n/*\n** list of valid conversion specifiers for the 'strftime' function\n*/\n#if !defined(LUA_STRFTIMEOPTIONS)\n\n#if !defined(LUA_USE_POSIX)\n#define LUA_STRFTIMEOPTIONS\t{ \"aAbBcdHIjmMpSUwWxXyYz%\", \"\" }\n#else\n#define LUA_STRFTIMEOPTIONS \\\n\t{ \"aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%\", \"\" \\\n\t  \"\", \"E\", \"cCxXyY\",  \\\n\t  \"O\", \"deHImMSuUVwWy\" }\n#endif\n\n#endif\n\n\n\n/*\n** By default, Lua uses tmpnam except when POSIX is available, where it\n** uses mkstemp.\n*/\n#if defined(LUA_USE_MKSTEMP)\n#include <unistd.h>\n#define LUA_TMPNAMBUFSIZE\t32\n#define lua_tmpnam(b,e) { \\\n        strcpy(b, \"/tmp/lua_XXXXXX\"); \\\n        e = mkstemp(b); \\\n        if (e != -1) close(e); \\\n        e = (e == -1); }\n\n#elif !defined(lua_tmpnam)\n\n#define LUA_TMPNAMBUFSIZE\tL_tmpnam\n#define lua_tmpnam(b,e)\t\t{ e = (tmpnam(b) == NULL); }\n\n#endif\n\n\n/*\n** By default, Lua uses gmtime/localtime, except when POSIX is available,\n** where it uses gmtime_r/localtime_r\n*/\n#if defined(LUA_USE_GMTIME_R)\n\n#define l_gmtime(t,r)\t\tgmtime_r(t,r)\n#define l_localtime(t,r)\tlocaltime_r(t,r)\n\n#elif !defined(l_gmtime)\n\n#define l_gmtime(t,r)\t\t((void)r, gmtime(t))\n#define l_localtime(t,r)  \t((void)r, localtime(t))\n\n#endif\n\n\n\nstatic int os_execute (lua_State *L) {\n  const char *cmd = luaL_optstring(L, 1, NULL);\n  int stat = system(cmd);\n  if (cmd != NULL)\n    return luaL_execresult(L, stat);\n  else {\n    lua_pushboolean(L, stat);  /* true if there is a shell */\n    return 1;\n  }\n}\n\n\nstatic int os_remove (lua_State *L) {\n  const char *filename = luaL_checkstring(L, 1);\n  return luaL_fileresult(L, remove(filename) == 0, filename);\n}\n\n\nstatic int os_rename (lua_State *L) {\n  const char *fromname = luaL_checkstring(L, 1);\n  const char *toname = luaL_checkstring(L, 2);\n  return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);\n}\n\n\nstatic int os_tmpname (lua_State *L) {\n  char buff[LUA_TMPNAMBUFSIZE];\n  int err;\n  lua_tmpnam(buff, err);\n  if (err)\n    return luaL_error(L, \"unable to generate a unique filename\");\n  lua_pushstring(L, buff);\n  return 1;\n}\n\n\nstatic int os_getenv (lua_State *L) {\n  lua_pushstring(L, getenv(luaL_checkstring(L, 1)));  /* if NULL push nil */\n  return 1;\n}\n\n\nstatic int os_clock (lua_State *L) {\n  lua_pushnumber(L, ((lua_Number)clock())/(lua_Number)CLOCKS_PER_SEC);\n  return 1;\n}\n\n\n/*\n** {======================================================\n** Time/Date operations\n** { year=%Y, month=%m, day=%d, hour=%H, min=%M, sec=%S,\n**   wday=%w+1, yday=%j, isdst=? }\n** =======================================================\n*/\n\nstatic void setfield (lua_State *L, const char *key, int value) {\n  lua_pushinteger(L, value);\n  lua_setfield(L, -2, key);\n}\n\nstatic void setboolfield (lua_State *L, const char *key, int value) {\n  if (value < 0)  /* undefined? */\n    return;  /* does not set field */\n  lua_pushboolean(L, value);\n  lua_setfield(L, -2, key);\n}\n\nstatic int getboolfield (lua_State *L, const char *key) {\n  int res;\n  lua_getfield(L, -1, key);\n  res = lua_isnil(L, -1) ? -1 : lua_toboolean(L, -1);\n  lua_pop(L, 1);\n  return res;\n}\n\n\nstatic int getfield (lua_State *L, const char *key, int d) {\n  int res, isnum;\n  lua_getfield(L, -1, key);\n  res = (int)lua_tointegerx(L, -1, &isnum);\n  if (!isnum) {\n    if (d < 0)\n      return luaL_error(L, \"field \" LUA_QS \" missing in date table\", key);\n    res = d;\n  }\n  lua_pop(L, 1);\n  return res;\n}\n\n\nstatic const char *checkoption (lua_State *L, const char *conv, char *buff) {\n  static const char *const options[] = LUA_STRFTIMEOPTIONS;\n  unsigned int i;\n  for (i = 0; i < sizeof(options)/sizeof(options[0]); i += 2) {\n    if (*conv != '\\0' && strchr(options[i], *conv) != NULL) {\n      buff[1] = *conv;\n      if (*options[i + 1] == '\\0') {  /* one-char conversion specifier? */\n        buff[2] = '\\0';  /* end buffer */\n        return conv + 1;\n      }\n      else if (*(conv + 1) != '\\0' &&\n               strchr(options[i + 1], *(conv + 1)) != NULL) {\n        buff[2] = *(conv + 1);  /* valid two-char conversion specifier */\n        buff[3] = '\\0';  /* end buffer */\n        return conv + 2;\n      }\n    }\n  }\n  luaL_argerror(L, 1,\n    lua_pushfstring(L, \"invalid conversion specifier '%%%s'\", conv));\n  return conv;  /* to avoid warnings */\n}\n\n\nstatic int os_date (lua_State *L) {\n  const char *s = luaL_optstring(L, 1, \"%c\");\n  time_t t = luaL_opt(L, (time_t)luaL_checknumber, 2, time(NULL));\n  struct tm tmr, *stm;\n  if (*s == '!') {  /* UTC? */\n    stm = l_gmtime(&t, &tmr);\n    s++;  /* skip `!' */\n  }\n  else\n    stm = l_localtime(&t, &tmr);\n  if (stm == NULL)  /* invalid date? */\n    lua_pushnil(L);\n  else if (strcmp(s, \"*t\") == 0) {\n    lua_createtable(L, 0, 9);  /* 9 = number of fields */\n    setfield(L, \"sec\", stm->tm_sec);\n    setfield(L, \"min\", stm->tm_min);\n    setfield(L, \"hour\", stm->tm_hour);\n    setfield(L, \"day\", stm->tm_mday);\n    setfield(L, \"month\", stm->tm_mon+1);\n    setfield(L, \"year\", stm->tm_year+1900);\n    setfield(L, \"wday\", stm->tm_wday+1);\n    setfield(L, \"yday\", stm->tm_yday+1);\n    setboolfield(L, \"isdst\", stm->tm_isdst);\n  }\n  else {\n    char cc[4];\n    luaL_Buffer b;\n    cc[0] = '%';\n    luaL_buffinit(L, &b);\n    while (*s) {\n      if (*s != '%')  /* no conversion specifier? */\n        luaL_addchar(&b, *s++);\n      else {\n        size_t reslen;\n        char buff[200];  /* should be big enough for any conversion result */\n        s = checkoption(L, s + 1, cc);\n        reslen = strftime(buff, sizeof(buff), cc, stm);\n        luaL_addlstring(&b, buff, reslen);\n      }\n    }\n    luaL_pushresult(&b);\n  }\n  return 1;\n}\n\n\nstatic int os_time (lua_State *L) {\n  time_t t;\n  if (lua_isnoneornil(L, 1))  /* called without args? */\n    t = time(NULL);  /* get current time */\n  else {\n    struct tm ts;\n    luaL_checktype(L, 1, LUA_TTABLE);\n    lua_settop(L, 1);  /* make sure table is at the top */\n    ts.tm_sec = getfield(L, \"sec\", 0);\n    ts.tm_min = getfield(L, \"min\", 0);\n    ts.tm_hour = getfield(L, \"hour\", 12);\n    ts.tm_mday = getfield(L, \"day\", -1);\n    ts.tm_mon = getfield(L, \"month\", -1) - 1;\n    ts.tm_year = getfield(L, \"year\", -1) - 1900;\n    ts.tm_isdst = getboolfield(L, \"isdst\");\n    t = mktime(&ts);\n  }\n  if (t == (time_t)(-1))\n    lua_pushnil(L);\n  else\n    lua_pushnumber(L, (lua_Number)t);\n  return 1;\n}\n\n\nstatic int os_difftime (lua_State *L) {\n  lua_pushnumber(L, difftime((time_t)(luaL_checknumber(L, 1)),\n                             (time_t)(luaL_optnumber(L, 2, 0))));\n  return 1;\n}\n\n/* }====================================================== */\n\n\nstatic int os_setlocale (lua_State *L) {\n  static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY,\n                      LC_NUMERIC, LC_TIME};\n  static const char *const catnames[] = {\"all\", \"collate\", \"ctype\", \"monetary\",\n     \"numeric\", \"time\", NULL};\n  const char *l = luaL_optstring(L, 1, NULL);\n  int op = luaL_checkoption(L, 2, \"all\", catnames);\n  lua_pushstring(L, setlocale(cat[op], l));\n  return 1;\n}\n\n\nstatic int os_exit (lua_State *L) {\n  int status;\n  if (lua_isboolean(L, 1))\n    status = (lua_toboolean(L, 1) ? EXIT_SUCCESS : EXIT_FAILURE);\n  else\n    status = luaL_optint(L, 1, EXIT_SUCCESS);\n  if (lua_toboolean(L, 2))\n    lua_close(L);\n  if (L) exit(status);  /* 'if' to avoid warnings for unreachable 'return' */\n  return 0;\n}\n\n\nstatic const luaL_Reg syslib[] = {\n  {\"clock\",     os_clock},\n  {\"date\",      os_date},\n  {\"difftime\",  os_difftime},\n  {\"execute\",   os_execute},\n  {\"exit\",      os_exit},\n  {\"getenv\",    os_getenv},\n  {\"remove\",    os_remove},\n  {\"rename\",    os_rename},\n  {\"setlocale\", os_setlocale},\n  {\"time\",      os_time},\n  {\"tmpname\",   os_tmpname},\n  {NULL, NULL}\n};\n\n/* }====================================================== */\n\n\n\nLUAMOD_API int luaopen_os (lua_State *L) {\n  luaL_newlib(L, syslib);\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lparser.c",
    "content": "/*\n** $Id: lparser.c,v 2.130.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua Parser\n** See Copyright Notice in lua.h\n*/\n\n\n#include <string.h>\n\n#define lparser_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lcode.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"llex.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lparser.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n\n\n\n/* maximum number of local variables per function (must be smaller\n   than 250, due to the bytecode format) */\n#define MAXVARS\t\t200\n\n\n#define hasmultret(k)\t\t((k) == VCALL || (k) == VVARARG)\n\n\n\n/*\n** nodes for block list (list of active blocks)\n*/\ntypedef struct BlockCnt {\n  struct BlockCnt *previous;  /* chain */\n  short firstlabel;  /* index of first label in this block */\n  short firstgoto;  /* index of first pending goto in this block */\n  lu_byte nactvar;  /* # active locals outside the block */\n  lu_byte upval;  /* true if some variable in the block is an upvalue */\n  lu_byte isloop;  /* true if `block' is a loop */\n} BlockCnt;\n\n\n\n/*\n** prototypes for recursive non-terminal functions\n*/\nstatic void statement (LexState *ls);\nstatic void expr (LexState *ls, expdesc *v);\n\n\nstatic void anchor_token (LexState *ls) {\n  /* last token from outer function must be EOS */\n  lua_assert(ls->fs != NULL || ls->t.token == TK_EOS);\n  if (ls->t.token == TK_NAME || ls->t.token == TK_STRING) {\n    TString *ts = ls->t.seminfo.ts;\n    luaX_newstring(ls, getstr(ts), ts->tsv.len);\n  }\n}\n\n\n/* semantic error */\nstatic l_noret semerror (LexState *ls, const char *msg) {\n  ls->t.token = 0;  /* remove 'near to' from final message */\n  luaX_syntaxerror(ls, msg);\n}\n\n\nstatic l_noret error_expected (LexState *ls, int token) {\n  luaX_syntaxerror(ls,\n      luaO_pushfstring(ls->L, \"%s expected\", luaX_token2str(ls, token)));\n}\n\n\nstatic l_noret errorlimit (FuncState *fs, int limit, const char *what) {\n  lua_State *L = fs->ls->L;\n  const char *msg;\n  int line = fs->f->linedefined;\n  const char *where = (line == 0)\n                      ? \"main function\"\n                      : luaO_pushfstring(L, \"function at line %d\", line);\n  msg = luaO_pushfstring(L, \"too many %s (limit is %d) in %s\",\n                             what, limit, where);\n  luaX_syntaxerror(fs->ls, msg);\n}\n\n\nstatic void checklimit (FuncState *fs, int v, int l, const char *what) {\n  if (v > l) errorlimit(fs, l, what);\n}\n\n\nstatic int testnext (LexState *ls, int c) {\n  if (ls->t.token == c) {\n    luaX_next(ls);\n    return 1;\n  }\n  else return 0;\n}\n\n\nstatic void check (LexState *ls, int c) {\n  if (ls->t.token != c)\n    error_expected(ls, c);\n}\n\n\nstatic void checknext (LexState *ls, int c) {\n  check(ls, c);\n  luaX_next(ls);\n}\n\n\n#define check_condition(ls,c,msg)\t{ if (!(c)) luaX_syntaxerror(ls, msg); }\n\n\n\nstatic void check_match (LexState *ls, int what, int who, int where) {\n  if (!testnext(ls, what)) {\n    if (where == ls->linenumber)\n      error_expected(ls, what);\n    else {\n      luaX_syntaxerror(ls, luaO_pushfstring(ls->L,\n             \"%s expected (to close %s at line %d)\",\n              luaX_token2str(ls, what), luaX_token2str(ls, who), where));\n    }\n  }\n}\n\n\nstatic TString *str_checkname (LexState *ls) {\n  TString *ts;\n  check(ls, TK_NAME);\n  ts = ls->t.seminfo.ts;\n  luaX_next(ls);\n  return ts;\n}\n\n\nstatic void init_exp (expdesc *e, expkind k, int i) {\n  e->f = e->t = NO_JUMP;\n  e->k = k;\n  e->u.info = i;\n}\n\n\nstatic void codestring (LexState *ls, expdesc *e, TString *s) {\n  init_exp(e, VK, luaK_stringK(ls->fs, s));\n}\n\n\nstatic void checkname (LexState *ls, expdesc *e) {\n  codestring(ls, e, str_checkname(ls));\n}\n\n\nstatic int registerlocalvar (LexState *ls, TString *varname) {\n  FuncState *fs = ls->fs;\n  Proto *f = fs->f;\n  int oldsize = f->sizelocvars;\n  luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars,\n                  LocVar, SHRT_MAX, \"local variables\");\n  while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;\n  f->locvars[fs->nlocvars].varname = varname;\n  luaC_objbarrier(ls->L, f, varname);\n  return fs->nlocvars++;\n}\n\n\nstatic void new_localvar (LexState *ls, TString *name) {\n  FuncState *fs = ls->fs;\n  Dyndata *dyd = ls->dyd;\n  int reg = registerlocalvar(ls, name);\n  checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal,\n                  MAXVARS, \"local variables\");\n  luaM_growvector(ls->L, dyd->actvar.arr, dyd->actvar.n + 1,\n                  dyd->actvar.size, Vardesc, MAX_INT, \"local variables\");\n  dyd->actvar.arr[dyd->actvar.n++].idx = cast(short, reg);\n}\n\n\nstatic void new_localvarliteral_ (LexState *ls, const char *name, size_t sz) {\n  new_localvar(ls, luaX_newstring(ls, name, sz));\n}\n\n#define new_localvarliteral(ls,v) \\\n\tnew_localvarliteral_(ls, \"\" v, (sizeof(v)/sizeof(char))-1)\n\n\nstatic LocVar *getlocvar (FuncState *fs, int i) {\n  int idx = fs->ls->dyd->actvar.arr[fs->firstlocal + i].idx;\n  lua_assert(idx < fs->nlocvars);\n  return &fs->f->locvars[idx];\n}\n\n\nstatic void adjustlocalvars (LexState *ls, int nvars) {\n  FuncState *fs = ls->fs;\n  fs->nactvar = cast_byte(fs->nactvar + nvars);\n  for (; nvars; nvars--) {\n    getlocvar(fs, fs->nactvar - nvars)->startpc = fs->pc;\n  }\n}\n\n\nstatic void removevars (FuncState *fs, int tolevel) {\n  fs->ls->dyd->actvar.n -= (fs->nactvar - tolevel);\n  while (fs->nactvar > tolevel)\n    getlocvar(fs, --fs->nactvar)->endpc = fs->pc;\n}\n\n\nstatic int searchupvalue (FuncState *fs, TString *name) {\n  int i;\n  Upvaldesc *up = fs->f->upvalues;\n  for (i = 0; i < fs->nups; i++) {\n    if (luaS_eqstr(up[i].name, name)) return i;\n  }\n  return -1;  /* not found */\n}\n\n\nstatic int newupvalue (FuncState *fs, TString *name, expdesc *v) {\n  Proto *f = fs->f;\n  int oldsize = f->sizeupvalues;\n  checklimit(fs, fs->nups + 1, MAXUPVAL, \"upvalues\");\n  luaM_growvector(fs->ls->L, f->upvalues, fs->nups, f->sizeupvalues,\n                  Upvaldesc, MAXUPVAL, \"upvalues\");\n  while (oldsize < f->sizeupvalues) f->upvalues[oldsize++].name = NULL;\n  f->upvalues[fs->nups].instack = (v->k == VLOCAL);\n  f->upvalues[fs->nups].idx = cast_byte(v->u.info);\n  f->upvalues[fs->nups].name = name;\n  luaC_objbarrier(fs->ls->L, f, name);\n  return fs->nups++;\n}\n\n\nstatic int searchvar (FuncState *fs, TString *n) {\n  int i;\n  for (i = cast_int(fs->nactvar) - 1; i >= 0; i--) {\n    if (luaS_eqstr(n, getlocvar(fs, i)->varname))\n      return i;\n  }\n  return -1;  /* not found */\n}\n\n\n/*\n  Mark block where variable at given level was defined\n  (to emit close instructions later).\n*/\nstatic void markupval (FuncState *fs, int level) {\n  BlockCnt *bl = fs->bl;\n  while (bl->nactvar > level) bl = bl->previous;\n  bl->upval = 1;\n}\n\n\n/*\n  Find variable with given name 'n'. If it is an upvalue, add this\n  upvalue into all intermediate functions.\n*/\nstatic int singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) {\n  if (fs == NULL)  /* no more levels? */\n    return VVOID;  /* default is global */\n  else {\n    int v = searchvar(fs, n);  /* look up locals at current level */\n    if (v >= 0) {  /* found? */\n      init_exp(var, VLOCAL, v);  /* variable is local */\n      if (!base)\n        markupval(fs, v);  /* local will be used as an upval */\n      return VLOCAL;\n    }\n    else {  /* not found as local at current level; try upvalues */\n      int idx = searchupvalue(fs, n);  /* try existing upvalues */\n      if (idx < 0) {  /* not found? */\n        if (singlevaraux(fs->prev, n, var, 0) == VVOID) /* try upper levels */\n          return VVOID;  /* not found; is a global */\n        /* else was LOCAL or UPVAL */\n        idx  = newupvalue(fs, n, var);  /* will be a new upvalue */\n      }\n      init_exp(var, VUPVAL, idx);\n      return VUPVAL;\n    }\n  }\n}\n\n\nstatic void singlevar (LexState *ls, expdesc *var) {\n  TString *varname = str_checkname(ls);\n  FuncState *fs = ls->fs;\n  if (singlevaraux(fs, varname, var, 1) == VVOID) {  /* global name? */\n    expdesc key;\n    singlevaraux(fs, ls->envn, var, 1);  /* get environment variable */\n    lua_assert(var->k == VLOCAL || var->k == VUPVAL);\n    codestring(ls, &key, varname);  /* key is variable name */\n    luaK_indexed(fs, var, &key);  /* env[varname] */\n  }\n}\n\n\nstatic void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {\n  FuncState *fs = ls->fs;\n  int extra = nvars - nexps;\n  if (hasmultret(e->k)) {\n    extra++;  /* includes call itself */\n    if (extra < 0) extra = 0;\n    luaK_setreturns(fs, e, extra);  /* last exp. provides the difference */\n    if (extra > 1) luaK_reserveregs(fs, extra-1);\n  }\n  else {\n    if (e->k != VVOID) luaK_exp2nextreg(fs, e);  /* close last expression */\n    if (extra > 0) {\n      int reg = fs->freereg;\n      luaK_reserveregs(fs, extra);\n      luaK_nil(fs, reg, extra);\n    }\n  }\n}\n\n\nstatic void enterlevel (LexState *ls) {\n  lua_State *L = ls->L;\n  ++L->nCcalls;\n  checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, \"C levels\");\n}\n\n\n#define leavelevel(ls)\t((ls)->L->nCcalls--)\n\n\nstatic void closegoto (LexState *ls, int g, Labeldesc *label) {\n  int i;\n  FuncState *fs = ls->fs;\n  Labellist *gl = &ls->dyd->gt;\n  Labeldesc *gt = &gl->arr[g];\n  lua_assert(luaS_eqstr(gt->name, label->name));\n  if (gt->nactvar < label->nactvar) {\n    TString *vname = getlocvar(fs, gt->nactvar)->varname;\n    const char *msg = luaO_pushfstring(ls->L,\n      \"<goto %s> at line %d jumps into the scope of local \" LUA_QS,\n      getstr(gt->name), gt->line, getstr(vname));\n    semerror(ls, msg);\n  }\n  luaK_patchlist(fs, gt->pc, label->pc);\n  /* remove goto from pending list */\n  for (i = g; i < gl->n - 1; i++)\n    gl->arr[i] = gl->arr[i + 1];\n  gl->n--;\n}\n\n\n/*\n** try to close a goto with existing labels; this solves backward jumps\n*/\nstatic int findlabel (LexState *ls, int g) {\n  int i;\n  BlockCnt *bl = ls->fs->bl;\n  Dyndata *dyd = ls->dyd;\n  Labeldesc *gt = &dyd->gt.arr[g];\n  /* check labels in current block for a match */\n  for (i = bl->firstlabel; i < dyd->label.n; i++) {\n    Labeldesc *lb = &dyd->label.arr[i];\n    if (luaS_eqstr(lb->name, gt->name)) {  /* correct label? */\n      if (gt->nactvar > lb->nactvar &&\n          (bl->upval || dyd->label.n > bl->firstlabel))\n        luaK_patchclose(ls->fs, gt->pc, lb->nactvar);\n      closegoto(ls, g, lb);  /* close it */\n      return 1;\n    }\n  }\n  return 0;  /* label not found; cannot close goto */\n}\n\n\nstatic int newlabelentry (LexState *ls, Labellist *l, TString *name,\n                          int line, int pc) {\n  int n = l->n;\n  luaM_growvector(ls->L, l->arr, n, l->size,\n                  Labeldesc, SHRT_MAX, \"labels/gotos\");\n  l->arr[n].name = name;\n  l->arr[n].line = line;\n  l->arr[n].nactvar = ls->fs->nactvar;\n  l->arr[n].pc = pc;\n  l->n++;\n  return n;\n}\n\n\n/*\n** check whether new label 'lb' matches any pending gotos in current\n** block; solves forward jumps\n*/\nstatic void findgotos (LexState *ls, Labeldesc *lb) {\n  Labellist *gl = &ls->dyd->gt;\n  int i = ls->fs->bl->firstgoto;\n  while (i < gl->n) {\n    if (luaS_eqstr(gl->arr[i].name, lb->name))\n      closegoto(ls, i, lb);\n    else\n      i++;\n  }\n}\n\n\n/*\n** \"export\" pending gotos to outer level, to check them against\n** outer labels; if the block being exited has upvalues, and\n** the goto exits the scope of any variable (which can be the\n** upvalue), close those variables being exited.\n*/\nstatic void movegotosout (FuncState *fs, BlockCnt *bl) {\n  int i = bl->firstgoto;\n  Labellist *gl = &fs->ls->dyd->gt;\n  /* correct pending gotos to current block and try to close it\n     with visible labels */\n  while (i < gl->n) {\n    Labeldesc *gt = &gl->arr[i];\n    if (gt->nactvar > bl->nactvar) {\n      if (bl->upval)\n        luaK_patchclose(fs, gt->pc, bl->nactvar);\n      gt->nactvar = bl->nactvar;\n    }\n    if (!findlabel(fs->ls, i))\n      i++;  /* move to next one */\n  }\n}\n\n\nstatic void enterblock (FuncState *fs, BlockCnt *bl, lu_byte isloop) {\n  bl->isloop = isloop;\n  bl->nactvar = fs->nactvar;\n  bl->firstlabel = fs->ls->dyd->label.n;\n  bl->firstgoto = fs->ls->dyd->gt.n;\n  bl->upval = 0;\n  bl->previous = fs->bl;\n  fs->bl = bl;\n  lua_assert(fs->freereg == fs->nactvar);\n}\n\n\n/*\n** create a label named \"break\" to resolve break statements\n*/\nstatic void breaklabel (LexState *ls) {\n  TString *n = luaS_new(ls->L, \"break\");\n  int l = newlabelentry(ls, &ls->dyd->label, n, 0, ls->fs->pc);\n  findgotos(ls, &ls->dyd->label.arr[l]);\n}\n\n/*\n** generates an error for an undefined 'goto'; choose appropriate\n** message when label name is a reserved word (which can only be 'break')\n*/\nstatic l_noret undefgoto (LexState *ls, Labeldesc *gt) {\n  const char *msg = isreserved(gt->name)\n                    ? \"<%s> at line %d not inside a loop\"\n                    : \"no visible label \" LUA_QS \" for <goto> at line %d\";\n  msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line);\n  semerror(ls, msg);\n}\n\n\nstatic void leaveblock (FuncState *fs) {\n  BlockCnt *bl = fs->bl;\n  LexState *ls = fs->ls;\n  if (bl->previous && bl->upval) {\n    /* create a 'jump to here' to close upvalues */\n    int j = luaK_jump(fs);\n    luaK_patchclose(fs, j, bl->nactvar);\n    luaK_patchtohere(fs, j);\n  }\n  if (bl->isloop)\n    breaklabel(ls);  /* close pending breaks */\n  fs->bl = bl->previous;\n  removevars(fs, bl->nactvar);\n  lua_assert(bl->nactvar == fs->nactvar);\n  fs->freereg = fs->nactvar;  /* free registers */\n  ls->dyd->label.n = bl->firstlabel;  /* remove local labels */\n  if (bl->previous)  /* inner block? */\n    movegotosout(fs, bl);  /* update pending gotos to outer block */\n  else if (bl->firstgoto < ls->dyd->gt.n)  /* pending gotos in outer block? */\n    undefgoto(ls, &ls->dyd->gt.arr[bl->firstgoto]);  /* error */\n}\n\n\n/*\n** adds a new prototype into list of prototypes\n*/\nstatic Proto *addprototype (LexState *ls) {\n  Proto *clp;\n  lua_State *L = ls->L;\n  FuncState *fs = ls->fs;\n  Proto *f = fs->f;  /* prototype of current function */\n  if (fs->np >= f->sizep) {\n    int oldsize = f->sizep;\n    luaM_growvector(L, f->p, fs->np, f->sizep, Proto *, MAXARG_Bx, \"functions\");\n    while (oldsize < f->sizep) f->p[oldsize++] = NULL;\n  }\n  f->p[fs->np++] = clp = luaF_newproto(L);\n  luaC_objbarrier(L, f, clp);\n  return clp;\n}\n\n\n/*\n** codes instruction to create new closure in parent function.\n** The OP_CLOSURE instruction must use the last available register,\n** so that, if it invokes the GC, the GC knows which registers\n** are in use at that time.\n*/\nstatic void codeclosure (LexState *ls, expdesc *v) {\n  FuncState *fs = ls->fs->prev;\n  init_exp(v, VRELOCABLE, luaK_codeABx(fs, OP_CLOSURE, 0, fs->np - 1));\n  luaK_exp2nextreg(fs, v);  /* fix it at the last register */\n}\n\n\nstatic void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {\n  lua_State *L = ls->L;\n  Proto *f;\n  fs->prev = ls->fs;  /* linked list of funcstates */\n  fs->ls = ls;\n  ls->fs = fs;\n  fs->pc = 0;\n  fs->lasttarget = 0;\n  fs->jpc = NO_JUMP;\n  fs->freereg = 0;\n  fs->nk = 0;\n  fs->np = 0;\n  fs->nups = 0;\n  fs->nlocvars = 0;\n  fs->nactvar = 0;\n  fs->firstlocal = ls->dyd->actvar.n;\n  fs->bl = NULL;\n  f = fs->f;\n  f->source = ls->source;\n  f->maxstacksize = 2;  /* registers 0/1 are always valid */\n  fs->h = luaH_new(L);\n  /* anchor table of constants (to avoid being collected) */\n  sethvalue2s(L, L->top, fs->h);\n  incr_top(L);\n  enterblock(fs, bl, 0);\n}\n\n\nstatic void close_func (LexState *ls) {\n  lua_State *L = ls->L;\n  FuncState *fs = ls->fs;\n  Proto *f = fs->f;\n  luaK_ret(fs, 0, 0);  /* final return */\n  leaveblock(fs);\n  luaM_reallocvector(L, f->code, f->sizecode, fs->pc, Instruction);\n  f->sizecode = fs->pc;\n  luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int);\n  f->sizelineinfo = fs->pc;\n  luaM_reallocvector(L, f->k, f->sizek, fs->nk, TValue);\n  f->sizek = fs->nk;\n  luaM_reallocvector(L, f->p, f->sizep, fs->np, Proto *);\n  f->sizep = fs->np;\n  luaM_reallocvector(L, f->locvars, f->sizelocvars, fs->nlocvars, LocVar);\n  f->sizelocvars = fs->nlocvars;\n  luaM_reallocvector(L, f->upvalues, f->sizeupvalues, fs->nups, Upvaldesc);\n  f->sizeupvalues = fs->nups;\n  lua_assert(fs->bl == NULL);\n  ls->fs = fs->prev;\n  /* last token read was anchored in defunct function; must re-anchor it */\n  anchor_token(ls);\n  L->top--;  /* pop table of constants */\n  luaC_checkGC(L);\n}\n\n\n\n/*============================================================*/\n/* GRAMMAR RULES */\n/*============================================================*/\n\n\n/*\n** check whether current token is in the follow set of a block.\n** 'until' closes syntactical blocks, but do not close scope,\n** so it handled in separate.\n*/\nstatic int block_follow (LexState *ls, int withuntil) {\n  switch (ls->t.token) {\n    case TK_ELSE: case TK_ELSEIF:\n    case TK_END: case TK_EOS:\n      return 1;\n    case TK_UNTIL: return withuntil;\n    default: return 0;\n  }\n}\n\n\nstatic void statlist (LexState *ls) {\n  /* statlist -> { stat [`;'] } */\n  while (!block_follow(ls, 1)) {\n    if (ls->t.token == TK_RETURN) {\n      statement(ls);\n      return;  /* 'return' must be last statement */\n    }\n    statement(ls);\n  }\n}\n\n\nstatic void fieldsel (LexState *ls, expdesc *v) {\n  /* fieldsel -> ['.' | ':'] NAME */\n  FuncState *fs = ls->fs;\n  expdesc key;\n  luaK_exp2anyregup(fs, v);\n  luaX_next(ls);  /* skip the dot or colon */\n  checkname(ls, &key);\n  luaK_indexed(fs, v, &key);\n}\n\n\nstatic void yindex (LexState *ls, expdesc *v) {\n  /* index -> '[' expr ']' */\n  luaX_next(ls);  /* skip the '[' */\n  expr(ls, v);\n  luaK_exp2val(ls->fs, v);\n  checknext(ls, ']');\n}\n\n\n/*\n** {======================================================================\n** Rules for Constructors\n** =======================================================================\n*/\n\n\nstruct ConsControl {\n  expdesc v;  /* last list item read */\n  expdesc *t;  /* table descriptor */\n  int nh;  /* total number of `record' elements */\n  int na;  /* total number of array elements */\n  int tostore;  /* number of array elements pending to be stored */\n};\n\n\nstatic void recfield (LexState *ls, struct ConsControl *cc) {\n  /* recfield -> (NAME | `['exp1`]') = exp1 */\n  FuncState *fs = ls->fs;\n  int reg = ls->fs->freereg;\n  expdesc key, val;\n  int rkkey;\n  if (ls->t.token == TK_NAME) {\n    checklimit(fs, cc->nh, MAX_INT, \"items in a constructor\");\n    checkname(ls, &key);\n  }\n  else  /* ls->t.token == '[' */\n    yindex(ls, &key);\n  cc->nh++;\n  checknext(ls, '=');\n  rkkey = luaK_exp2RK(fs, &key);\n  expr(ls, &val);\n  luaK_codeABC(fs, OP_SETTABLE, cc->t->u.info, rkkey, luaK_exp2RK(fs, &val));\n  fs->freereg = reg;  /* free registers */\n}\n\n\nstatic void closelistfield (FuncState *fs, struct ConsControl *cc) {\n  if (cc->v.k == VVOID) return;  /* there is no list item */\n  luaK_exp2nextreg(fs, &cc->v);\n  cc->v.k = VVOID;\n  if (cc->tostore == LFIELDS_PER_FLUSH) {\n    luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);  /* flush */\n    cc->tostore = 0;  /* no more items pending */\n  }\n}\n\n\nstatic void lastlistfield (FuncState *fs, struct ConsControl *cc) {\n  if (cc->tostore == 0) return;\n  if (hasmultret(cc->v.k)) {\n    luaK_setmultret(fs, &cc->v);\n    luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);\n    cc->na--;  /* do not count last expression (unknown number of elements) */\n  }\n  else {\n    if (cc->v.k != VVOID)\n      luaK_exp2nextreg(fs, &cc->v);\n    luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);\n  }\n}\n\n\nstatic void listfield (LexState *ls, struct ConsControl *cc) {\n  /* listfield -> exp */\n  expr(ls, &cc->v);\n  checklimit(ls->fs, cc->na, MAX_INT, \"items in a constructor\");\n  cc->na++;\n  cc->tostore++;\n}\n\n\nstatic void field (LexState *ls, struct ConsControl *cc) {\n  /* field -> listfield | recfield */\n  switch(ls->t.token) {\n    case TK_NAME: {  /* may be 'listfield' or 'recfield' */\n      if (luaX_lookahead(ls) != '=')  /* expression? */\n        listfield(ls, cc);\n      else\n        recfield(ls, cc);\n      break;\n    }\n    case '[': {\n      recfield(ls, cc);\n      break;\n    }\n    default: {\n      listfield(ls, cc);\n      break;\n    }\n  }\n}\n\n\nstatic void constructor (LexState *ls, expdesc *t) {\n  /* constructor -> '{' [ field { sep field } [sep] ] '}'\n     sep -> ',' | ';' */\n  FuncState *fs = ls->fs;\n  int line = ls->linenumber;\n  int pc = luaK_codeABC(fs, OP_NEWTABLE, 0, 0, 0);\n  struct ConsControl cc;\n  cc.na = cc.nh = cc.tostore = 0;\n  cc.t = t;\n  init_exp(t, VRELOCABLE, pc);\n  init_exp(&cc.v, VVOID, 0);  /* no value (yet) */\n  luaK_exp2nextreg(ls->fs, t);  /* fix it at stack top */\n  checknext(ls, '{');\n  do {\n    lua_assert(cc.v.k == VVOID || cc.tostore > 0);\n    if (ls->t.token == '}') break;\n    closelistfield(fs, &cc);\n    field(ls, &cc);\n  } while (testnext(ls, ',') || testnext(ls, ';'));\n  check_match(ls, '}', '{', line);\n  lastlistfield(fs, &cc);\n  SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */\n  SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh));  /* set initial table size */\n}\n\n/* }====================================================================== */\n\n\n\nstatic void parlist (LexState *ls) {\n  /* parlist -> [ param { `,' param } ] */\n  FuncState *fs = ls->fs;\n  Proto *f = fs->f;\n  int nparams = 0;\n  f->is_vararg = 0;\n  if (ls->t.token != ')') {  /* is `parlist' not empty? */\n    do {\n      switch (ls->t.token) {\n        case TK_NAME: {  /* param -> NAME */\n          new_localvar(ls, str_checkname(ls));\n          nparams++;\n          break;\n        }\n        case TK_DOTS: {  /* param -> `...' */\n          luaX_next(ls);\n          f->is_vararg = 1;\n          break;\n        }\n        default: luaX_syntaxerror(ls, \"<name> or \" LUA_QL(\"...\") \" expected\");\n      }\n    } while (!f->is_vararg && testnext(ls, ','));\n  }\n  adjustlocalvars(ls, nparams);\n  f->numparams = cast_byte(fs->nactvar);\n  luaK_reserveregs(fs, fs->nactvar);  /* reserve register for parameters */\n}\n\n\nstatic void body (LexState *ls, expdesc *e, int ismethod, int line) {\n  /* body ->  `(' parlist `)' block END */\n  FuncState new_fs;\n  BlockCnt bl;\n  new_fs.f = addprototype(ls);\n  new_fs.f->linedefined = line;\n  open_func(ls, &new_fs, &bl);\n  checknext(ls, '(');\n  if (ismethod) {\n    new_localvarliteral(ls, \"self\");  /* create 'self' parameter */\n    adjustlocalvars(ls, 1);\n  }\n  parlist(ls);\n  checknext(ls, ')');\n  statlist(ls);\n  new_fs.f->lastlinedefined = ls->linenumber;\n  check_match(ls, TK_END, TK_FUNCTION, line);\n  codeclosure(ls, e);\n  close_func(ls);\n}\n\n\nstatic int explist (LexState *ls, expdesc *v) {\n  /* explist -> expr { `,' expr } */\n  int n = 1;  /* at least one expression */\n  expr(ls, v);\n  while (testnext(ls, ',')) {\n    luaK_exp2nextreg(ls->fs, v);\n    expr(ls, v);\n    n++;\n  }\n  return n;\n}\n\n\nstatic void funcargs (LexState *ls, expdesc *f, int line) {\n  FuncState *fs = ls->fs;\n  expdesc args;\n  int base, nparams;\n  switch (ls->t.token) {\n    case '(': {  /* funcargs -> `(' [ explist ] `)' */\n      luaX_next(ls);\n      if (ls->t.token == ')')  /* arg list is empty? */\n        args.k = VVOID;\n      else {\n        explist(ls, &args);\n        luaK_setmultret(fs, &args);\n      }\n      check_match(ls, ')', '(', line);\n      break;\n    }\n    case '{': {  /* funcargs -> constructor */\n      constructor(ls, &args);\n      break;\n    }\n    case TK_STRING: {  /* funcargs -> STRING */\n      codestring(ls, &args, ls->t.seminfo.ts);\n      luaX_next(ls);  /* must use `seminfo' before `next' */\n      break;\n    }\n    default: {\n      luaX_syntaxerror(ls, \"function arguments expected\");\n    }\n  }\n  lua_assert(f->k == VNONRELOC);\n  base = f->u.info;  /* base register for call */\n  if (hasmultret(args.k))\n    nparams = LUA_MULTRET;  /* open call */\n  else {\n    if (args.k != VVOID)\n      luaK_exp2nextreg(fs, &args);  /* close last argument */\n    nparams = fs->freereg - (base+1);\n  }\n  init_exp(f, VCALL, luaK_codeABC(fs, OP_CALL, base, nparams+1, 2));\n  luaK_fixline(fs, line);\n  fs->freereg = base+1;  /* call remove function and arguments and leaves\n                            (unless changed) one result */\n}\n\n\n\n\n/*\n** {======================================================================\n** Expression parsing\n** =======================================================================\n*/\n\n\nstatic void primaryexp (LexState *ls, expdesc *v) {\n  /* primaryexp -> NAME | '(' expr ')' */\n  switch (ls->t.token) {\n    case '(': {\n      int line = ls->linenumber;\n      luaX_next(ls);\n      expr(ls, v);\n      check_match(ls, ')', '(', line);\n      luaK_dischargevars(ls->fs, v);\n      return;\n    }\n    case TK_NAME: {\n      singlevar(ls, v);\n      return;\n    }\n    default: {\n      luaX_syntaxerror(ls, \"unexpected symbol\");\n    }\n  }\n}\n\n\nstatic void suffixedexp (LexState *ls, expdesc *v) {\n  /* suffixedexp ->\n       primaryexp { '.' NAME | '[' exp ']' | ':' NAME funcargs | funcargs } */\n  FuncState *fs = ls->fs;\n  int line = ls->linenumber;\n  primaryexp(ls, v);\n  for (;;) {\n    switch (ls->t.token) {\n      case '.': {  /* fieldsel */\n        fieldsel(ls, v);\n        break;\n      }\n      case '[': {  /* `[' exp1 `]' */\n        expdesc key;\n        luaK_exp2anyregup(fs, v);\n        yindex(ls, &key);\n        luaK_indexed(fs, v, &key);\n        break;\n      }\n      case ':': {  /* `:' NAME funcargs */\n        expdesc key;\n        luaX_next(ls);\n        checkname(ls, &key);\n        luaK_self(fs, v, &key);\n        funcargs(ls, v, line);\n        break;\n      }\n      case '(': case TK_STRING: case '{': {  /* funcargs */\n        luaK_exp2nextreg(fs, v);\n        funcargs(ls, v, line);\n        break;\n      }\n      default: return;\n    }\n  }\n}\n\n\nstatic void simpleexp (LexState *ls, expdesc *v) {\n  /* simpleexp -> NUMBER | STRING | NIL | TRUE | FALSE | ... |\n                  constructor | FUNCTION body | suffixedexp */\n  switch (ls->t.token) {\n    case TK_NUMBER: {\n      init_exp(v, VKNUM, 0);\n      v->u.nval = ls->t.seminfo.r;\n      break;\n    }\n    case TK_STRING: {\n      codestring(ls, v, ls->t.seminfo.ts);\n      break;\n    }\n    case TK_NIL: {\n      init_exp(v, VNIL, 0);\n      break;\n    }\n    case TK_TRUE: {\n      init_exp(v, VTRUE, 0);\n      break;\n    }\n    case TK_FALSE: {\n      init_exp(v, VFALSE, 0);\n      break;\n    }\n    case TK_DOTS: {  /* vararg */\n      FuncState *fs = ls->fs;\n      check_condition(ls, fs->f->is_vararg,\n                      \"cannot use \" LUA_QL(\"...\") \" outside a vararg function\");\n      init_exp(v, VVARARG, luaK_codeABC(fs, OP_VARARG, 0, 1, 0));\n      break;\n    }\n    case '{': {  /* constructor */\n      constructor(ls, v);\n      return;\n    }\n    case TK_FUNCTION: {\n      luaX_next(ls);\n      body(ls, v, 0, ls->linenumber);\n      return;\n    }\n    default: {\n      suffixedexp(ls, v);\n      return;\n    }\n  }\n  luaX_next(ls);\n}\n\n\nstatic UnOpr getunopr (int op) {\n  switch (op) {\n    case TK_NOT: return OPR_NOT;\n    case '-': return OPR_MINUS;\n    case '#': return OPR_LEN;\n    default: return OPR_NOUNOPR;\n  }\n}\n\n\nstatic BinOpr getbinopr (int op) {\n  switch (op) {\n    case '+': return OPR_ADD;\n    case '-': return OPR_SUB;\n    case '*': return OPR_MUL;\n    case '/': return OPR_DIV;\n    case '%': return OPR_MOD;\n    case '^': return OPR_POW;\n    case TK_CONCAT: return OPR_CONCAT;\n    case TK_NE: return OPR_NE;\n    case TK_EQ: return OPR_EQ;\n    case '<': return OPR_LT;\n    case TK_LE: return OPR_LE;\n    case '>': return OPR_GT;\n    case TK_GE: return OPR_GE;\n    case TK_AND: return OPR_AND;\n    case TK_OR: return OPR_OR;\n    default: return OPR_NOBINOPR;\n  }\n}\n\n\nstatic const struct {\n  lu_byte left;  /* left priority for each binary operator */\n  lu_byte right; /* right priority */\n} priority[] = {  /* ORDER OPR */\n   {6, 6}, {6, 6}, {7, 7}, {7, 7}, {7, 7},  /* `+' `-' `*' `/' `%' */\n   {10, 9}, {5, 4},                 /* ^, .. (right associative) */\n   {3, 3}, {3, 3}, {3, 3},          /* ==, <, <= */\n   {3, 3}, {3, 3}, {3, 3},          /* ~=, >, >= */\n   {2, 2}, {1, 1}                   /* and, or */\n};\n\n#define UNARY_PRIORITY\t8  /* priority for unary operators */\n\n\n/*\n** subexpr -> (simpleexp | unop subexpr) { binop subexpr }\n** where `binop' is any binary operator with a priority higher than `limit'\n*/\nstatic BinOpr subexpr (LexState *ls, expdesc *v, int limit) {\n  BinOpr op;\n  UnOpr uop;\n  enterlevel(ls);\n  uop = getunopr(ls->t.token);\n  if (uop != OPR_NOUNOPR) {\n    int line = ls->linenumber;\n    luaX_next(ls);\n    subexpr(ls, v, UNARY_PRIORITY);\n    luaK_prefix(ls->fs, uop, v, line);\n  }\n  else simpleexp(ls, v);\n  /* expand while operators have priorities higher than `limit' */\n  op = getbinopr(ls->t.token);\n  while (op != OPR_NOBINOPR && priority[op].left > limit) {\n    expdesc v2;\n    BinOpr nextop;\n    int line = ls->linenumber;\n    luaX_next(ls);\n    luaK_infix(ls->fs, op, v);\n    /* read sub-expression with higher priority */\n    nextop = subexpr(ls, &v2, priority[op].right);\n    luaK_posfix(ls->fs, op, v, &v2, line);\n    op = nextop;\n  }\n  leavelevel(ls);\n  return op;  /* return first untreated operator */\n}\n\n\nstatic void expr (LexState *ls, expdesc *v) {\n  subexpr(ls, v, 0);\n}\n\n/* }==================================================================== */\n\n\n\n/*\n** {======================================================================\n** Rules for Statements\n** =======================================================================\n*/\n\n\nstatic void block (LexState *ls) {\n  /* block -> statlist */\n  FuncState *fs = ls->fs;\n  BlockCnt bl;\n  enterblock(fs, &bl, 0);\n  statlist(ls);\n  leaveblock(fs);\n}\n\n\n/*\n** structure to chain all variables in the left-hand side of an\n** assignment\n*/\nstruct LHS_assign {\n  struct LHS_assign *prev;\n  expdesc v;  /* variable (global, local, upvalue, or indexed) */\n};\n\n\n/*\n** check whether, in an assignment to an upvalue/local variable, the\n** upvalue/local variable is begin used in a previous assignment to a\n** table. If so, save original upvalue/local value in a safe place and\n** use this safe copy in the previous assignment.\n*/\nstatic void check_conflict (LexState *ls, struct LHS_assign *lh, expdesc *v) {\n  FuncState *fs = ls->fs;\n  int extra = fs->freereg;  /* eventual position to save local variable */\n  int conflict = 0;\n  for (; lh; lh = lh->prev) {  /* check all previous assignments */\n    if (lh->v.k == VINDEXED) {  /* assigning to a table? */\n      /* table is the upvalue/local being assigned now? */\n      if (lh->v.u.ind.vt == v->k && lh->v.u.ind.t == v->u.info) {\n        conflict = 1;\n        lh->v.u.ind.vt = VLOCAL;\n        lh->v.u.ind.t = extra;  /* previous assignment will use safe copy */\n      }\n      /* index is the local being assigned? (index cannot be upvalue) */\n      if (v->k == VLOCAL && lh->v.u.ind.idx == v->u.info) {\n        conflict = 1;\n        lh->v.u.ind.idx = extra;  /* previous assignment will use safe copy */\n      }\n    }\n  }\n  if (conflict) {\n    /* copy upvalue/local value to a temporary (in position 'extra') */\n    OpCode op = (v->k == VLOCAL) ? OP_MOVE : OP_GETUPVAL;\n    luaK_codeABC(fs, op, extra, v->u.info, 0);\n    luaK_reserveregs(fs, 1);\n  }\n}\n\n\nstatic void assignment (LexState *ls, struct LHS_assign *lh, int nvars) {\n  expdesc e;\n  check_condition(ls, vkisvar(lh->v.k), \"syntax error\");\n  if (testnext(ls, ',')) {  /* assignment -> ',' suffixedexp assignment */\n    struct LHS_assign nv;\n    nv.prev = lh;\n    suffixedexp(ls, &nv.v);\n    if (nv.v.k != VINDEXED)\n      check_conflict(ls, lh, &nv.v);\n    checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS,\n                    \"C levels\");\n    assignment(ls, &nv, nvars+1);\n  }\n  else {  /* assignment -> `=' explist */\n    int nexps;\n    checknext(ls, '=');\n    nexps = explist(ls, &e);\n    if (nexps != nvars) {\n      adjust_assign(ls, nvars, nexps, &e);\n      if (nexps > nvars)\n        ls->fs->freereg -= nexps - nvars;  /* remove extra values */\n    }\n    else {\n      luaK_setoneret(ls->fs, &e);  /* close last expression */\n      luaK_storevar(ls->fs, &lh->v, &e);\n      return;  /* avoid default */\n    }\n  }\n  init_exp(&e, VNONRELOC, ls->fs->freereg-1);  /* default assignment */\n  luaK_storevar(ls->fs, &lh->v, &e);\n}\n\n\nstatic int cond (LexState *ls) {\n  /* cond -> exp */\n  expdesc v;\n  expr(ls, &v);  /* read condition */\n  if (v.k == VNIL) v.k = VFALSE;  /* `falses' are all equal here */\n  luaK_goiftrue(ls->fs, &v);\n  return v.f;\n}\n\n\nstatic void gotostat (LexState *ls, int pc) {\n  int line = ls->linenumber;\n  TString *label;\n  int g;\n  if (testnext(ls, TK_GOTO))\n    label = str_checkname(ls);\n  else {\n    luaX_next(ls);  /* skip break */\n    label = luaS_new(ls->L, \"break\");\n  }\n  g = newlabelentry(ls, &ls->dyd->gt, label, line, pc);\n  findlabel(ls, g);  /* close it if label already defined */\n}\n\n\n/* check for repeated labels on the same block */\nstatic void checkrepeated (FuncState *fs, Labellist *ll, TString *label) {\n  int i;\n  for (i = fs->bl->firstlabel; i < ll->n; i++) {\n    if (luaS_eqstr(label, ll->arr[i].name)) {\n      const char *msg = luaO_pushfstring(fs->ls->L,\n                          \"label \" LUA_QS \" already defined on line %d\",\n                          getstr(label), ll->arr[i].line);\n      semerror(fs->ls, msg);\n    }\n  }\n}\n\n\n/* skip no-op statements */\nstatic void skipnoopstat (LexState *ls) {\n  while (ls->t.token == ';' || ls->t.token == TK_DBCOLON)\n    statement(ls);\n}\n\n\nstatic void labelstat (LexState *ls, TString *label, int line) {\n  /* label -> '::' NAME '::' */\n  FuncState *fs = ls->fs;\n  Labellist *ll = &ls->dyd->label;\n  int l;  /* index of new label being created */\n  checkrepeated(fs, ll, label);  /* check for repeated labels */\n  checknext(ls, TK_DBCOLON);  /* skip double colon */\n  /* create new entry for this label */\n  l = newlabelentry(ls, ll, label, line, fs->pc);\n  skipnoopstat(ls);  /* skip other no-op statements */\n  if (block_follow(ls, 0)) {  /* label is last no-op statement in the block? */\n    /* assume that locals are already out of scope */\n    ll->arr[l].nactvar = fs->bl->nactvar;\n  }\n  findgotos(ls, &ll->arr[l]);\n}\n\n\nstatic void whilestat (LexState *ls, int line) {\n  /* whilestat -> WHILE cond DO block END */\n  FuncState *fs = ls->fs;\n  int whileinit;\n  int condexit;\n  BlockCnt bl;\n  luaX_next(ls);  /* skip WHILE */\n  whileinit = luaK_getlabel(fs);\n  condexit = cond(ls);\n  enterblock(fs, &bl, 1);\n  checknext(ls, TK_DO);\n  block(ls);\n  luaK_jumpto(fs, whileinit);\n  check_match(ls, TK_END, TK_WHILE, line);\n  leaveblock(fs);\n  luaK_patchtohere(fs, condexit);  /* false conditions finish the loop */\n}\n\n\nstatic void repeatstat (LexState *ls, int line) {\n  /* repeatstat -> REPEAT block UNTIL cond */\n  int condexit;\n  FuncState *fs = ls->fs;\n  int repeat_init = luaK_getlabel(fs);\n  BlockCnt bl1, bl2;\n  enterblock(fs, &bl1, 1);  /* loop block */\n  enterblock(fs, &bl2, 0);  /* scope block */\n  luaX_next(ls);  /* skip REPEAT */\n  statlist(ls);\n  check_match(ls, TK_UNTIL, TK_REPEAT, line);\n  condexit = cond(ls);  /* read condition (inside scope block) */\n  if (bl2.upval)  /* upvalues? */\n    luaK_patchclose(fs, condexit, bl2.nactvar);\n  leaveblock(fs);  /* finish scope */\n  luaK_patchlist(fs, condexit, repeat_init);  /* close the loop */\n  leaveblock(fs);  /* finish loop */\n}\n\n\nstatic int exp1 (LexState *ls) {\n  expdesc e;\n  int reg;\n  expr(ls, &e);\n  luaK_exp2nextreg(ls->fs, &e);\n  lua_assert(e.k == VNONRELOC);\n  reg = e.u.info;\n  return reg;\n}\n\n\nstatic void forbody (LexState *ls, int base, int line, int nvars, int isnum) {\n  /* forbody -> DO block */\n  BlockCnt bl;\n  FuncState *fs = ls->fs;\n  int prep, endfor;\n  adjustlocalvars(ls, 3);  /* control variables */\n  checknext(ls, TK_DO);\n  prep = isnum ? luaK_codeAsBx(fs, OP_FORPREP, base, NO_JUMP) : luaK_jump(fs);\n  enterblock(fs, &bl, 0);  /* scope for declared variables */\n  adjustlocalvars(ls, nvars);\n  luaK_reserveregs(fs, nvars);\n  block(ls);\n  leaveblock(fs);  /* end of scope for declared variables */\n  luaK_patchtohere(fs, prep);\n  if (isnum)  /* numeric for? */\n    endfor = luaK_codeAsBx(fs, OP_FORLOOP, base, NO_JUMP);\n  else {  /* generic for */\n    luaK_codeABC(fs, OP_TFORCALL, base, 0, nvars);\n    luaK_fixline(fs, line);\n    endfor = luaK_codeAsBx(fs, OP_TFORLOOP, base + 2, NO_JUMP);\n  }\n  luaK_patchlist(fs, endfor, prep + 1);\n  luaK_fixline(fs, line);\n}\n\n\nstatic void fornum (LexState *ls, TString *varname, int line) {\n  /* fornum -> NAME = exp1,exp1[,exp1] forbody */\n  FuncState *fs = ls->fs;\n  int base = fs->freereg;\n  new_localvarliteral(ls, \"(for index)\");\n  new_localvarliteral(ls, \"(for limit)\");\n  new_localvarliteral(ls, \"(for step)\");\n  new_localvar(ls, varname);\n  checknext(ls, '=');\n  exp1(ls);  /* initial value */\n  checknext(ls, ',');\n  exp1(ls);  /* limit */\n  if (testnext(ls, ','))\n    exp1(ls);  /* optional step */\n  else {  /* default step = 1 */\n    luaK_codek(fs, fs->freereg, luaK_numberK(fs, 1));\n    luaK_reserveregs(fs, 1);\n  }\n  forbody(ls, base, line, 1, 1);\n}\n\n\nstatic void forlist (LexState *ls, TString *indexname) {\n  /* forlist -> NAME {,NAME} IN explist forbody */\n  FuncState *fs = ls->fs;\n  expdesc e;\n  int nvars = 4;  /* gen, state, control, plus at least one declared var */\n  int line;\n  int base = fs->freereg;\n  /* create control variables */\n  new_localvarliteral(ls, \"(for generator)\");\n  new_localvarliteral(ls, \"(for state)\");\n  new_localvarliteral(ls, \"(for control)\");\n  /* create declared variables */\n  new_localvar(ls, indexname);\n  while (testnext(ls, ',')) {\n    new_localvar(ls, str_checkname(ls));\n    nvars++;\n  }\n  checknext(ls, TK_IN);\n  line = ls->linenumber;\n  adjust_assign(ls, 3, explist(ls, &e), &e);\n  luaK_checkstack(fs, 3);  /* extra space to call generator */\n  forbody(ls, base, line, nvars - 3, 0);\n}\n\n\nstatic void forstat (LexState *ls, int line) {\n  /* forstat -> FOR (fornum | forlist) END */\n  FuncState *fs = ls->fs;\n  TString *varname;\n  BlockCnt bl;\n  enterblock(fs, &bl, 1);  /* scope for loop and control variables */\n  luaX_next(ls);  /* skip `for' */\n  varname = str_checkname(ls);  /* first variable name */\n  switch (ls->t.token) {\n    case '=': fornum(ls, varname, line); break;\n    case ',': case TK_IN: forlist(ls, varname); break;\n    default: luaX_syntaxerror(ls, LUA_QL(\"=\") \" or \" LUA_QL(\"in\") \" expected\");\n  }\n  check_match(ls, TK_END, TK_FOR, line);\n  leaveblock(fs);  /* loop scope (`break' jumps to this point) */\n}\n\n\nstatic void test_then_block (LexState *ls, int *escapelist) {\n  /* test_then_block -> [IF | ELSEIF] cond THEN block */\n  BlockCnt bl;\n  FuncState *fs = ls->fs;\n  expdesc v;\n  int jf;  /* instruction to skip 'then' code (if condition is false) */\n  luaX_next(ls);  /* skip IF or ELSEIF */\n  expr(ls, &v);  /* read condition */\n  checknext(ls, TK_THEN);\n  if (ls->t.token == TK_GOTO || ls->t.token == TK_BREAK) {\n    luaK_goiffalse(ls->fs, &v);  /* will jump to label if condition is true */\n    enterblock(fs, &bl, 0);  /* must enter block before 'goto' */\n    gotostat(ls, v.t);  /* handle goto/break */\n    skipnoopstat(ls);  /* skip other no-op statements */\n    if (block_follow(ls, 0)) {  /* 'goto' is the entire block? */\n      leaveblock(fs);\n      return;  /* and that is it */\n    }\n    else  /* must skip over 'then' part if condition is false */\n      jf = luaK_jump(fs);\n  }\n  else {  /* regular case (not goto/break) */\n    luaK_goiftrue(ls->fs, &v);  /* skip over block if condition is false */\n    enterblock(fs, &bl, 0);\n    jf = v.f;\n  }\n  statlist(ls);  /* `then' part */\n  leaveblock(fs);\n  if (ls->t.token == TK_ELSE ||\n      ls->t.token == TK_ELSEIF)  /* followed by 'else'/'elseif'? */\n    luaK_concat(fs, escapelist, luaK_jump(fs));  /* must jump over it */\n  luaK_patchtohere(fs, jf);\n}\n\n\nstatic void ifstat (LexState *ls, int line) {\n  /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */\n  FuncState *fs = ls->fs;\n  int escapelist = NO_JUMP;  /* exit list for finished parts */\n  test_then_block(ls, &escapelist);  /* IF cond THEN block */\n  while (ls->t.token == TK_ELSEIF)\n    test_then_block(ls, &escapelist);  /* ELSEIF cond THEN block */\n  if (testnext(ls, TK_ELSE))\n    block(ls);  /* `else' part */\n  check_match(ls, TK_END, TK_IF, line);\n  luaK_patchtohere(fs, escapelist);  /* patch escape list to 'if' end */\n}\n\n\nstatic void localfunc (LexState *ls) {\n  expdesc b;\n  FuncState *fs = ls->fs;\n  new_localvar(ls, str_checkname(ls));  /* new local variable */\n  adjustlocalvars(ls, 1);  /* enter its scope */\n  body(ls, &b, 0, ls->linenumber);  /* function created in next register */\n  /* debug information will only see the variable after this point! */\n  getlocvar(fs, b.u.info)->startpc = fs->pc;\n}\n\n\nstatic void localstat (LexState *ls) {\n  /* stat -> LOCAL NAME {`,' NAME} [`=' explist] */\n  int nvars = 0;\n  int nexps;\n  expdesc e;\n  do {\n    new_localvar(ls, str_checkname(ls));\n    nvars++;\n  } while (testnext(ls, ','));\n  if (testnext(ls, '='))\n    nexps = explist(ls, &e);\n  else {\n    e.k = VVOID;\n    nexps = 0;\n  }\n  adjust_assign(ls, nvars, nexps, &e);\n  adjustlocalvars(ls, nvars);\n}\n\n\nstatic int funcname (LexState *ls, expdesc *v) {\n  /* funcname -> NAME {fieldsel} [`:' NAME] */\n  int ismethod = 0;\n  singlevar(ls, v);\n  while (ls->t.token == '.')\n    fieldsel(ls, v);\n  if (ls->t.token == ':') {\n    ismethod = 1;\n    fieldsel(ls, v);\n  }\n  return ismethod;\n}\n\n\nstatic void funcstat (LexState *ls, int line) {\n  /* funcstat -> FUNCTION funcname body */\n  int ismethod;\n  expdesc v, b;\n  luaX_next(ls);  /* skip FUNCTION */\n  ismethod = funcname(ls, &v);\n  body(ls, &b, ismethod, line);\n  luaK_storevar(ls->fs, &v, &b);\n  luaK_fixline(ls->fs, line);  /* definition `happens' in the first line */\n}\n\n\nstatic void exprstat (LexState *ls) {\n  /* stat -> func | assignment */\n  FuncState *fs = ls->fs;\n  struct LHS_assign v;\n  suffixedexp(ls, &v.v);\n  if (ls->t.token == '=' || ls->t.token == ',') { /* stat -> assignment ? */\n    v.prev = NULL;\n    assignment(ls, &v, 1);\n  }\n  else {  /* stat -> func */\n    check_condition(ls, v.v.k == VCALL, \"syntax error\");\n    SETARG_C(getcode(fs, &v.v), 1);  /* call statement uses no results */\n  }\n}\n\n\nstatic void retstat (LexState *ls) {\n  /* stat -> RETURN [explist] [';'] */\n  FuncState *fs = ls->fs;\n  expdesc e;\n  int first, nret;  /* registers with returned values */\n  if (block_follow(ls, 1) || ls->t.token == ';')\n    first = nret = 0;  /* return no values */\n  else {\n    nret = explist(ls, &e);  /* optional return values */\n    if (hasmultret(e.k)) {\n      luaK_setmultret(fs, &e);\n      if (e.k == VCALL && nret == 1) {  /* tail call? */\n        SET_OPCODE(getcode(fs,&e), OP_TAILCALL);\n        lua_assert(GETARG_A(getcode(fs,&e)) == fs->nactvar);\n      }\n      first = fs->nactvar;\n      nret = LUA_MULTRET;  /* return all values */\n    }\n    else {\n      if (nret == 1)  /* only one single value? */\n        first = luaK_exp2anyreg(fs, &e);\n      else {\n        luaK_exp2nextreg(fs, &e);  /* values must go to the `stack' */\n        first = fs->nactvar;  /* return all `active' values */\n        lua_assert(nret == fs->freereg - first);\n      }\n    }\n  }\n  luaK_ret(fs, first, nret);\n  testnext(ls, ';');  /* skip optional semicolon */\n}\n\n\nstatic void statement (LexState *ls) {\n  int line = ls->linenumber;  /* may be needed for error messages */\n  enterlevel(ls);\n  switch (ls->t.token) {\n    case ';': {  /* stat -> ';' (empty statement) */\n      luaX_next(ls);  /* skip ';' */\n      break;\n    }\n    case TK_IF: {  /* stat -> ifstat */\n      ifstat(ls, line);\n      break;\n    }\n    case TK_WHILE: {  /* stat -> whilestat */\n      whilestat(ls, line);\n      break;\n    }\n    case TK_DO: {  /* stat -> DO block END */\n      luaX_next(ls);  /* skip DO */\n      block(ls);\n      check_match(ls, TK_END, TK_DO, line);\n      break;\n    }\n    case TK_FOR: {  /* stat -> forstat */\n      forstat(ls, line);\n      break;\n    }\n    case TK_REPEAT: {  /* stat -> repeatstat */\n      repeatstat(ls, line);\n      break;\n    }\n    case TK_FUNCTION: {  /* stat -> funcstat */\n      funcstat(ls, line);\n      break;\n    }\n    case TK_LOCAL: {  /* stat -> localstat */\n      luaX_next(ls);  /* skip LOCAL */\n      if (testnext(ls, TK_FUNCTION))  /* local function? */\n        localfunc(ls);\n      else\n        localstat(ls);\n      break;\n    }\n    case TK_DBCOLON: {  /* stat -> label */\n      luaX_next(ls);  /* skip double colon */\n      labelstat(ls, str_checkname(ls), line);\n      break;\n    }\n    case TK_RETURN: {  /* stat -> retstat */\n      luaX_next(ls);  /* skip RETURN */\n      retstat(ls);\n      break;\n    }\n    case TK_BREAK:   /* stat -> breakstat */\n    case TK_GOTO: {  /* stat -> 'goto' NAME */\n      gotostat(ls, luaK_jump(ls->fs));\n      break;\n    }\n    default: {  /* stat -> func | assignment */\n      exprstat(ls);\n      break;\n    }\n  }\n  lua_assert(ls->fs->f->maxstacksize >= ls->fs->freereg &&\n             ls->fs->freereg >= ls->fs->nactvar);\n  ls->fs->freereg = ls->fs->nactvar;  /* free registers */\n  leavelevel(ls);\n}\n\n/* }====================================================================== */\n\n\n/*\n** compiles the main function, which is a regular vararg function with an\n** upvalue named LUA_ENV\n*/\nstatic void mainfunc (LexState *ls, FuncState *fs) {\n  BlockCnt bl;\n  expdesc v;\n  open_func(ls, fs, &bl);\n  fs->f->is_vararg = 1;  /* main function is always vararg */\n  init_exp(&v, VLOCAL, 0);  /* create and... */\n  newupvalue(fs, ls->envn, &v);  /* ...set environment upvalue */\n  luaX_next(ls);  /* read first token */\n  statlist(ls);  /* parse main body */\n  check(ls, TK_EOS);\n  close_func(ls);\n}\n\n\nClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,\n                      Dyndata *dyd, const char *name, int firstchar) {\n  LexState lexstate;\n  FuncState funcstate;\n  Closure *cl = luaF_newLclosure(L, 1);  /* create main closure */\n  /* anchor closure (to avoid being collected) */\n  setclLvalue(L, L->top, cl);\n  incr_top(L);\n  funcstate.f = cl->l.p = luaF_newproto(L);\n  funcstate.f->source = luaS_new(L, name);  /* create and anchor TString */\n  lexstate.buff = buff;\n  lexstate.dyd = dyd;\n  dyd->actvar.n = dyd->gt.n = dyd->label.n = 0;\n  luaX_setinput(L, &lexstate, z, funcstate.f->source, firstchar);\n  mainfunc(&lexstate, &funcstate);\n  lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs);\n  /* all scopes should be correctly finished */\n  lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0);\n  return cl;  /* it's on the stack too */\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lparser.h",
    "content": "/*\n** $Id: lparser.h,v 1.70.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua Parser\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lparser_h\n#define lparser_h\n\n#include \"llimits.h\"\n#include \"lobject.h\"\n#include \"lzio.h\"\n\n\n/*\n** Expression descriptor\n*/\n\ntypedef enum {\n  VVOID,\t/* no value */\n  VNIL,\n  VTRUE,\n  VFALSE,\n  VK,\t\t/* info = index of constant in `k' */\n  VKNUM,\t/* nval = numerical value */\n  VNONRELOC,\t/* info = result register */\n  VLOCAL,\t/* info = local register */\n  VUPVAL,       /* info = index of upvalue in 'upvalues' */\n  VINDEXED,\t/* t = table register/upvalue; idx = index R/K */\n  VJMP,\t\t/* info = instruction pc */\n  VRELOCABLE,\t/* info = instruction pc */\n  VCALL,\t/* info = instruction pc */\n  VVARARG\t/* info = instruction pc */\n} expkind;\n\n\n#define vkisvar(k)\t(VLOCAL <= (k) && (k) <= VINDEXED)\n#define vkisinreg(k)\t((k) == VNONRELOC || (k) == VLOCAL)\n\ntypedef struct expdesc {\n  expkind k;\n  union {\n    struct {  /* for indexed variables (VINDEXED) */\n      short idx;  /* index (R/K) */\n      lu_byte t;  /* table (register or upvalue) */\n      lu_byte vt;  /* whether 't' is register (VLOCAL) or upvalue (VUPVAL) */\n    } ind;\n    int info;  /* for generic use */\n    lua_Number nval;  /* for VKNUM */\n  } u;\n  int t;  /* patch list of `exit when true' */\n  int f;  /* patch list of `exit when false' */\n} expdesc;\n\n\n/* description of active local variable */\ntypedef struct Vardesc {\n  short idx;  /* variable index in stack */\n} Vardesc;\n\n\n/* description of pending goto statements and label statements */\ntypedef struct Labeldesc {\n  TString *name;  /* label identifier */\n  int pc;  /* position in code */\n  int line;  /* line where it appeared */\n  lu_byte nactvar;  /* local level where it appears in current block */\n} Labeldesc;\n\n\n/* list of labels or gotos */\ntypedef struct Labellist {\n  Labeldesc *arr;  /* array */\n  int n;  /* number of entries in use */\n  int size;  /* array size */\n} Labellist;\n\n\n/* dynamic structures used by the parser */\ntypedef struct Dyndata {\n  struct {  /* list of active local variables */\n    Vardesc *arr;\n    int n;\n    int size;\n  } actvar;\n  Labellist gt;  /* list of pending gotos */\n  Labellist label;   /* list of active labels */\n} Dyndata;\n\n\n/* control of blocks */\nstruct BlockCnt;  /* defined in lparser.c */\n\n\n/* state needed to generate code for a given function */\ntypedef struct FuncState {\n  Proto *f;  /* current function header */\n  Table *h;  /* table to find (and reuse) elements in `k' */\n  struct FuncState *prev;  /* enclosing function */\n  struct LexState *ls;  /* lexical state */\n  struct BlockCnt *bl;  /* chain of current blocks */\n  int pc;  /* next position to code (equivalent to `ncode') */\n  int lasttarget;   /* 'label' of last 'jump label' */\n  int jpc;  /* list of pending jumps to `pc' */\n  int nk;  /* number of elements in `k' */\n  int np;  /* number of elements in `p' */\n  int firstlocal;  /* index of first local var (in Dyndata array) */\n  short nlocvars;  /* number of elements in 'f->locvars' */\n  lu_byte nactvar;  /* number of active local variables */\n  lu_byte nups;  /* number of upvalues */\n  lu_byte freereg;  /* first free register */\n} FuncState;\n\n\nLUAI_FUNC Closure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,\n                                Dyndata *dyd, const char *name, int firstchar);\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lstate.c",
    "content": "/*\n** $Id: lstate.c,v 2.99.1.2 2013/11/08 17:45:31 roberto Exp $\n** Global State\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stddef.h>\n#include <string.h>\n\n#define lstate_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lapi.h\"\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"llex.h\"\n#include \"lmem.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n\n\n#if !defined(LUAI_GCPAUSE)\n#define LUAI_GCPAUSE\t200  /* 200% */\n#endif\n\n#if !defined(LUAI_GCMAJOR)\n#define LUAI_GCMAJOR\t200  /* 200% */\n#endif\n\n#if !defined(LUAI_GCMUL)\n#define LUAI_GCMUL\t200 /* GC runs 'twice the speed' of memory allocation */\n#endif\n\n\n#define MEMERRMSG\t\"not enough memory\"\n\n\n/*\n** a macro to help the creation of a unique random seed when a state is\n** created; the seed is used to randomize hashes.\n*/\n#if !defined(luai_makeseed)\n#include <time.h>\n#define luai_makeseed()\t\tcast(unsigned int, time(NULL))\n#endif\n\n\n\n/*\n** thread state + extra space\n*/\ntypedef struct LX {\n#if defined(LUAI_EXTRASPACE)\n  char buff[LUAI_EXTRASPACE];\n#endif\n  lua_State l;\n} LX;\n\n\n/*\n** Main thread combines a thread state and the global state\n*/\ntypedef struct LG {\n  LX l;\n  global_State g;\n} LG;\n\n\n\n#define fromstate(L)\t(cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l)))\n\n\n/*\n** Compute an initial seed as random as possible. In ANSI, rely on\n** Address Space Layout Randomization (if present) to increase\n** randomness..\n*/\n#define addbuff(b,p,e) \\\n  { size_t t = cast(size_t, e); \\\n    memcpy(buff + p, &t, sizeof(t)); p += sizeof(t); }\n\nstatic unsigned int makeseed (lua_State *L) {\n  char buff[4 * sizeof(size_t)];\n  unsigned int h = luai_makeseed();\n  int p = 0;\n  addbuff(buff, p, L);  /* heap variable */\n  addbuff(buff, p, &h);  /* local variable */\n  addbuff(buff, p, luaO_nilobject);  /* global variable */\n  addbuff(buff, p, &lua_newstate);  /* public function */\n  lua_assert(p == sizeof(buff));\n  return luaS_hash(buff, p, h);\n}\n\n\n/*\n** set GCdebt to a new value keeping the value (totalbytes + GCdebt)\n** invariant\n*/\nvoid luaE_setdebt (global_State *g, l_mem debt) {\n  g->totalbytes -= (debt - g->GCdebt);\n  g->GCdebt = debt;\n}\n\n\nCallInfo *luaE_extendCI (lua_State *L) {\n  CallInfo *ci = luaM_new(L, CallInfo);\n  lua_assert(L->ci->next == NULL);\n  L->ci->next = ci;\n  ci->previous = L->ci;\n  ci->next = NULL;\n  return ci;\n}\n\n\nvoid luaE_freeCI (lua_State *L) {\n  CallInfo *ci = L->ci;\n  CallInfo *next = ci->next;\n  ci->next = NULL;\n  while ((ci = next) != NULL) {\n    next = ci->next;\n    luaM_free(L, ci);\n  }\n}\n\n\nstatic void stack_init (lua_State *L1, lua_State *L) {\n  int i; CallInfo *ci;\n  /* initialize stack array */\n  L1->stack = luaM_newvector(L, BASIC_STACK_SIZE, TValue);\n  L1->stacksize = BASIC_STACK_SIZE;\n  for (i = 0; i < BASIC_STACK_SIZE; i++)\n    setnilvalue(L1->stack + i);  /* erase new stack */\n  L1->top = L1->stack;\n  L1->stack_last = L1->stack + L1->stacksize - EXTRA_STACK;\n  /* initialize first ci */\n  ci = &L1->base_ci;\n  ci->next = ci->previous = NULL;\n  ci->callstatus = 0;\n  ci->func = L1->top;\n  setnilvalue(L1->top++);  /* 'function' entry for this 'ci' */\n  ci->top = L1->top + LUA_MINSTACK;\n  L1->ci = ci;\n}\n\n\nstatic void freestack (lua_State *L) {\n  if (L->stack == NULL)\n    return;  /* stack not completely built yet */\n  L->ci = &L->base_ci;  /* free the entire 'ci' list */\n  luaE_freeCI(L);\n  luaM_freearray(L, L->stack, L->stacksize);  /* free stack array */\n}\n\n\n/*\n** Create registry table and its predefined values\n*/\nstatic void init_registry (lua_State *L, global_State *g) {\n  TValue mt;\n  /* create registry */\n  Table *registry = luaH_new(L);\n  sethvalue(L, &g->l_registry, registry);\n  luaH_resize(L, registry, LUA_RIDX_LAST, 0);\n  /* registry[LUA_RIDX_MAINTHREAD] = L */\n  setthvalue(L, &mt, L);\n  luaH_setint(L, registry, LUA_RIDX_MAINTHREAD, &mt);\n  /* registry[LUA_RIDX_GLOBALS] = table of globals */\n  sethvalue(L, &mt, luaH_new(L));\n  luaH_setint(L, registry, LUA_RIDX_GLOBALS, &mt);\n}\n\n\n/*\n** open parts of the state that may cause memory-allocation errors\n*/\nstatic void f_luaopen (lua_State *L, void *ud) {\n  global_State *g = G(L);\n  UNUSED(ud);\n  stack_init(L, L);  /* init stack */\n  init_registry(L, g);\n  luaS_resize(L, MINSTRTABSIZE);  /* initial size of string table */\n  luaT_init(L);\n  luaX_init(L);\n  /* pre-create memory-error message */\n  g->memerrmsg = luaS_newliteral(L, MEMERRMSG);\n  luaS_fix(g->memerrmsg);  /* it should never be collected */\n  g->gcrunning = 1;  /* allow gc */\n  g->version = lua_version(NULL);\n  luai_userstateopen(L);\n}\n\n\n/*\n** preinitialize a state with consistent values without allocating\n** any memory (to avoid errors)\n*/\nstatic void preinit_state (lua_State *L, global_State *g) {\n  G(L) = g;\n  L->stack = NULL;\n  L->ci = NULL;\n  L->stacksize = 0;\n  L->errorJmp = NULL;\n  L->nCcalls = 0;\n  L->hook = NULL;\n  L->hookmask = 0;\n  L->basehookcount = 0;\n  L->allowhook = 1;\n  resethookcount(L);\n  L->openupval = NULL;\n  L->nny = 1;\n  L->status = LUA_OK;\n  L->errfunc = 0;\n}\n\n\nstatic void close_state (lua_State *L) {\n  global_State *g = G(L);\n  luaF_close(L, L->stack);  /* close all upvalues for this thread */\n  luaC_freeallobjects(L);  /* collect all objects */\n  if (g->version)  /* closing a fully built state? */\n    luai_userstateclose(L);\n  luaM_freearray(L, G(L)->strt.hash, G(L)->strt.size);\n  luaZ_freebuffer(L, &g->buff);\n  freestack(L);\n  lua_assert(gettotalbytes(g) == sizeof(LG));\n  (*g->frealloc)(g->ud, fromstate(L), sizeof(LG), 0);  /* free main block */\n}\n\n\nLUA_API lua_State *lua_newthread (lua_State *L) {\n  lua_State *L1;\n  lua_lock(L);\n  luaC_checkGC(L);\n  L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th;\n  setthvalue(L, L->top, L1);\n  api_incr_top(L);\n  preinit_state(L1, G(L));\n  L1->hookmask = L->hookmask;\n  L1->basehookcount = L->basehookcount;\n  L1->hook = L->hook;\n  resethookcount(L1);\n  luai_userstatethread(L, L1);\n  stack_init(L1, L);  /* init stack */\n  lua_unlock(L);\n  return L1;\n}\n\n\nvoid luaE_freethread (lua_State *L, lua_State *L1) {\n  LX *l = fromstate(L1);\n  luaF_close(L1, L1->stack);  /* close all upvalues for this thread */\n  lua_assert(L1->openupval == NULL);\n  luai_userstatefree(L, L1);\n  freestack(L1);\n  luaM_free(L, l);\n}\n\n\nLUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {\n  int i;\n  lua_State *L;\n  global_State *g;\n  LG *l = cast(LG *, (*f)(ud, NULL, LUA_TTHREAD, sizeof(LG)));\n  if (l == NULL) return NULL;\n  L = &l->l.l;\n  g = &l->g;\n  L->next = NULL;\n  L->tt = LUA_TTHREAD;\n  g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT);\n  L->marked = luaC_white(g);\n  g->gckind = KGC_NORMAL;\n  preinit_state(L, g);\n  g->frealloc = f;\n  g->ud = ud;\n  g->mainthread = L;\n  g->seed = makeseed(L);\n  g->uvhead.u.l.prev = &g->uvhead;\n  g->uvhead.u.l.next = &g->uvhead;\n  g->gcrunning = 0;  /* no GC while building state */\n  g->GCestimate = 0;\n  g->strt.size = 0;\n  g->strt.nuse = 0;\n  g->strt.hash = NULL;\n  setnilvalue(&g->l_registry);\n  luaZ_initbuffer(L, &g->buff);\n  g->panic = NULL;\n  g->version = NULL;\n  g->gcstate = GCSpause;\n  g->allgc = NULL;\n  g->finobj = NULL;\n  g->tobefnz = NULL;\n  g->sweepgc = g->sweepfin = NULL;\n  g->gray = g->grayagain = NULL;\n  g->weak = g->ephemeron = g->allweak = NULL;\n  g->totalbytes = sizeof(LG);\n  g->GCdebt = 0;\n  g->gcpause = LUAI_GCPAUSE;\n  g->gcmajorinc = LUAI_GCMAJOR;\n  g->gcstepmul = LUAI_GCMUL;\n  for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL;\n  if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) {\n    /* memory allocation error: free partial state */\n    close_state(L);\n    L = NULL;\n  }\n  return L;\n}\n\n\nLUA_API void lua_close (lua_State *L) {\n  L = G(L)->mainthread;  /* only the main thread can be closed */\n  lua_lock(L);\n  close_state(L);\n}\n\n\n"
  },
  {
    "path": "src/lib/lua52/lstate.h",
    "content": "/*\n** $Id: lstate.h,v 2.82.1.1 2013/04/12 18:48:47 roberto Exp $\n** Global State\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lstate_h\n#define lstate_h\n\n#include \"lua.h\"\n\n#include \"lobject.h\"\n#include \"ltm.h\"\n#include \"lzio.h\"\n\n\n/*\n\n** Some notes about garbage-collected objects:  All objects in Lua must\n** be kept somehow accessible until being freed.\n**\n** Lua keeps most objects linked in list g->allgc. The link uses field\n** 'next' of the CommonHeader.\n**\n** Strings are kept in several lists headed by the array g->strt.hash.\n**\n** Open upvalues are not subject to independent garbage collection. They\n** are collected together with their respective threads. Lua keeps a\n** double-linked list with all open upvalues (g->uvhead) so that it can\n** mark objects referred by them. (They are always gray, so they must\n** be remarked in the atomic step. Usually their contents would be marked\n** when traversing the respective threads, but the thread may already be\n** dead, while the upvalue is still accessible through closures.)\n**\n** Objects with finalizers are kept in the list g->finobj.\n**\n** The list g->tobefnz links all objects being finalized.\n\n*/\n\n\nstruct lua_longjmp;  /* defined in ldo.c */\n\n\n\n/* extra stack space to handle TM calls and some other extras */\n#define EXTRA_STACK   5\n\n\n#define BASIC_STACK_SIZE        (2*LUA_MINSTACK)\n\n\n/* kinds of Garbage Collection */\n#define KGC_NORMAL\t0\n#define KGC_EMERGENCY\t1\t/* gc was forced by an allocation failure */\n#define KGC_GEN\t\t2\t/* generational collection */\n\n\ntypedef struct stringtable {\n  GCObject **hash;\n  lu_int32 nuse;  /* number of elements */\n  int size;\n} stringtable;\n\n\n/*\n** information about a call\n*/\ntypedef struct CallInfo {\n  StkId func;  /* function index in the stack */\n  StkId\ttop;  /* top for this function */\n  struct CallInfo *previous, *next;  /* dynamic call link */\n  short nresults;  /* expected number of results from this function */\n  lu_byte callstatus;\n  ptrdiff_t extra;\n  union {\n    struct {  /* only for Lua functions */\n      StkId base;  /* base for this function */\n      const Instruction *savedpc;\n    } l;\n    struct {  /* only for C functions */\n      int ctx;  /* context info. in case of yields */\n      lua_CFunction k;  /* continuation in case of yields */\n      ptrdiff_t old_errfunc;\n      lu_byte old_allowhook;\n      lu_byte status;\n    } c;\n  } u;\n} CallInfo;\n\n\n/*\n** Bits in CallInfo status\n*/\n#define CIST_LUA\t(1<<0)\t/* call is running a Lua function */\n#define CIST_HOOKED\t(1<<1)\t/* call is running a debug hook */\n#define CIST_REENTRY\t(1<<2)\t/* call is running on same invocation of\n                                   luaV_execute of previous call */\n#define CIST_YIELDED\t(1<<3)\t/* call reentered after suspension */\n#define CIST_YPCALL\t(1<<4)\t/* call is a yieldable protected call */\n#define CIST_STAT\t(1<<5)\t/* call has an error status (pcall) */\n#define CIST_TAIL\t(1<<6)\t/* call was tail called */\n#define CIST_HOOKYIELD\t(1<<7)\t/* last hook called yielded */\n\n\n#define isLua(ci)\t((ci)->callstatus & CIST_LUA)\n\n\n/*\n** `global state', shared by all threads of this state\n*/\ntypedef struct global_State {\n  lua_Alloc frealloc;  /* function to reallocate memory */\n  void *ud;         /* auxiliary data to `frealloc' */\n  lu_mem totalbytes;  /* number of bytes currently allocated - GCdebt */\n  l_mem GCdebt;  /* bytes allocated not yet compensated by the collector */\n  lu_mem GCmemtrav;  /* memory traversed by the GC */\n  lu_mem GCestimate;  /* an estimate of the non-garbage memory in use */\n  stringtable strt;  /* hash table for strings */\n  TValue l_registry;\n  unsigned int seed;  /* randomized seed for hashes */\n  lu_byte currentwhite;\n  lu_byte gcstate;  /* state of garbage collector */\n  lu_byte gckind;  /* kind of GC running */\n  lu_byte gcrunning;  /* true if GC is running */\n  int sweepstrgc;  /* position of sweep in `strt' */\n  GCObject *allgc;  /* list of all collectable objects */\n  GCObject *finobj;  /* list of collectable objects with finalizers */\n  GCObject **sweepgc;  /* current position of sweep in list 'allgc' */\n  GCObject **sweepfin;  /* current position of sweep in list 'finobj' */\n  GCObject *gray;  /* list of gray objects */\n  GCObject *grayagain;  /* list of objects to be traversed atomically */\n  GCObject *weak;  /* list of tables with weak values */\n  GCObject *ephemeron;  /* list of ephemeron tables (weak keys) */\n  GCObject *allweak;  /* list of all-weak tables */\n  GCObject *tobefnz;  /* list of userdata to be GC */\n  UpVal uvhead;  /* head of double-linked list of all open upvalues */\n  Mbuffer buff;  /* temporary buffer for string concatenation */\n  int gcpause;  /* size of pause between successive GCs */\n  int gcmajorinc;  /* pause between major collections (only in gen. mode) */\n  int gcstepmul;  /* GC `granularity' */\n  lua_CFunction panic;  /* to be called in unprotected errors */\n  struct lua_State *mainthread;\n  const lua_Number *version;  /* pointer to version number */\n  TString *memerrmsg;  /* memory-error message */\n  TString *tmname[TM_N];  /* array with tag-method names */\n  struct Table *mt[LUA_NUMTAGS];  /* metatables for basic types */\n} global_State;\n\n\n/*\n** `per thread' state\n*/\nstruct lua_State {\n  CommonHeader;\n  lu_byte status;\n  StkId top;  /* first free slot in the stack */\n  global_State *l_G;\n  CallInfo *ci;  /* call info for current function */\n  const Instruction *oldpc;  /* last pc traced */\n  StkId stack_last;  /* last free slot in the stack */\n  StkId stack;  /* stack base */\n  int stacksize;\n  unsigned short nny;  /* number of non-yieldable calls in stack */\n  unsigned short nCcalls;  /* number of nested C calls */\n  lu_byte hookmask;\n  lu_byte allowhook;\n  int basehookcount;\n  int hookcount;\n  lua_Hook hook;\n  GCObject *openupval;  /* list of open upvalues in this stack */\n  GCObject *gclist;\n  struct lua_longjmp *errorJmp;  /* current error recover point */\n  ptrdiff_t errfunc;  /* current error handling function (stack index) */\n  CallInfo base_ci;  /* CallInfo for first level (C calling Lua) */\n};\n\n\n#define G(L)\t(L->l_G)\n\n\n/*\n** Union of all collectable objects\n*/\nunion GCObject {\n  GCheader gch;  /* common header */\n  union TString ts;\n  union Udata u;\n  union Closure cl;\n  struct Table h;\n  struct Proto p;\n  struct UpVal uv;\n  struct lua_State th;  /* thread */\n};\n\n\n#define gch(o)\t\t(&(o)->gch)\n\n/* macros to convert a GCObject into a specific value */\n#define rawgco2ts(o)  \\\n\tcheck_exp(novariant((o)->gch.tt) == LUA_TSTRING, &((o)->ts))\n#define gco2ts(o)\t(&rawgco2ts(o)->tsv)\n#define rawgco2u(o)\tcheck_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))\n#define gco2u(o)\t(&rawgco2u(o)->uv)\n#define gco2lcl(o)\tcheck_exp((o)->gch.tt == LUA_TLCL, &((o)->cl.l))\n#define gco2ccl(o)\tcheck_exp((o)->gch.tt == LUA_TCCL, &((o)->cl.c))\n#define gco2cl(o)  \\\n\tcheck_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl))\n#define gco2t(o)\tcheck_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))\n#define gco2p(o)\tcheck_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))\n#define gco2uv(o)\tcheck_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))\n#define gco2th(o)\tcheck_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))\n\n/* macro to convert any Lua object into a GCObject */\n#define obj2gco(v)\t(cast(GCObject *, (v)))\n\n\n/* actual number of total bytes allocated */\n#define gettotalbytes(g)\t((g)->totalbytes + (g)->GCdebt)\n\nLUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt);\nLUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);\nLUAI_FUNC CallInfo *luaE_extendCI (lua_State *L);\nLUAI_FUNC void luaE_freeCI (lua_State *L);\n\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/lstring.c",
    "content": "/*\n** $Id: lstring.c,v 2.26.1.1 2013/04/12 18:48:47 roberto Exp $\n** String table (keeps all strings handled by Lua)\n** See Copyright Notice in lua.h\n*/\n\n\n#include <string.h>\n\n#define lstring_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n\n\n/*\n** Lua will use at most ~(2^LUAI_HASHLIMIT) bytes from a string to\n** compute its hash\n*/\n#if !defined(LUAI_HASHLIMIT)\n#define LUAI_HASHLIMIT\t\t5\n#endif\n\n\n/*\n** equality for long strings\n*/\nint luaS_eqlngstr (TString *a, TString *b) {\n  size_t len = a->tsv.len;\n  lua_assert(a->tsv.tt == LUA_TLNGSTR && b->tsv.tt == LUA_TLNGSTR);\n  return (a == b) ||  /* same instance or... */\n    ((len == b->tsv.len) &&  /* equal length and ... */\n     (memcmp(getstr(a), getstr(b), len) == 0));  /* equal contents */\n}\n\n\n/*\n** equality for strings\n*/\nint luaS_eqstr (TString *a, TString *b) {\n  return (a->tsv.tt == b->tsv.tt) &&\n         (a->tsv.tt == LUA_TSHRSTR ? eqshrstr(a, b) : luaS_eqlngstr(a, b));\n}\n\n\nunsigned int luaS_hash (const char *str, size_t l, unsigned int seed) {\n  unsigned int h = seed ^ cast(unsigned int, l);\n  size_t l1;\n  size_t step = (l >> LUAI_HASHLIMIT) + 1;\n  for (l1 = l; l1 >= step; l1 -= step)\n    h = h ^ ((h<<5) + (h>>2) + cast_byte(str[l1 - 1]));\n  return h;\n}\n\n\n/*\n** resizes the string table\n*/\nvoid luaS_resize (lua_State *L, int newsize) {\n  int i;\n  stringtable *tb = &G(L)->strt;\n  /* cannot resize while GC is traversing strings */\n  luaC_runtilstate(L, ~bitmask(GCSsweepstring));\n  if (newsize > tb->size) {\n    luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *);\n    for (i = tb->size; i < newsize; i++) tb->hash[i] = NULL;\n  }\n  /* rehash */\n  for (i=0; i<tb->size; i++) {\n    GCObject *p = tb->hash[i];\n    tb->hash[i] = NULL;\n    while (p) {  /* for each node in the list */\n      GCObject *next = gch(p)->next;  /* save next */\n      unsigned int h = lmod(gco2ts(p)->hash, newsize);  /* new position */\n      gch(p)->next = tb->hash[h];  /* chain it */\n      tb->hash[h] = p;\n      resetoldbit(p);  /* see MOVE OLD rule */\n      p = next;\n    }\n  }\n  if (newsize < tb->size) {\n    /* shrinking slice must be empty */\n    lua_assert(tb->hash[newsize] == NULL && tb->hash[tb->size - 1] == NULL);\n    luaM_reallocvector(L, tb->hash, tb->size, newsize, GCObject *);\n  }\n  tb->size = newsize;\n}\n\n\n/*\n** creates a new string object\n*/\nstatic TString *createstrobj (lua_State *L, const char *str, size_t l,\n                              int tag, unsigned int h, GCObject **list) {\n  TString *ts;\n  size_t totalsize;  /* total size of TString object */\n  totalsize = sizeof(TString) + ((l + 1) * sizeof(char));\n  ts = &luaC_newobj(L, tag, totalsize, list, 0)->ts;\n  ts->tsv.len = l;\n  ts->tsv.hash = h;\n  ts->tsv.extra = 0;\n  memcpy(ts+1, str, l*sizeof(char));\n  ((char *)(ts+1))[l] = '\\0';  /* ending 0 */\n  return ts;\n}\n\n\n/*\n** creates a new short string, inserting it into string table\n*/\nstatic TString *newshrstr (lua_State *L, const char *str, size_t l,\n                                       unsigned int h) {\n  GCObject **list;  /* (pointer to) list where it will be inserted */\n  stringtable *tb = &G(L)->strt;\n  TString *s;\n  if (tb->nuse >= cast(lu_int32, tb->size) && tb->size <= MAX_INT/2)\n    luaS_resize(L, tb->size*2);  /* too crowded */\n  list = &tb->hash[lmod(h, tb->size)];\n  s = createstrobj(L, str, l, LUA_TSHRSTR, h, list);\n  tb->nuse++;\n  return s;\n}\n\n\n/*\n** checks whether short string exists and reuses it or creates a new one\n*/\nstatic TString *internshrstr (lua_State *L, const char *str, size_t l) {\n  GCObject *o;\n  global_State *g = G(L);\n  unsigned int h = luaS_hash(str, l, g->seed);\n  for (o = g->strt.hash[lmod(h, g->strt.size)];\n       o != NULL;\n       o = gch(o)->next) {\n    TString *ts = rawgco2ts(o);\n    if (h == ts->tsv.hash &&\n        l == ts->tsv.len &&\n        (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) {\n      if (isdead(G(L), o))  /* string is dead (but was not collected yet)? */\n        changewhite(o);  /* resurrect it */\n      return ts;\n    }\n  }\n  return newshrstr(L, str, l, h);  /* not found; create a new string */\n}\n\n\n/*\n** new string (with explicit length)\n*/\nTString *luaS_newlstr (lua_State *L, const char *str, size_t l) {\n  if (l <= LUAI_MAXSHORTLEN)  /* short string? */\n    return internshrstr(L, str, l);\n  else {\n    if (l + 1 > (MAX_SIZET - sizeof(TString))/sizeof(char))\n      luaM_toobig(L);\n    return createstrobj(L, str, l, LUA_TLNGSTR, G(L)->seed, NULL);\n  }\n}\n\n\n/*\n** new zero-terminated string\n*/\nTString *luaS_new (lua_State *L, const char *str) {\n  return luaS_newlstr(L, str, strlen(str));\n}\n\n\nUdata *luaS_newudata (lua_State *L, size_t s, Table *e) {\n  Udata *u;\n  if (s > MAX_SIZET - sizeof(Udata))\n    luaM_toobig(L);\n  u = &luaC_newobj(L, LUA_TUSERDATA, sizeof(Udata) + s, NULL, 0)->u;\n  u->uv.len = s;\n  u->uv.metatable = NULL;\n  u->uv.env = e;\n  return u;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lstring.h",
    "content": "/*\n** $Id: lstring.h,v 1.49.1.1 2013/04/12 18:48:47 roberto Exp $\n** String table (keep all strings handled by Lua)\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lstring_h\n#define lstring_h\n\n#include \"lgc.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n\n\n#define sizestring(s)\t(sizeof(union TString)+((s)->len+1)*sizeof(char))\n\n#define sizeudata(u)\t(sizeof(union Udata)+(u)->len)\n\n#define luaS_newliteral(L, s)\t(luaS_newlstr(L, \"\" s, \\\n                                 (sizeof(s)/sizeof(char))-1))\n\n#define luaS_fix(s)\tl_setbit((s)->tsv.marked, FIXEDBIT)\n\n\n/*\n** test whether a string is a reserved word\n*/\n#define isreserved(s)\t((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)\n\n\n/*\n** equality for short strings, which are always internalized\n*/\n#define eqshrstr(a,b)\tcheck_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b))\n\n\nLUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed);\nLUAI_FUNC int luaS_eqlngstr (TString *a, TString *b);\nLUAI_FUNC int luaS_eqstr (TString *a, TString *b);\nLUAI_FUNC void luaS_resize (lua_State *L, int newsize);\nLUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);\nLUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);\nLUAI_FUNC TString *luaS_new (lua_State *L, const char *str);\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lstrlib.c",
    "content": "/*\n** $Id: lstrlib.c,v 1.178.1.1 2013/04/12 18:48:47 roberto Exp $\n** Standard library for string operations and pattern-matching\n** See Copyright Notice in lua.h\n*/\n\n\n#include <ctype.h>\n#include <stddef.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define lstrlib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n/*\n** maximum number of captures that a pattern can do during\n** pattern-matching. This limit is arbitrary.\n*/\n#if !defined(LUA_MAXCAPTURES)\n#define LUA_MAXCAPTURES\t\t32\n#endif\n\n\n/* macro to `unsign' a character */\n#define uchar(c)\t((unsigned char)(c))\n\n\n\nstatic int str_len (lua_State *L) {\n  size_t l;\n  luaL_checklstring(L, 1, &l);\n  lua_pushinteger(L, (lua_Integer)l);\n  return 1;\n}\n\n\n/* translate a relative string position: negative means back from end */\nstatic size_t posrelat (ptrdiff_t pos, size_t len) {\n  if (pos >= 0) return (size_t)pos;\n  else if (0u - (size_t)pos > len) return 0;\n  else return len - ((size_t)-pos) + 1;\n}\n\n\nstatic int str_sub (lua_State *L) {\n  size_t l;\n  const char *s = luaL_checklstring(L, 1, &l);\n  size_t start = posrelat(luaL_checkinteger(L, 2), l);\n  size_t end = posrelat(luaL_optinteger(L, 3, -1), l);\n  if (start < 1) start = 1;\n  if (end > l) end = l;\n  if (start <= end)\n    lua_pushlstring(L, s + start - 1, end - start + 1);\n  else lua_pushliteral(L, \"\");\n  return 1;\n}\n\n\nstatic int str_reverse (lua_State *L) {\n  size_t l, i;\n  luaL_Buffer b;\n  const char *s = luaL_checklstring(L, 1, &l);\n  char *p = luaL_buffinitsize(L, &b, l);\n  for (i = 0; i < l; i++)\n    p[i] = s[l - i - 1];\n  luaL_pushresultsize(&b, l);\n  return 1;\n}\n\n\nstatic int str_lower (lua_State *L) {\n  size_t l;\n  size_t i;\n  luaL_Buffer b;\n  const char *s = luaL_checklstring(L, 1, &l);\n  char *p = luaL_buffinitsize(L, &b, l);\n  for (i=0; i<l; i++)\n    p[i] = tolower(uchar(s[i]));\n  luaL_pushresultsize(&b, l);\n  return 1;\n}\n\n\nstatic int str_upper (lua_State *L) {\n  size_t l;\n  size_t i;\n  luaL_Buffer b;\n  const char *s = luaL_checklstring(L, 1, &l);\n  char *p = luaL_buffinitsize(L, &b, l);\n  for (i=0; i<l; i++)\n    p[i] = toupper(uchar(s[i]));\n  luaL_pushresultsize(&b, l);\n  return 1;\n}\n\n\n/* reasonable limit to avoid arithmetic overflow */\n#define MAXSIZE\t\t((~(size_t)0) >> 1)\n\nstatic int str_rep (lua_State *L) {\n  size_t l, lsep;\n  const char *s = luaL_checklstring(L, 1, &l);\n  int n = luaL_checkint(L, 2);\n  const char *sep = luaL_optlstring(L, 3, \"\", &lsep);\n  if (n <= 0) lua_pushliteral(L, \"\");\n  else if (l + lsep < l || l + lsep >= MAXSIZE / n)  /* may overflow? */\n    return luaL_error(L, \"resulting string too large\");\n  else {\n    size_t totallen = n * l + (n - 1) * lsep;\n    luaL_Buffer b;\n    char *p = luaL_buffinitsize(L, &b, totallen);\n    while (n-- > 1) {  /* first n-1 copies (followed by separator) */\n      memcpy(p, s, l * sizeof(char)); p += l;\n      if (lsep > 0) {  /* avoid empty 'memcpy' (may be expensive) */\n        memcpy(p, sep, lsep * sizeof(char)); p += lsep;\n      }\n    }\n    memcpy(p, s, l * sizeof(char));  /* last copy (not followed by separator) */\n    luaL_pushresultsize(&b, totallen);\n  }\n  return 1;\n}\n\n\nstatic int str_byte (lua_State *L) {\n  size_t l;\n  const char *s = luaL_checklstring(L, 1, &l);\n  size_t posi = posrelat(luaL_optinteger(L, 2, 1), l);\n  size_t pose = posrelat(luaL_optinteger(L, 3, posi), l);\n  int n, i;\n  if (posi < 1) posi = 1;\n  if (pose > l) pose = l;\n  if (posi > pose) return 0;  /* empty interval; return no values */\n  n = (int)(pose -  posi + 1);\n  if (posi + n <= pose)  /* (size_t -> int) overflow? */\n    return luaL_error(L, \"string slice too long\");\n  luaL_checkstack(L, n, \"string slice too long\");\n  for (i=0; i<n; i++)\n    lua_pushinteger(L, uchar(s[posi+i-1]));\n  return n;\n}\n\n\nstatic int str_char (lua_State *L) {\n  int n = lua_gettop(L);  /* number of arguments */\n  int i;\n  luaL_Buffer b;\n  char *p = luaL_buffinitsize(L, &b, n);\n  for (i=1; i<=n; i++) {\n    int c = luaL_checkint(L, i);\n    luaL_argcheck(L, uchar(c) == c, i, \"value out of range\");\n    p[i - 1] = uchar(c);\n  }\n  luaL_pushresultsize(&b, n);\n  return 1;\n}\n\n\nstatic int writer (lua_State *L, const void* b, size_t size, void* B) {\n  (void)L;\n  luaL_addlstring((luaL_Buffer*) B, (const char *)b, size);\n  return 0;\n}\n\n\nstatic int str_dump (lua_State *L) {\n  luaL_Buffer b;\n  luaL_checktype(L, 1, LUA_TFUNCTION);\n  lua_settop(L, 1);\n  luaL_buffinit(L,&b);\n  if (lua_dump(L, writer, &b) != 0)\n    return luaL_error(L, \"unable to dump given function\");\n  luaL_pushresult(&b);\n  return 1;\n}\n\n\n\n/*\n** {======================================================\n** PATTERN MATCHING\n** =======================================================\n*/\n\n\n#define CAP_UNFINISHED\t(-1)\n#define CAP_POSITION\t(-2)\n\n\ntypedef struct MatchState {\n  int matchdepth;  /* control for recursive depth (to avoid C stack overflow) */\n  const char *src_init;  /* init of source string */\n  const char *src_end;  /* end ('\\0') of source string */\n  const char *p_end;  /* end ('\\0') of pattern */\n  lua_State *L;\n  int level;  /* total number of captures (finished or unfinished) */\n  struct {\n    const char *init;\n    ptrdiff_t len;\n  } capture[LUA_MAXCAPTURES];\n} MatchState;\n\n\n/* recursive function */\nstatic const char *match (MatchState *ms, const char *s, const char *p);\n\n\n/* maximum recursion depth for 'match' */\n#if !defined(MAXCCALLS)\n#define MAXCCALLS\t200\n#endif\n\n\n#define L_ESC\t\t'%'\n#define SPECIALS\t\"^$*+?.([%-\"\n\n\nstatic int check_capture (MatchState *ms, int l) {\n  l -= '1';\n  if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED)\n    return luaL_error(ms->L, \"invalid capture index %%%d\", l + 1);\n  return l;\n}\n\n\nstatic int capture_to_close (MatchState *ms) {\n  int level = ms->level;\n  for (level--; level>=0; level--)\n    if (ms->capture[level].len == CAP_UNFINISHED) return level;\n  return luaL_error(ms->L, \"invalid pattern capture\");\n}\n\n\nstatic const char *classend (MatchState *ms, const char *p) {\n  switch (*p++) {\n    case L_ESC: {\n      if (p == ms->p_end)\n        luaL_error(ms->L, \"malformed pattern (ends with \" LUA_QL(\"%%\") \")\");\n      return p+1;\n    }\n    case '[': {\n      if (*p == '^') p++;\n      do {  /* look for a `]' */\n        if (p == ms->p_end)\n          luaL_error(ms->L, \"malformed pattern (missing \" LUA_QL(\"]\") \")\");\n        if (*(p++) == L_ESC && p < ms->p_end)\n          p++;  /* skip escapes (e.g. `%]') */\n      } while (*p != ']');\n      return p+1;\n    }\n    default: {\n      return p;\n    }\n  }\n}\n\n\nstatic int match_class (int c, int cl) {\n  int res;\n  switch (tolower(cl)) {\n    case 'a' : res = isalpha(c); break;\n    case 'c' : res = iscntrl(c); break;\n    case 'd' : res = isdigit(c); break;\n    case 'g' : res = isgraph(c); break;\n    case 'l' : res = islower(c); break;\n    case 'p' : res = ispunct(c); break;\n    case 's' : res = isspace(c); break;\n    case 'u' : res = isupper(c); break;\n    case 'w' : res = isalnum(c); break;\n    case 'x' : res = isxdigit(c); break;\n    case 'z' : res = (c == 0); break;  /* deprecated option */\n    default: return (cl == c);\n  }\n  return (islower(cl) ? res : !res);\n}\n\n\nstatic int matchbracketclass (int c, const char *p, const char *ec) {\n  int sig = 1;\n  if (*(p+1) == '^') {\n    sig = 0;\n    p++;  /* skip the `^' */\n  }\n  while (++p < ec) {\n    if (*p == L_ESC) {\n      p++;\n      if (match_class(c, uchar(*p)))\n        return sig;\n    }\n    else if ((*(p+1) == '-') && (p+2 < ec)) {\n      p+=2;\n      if (uchar(*(p-2)) <= c && c <= uchar(*p))\n        return sig;\n    }\n    else if (uchar(*p) == c) return sig;\n  }\n  return !sig;\n}\n\n\nstatic int singlematch (MatchState *ms, const char *s, const char *p,\n                        const char *ep) {\n  if (s >= ms->src_end)\n    return 0;\n  else {\n    int c = uchar(*s);\n    switch (*p) {\n      case '.': return 1;  /* matches any char */\n      case L_ESC: return match_class(c, uchar(*(p+1)));\n      case '[': return matchbracketclass(c, p, ep-1);\n      default:  return (uchar(*p) == c);\n    }\n  }\n}\n\n\nstatic const char *matchbalance (MatchState *ms, const char *s,\n                                   const char *p) {\n  if (p >= ms->p_end - 1)\n    luaL_error(ms->L, \"malformed pattern \"\n                      \"(missing arguments to \" LUA_QL(\"%%b\") \")\");\n  if (*s != *p) return NULL;\n  else {\n    int b = *p;\n    int e = *(p+1);\n    int cont = 1;\n    while (++s < ms->src_end) {\n      if (*s == e) {\n        if (--cont == 0) return s+1;\n      }\n      else if (*s == b) cont++;\n    }\n  }\n  return NULL;  /* string ends out of balance */\n}\n\n\nstatic const char *max_expand (MatchState *ms, const char *s,\n                                 const char *p, const char *ep) {\n  ptrdiff_t i = 0;  /* counts maximum expand for item */\n  while (singlematch(ms, s + i, p, ep))\n    i++;\n  /* keeps trying to match with the maximum repetitions */\n  while (i>=0) {\n    const char *res = match(ms, (s+i), ep+1);\n    if (res) return res;\n    i--;  /* else didn't match; reduce 1 repetition to try again */\n  }\n  return NULL;\n}\n\n\nstatic const char *min_expand (MatchState *ms, const char *s,\n                                 const char *p, const char *ep) {\n  for (;;) {\n    const char *res = match(ms, s, ep+1);\n    if (res != NULL)\n      return res;\n    else if (singlematch(ms, s, p, ep))\n      s++;  /* try with one more repetition */\n    else return NULL;\n  }\n}\n\n\nstatic const char *start_capture (MatchState *ms, const char *s,\n                                    const char *p, int what) {\n  const char *res;\n  int level = ms->level;\n  if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, \"too many captures\");\n  ms->capture[level].init = s;\n  ms->capture[level].len = what;\n  ms->level = level+1;\n  if ((res=match(ms, s, p)) == NULL)  /* match failed? */\n    ms->level--;  /* undo capture */\n  return res;\n}\n\n\nstatic const char *end_capture (MatchState *ms, const char *s,\n                                  const char *p) {\n  int l = capture_to_close(ms);\n  const char *res;\n  ms->capture[l].len = s - ms->capture[l].init;  /* close capture */\n  if ((res = match(ms, s, p)) == NULL)  /* match failed? */\n    ms->capture[l].len = CAP_UNFINISHED;  /* undo capture */\n  return res;\n}\n\n\nstatic const char *match_capture (MatchState *ms, const char *s, int l) {\n  size_t len;\n  l = check_capture(ms, l);\n  len = ms->capture[l].len;\n  if ((size_t)(ms->src_end-s) >= len &&\n      memcmp(ms->capture[l].init, s, len) == 0)\n    return s+len;\n  else return NULL;\n}\n\n\nstatic const char *match (MatchState *ms, const char *s, const char *p) {\n  if (ms->matchdepth-- == 0)\n    luaL_error(ms->L, \"pattern too complex\");\n  init: /* using goto's to optimize tail recursion */\n  if (p != ms->p_end) {  /* end of pattern? */\n    switch (*p) {\n      case '(': {  /* start capture */\n        if (*(p + 1) == ')')  /* position capture? */\n          s = start_capture(ms, s, p + 2, CAP_POSITION);\n        else\n          s = start_capture(ms, s, p + 1, CAP_UNFINISHED);\n        break;\n      }\n      case ')': {  /* end capture */\n        s = end_capture(ms, s, p + 1);\n        break;\n      }\n      case '$': {\n        if ((p + 1) != ms->p_end)  /* is the `$' the last char in pattern? */\n          goto dflt;  /* no; go to default */\n        s = (s == ms->src_end) ? s : NULL;  /* check end of string */\n        break;\n      }\n      case L_ESC: {  /* escaped sequences not in the format class[*+?-]? */\n        switch (*(p + 1)) {\n          case 'b': {  /* balanced string? */\n            s = matchbalance(ms, s, p + 2);\n            if (s != NULL) {\n              p += 4; goto init;  /* return match(ms, s, p + 4); */\n            }  /* else fail (s == NULL) */\n            break;\n          }\n          case 'f': {  /* frontier? */\n            const char *ep; char previous;\n            p += 2;\n            if (*p != '[')\n              luaL_error(ms->L, \"missing \" LUA_QL(\"[\") \" after \"\n                                 LUA_QL(\"%%f\") \" in pattern\");\n            ep = classend(ms, p);  /* points to what is next */\n            previous = (s == ms->src_init) ? '\\0' : *(s - 1);\n            if (!matchbracketclass(uchar(previous), p, ep - 1) &&\n               matchbracketclass(uchar(*s), p, ep - 1)) {\n              p = ep; goto init;  /* return match(ms, s, ep); */\n            }\n            s = NULL;  /* match failed */\n            break;\n          }\n          case '0': case '1': case '2': case '3':\n          case '4': case '5': case '6': case '7':\n          case '8': case '9': {  /* capture results (%0-%9)? */\n            s = match_capture(ms, s, uchar(*(p + 1)));\n            if (s != NULL) {\n              p += 2; goto init;  /* return match(ms, s, p + 2) */\n            }\n            break;\n          }\n          default: goto dflt;\n        }\n        break;\n      }\n      default: dflt: {  /* pattern class plus optional suffix */\n        const char *ep = classend(ms, p);  /* points to optional suffix */\n        /* does not match at least once? */\n        if (!singlematch(ms, s, p, ep)) {\n          if (*ep == '*' || *ep == '?' || *ep == '-') {  /* accept empty? */\n            p = ep + 1; goto init;  /* return match(ms, s, ep + 1); */\n          }\n          else  /* '+' or no suffix */\n            s = NULL;  /* fail */\n        }\n        else {  /* matched once */\n          switch (*ep) {  /* handle optional suffix */\n            case '?': {  /* optional */\n              const char *res;\n              if ((res = match(ms, s + 1, ep + 1)) != NULL)\n                s = res;\n              else {\n                p = ep + 1; goto init;  /* else return match(ms, s, ep + 1); */\n              }\n              break;\n            }\n            case '+':  /* 1 or more repetitions */\n              s++;  /* 1 match already done */\n              /* go through */\n            case '*':  /* 0 or more repetitions */\n              s = max_expand(ms, s, p, ep);\n              break;\n            case '-':  /* 0 or more repetitions (minimum) */\n              s = min_expand(ms, s, p, ep);\n              break;\n            default:  /* no suffix */\n              s++; p = ep; goto init;  /* return match(ms, s + 1, ep); */\n          }\n        }\n        break;\n      }\n    }\n  }\n  ms->matchdepth++;\n  return s;\n}\n\n\n\nstatic const char *lmemfind (const char *s1, size_t l1,\n                               const char *s2, size_t l2) {\n  if (l2 == 0) return s1;  /* empty strings are everywhere */\n  else if (l2 > l1) return NULL;  /* avoids a negative `l1' */\n  else {\n    const char *init;  /* to search for a `*s2' inside `s1' */\n    l2--;  /* 1st char will be checked by `memchr' */\n    l1 = l1-l2;  /* `s2' cannot be found after that */\n    while (l1 > 0 && (init = (const char *)memchr(s1, *s2, l1)) != NULL) {\n      init++;   /* 1st char is already checked */\n      if (memcmp(init, s2+1, l2) == 0)\n        return init-1;\n      else {  /* correct `l1' and `s1' to try again */\n        l1 -= init-s1;\n        s1 = init;\n      }\n    }\n    return NULL;  /* not found */\n  }\n}\n\n\nstatic void push_onecapture (MatchState *ms, int i, const char *s,\n                                                    const char *e) {\n  if (i >= ms->level) {\n    if (i == 0)  /* ms->level == 0, too */\n      lua_pushlstring(ms->L, s, e - s);  /* add whole match */\n    else\n      luaL_error(ms->L, \"invalid capture index\");\n  }\n  else {\n    ptrdiff_t l = ms->capture[i].len;\n    if (l == CAP_UNFINISHED) luaL_error(ms->L, \"unfinished capture\");\n    if (l == CAP_POSITION)\n      lua_pushinteger(ms->L, ms->capture[i].init - ms->src_init + 1);\n    else\n      lua_pushlstring(ms->L, ms->capture[i].init, l);\n  }\n}\n\n\nstatic int push_captures (MatchState *ms, const char *s, const char *e) {\n  int i;\n  int nlevels = (ms->level == 0 && s) ? 1 : ms->level;\n  luaL_checkstack(ms->L, nlevels, \"too many captures\");\n  for (i = 0; i < nlevels; i++)\n    push_onecapture(ms, i, s, e);\n  return nlevels;  /* number of strings pushed */\n}\n\n\n/* check whether pattern has no special characters */\nstatic int nospecials (const char *p, size_t l) {\n  size_t upto = 0;\n  do {\n    if (strpbrk(p + upto, SPECIALS))\n      return 0;  /* pattern has a special character */\n    upto += strlen(p + upto) + 1;  /* may have more after \\0 */\n  } while (upto <= l);\n  return 1;  /* no special chars found */\n}\n\n\nstatic int str_find_aux (lua_State *L, int find) {\n  size_t ls, lp;\n  const char *s = luaL_checklstring(L, 1, &ls);\n  const char *p = luaL_checklstring(L, 2, &lp);\n  size_t init = posrelat(luaL_optinteger(L, 3, 1), ls);\n  if (init < 1) init = 1;\n  else if (init > ls + 1) {  /* start after string's end? */\n    lua_pushnil(L);  /* cannot find anything */\n    return 1;\n  }\n  /* explicit request or no special characters? */\n  if (find && (lua_toboolean(L, 4) || nospecials(p, lp))) {\n    /* do a plain search */\n    const char *s2 = lmemfind(s + init - 1, ls - init + 1, p, lp);\n    if (s2) {\n      lua_pushinteger(L, s2 - s + 1);\n      lua_pushinteger(L, s2 - s + lp);\n      return 2;\n    }\n  }\n  else {\n    MatchState ms;\n    const char *s1 = s + init - 1;\n    int anchor = (*p == '^');\n    if (anchor) {\n      p++; lp--;  /* skip anchor character */\n    }\n    ms.L = L;\n    ms.matchdepth = MAXCCALLS;\n    ms.src_init = s;\n    ms.src_end = s + ls;\n    ms.p_end = p + lp;\n    do {\n      const char *res;\n      ms.level = 0;\n      lua_assert(ms.matchdepth == MAXCCALLS);\n      if ((res=match(&ms, s1, p)) != NULL) {\n        if (find) {\n          lua_pushinteger(L, s1 - s + 1);  /* start */\n          lua_pushinteger(L, res - s);   /* end */\n          return push_captures(&ms, NULL, 0) + 2;\n        }\n        else\n          return push_captures(&ms, s1, res);\n      }\n    } while (s1++ < ms.src_end && !anchor);\n  }\n  lua_pushnil(L);  /* not found */\n  return 1;\n}\n\n\nstatic int str_find (lua_State *L) {\n  return str_find_aux(L, 1);\n}\n\n\nstatic int str_match (lua_State *L) {\n  return str_find_aux(L, 0);\n}\n\n\nstatic int gmatch_aux (lua_State *L) {\n  MatchState ms;\n  size_t ls, lp;\n  const char *s = lua_tolstring(L, lua_upvalueindex(1), &ls);\n  const char *p = lua_tolstring(L, lua_upvalueindex(2), &lp);\n  const char *src;\n  ms.L = L;\n  ms.matchdepth = MAXCCALLS;\n  ms.src_init = s;\n  ms.src_end = s+ls;\n  ms.p_end = p + lp;\n  for (src = s + (size_t)lua_tointeger(L, lua_upvalueindex(3));\n       src <= ms.src_end;\n       src++) {\n    const char *e;\n    ms.level = 0;\n    lua_assert(ms.matchdepth == MAXCCALLS);\n    if ((e = match(&ms, src, p)) != NULL) {\n      lua_Integer newstart = e-s;\n      if (e == src) newstart++;  /* empty match? go at least one position */\n      lua_pushinteger(L, newstart);\n      lua_replace(L, lua_upvalueindex(3));\n      return push_captures(&ms, src, e);\n    }\n  }\n  return 0;  /* not found */\n}\n\n\nstatic int gmatch (lua_State *L) {\n  luaL_checkstring(L, 1);\n  luaL_checkstring(L, 2);\n  lua_settop(L, 2);\n  lua_pushinteger(L, 0);\n  lua_pushcclosure(L, gmatch_aux, 3);\n  return 1;\n}\n\n\nstatic void add_s (MatchState *ms, luaL_Buffer *b, const char *s,\n                                                   const char *e) {\n  size_t l, i;\n  const char *news = lua_tolstring(ms->L, 3, &l);\n  for (i = 0; i < l; i++) {\n    if (news[i] != L_ESC)\n      luaL_addchar(b, news[i]);\n    else {\n      i++;  /* skip ESC */\n      if (!isdigit(uchar(news[i]))) {\n        if (news[i] != L_ESC)\n          luaL_error(ms->L, \"invalid use of \" LUA_QL(\"%c\")\n                           \" in replacement string\", L_ESC);\n        luaL_addchar(b, news[i]);\n      }\n      else if (news[i] == '0')\n          luaL_addlstring(b, s, e - s);\n      else {\n        push_onecapture(ms, news[i] - '1', s, e);\n        luaL_addvalue(b);  /* add capture to accumulated result */\n      }\n    }\n  }\n}\n\n\nstatic void add_value (MatchState *ms, luaL_Buffer *b, const char *s,\n                                       const char *e, int tr) {\n  lua_State *L = ms->L;\n  switch (tr) {\n    case LUA_TFUNCTION: {\n      int n;\n      lua_pushvalue(L, 3);\n      n = push_captures(ms, s, e);\n      lua_call(L, n, 1);\n      break;\n    }\n    case LUA_TTABLE: {\n      push_onecapture(ms, 0, s, e);\n      lua_gettable(L, 3);\n      break;\n    }\n    default: {  /* LUA_TNUMBER or LUA_TSTRING */\n      add_s(ms, b, s, e);\n      return;\n    }\n  }\n  if (!lua_toboolean(L, -1)) {  /* nil or false? */\n    lua_pop(L, 1);\n    lua_pushlstring(L, s, e - s);  /* keep original text */\n  }\n  else if (!lua_isstring(L, -1))\n    luaL_error(L, \"invalid replacement value (a %s)\", luaL_typename(L, -1));\n  luaL_addvalue(b);  /* add result to accumulator */\n}\n\n\nstatic int str_gsub (lua_State *L) {\n  size_t srcl, lp;\n  const char *src = luaL_checklstring(L, 1, &srcl);\n  const char *p = luaL_checklstring(L, 2, &lp);\n  int tr = lua_type(L, 3);\n  size_t max_s = luaL_optinteger(L, 4, srcl+1);\n  int anchor = (*p == '^');\n  size_t n = 0;\n  MatchState ms;\n  luaL_Buffer b;\n  luaL_argcheck(L, tr == LUA_TNUMBER || tr == LUA_TSTRING ||\n                   tr == LUA_TFUNCTION || tr == LUA_TTABLE, 3,\n                      \"string/function/table expected\");\n  luaL_buffinit(L, &b);\n  if (anchor) {\n    p++; lp--;  /* skip anchor character */\n  }\n  ms.L = L;\n  ms.matchdepth = MAXCCALLS;\n  ms.src_init = src;\n  ms.src_end = src+srcl;\n  ms.p_end = p + lp;\n  while (n < max_s) {\n    const char *e;\n    ms.level = 0;\n    lua_assert(ms.matchdepth == MAXCCALLS);\n    e = match(&ms, src, p);\n    if (e) {\n      n++;\n      add_value(&ms, &b, src, e, tr);\n    }\n    if (e && e>src) /* non empty match? */\n      src = e;  /* skip it */\n    else if (src < ms.src_end)\n      luaL_addchar(&b, *src++);\n    else break;\n    if (anchor) break;\n  }\n  luaL_addlstring(&b, src, ms.src_end-src);\n  luaL_pushresult(&b);\n  lua_pushinteger(L, n);  /* number of substitutions */\n  return 2;\n}\n\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** STRING FORMAT\n** =======================================================\n*/\n\n/*\n** LUA_INTFRMLEN is the length modifier for integer conversions in\n** 'string.format'; LUA_INTFRM_T is the integer type corresponding to\n** the previous length\n*/\n#if !defined(LUA_INTFRMLEN)\t/* { */\n#if defined(LUA_USE_LONGLONG)\n\n#define LUA_INTFRMLEN\t\t\"ll\"\n#define LUA_INTFRM_T\t\tlong long\n\n#else\n\n#define LUA_INTFRMLEN\t\t\"l\"\n#define LUA_INTFRM_T\t\tlong\n\n#endif\n#endif\t\t\t\t/* } */\n\n\n/*\n** LUA_FLTFRMLEN is the length modifier for float conversions in\n** 'string.format'; LUA_FLTFRM_T is the float type corresponding to\n** the previous length\n*/\n#if !defined(LUA_FLTFRMLEN)\n\n#define LUA_FLTFRMLEN\t\t\"\"\n#define LUA_FLTFRM_T\t\tdouble\n\n#endif\n\n\n/* maximum size of each formatted item (> len(format('%99.99f', -1e308))) */\n#define MAX_ITEM\t512\n/* valid flags in a format specification */\n#define FLAGS\t\"-+ #0\"\n/*\n** maximum size of each format specification (such as '%-099.99d')\n** (+10 accounts for %99.99x plus margin of error)\n*/\n#define MAX_FORMAT\t(sizeof(FLAGS) + sizeof(LUA_INTFRMLEN) + 10)\n\n\nstatic void addquoted (lua_State *L, luaL_Buffer *b, int arg) {\n  size_t l;\n  const char *s = luaL_checklstring(L, arg, &l);\n  luaL_addchar(b, '\"');\n  while (l--) {\n    if (*s == '\"' || *s == '\\\\' || *s == '\\n') {\n      luaL_addchar(b, '\\\\');\n      luaL_addchar(b, *s);\n    }\n    else if (*s == '\\0' || iscntrl(uchar(*s))) {\n      char buff[10];\n      if (!isdigit(uchar(*(s+1))))\n        sprintf(buff, \"\\\\%d\", (int)uchar(*s));\n      else\n        sprintf(buff, \"\\\\%03d\", (int)uchar(*s));\n      luaL_addstring(b, buff);\n    }\n    else\n      luaL_addchar(b, *s);\n    s++;\n  }\n  luaL_addchar(b, '\"');\n}\n\nstatic const char *scanformat (lua_State *L, const char *strfrmt, char *form) {\n  const char *p = strfrmt;\n  while (*p != '\\0' && strchr(FLAGS, *p) != NULL) p++;  /* skip flags */\n  if ((size_t)(p - strfrmt) >= sizeof(FLAGS)/sizeof(char))\n    luaL_error(L, \"invalid format (repeated flags)\");\n  if (isdigit(uchar(*p))) p++;  /* skip width */\n  if (isdigit(uchar(*p))) p++;  /* (2 digits at most) */\n  if (*p == '.') {\n    p++;\n    if (isdigit(uchar(*p))) p++;  /* skip precision */\n    if (isdigit(uchar(*p))) p++;  /* (2 digits at most) */\n  }\n  if (isdigit(uchar(*p)))\n    luaL_error(L, \"invalid format (width or precision too long)\");\n  *(form++) = '%';\n  memcpy(form, strfrmt, (p - strfrmt + 1) * sizeof(char));\n  form += p - strfrmt + 1;\n  *form = '\\0';\n  return p;\n}\n\n\n/*\n** add length modifier into formats\n*/\nstatic void addlenmod (char *form, const char *lenmod) {\n  size_t l = strlen(form);\n  size_t lm = strlen(lenmod);\n  char spec = form[l - 1];\n  strcpy(form + l - 1, lenmod);\n  form[l + lm - 1] = spec;\n  form[l + lm] = '\\0';\n}\n\n\nstatic int str_format (lua_State *L) {\n  int top = lua_gettop(L);\n  int arg = 1;\n  size_t sfl;\n  const char *strfrmt = luaL_checklstring(L, arg, &sfl);\n  const char *strfrmt_end = strfrmt+sfl;\n  luaL_Buffer b;\n  luaL_buffinit(L, &b);\n  while (strfrmt < strfrmt_end) {\n    if (*strfrmt != L_ESC)\n      luaL_addchar(&b, *strfrmt++);\n    else if (*++strfrmt == L_ESC)\n      luaL_addchar(&b, *strfrmt++);  /* %% */\n    else { /* format item */\n      char form[MAX_FORMAT];  /* to store the format (`%...') */\n      char *buff = luaL_prepbuffsize(&b, MAX_ITEM);  /* to put formatted item */\n      int nb = 0;  /* number of bytes in added item */\n      if (++arg > top)\n        luaL_argerror(L, arg, \"no value\");\n      strfrmt = scanformat(L, strfrmt, form);\n      switch (*strfrmt++) {\n        case 'c': {\n          nb = sprintf(buff, form, luaL_checkint(L, arg));\n          break;\n        }\n        case 'd': case 'i': {\n          lua_Number n = luaL_checknumber(L, arg);\n          LUA_INTFRM_T ni = (LUA_INTFRM_T)n;\n          lua_Number diff = n - (lua_Number)ni;\n          luaL_argcheck(L, -1 < diff && diff < 1, arg,\n                        \"not a number in proper range\");\n          addlenmod(form, LUA_INTFRMLEN);\n          nb = sprintf(buff, form, ni);\n          break;\n        }\n        case 'o': case 'u': case 'x': case 'X': {\n          lua_Number n = luaL_checknumber(L, arg);\n          unsigned LUA_INTFRM_T ni = (unsigned LUA_INTFRM_T)n;\n          lua_Number diff = n - (lua_Number)ni;\n          luaL_argcheck(L, -1 < diff && diff < 1, arg,\n                        \"not a non-negative number in proper range\");\n          addlenmod(form, LUA_INTFRMLEN);\n          nb = sprintf(buff, form, ni);\n          break;\n        }\n        case 'e': case 'E': case 'f':\n#if defined(LUA_USE_AFORMAT)\n        case 'a': case 'A':\n#endif\n        case 'g': case 'G': {\n          addlenmod(form, LUA_FLTFRMLEN);\n          nb = sprintf(buff, form, (LUA_FLTFRM_T)luaL_checknumber(L, arg));\n          break;\n        }\n        case 'q': {\n          addquoted(L, &b, arg);\n          break;\n        }\n        case 's': {\n          size_t l;\n          const char *s = luaL_tolstring(L, arg, &l);\n          if (!strchr(form, '.') && l >= 100) {\n            /* no precision and string is too long to be formatted;\n               keep original string */\n            luaL_addvalue(&b);\n            break;\n          }\n          else {\n            nb = sprintf(buff, form, s);\n            lua_pop(L, 1);  /* remove result from 'luaL_tolstring' */\n            break;\n          }\n        }\n        default: {  /* also treat cases `pnLlh' */\n          return luaL_error(L, \"invalid option \" LUA_QL(\"%%%c\") \" to \"\n                               LUA_QL(\"format\"), *(strfrmt - 1));\n        }\n      }\n      luaL_addsize(&b, nb);\n    }\n  }\n  luaL_pushresult(&b);\n  return 1;\n}\n\n/* }====================================================== */\n\n\nstatic const luaL_Reg strlib[] = {\n  {\"byte\", str_byte},\n  {\"char\", str_char},\n  {\"dump\", str_dump},\n  {\"find\", str_find},\n  {\"format\", str_format},\n  {\"gmatch\", gmatch},\n  {\"gsub\", str_gsub},\n  {\"len\", str_len},\n  {\"lower\", str_lower},\n  {\"match\", str_match},\n  {\"rep\", str_rep},\n  {\"reverse\", str_reverse},\n  {\"sub\", str_sub},\n  {\"upper\", str_upper},\n  {NULL, NULL}\n};\n\n\nstatic void createmetatable (lua_State *L) {\n  lua_createtable(L, 0, 1);  /* table to be metatable for strings */\n  lua_pushliteral(L, \"\");  /* dummy string */\n  lua_pushvalue(L, -2);  /* copy table */\n  lua_setmetatable(L, -2);  /* set table as metatable for strings */\n  lua_pop(L, 1);  /* pop dummy string */\n  lua_pushvalue(L, -2);  /* get string library */\n  lua_setfield(L, -2, \"__index\");  /* metatable.__index = string */\n  lua_pop(L, 1);  /* pop metatable */\n}\n\n\n/*\n** Open string library\n*/\nLUAMOD_API int luaopen_string (lua_State *L) {\n  luaL_newlib(L, strlib);\n  createmetatable(L);\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/ltable.c",
    "content": "/*\n** $Id: ltable.c,v 2.72.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua tables (hash)\n** See Copyright Notice in lua.h\n*/\n\n\n/*\n** Implementation of tables (aka arrays, objects, or hash tables).\n** Tables keep its elements in two parts: an array part and a hash part.\n** Non-negative integer keys are all candidates to be kept in the array\n** part. The actual size of the array is the largest `n' such that at\n** least half the slots between 0 and n are in use.\n** Hash uses a mix of chained scatter table with Brent's variation.\n** A main invariant of these tables is that, if an element is not\n** in its main position (i.e. the `original' position that its hash gives\n** to it), then the colliding element is in its own main position.\n** Hence even when the load factor reaches 100%, performance remains good.\n*/\n\n#include <string.h>\n\n#define ltable_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lgc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"lvm.h\"\n\n\n/*\n** max size of array part is 2^MAXBITS\n*/\n#if LUAI_BITSINT >= 32\n#define MAXBITS\t\t30\n#else\n#define MAXBITS\t\t(LUAI_BITSINT-2)\n#endif\n\n#define MAXASIZE\t(1 << MAXBITS)\n\n\n#define hashpow2(t,n)\t\t(gnode(t, lmod((n), sizenode(t))))\n\n#define hashstr(t,str)\t\thashpow2(t, (str)->tsv.hash)\n#define hashboolean(t,p)\thashpow2(t, p)\n\n\n/*\n** for some types, it is better to avoid modulus by power of 2, as\n** they tend to have many 2 factors.\n*/\n#define hashmod(t,n)\t(gnode(t, ((n) % ((sizenode(t)-1)|1))))\n\n\n#define hashpointer(t,p)\thashmod(t, IntPoint(p))\n\n\n#define dummynode\t\t(&dummynode_)\n\n#define isdummy(n)\t\t((n) == dummynode)\n\nstatic const Node dummynode_ = {\n  {NILCONSTANT},  /* value */\n  {{NILCONSTANT, NULL}}  /* key */\n};\n\n\n/*\n** hash for lua_Numbers\n*/\nstatic Node *hashnum (const Table *t, lua_Number n) {\n  int i;\n  luai_hashnum(i, n);\n  if (i < 0) {\n    if (cast(unsigned int, i) == 0u - i)  /* use unsigned to avoid overflows */\n      i = 0;  /* handle INT_MIN */\n    i = -i;  /* must be a positive value */\n  }\n  return hashmod(t, i);\n}\n\n\n\n/*\n** returns the `main' position of an element in a table (that is, the index\n** of its hash value)\n*/\nstatic Node *mainposition (const Table *t, const TValue *key) {\n  switch (ttype(key)) {\n    case LUA_TNUMBER:\n      return hashnum(t, nvalue(key));\n    case LUA_TLNGSTR: {\n      TString *s = rawtsvalue(key);\n      if (s->tsv.extra == 0) {  /* no hash? */\n        s->tsv.hash = luaS_hash(getstr(s), s->tsv.len, s->tsv.hash);\n        s->tsv.extra = 1;  /* now it has its hash */\n      }\n      return hashstr(t, rawtsvalue(key));\n    }\n    case LUA_TSHRSTR:\n      return hashstr(t, rawtsvalue(key));\n    case LUA_TBOOLEAN:\n      return hashboolean(t, bvalue(key));\n    case LUA_TLIGHTUSERDATA:\n      return hashpointer(t, pvalue(key));\n    case LUA_TLCF:\n      return hashpointer(t, fvalue(key));\n    default:\n      return hashpointer(t, gcvalue(key));\n  }\n}\n\n\n/*\n** returns the index for `key' if `key' is an appropriate key to live in\n** the array part of the table, -1 otherwise.\n*/\nstatic int arrayindex (const TValue *key) {\n  if (ttisnumber(key)) {\n    lua_Number n = nvalue(key);\n    int k;\n    lua_number2int(k, n);\n    if (luai_numeq(cast_num(k), n))\n      return k;\n  }\n  return -1;  /* `key' did not match some condition */\n}\n\n\n/*\n** returns the index of a `key' for table traversals. First goes all\n** elements in the array part, then elements in the hash part. The\n** beginning of a traversal is signaled by -1.\n*/\nstatic int findindex (lua_State *L, Table *t, StkId key) {\n  int i;\n  if (ttisnil(key)) return -1;  /* first iteration */\n  i = arrayindex(key);\n  if (0 < i && i <= t->sizearray)  /* is `key' inside array part? */\n    return i-1;  /* yes; that's the index (corrected to C) */\n  else {\n    Node *n = mainposition(t, key);\n    for (;;) {  /* check whether `key' is somewhere in the chain */\n      /* key may be dead already, but it is ok to use it in `next' */\n      if (luaV_rawequalobj(gkey(n), key) ||\n            (ttisdeadkey(gkey(n)) && iscollectable(key) &&\n             deadvalue(gkey(n)) == gcvalue(key))) {\n        i = cast_int(n - gnode(t, 0));  /* key index in hash table */\n        /* hash elements are numbered after array ones */\n        return i + t->sizearray;\n      }\n      else n = gnext(n);\n      if (n == NULL)\n        luaG_runerror(L, \"invalid key to \" LUA_QL(\"next\"));  /* key not found */\n    }\n  }\n}\n\n\nint luaH_next (lua_State *L, Table *t, StkId key) {\n  int i = findindex(L, t, key);  /* find original element */\n  for (i++; i < t->sizearray; i++) {  /* try first array part */\n    if (!ttisnil(&t->array[i])) {  /* a non-nil value? */\n      setnvalue(key, cast_num(i+1));\n      setobj2s(L, key+1, &t->array[i]);\n      return 1;\n    }\n  }\n  for (i -= t->sizearray; i < sizenode(t); i++) {  /* then hash part */\n    if (!ttisnil(gval(gnode(t, i)))) {  /* a non-nil value? */\n      setobj2s(L, key, gkey(gnode(t, i)));\n      setobj2s(L, key+1, gval(gnode(t, i)));\n      return 1;\n    }\n  }\n  return 0;  /* no more elements */\n}\n\n\n/*\n** {=============================================================\n** Rehash\n** ==============================================================\n*/\n\n\nstatic int computesizes (int nums[], int *narray) {\n  int i;\n  int twotoi;  /* 2^i */\n  int a = 0;  /* number of elements smaller than 2^i */\n  int na = 0;  /* number of elements to go to array part */\n  int n = 0;  /* optimal size for array part */\n  for (i = 0, twotoi = 1; twotoi/2 < *narray; i++, twotoi *= 2) {\n    if (nums[i] > 0) {\n      a += nums[i];\n      if (a > twotoi/2) {  /* more than half elements present? */\n        n = twotoi;  /* optimal size (till now) */\n        na = a;  /* all elements smaller than n will go to array part */\n      }\n    }\n    if (a == *narray) break;  /* all elements already counted */\n  }\n  *narray = n;\n  lua_assert(*narray/2 <= na && na <= *narray);\n  return na;\n}\n\n\nstatic int countint (const TValue *key, int *nums) {\n  int k = arrayindex(key);\n  if (0 < k && k <= MAXASIZE) {  /* is `key' an appropriate array index? */\n    nums[luaO_ceillog2(k)]++;  /* count as such */\n    return 1;\n  }\n  else\n    return 0;\n}\n\n\nstatic int numusearray (const Table *t, int *nums) {\n  int lg;\n  int ttlg;  /* 2^lg */\n  int ause = 0;  /* summation of `nums' */\n  int i = 1;  /* count to traverse all array keys */\n  for (lg=0, ttlg=1; lg<=MAXBITS; lg++, ttlg*=2) {  /* for each slice */\n    int lc = 0;  /* counter */\n    int lim = ttlg;\n    if (lim > t->sizearray) {\n      lim = t->sizearray;  /* adjust upper limit */\n      if (i > lim)\n        break;  /* no more elements to count */\n    }\n    /* count elements in range (2^(lg-1), 2^lg] */\n    for (; i <= lim; i++) {\n      if (!ttisnil(&t->array[i-1]))\n        lc++;\n    }\n    nums[lg] += lc;\n    ause += lc;\n  }\n  return ause;\n}\n\n\nstatic int numusehash (const Table *t, int *nums, int *pnasize) {\n  int totaluse = 0;  /* total number of elements */\n  int ause = 0;  /* summation of `nums' */\n  int i = sizenode(t);\n  while (i--) {\n    Node *n = &t->node[i];\n    if (!ttisnil(gval(n))) {\n      ause += countint(gkey(n), nums);\n      totaluse++;\n    }\n  }\n  *pnasize += ause;\n  return totaluse;\n}\n\n\nstatic void setarrayvector (lua_State *L, Table *t, int size) {\n  int i;\n  luaM_reallocvector(L, t->array, t->sizearray, size, TValue);\n  for (i=t->sizearray; i<size; i++)\n     setnilvalue(&t->array[i]);\n  t->sizearray = size;\n}\n\n\nstatic void setnodevector (lua_State *L, Table *t, int size) {\n  int lsize;\n  if (size == 0) {  /* no elements to hash part? */\n    t->node = cast(Node *, dummynode);  /* use common `dummynode' */\n    lsize = 0;\n  }\n  else {\n    int i;\n    lsize = luaO_ceillog2(size);\n    if (lsize > MAXBITS)\n      luaG_runerror(L, \"table overflow\");\n    size = twoto(lsize);\n    t->node = luaM_newvector(L, size, Node);\n    for (i=0; i<size; i++) {\n      Node *n = gnode(t, i);\n      gnext(n) = NULL;\n      setnilvalue(gkey(n));\n      setnilvalue(gval(n));\n    }\n  }\n  t->lsizenode = cast_byte(lsize);\n  t->lastfree = gnode(t, size);  /* all positions are free */\n}\n\n\nvoid luaH_resize (lua_State *L, Table *t, int nasize, int nhsize) {\n  int i;\n  int oldasize = t->sizearray;\n  int oldhsize = t->lsizenode;\n  Node *nold = t->node;  /* save old hash ... */\n  if (nasize > oldasize)  /* array part must grow? */\n    setarrayvector(L, t, nasize);\n  /* create new hash part with appropriate size */\n  setnodevector(L, t, nhsize);\n  if (nasize < oldasize) {  /* array part must shrink? */\n    t->sizearray = nasize;\n    /* re-insert elements from vanishing slice */\n    for (i=nasize; i<oldasize; i++) {\n      if (!ttisnil(&t->array[i]))\n        luaH_setint(L, t, i + 1, &t->array[i]);\n    }\n    /* shrink array */\n    luaM_reallocvector(L, t->array, oldasize, nasize, TValue);\n  }\n  /* re-insert elements from hash part */\n  for (i = twoto(oldhsize) - 1; i >= 0; i--) {\n    Node *old = nold+i;\n    if (!ttisnil(gval(old))) {\n      /* doesn't need barrier/invalidate cache, as entry was\n         already present in the table */\n      setobjt2t(L, luaH_set(L, t, gkey(old)), gval(old));\n    }\n  }\n  if (!isdummy(nold))\n    luaM_freearray(L, nold, cast(size_t, twoto(oldhsize))); /* free old array */\n}\n\n\nvoid luaH_resizearray (lua_State *L, Table *t, int nasize) {\n  int nsize = isdummy(t->node) ? 0 : sizenode(t);\n  luaH_resize(L, t, nasize, nsize);\n}\n\n\nstatic void rehash (lua_State *L, Table *t, const TValue *ek) {\n  int nasize, na;\n  int nums[MAXBITS+1];  /* nums[i] = number of keys with 2^(i-1) < k <= 2^i */\n  int i;\n  int totaluse;\n  for (i=0; i<=MAXBITS; i++) nums[i] = 0;  /* reset counts */\n  nasize = numusearray(t, nums);  /* count keys in array part */\n  totaluse = nasize;  /* all those keys are integer keys */\n  totaluse += numusehash(t, nums, &nasize);  /* count keys in hash part */\n  /* count extra key */\n  nasize += countint(ek, nums);\n  totaluse++;\n  /* compute new size for array part */\n  na = computesizes(nums, &nasize);\n  /* resize the table to new computed sizes */\n  luaH_resize(L, t, nasize, totaluse - na);\n}\n\n\n\n/*\n** }=============================================================\n*/\n\n\nTable *luaH_new (lua_State *L) {\n  Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h;\n  t->metatable = NULL;\n  t->flags = cast_byte(~0);\n  t->array = NULL;\n  t->sizearray = 0;\n  setnodevector(L, t, 0);\n  return t;\n}\n\n\nvoid luaH_free (lua_State *L, Table *t) {\n  if (!isdummy(t->node))\n    luaM_freearray(L, t->node, cast(size_t, sizenode(t)));\n  luaM_freearray(L, t->array, t->sizearray);\n  luaM_free(L, t);\n}\n\n\nstatic Node *getfreepos (Table *t) {\n  while (t->lastfree > t->node) {\n    t->lastfree--;\n    if (ttisnil(gkey(t->lastfree)))\n      return t->lastfree;\n  }\n  return NULL;  /* could not find a free place */\n}\n\n\n\n/*\n** inserts a new key into a hash table; first, check whether key's main\n** position is free. If not, check whether colliding node is in its main\n** position or not: if it is not, move colliding node to an empty place and\n** put new key in its main position; otherwise (colliding node is in its main\n** position), new key goes to an empty position.\n*/\nTValue *luaH_newkey (lua_State *L, Table *t, const TValue *key) {\n  Node *mp;\n  if (ttisnil(key)) luaG_runerror(L, \"table index is nil\");\n  else if (ttisnumber(key) && luai_numisnan(L, nvalue(key)))\n    luaG_runerror(L, \"table index is NaN\");\n  mp = mainposition(t, key);\n  if (!ttisnil(gval(mp)) || isdummy(mp)) {  /* main position is taken? */\n    Node *othern;\n    Node *n = getfreepos(t);  /* get a free place */\n    if (n == NULL) {  /* cannot find a free place? */\n      rehash(L, t, key);  /* grow table */\n      /* whatever called 'newkey' take care of TM cache and GC barrier */\n      return luaH_set(L, t, key);  /* insert key into grown table */\n    }\n    lua_assert(!isdummy(n));\n    othern = mainposition(t, gkey(mp));\n    if (othern != mp) {  /* is colliding node out of its main position? */\n      /* yes; move colliding node into free position */\n      while (gnext(othern) != mp) othern = gnext(othern);  /* find previous */\n      gnext(othern) = n;  /* redo the chain with `n' in place of `mp' */\n      *n = *mp;  /* copy colliding node into free pos. (mp->next also goes) */\n      gnext(mp) = NULL;  /* now `mp' is free */\n      setnilvalue(gval(mp));\n    }\n    else {  /* colliding node is in its own main position */\n      /* new node will go into free position */\n      gnext(n) = gnext(mp);  /* chain new position */\n      gnext(mp) = n;\n      mp = n;\n    }\n  }\n  setobj2t(L, gkey(mp), key);\n  luaC_barrierback(L, obj2gco(t), key);\n  lua_assert(ttisnil(gval(mp)));\n  return gval(mp);\n}\n\n\n/*\n** search function for integers\n*/\nconst TValue *luaH_getint (Table *t, int key) {\n  /* (1 <= key && key <= t->sizearray) */\n  if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))\n    return &t->array[key-1];\n  else {\n    lua_Number nk = cast_num(key);\n    Node *n = hashnum(t, nk);\n    do {  /* check whether `key' is somewhere in the chain */\n      if (ttisnumber(gkey(n)) && luai_numeq(nvalue(gkey(n)), nk))\n        return gval(n);  /* that's it */\n      else n = gnext(n);\n    } while (n);\n    return luaO_nilobject;\n  }\n}\n\n\n/*\n** search function for short strings\n*/\nconst TValue *luaH_getstr (Table *t, TString *key) {\n  Node *n = hashstr(t, key);\n  lua_assert(key->tsv.tt == LUA_TSHRSTR);\n  do {  /* check whether `key' is somewhere in the chain */\n    if (ttisshrstring(gkey(n)) && eqshrstr(rawtsvalue(gkey(n)), key))\n      return gval(n);  /* that's it */\n    else n = gnext(n);\n  } while (n);\n  return luaO_nilobject;\n}\n\n\n/*\n** main search function\n*/\nconst TValue *luaH_get (Table *t, const TValue *key) {\n  switch (ttype(key)) {\n    case LUA_TSHRSTR: return luaH_getstr(t, rawtsvalue(key));\n    case LUA_TNIL: return luaO_nilobject;\n    case LUA_TNUMBER: {\n      int k;\n      lua_Number n = nvalue(key);\n      lua_number2int(k, n);\n      if (luai_numeq(cast_num(k), n)) /* index is int? */\n        return luaH_getint(t, k);  /* use specialized version */\n      /* else go through */\n    }\n    default: {\n      Node *n = mainposition(t, key);\n      do {  /* check whether `key' is somewhere in the chain */\n        if (luaV_rawequalobj(gkey(n), key))\n          return gval(n);  /* that's it */\n        else n = gnext(n);\n      } while (n);\n      return luaO_nilobject;\n    }\n  }\n}\n\n\n/*\n** beware: when using this function you probably need to check a GC\n** barrier and invalidate the TM cache.\n*/\nTValue *luaH_set (lua_State *L, Table *t, const TValue *key) {\n  const TValue *p = luaH_get(t, key);\n  if (p != luaO_nilobject)\n    return cast(TValue *, p);\n  else return luaH_newkey(L, t, key);\n}\n\n\nvoid luaH_setint (lua_State *L, Table *t, int key, TValue *value) {\n  const TValue *p = luaH_getint(t, key);\n  TValue *cell;\n  if (p != luaO_nilobject)\n    cell = cast(TValue *, p);\n  else {\n    TValue k;\n    setnvalue(&k, cast_num(key));\n    cell = luaH_newkey(L, t, &k);\n  }\n  setobj2t(L, cell, value);\n}\n\n\nstatic int unbound_search (Table *t, unsigned int j) {\n  unsigned int i = j;  /* i is zero or a present index */\n  j++;\n  /* find `i' and `j' such that i is present and j is not */\n  while (!ttisnil(luaH_getint(t, j))) {\n    i = j;\n    j *= 2;\n    if (j > cast(unsigned int, MAX_INT)) {  /* overflow? */\n      /* table was built with bad purposes: resort to linear search */\n      i = 1;\n      while (!ttisnil(luaH_getint(t, i))) i++;\n      return i - 1;\n    }\n  }\n  /* now do a binary search between them */\n  while (j - i > 1) {\n    unsigned int m = (i+j)/2;\n    if (ttisnil(luaH_getint(t, m))) j = m;\n    else i = m;\n  }\n  return i;\n}\n\n\n/*\n** Try to find a boundary in table `t'. A `boundary' is an integer index\n** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil).\n*/\nint luaH_getn (Table *t) {\n  unsigned int j = t->sizearray;\n  if (j > 0 && ttisnil(&t->array[j - 1])) {\n    /* there is a boundary in the array part: (binary) search for it */\n    unsigned int i = 0;\n    while (j - i > 1) {\n      unsigned int m = (i+j)/2;\n      if (ttisnil(&t->array[m - 1])) j = m;\n      else i = m;\n    }\n    return i;\n  }\n  /* else must find a boundary in hash part */\n  else if (isdummy(t->node))  /* hash part is empty? */\n    return j;  /* that is easy... */\n  else return unbound_search(t, j);\n}\n\n\n\n#if defined(LUA_DEBUG)\n\nNode *luaH_mainposition (const Table *t, const TValue *key) {\n  return mainposition(t, key);\n}\n\nint luaH_isdummy (Node *n) { return isdummy(n); }\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/ltable.h",
    "content": "/*\n** $Id: ltable.h,v 2.16.1.2 2013/08/30 15:49:41 roberto Exp $\n** Lua tables (hash)\n** See Copyright Notice in lua.h\n*/\n\n#ifndef ltable_h\n#define ltable_h\n\n#include \"lobject.h\"\n\n\n#define gnode(t,i)\t(&(t)->node[i])\n#define gkey(n)\t\t(&(n)->i_key.tvk)\n#define gval(n)\t\t(&(n)->i_val)\n#define gnext(n)\t((n)->i_key.nk.next)\n\n#define invalidateTMcache(t)\t((t)->flags = 0)\n\n/* returns the key, given the value of a table entry */\n#define keyfromval(v) \\\n  (gkey(cast(Node *, cast(char *, (v)) - offsetof(Node, i_val))))\n\n\nLUAI_FUNC const TValue *luaH_getint (Table *t, int key);\nLUAI_FUNC void luaH_setint (lua_State *L, Table *t, int key, TValue *value);\nLUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key);\nLUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key);\nLUAI_FUNC TValue *luaH_newkey (lua_State *L, Table *t, const TValue *key);\nLUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key);\nLUAI_FUNC Table *luaH_new (lua_State *L);\nLUAI_FUNC void luaH_resize (lua_State *L, Table *t, int nasize, int nhsize);\nLUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize);\nLUAI_FUNC void luaH_free (lua_State *L, Table *t);\nLUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);\nLUAI_FUNC int luaH_getn (Table *t);\n\n\n#if defined(LUA_DEBUG)\nLUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key);\nLUAI_FUNC int luaH_isdummy (Node *n);\n#endif\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/ltablib.c",
    "content": "/*\n** $Id: ltablib.c,v 1.65.1.2 2014/05/07 16:32:55 roberto Exp $\n** Library for Table Manipulation\n** See Copyright Notice in lua.h\n*/\n\n\n#include <limits.h>\n#include <stddef.h>\n\n#define ltablib_c\n#define LUA_LIB\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n#define aux_getn(L,n)\t(luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n))\n\n\n\n#if defined(LUA_COMPAT_MAXN)\nstatic int maxn (lua_State *L) {\n  lua_Number max = 0;\n  luaL_checktype(L, 1, LUA_TTABLE);\n  lua_pushnil(L);  /* first key */\n  while (lua_next(L, 1)) {\n    lua_pop(L, 1);  /* remove value */\n    if (lua_type(L, -1) == LUA_TNUMBER) {\n      lua_Number v = lua_tonumber(L, -1);\n      if (v > max) max = v;\n    }\n  }\n  lua_pushnumber(L, max);\n  return 1;\n}\n#endif\n\n\nstatic int tinsert (lua_State *L) {\n  int e = aux_getn(L, 1) + 1;  /* first empty element */\n  int pos;  /* where to insert new element */\n  switch (lua_gettop(L)) {\n    case 2: {  /* called with only 2 arguments */\n      pos = e;  /* insert new element at the end */\n      break;\n    }\n    case 3: {\n      int i;\n      pos = luaL_checkint(L, 2);  /* 2nd argument is the position */\n      luaL_argcheck(L, 1 <= pos && pos <= e, 2, \"position out of bounds\");\n      for (i = e; i > pos; i--) {  /* move up elements */\n        lua_rawgeti(L, 1, i-1);\n        lua_rawseti(L, 1, i);  /* t[i] = t[i-1] */\n      }\n      break;\n    }\n    default: {\n      return luaL_error(L, \"wrong number of arguments to \" LUA_QL(\"insert\"));\n    }\n  }\n  lua_rawseti(L, 1, pos);  /* t[pos] = v */\n  return 0;\n}\n\n\nstatic int tremove (lua_State *L) {\n  int size = aux_getn(L, 1);\n  int pos = luaL_optint(L, 2, size);\n  if (pos != size)  /* validate 'pos' if given */\n    luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1, \"position out of bounds\");\n  lua_rawgeti(L, 1, pos);  /* result = t[pos] */\n  for ( ; pos < size; pos++) {\n    lua_rawgeti(L, 1, pos+1);\n    lua_rawseti(L, 1, pos);  /* t[pos] = t[pos+1] */\n  }\n  lua_pushnil(L);\n  lua_rawseti(L, 1, pos);  /* t[pos] = nil */\n  return 1;\n}\n\n\nstatic void addfield (lua_State *L, luaL_Buffer *b, int i) {\n  lua_rawgeti(L, 1, i);\n  if (!lua_isstring(L, -1))\n    luaL_error(L, \"invalid value (%s) at index %d in table for \"\n                  LUA_QL(\"concat\"), luaL_typename(L, -1), i);\n  luaL_addvalue(b);\n}\n\n\nstatic int tconcat (lua_State *L) {\n  luaL_Buffer b;\n  size_t lsep;\n  int i, last;\n  const char *sep = luaL_optlstring(L, 2, \"\", &lsep);\n  luaL_checktype(L, 1, LUA_TTABLE);\n  i = luaL_optint(L, 3, 1);\n  last = luaL_opt(L, luaL_checkint, 4, luaL_len(L, 1));\n  luaL_buffinit(L, &b);\n  for (; i < last; i++) {\n    addfield(L, &b, i);\n    luaL_addlstring(&b, sep, lsep);\n  }\n  if (i == last)  /* add last value (if interval was not empty) */\n    addfield(L, &b, i);\n  luaL_pushresult(&b);\n  return 1;\n}\n\n\n/*\n** {======================================================\n** Pack/unpack\n** =======================================================\n*/\n\nstatic int pack (lua_State *L) {\n  int n = lua_gettop(L);  /* number of elements to pack */\n  lua_createtable(L, n, 1);  /* create result table */\n  lua_pushinteger(L, n);\n  lua_setfield(L, -2, \"n\");  /* t.n = number of elements */\n  if (n > 0) {  /* at least one element? */\n    int i;\n    lua_pushvalue(L, 1);\n    lua_rawseti(L, -2, 1);  /* insert first element */\n    lua_replace(L, 1);  /* move table into index 1 */\n    for (i = n; i >= 2; i--)  /* assign other elements */\n      lua_rawseti(L, 1, i);\n  }\n  return 1;  /* return table */\n}\n\n\nstatic int unpack (lua_State *L) {\n  int i, e;\n  unsigned int n;\n  luaL_checktype(L, 1, LUA_TTABLE);\n  i = luaL_optint(L, 2, 1);\n  e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1));\n  if (i > e) return 0;  /* empty range */\n  n = (unsigned int)e - (unsigned int)i;  /* number of elements minus 1 */\n  if (n > (INT_MAX - 10) || !lua_checkstack(L, ++n))\n    return luaL_error(L, \"too many results to unpack\");\n  lua_rawgeti(L, 1, i);  /* push arg[i] (avoiding overflow problems) */\n  while (i++ < e)  /* push arg[i + 1...e] */\n    lua_rawgeti(L, 1, i);\n  return n;\n}\n\n/* }====================================================== */\n\n\n\n/*\n** {======================================================\n** Quicksort\n** (based on `Algorithms in MODULA-3', Robert Sedgewick;\n**  Addison-Wesley, 1993.)\n** =======================================================\n*/\n\n\nstatic void set2 (lua_State *L, int i, int j) {\n  lua_rawseti(L, 1, i);\n  lua_rawseti(L, 1, j);\n}\n\nstatic int sort_comp (lua_State *L, int a, int b) {\n  if (!lua_isnil(L, 2)) {  /* function? */\n    int res;\n    lua_pushvalue(L, 2);\n    lua_pushvalue(L, a-1);  /* -1 to compensate function */\n    lua_pushvalue(L, b-2);  /* -2 to compensate function and `a' */\n    lua_call(L, 2, 1);\n    res = lua_toboolean(L, -1);\n    lua_pop(L, 1);\n    return res;\n  }\n  else  /* a < b? */\n    return lua_compare(L, a, b, LUA_OPLT);\n}\n\nstatic void auxsort (lua_State *L, int l, int u) {\n  while (l < u) {  /* for tail recursion */\n    int i, j;\n    /* sort elements a[l], a[(l+u)/2] and a[u] */\n    lua_rawgeti(L, 1, l);\n    lua_rawgeti(L, 1, u);\n    if (sort_comp(L, -1, -2))  /* a[u] < a[l]? */\n      set2(L, l, u);  /* swap a[l] - a[u] */\n    else\n      lua_pop(L, 2);\n    if (u-l == 1) break;  /* only 2 elements */\n    i = (l+u)/2;\n    lua_rawgeti(L, 1, i);\n    lua_rawgeti(L, 1, l);\n    if (sort_comp(L, -2, -1))  /* a[i]<a[l]? */\n      set2(L, i, l);\n    else {\n      lua_pop(L, 1);  /* remove a[l] */\n      lua_rawgeti(L, 1, u);\n      if (sort_comp(L, -1, -2))  /* a[u]<a[i]? */\n        set2(L, i, u);\n      else\n        lua_pop(L, 2);\n    }\n    if (u-l == 2) break;  /* only 3 elements */\n    lua_rawgeti(L, 1, i);  /* Pivot */\n    lua_pushvalue(L, -1);\n    lua_rawgeti(L, 1, u-1);\n    set2(L, i, u-1);\n    /* a[l] <= P == a[u-1] <= a[u], only need to sort from l+1 to u-2 */\n    i = l; j = u-1;\n    for (;;) {  /* invariant: a[l..i] <= P <= a[j..u] */\n      /* repeat ++i until a[i] >= P */\n      while (lua_rawgeti(L, 1, ++i), sort_comp(L, -1, -2)) {\n        if (i>=u) luaL_error(L, \"invalid order function for sorting\");\n        lua_pop(L, 1);  /* remove a[i] */\n      }\n      /* repeat --j until a[j] <= P */\n      while (lua_rawgeti(L, 1, --j), sort_comp(L, -3, -1)) {\n        if (j<=l) luaL_error(L, \"invalid order function for sorting\");\n        lua_pop(L, 1);  /* remove a[j] */\n      }\n      if (j<i) {\n        lua_pop(L, 3);  /* pop pivot, a[i], a[j] */\n        break;\n      }\n      set2(L, i, j);\n    }\n    lua_rawgeti(L, 1, u-1);\n    lua_rawgeti(L, 1, i);\n    set2(L, u-1, i);  /* swap pivot (a[u-1]) with a[i] */\n    /* a[l..i-1] <= a[i] == P <= a[i+1..u] */\n    /* adjust so that smaller half is in [j..i] and larger one in [l..u] */\n    if (i-l < u-i) {\n      j=l; i=i-1; l=i+2;\n    }\n    else {\n      j=i+1; i=u; u=j-2;\n    }\n    auxsort(L, j, i);  /* call recursively the smaller one */\n  }  /* repeat the routine for the larger one */\n}\n\nstatic int sort (lua_State *L) {\n  int n = aux_getn(L, 1);\n  luaL_checkstack(L, 40, \"\");  /* assume array is smaller than 2^40 */\n  if (!lua_isnoneornil(L, 2))  /* is there a 2nd argument? */\n    luaL_checktype(L, 2, LUA_TFUNCTION);\n  lua_settop(L, 2);  /* make sure there is two arguments */\n  auxsort(L, 1, n);\n  return 0;\n}\n\n/* }====================================================== */\n\n\nstatic const luaL_Reg tab_funcs[] = {\n  {\"concat\", tconcat},\n#if defined(LUA_COMPAT_MAXN)\n  {\"maxn\", maxn},\n#endif\n  {\"insert\", tinsert},\n  {\"pack\", pack},\n  {\"unpack\", unpack},\n  {\"remove\", tremove},\n  {\"sort\", sort},\n  {NULL, NULL}\n};\n\n\nLUAMOD_API int luaopen_table (lua_State *L) {\n  luaL_newlib(L, tab_funcs);\n#if defined(LUA_COMPAT_UNPACK)\n  /* _G.unpack = table.unpack */\n  lua_getfield(L, -1, \"unpack\");\n  lua_setglobal(L, \"unpack\");\n#endif\n  return 1;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/ltm.c",
    "content": "/*\n** $Id: ltm.c,v 2.14.1.1 2013/04/12 18:48:47 roberto Exp $\n** Tag methods\n** See Copyright Notice in lua.h\n*/\n\n\n#include <string.h>\n\n#define ltm_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n\n\nstatic const char udatatypename[] = \"userdata\";\n\nLUAI_DDEF const char *const luaT_typenames_[LUA_TOTALTAGS] = {\n  \"no value\",\n  \"nil\", \"boolean\", udatatypename, \"number\",\n  \"string\", \"table\", \"function\", udatatypename, \"thread\",\n  \"proto\", \"upval\"  /* these last two cases are used for tests only */\n};\n\n\nvoid luaT_init (lua_State *L) {\n  static const char *const luaT_eventname[] = {  /* ORDER TM */\n    \"__index\", \"__newindex\",\n    \"__gc\", \"__mode\", \"__len\", \"__eq\",\n    \"__add\", \"__sub\", \"__mul\", \"__div\", \"__mod\",\n    \"__pow\", \"__unm\", \"__lt\", \"__le\",\n    \"__concat\", \"__call\"\n  };\n  int i;\n  for (i=0; i<TM_N; i++) {\n    G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);\n    luaS_fix(G(L)->tmname[i]);  /* never collect these names */\n  }\n}\n\n\n/*\n** function to be used with macro \"fasttm\": optimized for absence of\n** tag methods\n*/\nconst TValue *luaT_gettm (Table *events, TMS event, TString *ename) {\n  const TValue *tm = luaH_getstr(events, ename);\n  lua_assert(event <= TM_EQ);\n  if (ttisnil(tm)) {  /* no tag method? */\n    events->flags |= cast_byte(1u<<event);  /* cache this fact */\n    return NULL;\n  }\n  else return tm;\n}\n\n\nconst TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {\n  Table *mt;\n  switch (ttypenv(o)) {\n    case LUA_TTABLE:\n      mt = hvalue(o)->metatable;\n      break;\n    case LUA_TUSERDATA:\n      mt = uvalue(o)->metatable;\n      break;\n    default:\n      mt = G(L)->mt[ttypenv(o)];\n  }\n  return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject);\n}\n\n"
  },
  {
    "path": "src/lib/lua52/ltm.h",
    "content": "/*\n** $Id: ltm.h,v 2.11.1.1 2013/04/12 18:48:47 roberto Exp $\n** Tag methods\n** See Copyright Notice in lua.h\n*/\n\n#ifndef ltm_h\n#define ltm_h\n\n\n#include \"lobject.h\"\n\n\n/*\n* WARNING: if you change the order of this enumeration,\n* grep \"ORDER TM\"\n*/\ntypedef enum {\n  TM_INDEX,\n  TM_NEWINDEX,\n  TM_GC,\n  TM_MODE,\n  TM_LEN,\n  TM_EQ,  /* last tag method with `fast' access */\n  TM_ADD,\n  TM_SUB,\n  TM_MUL,\n  TM_DIV,\n  TM_MOD,\n  TM_POW,\n  TM_UNM,\n  TM_LT,\n  TM_LE,\n  TM_CONCAT,\n  TM_CALL,\n  TM_N\t\t/* number of elements in the enum */\n} TMS;\n\n\n\n#define gfasttm(g,et,e) ((et) == NULL ? NULL : \\\n  ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))\n\n#define fasttm(l,et,e)\tgfasttm(G(l), et, e)\n\n#define ttypename(x)\tluaT_typenames_[(x) + 1]\n#define objtypename(x)\tttypename(ttypenv(x))\n\nLUAI_DDEC const char *const luaT_typenames_[LUA_TOTALTAGS];\n\n\nLUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);\nLUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,\n                                                       TMS event);\nLUAI_FUNC void luaT_init (lua_State *L);\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lua.c_",
    "content": "/*\n** $Id: lua.c,v 1.206.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua stand-alone interpreter\n** See Copyright Notice in lua.h\n*/\n\n\n#include <signal.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define lua_c\n\n#include \"lua.h\"\n\n#include \"lauxlib.h\"\n#include \"lualib.h\"\n\n\n#if !defined(LUA_PROMPT)\n#define LUA_PROMPT\t\t\"> \"\n#define LUA_PROMPT2\t\t\">> \"\n#endif\n\n#if !defined(LUA_PROGNAME)\n#define LUA_PROGNAME\t\t\"lua\"\n#endif\n\n#if !defined(LUA_MAXINPUT)\n#define LUA_MAXINPUT\t\t512\n#endif\n\n#if !defined(LUA_INIT)\n#define LUA_INIT\t\t\"LUA_INIT\"\n#endif\n\n#define LUA_INITVERSION  \\\n\tLUA_INIT \"_\" LUA_VERSION_MAJOR \"_\" LUA_VERSION_MINOR\n\n\n/*\n** lua_stdin_is_tty detects whether the standard input is a 'tty' (that\n** is, whether we're running lua interactively).\n*/\n#if defined(LUA_USE_ISATTY)\n#include <unistd.h>\n#define lua_stdin_is_tty()\tisatty(0)\n#elif defined(LUA_WIN)\n#include <io.h>\n#include <stdio.h>\n#define lua_stdin_is_tty()\t_isatty(_fileno(stdin))\n#else\n#define lua_stdin_is_tty()\t1  /* assume stdin is a tty */\n#endif\n\n\n/*\n** lua_readline defines how to show a prompt and then read a line from\n** the standard input.\n** lua_saveline defines how to \"save\" a read line in a \"history\".\n** lua_freeline defines how to free a line read by lua_readline.\n*/\n#if defined(LUA_USE_READLINE)\n\n#include <stdio.h>\n#include <readline/readline.h>\n#include <readline/history.h>\n#define lua_readline(L,b,p)\t((void)L, ((b)=readline(p)) != NULL)\n#define lua_saveline(L,idx) \\\n        if (lua_rawlen(L,idx) > 0)  /* non-empty line? */ \\\n          add_history(lua_tostring(L, idx));  /* add it to history */\n#define lua_freeline(L,b)\t((void)L, free(b))\n\n#elif !defined(lua_readline)\n\n#define lua_readline(L,b,p) \\\n        ((void)L, fputs(p, stdout), fflush(stdout),  /* show prompt */ \\\n        fgets(b, LUA_MAXINPUT, stdin) != NULL)  /* get line */\n#define lua_saveline(L,idx)\t{ (void)L; (void)idx; }\n#define lua_freeline(L,b)\t{ (void)L; (void)b; }\n\n#endif\n\n\n\n\nstatic lua_State *globalL = NULL;\n\nstatic const char *progname = LUA_PROGNAME;\n\n\n\nstatic void lstop (lua_State *L, lua_Debug *ar) {\n  (void)ar;  /* unused arg. */\n  lua_sethook(L, NULL, 0, 0);\n  luaL_error(L, \"interrupted!\");\n}\n\n\nstatic void laction (int i) {\n  signal(i, SIG_DFL); /* if another SIGINT happens before lstop,\n                              terminate process (default action) */\n  lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1);\n}\n\n\nstatic void print_usage (const char *badoption) {\n  luai_writestringerror(\"%s: \", progname);\n  if (badoption[1] == 'e' || badoption[1] == 'l')\n    luai_writestringerror(\"'%s' needs argument\\n\", badoption);\n  else\n    luai_writestringerror(\"unrecognized option '%s'\\n\", badoption);\n  luai_writestringerror(\n  \"usage: %s [options] [script [args]]\\n\"\n  \"Available options are:\\n\"\n  \"  -e stat  execute string \" LUA_QL(\"stat\") \"\\n\"\n  \"  -i       enter interactive mode after executing \" LUA_QL(\"script\") \"\\n\"\n  \"  -l name  require library \" LUA_QL(\"name\") \"\\n\"\n  \"  -v       show version information\\n\"\n  \"  -E       ignore environment variables\\n\"\n  \"  --       stop handling options\\n\"\n  \"  -        stop handling options and execute stdin\\n\"\n  ,\n  progname);\n}\n\n\nstatic void l_message (const char *pname, const char *msg) {\n  if (pname) luai_writestringerror(\"%s: \", pname);\n  luai_writestringerror(\"%s\\n\", msg);\n}\n\n\nstatic int report (lua_State *L, int status) {\n  if (status != LUA_OK && !lua_isnil(L, -1)) {\n    const char *msg = lua_tostring(L, -1);\n    if (msg == NULL) msg = \"(error object is not a string)\";\n    l_message(progname, msg);\n    lua_pop(L, 1);\n    /* force a complete garbage collection in case of errors */\n    lua_gc(L, LUA_GCCOLLECT, 0);\n  }\n  return status;\n}\n\n\n/* the next function is called unprotected, so it must avoid errors */\nstatic void finalreport (lua_State *L, int status) {\n  if (status != LUA_OK) {\n    const char *msg = (lua_type(L, -1) == LUA_TSTRING) ? lua_tostring(L, -1)\n                                                       : NULL;\n    if (msg == NULL) msg = \"(error object is not a string)\";\n    l_message(progname, msg);\n    lua_pop(L, 1);\n  }\n}\n\n\nstatic int traceback (lua_State *L) {\n  const char *msg = lua_tostring(L, 1);\n  if (msg)\n    luaL_traceback(L, L, msg, 1);\n  else if (!lua_isnoneornil(L, 1)) {  /* is there an error object? */\n    if (!luaL_callmeta(L, 1, \"__tostring\"))  /* try its 'tostring' metamethod */\n      lua_pushliteral(L, \"(no error message)\");\n  }\n  return 1;\n}\n\n\nstatic int docall (lua_State *L, int narg, int nres) {\n  int status;\n  int base = lua_gettop(L) - narg;  /* function index */\n  lua_pushcfunction(L, traceback);  /* push traceback function */\n  lua_insert(L, base);  /* put it under chunk and args */\n  globalL = L;  /* to be available to 'laction' */\n  signal(SIGINT, laction);\n  status = lua_pcall(L, narg, nres, base);\n  signal(SIGINT, SIG_DFL);\n  lua_remove(L, base);  /* remove traceback function */\n  return status;\n}\n\n\nstatic void print_version (void) {\n  luai_writestring(LUA_COPYRIGHT, strlen(LUA_COPYRIGHT));\n  luai_writeline();\n}\n\n\nstatic int getargs (lua_State *L, char **argv, int n) {\n  int narg;\n  int i;\n  int argc = 0;\n  while (argv[argc]) argc++;  /* count total number of arguments */\n  narg = argc - (n + 1);  /* number of arguments to the script */\n  luaL_checkstack(L, narg + 3, \"too many arguments to script\");\n  for (i=n+1; i < argc; i++)\n    lua_pushstring(L, argv[i]);\n  lua_createtable(L, narg, n + 1);\n  for (i=0; i < argc; i++) {\n    lua_pushstring(L, argv[i]);\n    lua_rawseti(L, -2, i - n);\n  }\n  return narg;\n}\n\n\nstatic int dofile (lua_State *L, const char *name) {\n  int status = luaL_loadfile(L, name);\n  if (status == LUA_OK) status = docall(L, 0, 0);\n  return report(L, status);\n}\n\n\nstatic int dostring (lua_State *L, const char *s, const char *name) {\n  int status = luaL_loadbuffer(L, s, strlen(s), name);\n  if (status == LUA_OK) status = docall(L, 0, 0);\n  return report(L, status);\n}\n\n\nstatic int dolibrary (lua_State *L, const char *name) {\n  int status;\n  lua_getglobal(L, \"require\");\n  lua_pushstring(L, name);\n  status = docall(L, 1, 1);  /* call 'require(name)' */\n  if (status == LUA_OK)\n    lua_setglobal(L, name);  /* global[name] = require return */\n  return report(L, status);\n}\n\n\nstatic const char *get_prompt (lua_State *L, int firstline) {\n  const char *p;\n  lua_getglobal(L, firstline ? \"_PROMPT\" : \"_PROMPT2\");\n  p = lua_tostring(L, -1);\n  if (p == NULL) p = (firstline ? LUA_PROMPT : LUA_PROMPT2);\n  return p;\n}\n\n/* mark in error messages for incomplete statements */\n#define EOFMARK\t\t\"<eof>\"\n#define marklen\t\t(sizeof(EOFMARK)/sizeof(char) - 1)\n\nstatic int incomplete (lua_State *L, int status) {\n  if (status == LUA_ERRSYNTAX) {\n    size_t lmsg;\n    const char *msg = lua_tolstring(L, -1, &lmsg);\n    if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) {\n      lua_pop(L, 1);\n      return 1;\n    }\n  }\n  return 0;  /* else... */\n}\n\n\nstatic int pushline (lua_State *L, int firstline) {\n  char buffer[LUA_MAXINPUT];\n  char *b = buffer;\n  size_t l;\n  const char *prmt = get_prompt(L, firstline);\n  int readstatus = lua_readline(L, b, prmt);\n  lua_pop(L, 1);  /* remove result from 'get_prompt' */\n  if (readstatus == 0)\n    return 0;  /* no input */\n  l = strlen(b);\n  if (l > 0 && b[l-1] == '\\n')  /* line ends with newline? */\n    b[l-1] = '\\0';  /* remove it */\n  if (firstline && b[0] == '=')  /* first line starts with `=' ? */\n    lua_pushfstring(L, \"return %s\", b+1);  /* change it to `return' */\n  else\n    lua_pushstring(L, b);\n  lua_freeline(L, b);\n  return 1;\n}\n\n\nstatic int loadline (lua_State *L) {\n  int status;\n  lua_settop(L, 0);\n  if (!pushline(L, 1))\n    return -1;  /* no input */\n  for (;;) {  /* repeat until gets a complete line */\n    size_t l;\n    const char *line = lua_tolstring(L, 1, &l);\n    status = luaL_loadbuffer(L, line, l, \"=stdin\");\n    if (!incomplete(L, status)) break;  /* cannot try to add lines? */\n    if (!pushline(L, 0))  /* no more input? */\n      return -1;\n    lua_pushliteral(L, \"\\n\");  /* add a new line... */\n    lua_insert(L, -2);  /* ...between the two lines */\n    lua_concat(L, 3);  /* join them */\n  }\n  lua_saveline(L, 1);\n  lua_remove(L, 1);  /* remove line */\n  return status;\n}\n\n\nstatic void dotty (lua_State *L) {\n  int status;\n  const char *oldprogname = progname;\n  progname = NULL;\n  while ((status = loadline(L)) != -1) {\n    if (status == LUA_OK) status = docall(L, 0, LUA_MULTRET);\n    report(L, status);\n    if (status == LUA_OK && lua_gettop(L) > 0) {  /* any result to print? */\n      luaL_checkstack(L, LUA_MINSTACK, \"too many results to print\");\n      lua_getglobal(L, \"print\");\n      lua_insert(L, 1);\n      if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != LUA_OK)\n        l_message(progname, lua_pushfstring(L,\n                               \"error calling \" LUA_QL(\"print\") \" (%s)\",\n                               lua_tostring(L, -1)));\n    }\n  }\n  lua_settop(L, 0);  /* clear stack */\n  luai_writeline();\n  progname = oldprogname;\n}\n\n\nstatic int handle_script (lua_State *L, char **argv, int n) {\n  int status;\n  const char *fname;\n  int narg = getargs(L, argv, n);  /* collect arguments */\n  lua_setglobal(L, \"arg\");\n  fname = argv[n];\n  if (strcmp(fname, \"-\") == 0 && strcmp(argv[n-1], \"--\") != 0)\n    fname = NULL;  /* stdin */\n  status = luaL_loadfile(L, fname);\n  lua_insert(L, -(narg+1));\n  if (status == LUA_OK)\n    status = docall(L, narg, LUA_MULTRET);\n  else\n    lua_pop(L, narg);\n  return report(L, status);\n}\n\n\n/* check that argument has no extra characters at the end */\n#define noextrachars(x)\t\t{if ((x)[2] != '\\0') return -1;}\n\n\n/* indices of various argument indicators in array args */\n#define has_i\t\t0\t/* -i */\n#define has_v\t\t1\t/* -v */\n#define has_e\t\t2\t/* -e */\n#define has_E\t\t3\t/* -E */\n\n#define num_has\t\t4\t/* number of 'has_*' */\n\n\nstatic int collectargs (char **argv, int *args) {\n  int i;\n  for (i = 1; argv[i] != NULL; i++) {\n    if (argv[i][0] != '-')  /* not an option? */\n        return i;\n    switch (argv[i][1]) {  /* option */\n      case '-':\n        noextrachars(argv[i]);\n        return (argv[i+1] != NULL ? i+1 : 0);\n      case '\\0':\n        return i;\n      case 'E':\n        args[has_E] = 1;\n        break;\n      case 'i':\n        noextrachars(argv[i]);\n        args[has_i] = 1;  /* go through */\n      case 'v':\n        noextrachars(argv[i]);\n        args[has_v] = 1;\n        break;\n      case 'e':\n        args[has_e] = 1;  /* go through */\n      case 'l':  /* both options need an argument */\n        if (argv[i][2] == '\\0') {  /* no concatenated argument? */\n          i++;  /* try next 'argv' */\n          if (argv[i] == NULL || argv[i][0] == '-')\n            return -(i - 1);  /* no next argument or it is another option */\n        }\n        break;\n      default:  /* invalid option; return its index... */\n        return -i;  /* ...as a negative value */\n    }\n  }\n  return 0;\n}\n\n\nstatic int runargs (lua_State *L, char **argv, int n) {\n  int i;\n  for (i = 1; i < n; i++) {\n    lua_assert(argv[i][0] == '-');\n    switch (argv[i][1]) {  /* option */\n      case 'e': {\n        const char *chunk = argv[i] + 2;\n        if (*chunk == '\\0') chunk = argv[++i];\n        lua_assert(chunk != NULL);\n        if (dostring(L, chunk, \"=(command line)\") != LUA_OK)\n          return 0;\n        break;\n      }\n      case 'l': {\n        const char *filename = argv[i] + 2;\n        if (*filename == '\\0') filename = argv[++i];\n        lua_assert(filename != NULL);\n        if (dolibrary(L, filename) != LUA_OK)\n          return 0;  /* stop if file fails */\n        break;\n      }\n      default: break;\n    }\n  }\n  return 1;\n}\n\n\nstatic int handle_luainit (lua_State *L) {\n  const char *name = \"=\" LUA_INITVERSION;\n  const char *init = getenv(name + 1);\n  if (init == NULL) {\n    name = \"=\" LUA_INIT;\n    init = getenv(name + 1);  /* try alternative name */\n  }\n  if (init == NULL) return LUA_OK;\n  else if (init[0] == '@')\n    return dofile(L, init+1);\n  else\n    return dostring(L, init, name);\n}\n\n\nstatic int pmain (lua_State *L) {\n  int argc = (int)lua_tointeger(L, 1);\n  char **argv = (char **)lua_touserdata(L, 2);\n  int script;\n  int args[num_has];\n  args[has_i] = args[has_v] = args[has_e] = args[has_E] = 0;\n  if (argv[0] && argv[0][0]) progname = argv[0];\n  script = collectargs(argv, args);\n  if (script < 0) {  /* invalid arg? */\n    print_usage(argv[-script]);\n    return 0;\n  }\n  if (args[has_v]) print_version();\n  if (args[has_E]) {  /* option '-E'? */\n    lua_pushboolean(L, 1);  /* signal for libraries to ignore env. vars. */\n    lua_setfield(L, LUA_REGISTRYINDEX, \"LUA_NOENV\");\n  }\n  /* open standard libraries */\n  luaL_checkversion(L);\n  lua_gc(L, LUA_GCSTOP, 0);  /* stop collector during initialization */\n  luaL_openlibs(L);  /* open libraries */\n  lua_gc(L, LUA_GCRESTART, 0);\n  if (!args[has_E] && handle_luainit(L) != LUA_OK)\n    return 0;  /* error running LUA_INIT */\n  /* execute arguments -e and -l */\n  if (!runargs(L, argv, (script > 0) ? script : argc)) return 0;\n  /* execute main script (if there is one) */\n  if (script && handle_script(L, argv, script) != LUA_OK) return 0;\n  if (args[has_i])  /* -i option? */\n    dotty(L);\n  else if (script == 0 && !args[has_e] && !args[has_v]) {  /* no arguments? */\n    if (lua_stdin_is_tty()) {\n      print_version();\n      dotty(L);\n    }\n    else dofile(L, NULL);  /* executes stdin as a file */\n  }\n  lua_pushboolean(L, 1);  /* signal no errors */\n  return 1;\n}\n\n\nint main (int argc, char **argv) {\n  int status, result;\n  lua_State *L = luaL_newstate();  /* create state */\n  if (L == NULL) {\n    l_message(argv[0], \"cannot create state: not enough memory\");\n    return EXIT_FAILURE;\n  }\n  /* call 'pmain' in protected mode */\n  lua_pushcfunction(L, &pmain);\n  lua_pushinteger(L, argc);  /* 1st argument */\n  lua_pushlightuserdata(L, argv); /* 2nd argument */\n  status = lua_pcall(L, 2, 1, 0);\n  result = lua_toboolean(L, -1);  /* get result */\n  finalreport(L, status);\n  lua_close(L);\n  return (result && status == LUA_OK) ? EXIT_SUCCESS : EXIT_FAILURE;\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lua.h",
    "content": "/*\n** $Id: lua.h,v 1.285.1.4 2015/02/21 14:04:50 roberto Exp $\n** Lua - A Scripting Language\n** Lua.org, PUC-Rio, Brazil (http://www.lua.org)\n** See Copyright Notice at the end of this file\n*/\n\n\n#ifndef lua_h\n#define lua_h\n\n#include <stdarg.h>\n#include <stddef.h>\n\n\n#include \"luaconf.h\"\n\n\n#define LUA_VERSION_MAJOR\t\"5\"\n#define LUA_VERSION_MINOR\t\"2\"\n#define LUA_VERSION_NUM\t\t502\n#define LUA_VERSION_RELEASE\t\"4\"\n\n#define LUA_VERSION\t\"Lua \" LUA_VERSION_MAJOR \".\" LUA_VERSION_MINOR\n#define LUA_RELEASE\tLUA_VERSION \".\" LUA_VERSION_RELEASE\n#define LUA_COPYRIGHT\tLUA_RELEASE \"  Copyright (C) 1994-2015 Lua.org, PUC-Rio\"\n#define LUA_AUTHORS\t\"R. Ierusalimschy, L. H. de Figueiredo, W. Celes\"\n\n\n/* mark for precompiled code ('<esc>Lua') */\n#define LUA_SIGNATURE\t\"\\033Lua\"\n\n/* option for multiple returns in 'lua_pcall' and 'lua_call' */\n#define LUA_MULTRET\t(-1)\n\n\n/*\n** pseudo-indices\n*/\n#define LUA_REGISTRYINDEX\tLUAI_FIRSTPSEUDOIDX\n#define lua_upvalueindex(i)\t(LUA_REGISTRYINDEX - (i))\n\n\n/* thread status */\n#define LUA_OK\t\t0\n#define LUA_YIELD\t1\n#define LUA_ERRRUN\t2\n#define LUA_ERRSYNTAX\t3\n#define LUA_ERRMEM\t4\n#define LUA_ERRGCMM\t5\n#define LUA_ERRERR\t6\n\n\ntypedef struct lua_State lua_State;\n\ntypedef int (*lua_CFunction) (lua_State *L);\n\n\n/*\n** functions that read/write blocks when loading/dumping Lua chunks\n*/\ntypedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);\n\ntypedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud);\n\n\n/*\n** prototype for memory-allocation functions\n*/\ntypedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);\n\n\n/*\n** basic types\n*/\n#define LUA_TNONE\t\t(-1)\n\n#define LUA_TNIL\t\t0\n#define LUA_TBOOLEAN\t\t1\n#define LUA_TLIGHTUSERDATA\t2\n#define LUA_TNUMBER\t\t3\n#define LUA_TSTRING\t\t4\n#define LUA_TTABLE\t\t5\n#define LUA_TFUNCTION\t\t6\n#define LUA_TUSERDATA\t\t7\n#define LUA_TTHREAD\t\t8\n\n#define LUA_NUMTAGS\t\t9\n\n\n\n/* minimum Lua stack available to a C function */\n#define LUA_MINSTACK\t20\n\n\n/* predefined values in the registry */\n#define LUA_RIDX_MAINTHREAD\t1\n#define LUA_RIDX_GLOBALS\t2\n#define LUA_RIDX_LAST\t\tLUA_RIDX_GLOBALS\n\n\n/* type of numbers in Lua */\ntypedef LUA_NUMBER lua_Number;\n\n\n/* type for integer functions */\ntypedef LUA_INTEGER lua_Integer;\n\n/* unsigned integer type */\ntypedef LUA_UNSIGNED lua_Unsigned;\n\n\n\n/*\n** generic extra include file\n*/\n#if defined(LUA_USER_H)\n#include LUA_USER_H\n#endif\n\n\n/*\n** RCS ident string\n*/\nextern const char lua_ident[];\n\n\n/*\n** state manipulation\n*/\nLUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);\nLUA_API void       (lua_close) (lua_State *L);\nLUA_API lua_State *(lua_newthread) (lua_State *L);\n\nLUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf);\n\n\nLUA_API const lua_Number *(lua_version) (lua_State *L);\n\n\n/*\n** basic stack manipulation\n*/\nLUA_API int   (lua_absindex) (lua_State *L, int idx);\nLUA_API int   (lua_gettop) (lua_State *L);\nLUA_API void  (lua_settop) (lua_State *L, int idx);\nLUA_API void  (lua_pushvalue) (lua_State *L, int idx);\nLUA_API void  (lua_remove) (lua_State *L, int idx);\nLUA_API void  (lua_insert) (lua_State *L, int idx);\nLUA_API void  (lua_replace) (lua_State *L, int idx);\nLUA_API void  (lua_copy) (lua_State *L, int fromidx, int toidx);\nLUA_API int   (lua_checkstack) (lua_State *L, int sz);\n\nLUA_API void  (lua_xmove) (lua_State *from, lua_State *to, int n);\n\n\n/*\n** access functions (stack -> C)\n*/\n\nLUA_API int             (lua_isnumber) (lua_State *L, int idx);\nLUA_API int             (lua_isstring) (lua_State *L, int idx);\nLUA_API int             (lua_iscfunction) (lua_State *L, int idx);\nLUA_API int             (lua_isuserdata) (lua_State *L, int idx);\nLUA_API int             (lua_type) (lua_State *L, int idx);\nLUA_API const char     *(lua_typename) (lua_State *L, int tp);\n\nLUA_API lua_Number      (lua_tonumberx) (lua_State *L, int idx, int *isnum);\nLUA_API lua_Integer     (lua_tointegerx) (lua_State *L, int idx, int *isnum);\nLUA_API lua_Unsigned    (lua_tounsignedx) (lua_State *L, int idx, int *isnum);\nLUA_API int             (lua_toboolean) (lua_State *L, int idx);\nLUA_API const char     *(lua_tolstring) (lua_State *L, int idx, size_t *len);\nLUA_API size_t          (lua_rawlen) (lua_State *L, int idx);\nLUA_API lua_CFunction   (lua_tocfunction) (lua_State *L, int idx);\nLUA_API void\t       *(lua_touserdata) (lua_State *L, int idx);\nLUA_API lua_State      *(lua_tothread) (lua_State *L, int idx);\nLUA_API const void     *(lua_topointer) (lua_State *L, int idx);\n\n\n/*\n** Comparison and arithmetic functions\n*/\n\n#define LUA_OPADD\t0\t/* ORDER TM */\n#define LUA_OPSUB\t1\n#define LUA_OPMUL\t2\n#define LUA_OPDIV\t3\n#define LUA_OPMOD\t4\n#define LUA_OPPOW\t5\n#define LUA_OPUNM\t6\n\nLUA_API void  (lua_arith) (lua_State *L, int op);\n\n#define LUA_OPEQ\t0\n#define LUA_OPLT\t1\n#define LUA_OPLE\t2\n\nLUA_API int   (lua_rawequal) (lua_State *L, int idx1, int idx2);\nLUA_API int   (lua_compare) (lua_State *L, int idx1, int idx2, int op);\n\n\n/*\n** push functions (C -> stack)\n*/\nLUA_API void        (lua_pushnil) (lua_State *L);\nLUA_API void        (lua_pushnumber) (lua_State *L, lua_Number n);\nLUA_API void        (lua_pushinteger) (lua_State *L, lua_Integer n);\nLUA_API void        (lua_pushunsigned) (lua_State *L, lua_Unsigned n);\nLUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t l);\nLUA_API const char *(lua_pushstring) (lua_State *L, const char *s);\nLUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,\n                                                      va_list argp);\nLUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);\nLUA_API void  (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);\nLUA_API void  (lua_pushboolean) (lua_State *L, int b);\nLUA_API void  (lua_pushlightuserdata) (lua_State *L, void *p);\nLUA_API int   (lua_pushthread) (lua_State *L);\n\n\n/*\n** get functions (Lua -> stack)\n*/\nLUA_API void  (lua_getglobal) (lua_State *L, const char *var);\nLUA_API void  (lua_gettable) (lua_State *L, int idx);\nLUA_API void  (lua_getfield) (lua_State *L, int idx, const char *k);\nLUA_API void  (lua_rawget) (lua_State *L, int idx);\nLUA_API void  (lua_rawgeti) (lua_State *L, int idx, int n);\nLUA_API void  (lua_rawgetp) (lua_State *L, int idx, const void *p);\nLUA_API void  (lua_createtable) (lua_State *L, int narr, int nrec);\nLUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);\nLUA_API int   (lua_getmetatable) (lua_State *L, int objindex);\nLUA_API void  (lua_getuservalue) (lua_State *L, int idx);\n\n\n/*\n** set functions (stack -> Lua)\n*/\nLUA_API void  (lua_setglobal) (lua_State *L, const char *var);\nLUA_API void  (lua_settable) (lua_State *L, int idx);\nLUA_API void  (lua_setfield) (lua_State *L, int idx, const char *k);\nLUA_API void  (lua_rawset) (lua_State *L, int idx);\nLUA_API void  (lua_rawseti) (lua_State *L, int idx, int n);\nLUA_API void  (lua_rawsetp) (lua_State *L, int idx, const void *p);\nLUA_API int   (lua_setmetatable) (lua_State *L, int objindex);\nLUA_API void  (lua_setuservalue) (lua_State *L, int idx);\n\n\n/*\n** 'load' and 'call' functions (load and run Lua code)\n*/\nLUA_API void  (lua_callk) (lua_State *L, int nargs, int nresults, int ctx,\n                           lua_CFunction k);\n#define lua_call(L,n,r)\t\tlua_callk(L, (n), (r), 0, NULL)\n\nLUA_API int   (lua_getctx) (lua_State *L, int *ctx);\n\nLUA_API int   (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc,\n                            int ctx, lua_CFunction k);\n#define lua_pcall(L,n,r,f)\tlua_pcallk(L, (n), (r), (f), 0, NULL)\n\nLUA_API int   (lua_load) (lua_State *L, lua_Reader reader, void *dt,\n                                        const char *chunkname,\n                                        const char *mode);\n\nLUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);\n\n\n/*\n** coroutine functions\n*/\nLUA_API int  (lua_yieldk) (lua_State *L, int nresults, int ctx,\n                           lua_CFunction k);\n#define lua_yield(L,n)\t\tlua_yieldk(L, (n), 0, NULL)\nLUA_API int  (lua_resume) (lua_State *L, lua_State *from, int narg);\nLUA_API int  (lua_status) (lua_State *L);\n\n/*\n** garbage-collection function and options\n*/\n\n#define LUA_GCSTOP\t\t0\n#define LUA_GCRESTART\t\t1\n#define LUA_GCCOLLECT\t\t2\n#define LUA_GCCOUNT\t\t3\n#define LUA_GCCOUNTB\t\t4\n#define LUA_GCSTEP\t\t5\n#define LUA_GCSETPAUSE\t\t6\n#define LUA_GCSETSTEPMUL\t7\n#define LUA_GCSETMAJORINC\t8\n#define LUA_GCISRUNNING\t\t9\n#define LUA_GCGEN\t\t10\n#define LUA_GCINC\t\t11\n\nLUA_API int (lua_gc) (lua_State *L, int what, int data);\n\n\n/*\n** miscellaneous functions\n*/\n\nLUA_API int   (lua_error) (lua_State *L);\n\nLUA_API int   (lua_next) (lua_State *L, int idx);\n\nLUA_API void  (lua_concat) (lua_State *L, int n);\nLUA_API void  (lua_len)    (lua_State *L, int idx);\n\nLUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);\nLUA_API void      (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);\n\n\n\n/*\n** ===============================================================\n** some useful macros\n** ===============================================================\n*/\n\n#define lua_tonumber(L,i)\tlua_tonumberx(L,i,NULL)\n#define lua_tointeger(L,i)\tlua_tointegerx(L,i,NULL)\n#define lua_tounsigned(L,i)\tlua_tounsignedx(L,i,NULL)\n\n#define lua_pop(L,n)\t\tlua_settop(L, -(n)-1)\n\n#define lua_newtable(L)\t\tlua_createtable(L, 0, 0)\n\n#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))\n\n#define lua_pushcfunction(L,f)\tlua_pushcclosure(L, (f), 0)\n\n#define lua_isfunction(L,n)\t(lua_type(L, (n)) == LUA_TFUNCTION)\n#define lua_istable(L,n)\t(lua_type(L, (n)) == LUA_TTABLE)\n#define lua_islightuserdata(L,n)\t(lua_type(L, (n)) == LUA_TLIGHTUSERDATA)\n#define lua_isnil(L,n)\t\t(lua_type(L, (n)) == LUA_TNIL)\n#define lua_isboolean(L,n)\t(lua_type(L, (n)) == LUA_TBOOLEAN)\n#define lua_isthread(L,n)\t(lua_type(L, (n)) == LUA_TTHREAD)\n#define lua_isnone(L,n)\t\t(lua_type(L, (n)) == LUA_TNONE)\n#define lua_isnoneornil(L, n)\t(lua_type(L, (n)) <= 0)\n\n#define lua_pushliteral(L, s)\t\\\n\tlua_pushlstring(L, \"\" s, (sizeof(s)/sizeof(char))-1)\n\n#define lua_pushglobaltable(L)  \\\n\tlua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS)\n\n#define lua_tostring(L,i)\tlua_tolstring(L, (i), NULL)\n\n\n\n/*\n** {======================================================================\n** Debug API\n** =======================================================================\n*/\n\n\n/*\n** Event codes\n*/\n#define LUA_HOOKCALL\t0\n#define LUA_HOOKRET\t1\n#define LUA_HOOKLINE\t2\n#define LUA_HOOKCOUNT\t3\n#define LUA_HOOKTAILCALL 4\n\n\n/*\n** Event masks\n*/\n#define LUA_MASKCALL\t(1 << LUA_HOOKCALL)\n#define LUA_MASKRET\t(1 << LUA_HOOKRET)\n#define LUA_MASKLINE\t(1 << LUA_HOOKLINE)\n#define LUA_MASKCOUNT\t(1 << LUA_HOOKCOUNT)\n\ntypedef struct lua_Debug lua_Debug;  /* activation record */\n\n\n/* Functions to be called by the debugger in specific events */\ntypedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);\n\n\nLUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar);\nLUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar);\nLUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n);\nLUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n);\nLUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n);\nLUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n);\n\nLUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n);\nLUA_API void  (lua_upvaluejoin) (lua_State *L, int fidx1, int n1,\n                                               int fidx2, int n2);\n\nLUA_API int (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count);\nLUA_API lua_Hook (lua_gethook) (lua_State *L);\nLUA_API int (lua_gethookmask) (lua_State *L);\nLUA_API int (lua_gethookcount) (lua_State *L);\n\n\nstruct lua_Debug {\n  int event;\n  const char *name;\t/* (n) */\n  const char *namewhat;\t/* (n) 'global', 'local', 'field', 'method' */\n  const char *what;\t/* (S) 'Lua', 'C', 'main', 'tail' */\n  const char *source;\t/* (S) */\n  int currentline;\t/* (l) */\n  int linedefined;\t/* (S) */\n  int lastlinedefined;\t/* (S) */\n  unsigned char nups;\t/* (u) number of upvalues */\n  unsigned char nparams;/* (u) number of parameters */\n  char isvararg;        /* (u) */\n  char istailcall;\t/* (t) */\n  char short_src[LUA_IDSIZE]; /* (S) */\n  /* private part */\n  struct CallInfo *i_ci;  /* active function */\n};\n\n/* }====================================================================== */\n\n\n/******************************************************************************\n* Copyright (C) 1994-2015 Lua.org, PUC-Rio.\n*\n* Permission is hereby granted, free of charge, to any person obtaining\n* a copy of this software and associated documentation files (the\n* \"Software\"), to deal in the Software without restriction, including\n* without limitation the rights to use, copy, modify, merge, publish,\n* distribute, sublicense, and/or sell copies of the Software, and to\n* permit persons to whom the Software is furnished to do so, subject to\n* the following conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n******************************************************************************/\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lua.hpp",
    "content": "// lua.hpp\n// Lua header files for C++\n// <<extern \"C\">> not supplied automatically because Lua also compiles as C++\n\nextern \"C\" {\n#include \"lua.h\"\n#include \"lualib.h\"\n#include \"lauxlib.h\"\n}\n"
  },
  {
    "path": "src/lib/lua52/luac.c_",
    "content": "/*\n** $Id: luac.c,v 1.69 2011/11/29 17:46:33 lhf Exp $\n** Lua compiler (saves bytecodes to files; also list bytecodes)\n** See Copyright Notice in lua.h\n*/\n\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define luac_c\n#define LUA_CORE\n\n#include \"lua.h\"\n#include \"lauxlib.h\"\n\n#include \"lobject.h\"\n#include \"lstate.h\"\n#include \"lundump.h\"\n\nstatic void PrintFunction(const Proto* f, int full);\n#define luaU_print\tPrintFunction\n\n#define PROGNAME\t\"luac\"\t\t/* default program name */\n#define OUTPUT\t\tPROGNAME \".out\"\t/* default output file */\n\nstatic int listing=0;\t\t\t/* list bytecodes? */\nstatic int dumping=1;\t\t\t/* dump bytecodes? */\nstatic int stripping=0;\t\t\t/* strip debug information? */\nstatic char Output[]={ OUTPUT };\t/* default output file name */\nstatic const char* output=Output;\t/* actual output file name */\nstatic const char* progname=PROGNAME;\t/* actual program name */\n\nstatic void fatal(const char* message)\n{\n fprintf(stderr,\"%s: %s\\n\",progname,message);\n exit(EXIT_FAILURE);\n}\n\nstatic void cannot(const char* what)\n{\n fprintf(stderr,\"%s: cannot %s %s: %s\\n\",progname,what,output,strerror(errno));\n exit(EXIT_FAILURE);\n}\n\nstatic void usage(const char* message)\n{\n if (*message=='-')\n  fprintf(stderr,\"%s: unrecognized option \" LUA_QS \"\\n\",progname,message);\n else\n  fprintf(stderr,\"%s: %s\\n\",progname,message);\n fprintf(stderr,\n  \"usage: %s [options] [filenames]\\n\"\n  \"Available options are:\\n\"\n  \"  -l       list (use -l -l for full listing)\\n\"\n  \"  -o name  output to file \" LUA_QL(\"name\") \" (default is \\\"%s\\\")\\n\"\n  \"  -p       parse only\\n\"\n  \"  -s       strip debug information\\n\"\n  \"  -v       show version information\\n\"\n  \"  --       stop handling options\\n\"\n  \"  -        stop handling options and process stdin\\n\"\n  ,progname,Output);\n exit(EXIT_FAILURE);\n}\n\n#define IS(s)\t(strcmp(argv[i],s)==0)\n\nstatic int doargs(int argc, char* argv[])\n{\n int i;\n int version=0;\n if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0];\n for (i=1; i<argc; i++)\n {\n  if (*argv[i]!='-')\t\t\t/* end of options; keep it */\n   break;\n  else if (IS(\"--\"))\t\t\t/* end of options; skip it */\n  {\n   ++i;\n   if (version) ++version;\n   break;\n  }\n  else if (IS(\"-\"))\t\t\t/* end of options; use stdin */\n   break;\n  else if (IS(\"-l\"))\t\t\t/* list */\n   ++listing;\n  else if (IS(\"-o\"))\t\t\t/* output file */\n  {\n   output=argv[++i];\n   if (output==NULL || *output==0 || (*output=='-' && output[1]!=0))\n    usage(LUA_QL(\"-o\") \" needs argument\");\n   if (IS(\"-\")) output=NULL;\n  }\n  else if (IS(\"-p\"))\t\t\t/* parse only */\n   dumping=0;\n  else if (IS(\"-s\"))\t\t\t/* strip debug information */\n   stripping=1;\n  else if (IS(\"-v\"))\t\t\t/* show version */\n   ++version;\n  else\t\t\t\t\t/* unknown option */\n   usage(argv[i]);\n }\n if (i==argc && (listing || !dumping))\n {\n  dumping=0;\n  argv[--i]=Output;\n }\n if (version)\n {\n  printf(\"%s\\n\",LUA_COPYRIGHT);\n  if (version==argc-1) exit(EXIT_SUCCESS);\n }\n return i;\n}\n\n#define FUNCTION \"(function()end)();\"\n\nstatic const char* reader(lua_State *L, void *ud, size_t *size)\n{\n UNUSED(L);\n if ((*(int*)ud)--)\n {\n  *size=sizeof(FUNCTION)-1;\n  return FUNCTION;\n }\n else\n {\n  *size=0;\n  return NULL;\n }\n}\n\n#define toproto(L,i) getproto(L->top+(i))\n\nstatic const Proto* combine(lua_State* L, int n)\n{\n if (n==1)\n  return toproto(L,-1);\n else\n {\n  Proto* f;\n  int i=n;\n  if (lua_load(L,reader,&i,\"=(\" PROGNAME \")\",NULL)!=LUA_OK) fatal(lua_tostring(L,-1));\n  f=toproto(L,-1);\n  for (i=0; i<n; i++)\n  {\n   f->p[i]=toproto(L,i-n-1);\n   if (f->p[i]->sizeupvalues>0) f->p[i]->upvalues[0].instack=0;\n  }\n  f->sizelineinfo=0;\n  return f;\n }\n}\n\nstatic int writer(lua_State* L, const void* p, size_t size, void* u)\n{\n UNUSED(L);\n return (fwrite(p,size,1,(FILE*)u)!=1) && (size!=0);\n}\n\nstatic int pmain(lua_State* L)\n{\n int argc=(int)lua_tointeger(L,1);\n char** argv=(char**)lua_touserdata(L,2);\n const Proto* f;\n int i;\n if (!lua_checkstack(L,argc)) fatal(\"too many input files\");\n for (i=0; i<argc; i++)\n {\n  const char* filename=IS(\"-\") ? NULL : argv[i];\n  if (luaL_loadfile(L,filename)!=LUA_OK) fatal(lua_tostring(L,-1));\n }\n f=combine(L,argc);\n if (listing) luaU_print(f,listing>1);\n if (dumping)\n {\n  FILE* D= (output==NULL) ? stdout : fopen(output,\"wb\");\n  if (D==NULL) cannot(\"open\");\n  lua_lock(L);\n  luaU_dump(L,f,writer,D,stripping);\n  lua_unlock(L);\n  if (ferror(D)) cannot(\"write\");\n  if (fclose(D)) cannot(\"close\");\n }\n return 0;\n}\n\nint main(int argc, char* argv[])\n{\n lua_State* L;\n int i=doargs(argc,argv);\n argc-=i; argv+=i;\n if (argc<=0) usage(\"no input files given\");\n L=luaL_newstate();\n if (L==NULL) fatal(\"cannot create state: not enough memory\");\n lua_pushcfunction(L,&pmain);\n lua_pushinteger(L,argc);\n lua_pushlightuserdata(L,argv);\n if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1));\n lua_close(L);\n return EXIT_SUCCESS;\n}\n\n/*\n** $Id: print.c,v 1.69 2013/07/04 01:03:46 lhf Exp $\n** print bytecodes\n** See Copyright Notice in lua.h\n*/\n\n#include <ctype.h>\n#include <stdio.h>\n\n#define luac_c\n#define LUA_CORE\n\n#include \"ldebug.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n\n#define VOID(p)\t\t((const void*)(p))\n\nstatic void PrintString(const TString* ts)\n{\n const char* s=getstr(ts);\n size_t i,n=ts->tsv.len;\n printf(\"%c\",'\"');\n for (i=0; i<n; i++)\n {\n  int c=(int)(unsigned char)s[i];\n  switch (c)\n  {\n   case '\"':  printf(\"\\\\\\\"\"); break;\n   case '\\\\': printf(\"\\\\\\\\\"); break;\n   case '\\a': printf(\"\\\\a\"); break;\n   case '\\b': printf(\"\\\\b\"); break;\n   case '\\f': printf(\"\\\\f\"); break;\n   case '\\n': printf(\"\\\\n\"); break;\n   case '\\r': printf(\"\\\\r\"); break;\n   case '\\t': printf(\"\\\\t\"); break;\n   case '\\v': printf(\"\\\\v\"); break;\n   default:\tif (isprint(c))\n   \t\t\tprintf(\"%c\",c);\n\t\telse\n\t\t\tprintf(\"\\\\%03d\",c);\n  }\n }\n printf(\"%c\",'\"');\n}\n\nstatic void PrintConstant(const Proto* f, int i)\n{\n const TValue* o=&f->k[i];\n switch (ttypenv(o))\n {\n  case LUA_TNIL:\n\tprintf(\"nil\");\n\tbreak;\n  case LUA_TBOOLEAN:\n\tprintf(bvalue(o) ? \"true\" : \"false\");\n\tbreak;\n  case LUA_TNUMBER:\n\tprintf(LUA_NUMBER_FMT,nvalue(o));\n\tbreak;\n  case LUA_TSTRING:\n\tPrintString(rawtsvalue(o));\n\tbreak;\n  default:\t\t\t\t/* cannot happen */\n\tprintf(\"? type=%d\",ttype(o));\n\tbreak;\n }\n}\n\n#define UPVALNAME(x) ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : \"-\")\n#define MYK(x)\t\t(-1-(x))\n\nstatic void PrintCode(const Proto* f)\n{\n const Instruction* code=f->code;\n int pc,n=f->sizecode;\n for (pc=0; pc<n; pc++)\n {\n  Instruction i=code[pc];\n  OpCode o=GET_OPCODE(i);\n  int a=GETARG_A(i);\n  int b=GETARG_B(i);\n  int c=GETARG_C(i);\n  int ax=GETARG_Ax(i);\n  int bx=GETARG_Bx(i);\n  int sbx=GETARG_sBx(i);\n  int line=getfuncline(f,pc);\n  printf(\"\\t%d\\t\",pc+1);\n  if (line>0) printf(\"[%d]\\t\",line); else printf(\"[-]\\t\");\n  printf(\"%-9s\\t\",luaP_opnames[o]);\n  switch (getOpMode(o))\n  {\n   case iABC:\n    printf(\"%d\",a);\n    if (getBMode(o)!=OpArgN) printf(\" %d\",ISK(b) ? (MYK(INDEXK(b))) : b);\n    if (getCMode(o)!=OpArgN) printf(\" %d\",ISK(c) ? (MYK(INDEXK(c))) : c);\n    break;\n   case iABx:\n    printf(\"%d\",a);\n    if (getBMode(o)==OpArgK) printf(\" %d\",MYK(bx));\n    if (getBMode(o)==OpArgU) printf(\" %d\",bx);\n    break;\n   case iAsBx:\n    printf(\"%d %d\",a,sbx);\n    break;\n   case iAx:\n    printf(\"%d\",MYK(ax));\n    break;\n  }\n  switch (o)\n  {\n   case OP_LOADK:\n    printf(\"\\t; \"); PrintConstant(f,bx);\n    break;\n   case OP_GETUPVAL:\n   case OP_SETUPVAL:\n    printf(\"\\t; %s\",UPVALNAME(b));\n    break;\n   case OP_GETTABUP:\n    printf(\"\\t; %s\",UPVALNAME(b));\n    if (ISK(c)) { printf(\" \"); PrintConstant(f,INDEXK(c)); }\n    break;\n   case OP_SETTABUP:\n    printf(\"\\t; %s\",UPVALNAME(a));\n    if (ISK(b)) { printf(\" \"); PrintConstant(f,INDEXK(b)); }\n    if (ISK(c)) { printf(\" \"); PrintConstant(f,INDEXK(c)); }\n    break;\n   case OP_GETTABLE:\n   case OP_SELF:\n    if (ISK(c)) { printf(\"\\t; \"); PrintConstant(f,INDEXK(c)); }\n    break;\n   case OP_SETTABLE:\n   case OP_ADD:\n   case OP_SUB:\n   case OP_MUL:\n   case OP_DIV:\n   case OP_POW:\n   case OP_EQ:\n   case OP_LT:\n   case OP_LE:\n    if (ISK(b) || ISK(c))\n    {\n     printf(\"\\t; \");\n     if (ISK(b)) PrintConstant(f,INDEXK(b)); else printf(\"-\");\n     printf(\" \");\n     if (ISK(c)) PrintConstant(f,INDEXK(c)); else printf(\"-\");\n    }\n    break;\n   case OP_JMP:\n   case OP_FORLOOP:\n   case OP_FORPREP:\n   case OP_TFORLOOP:\n    printf(\"\\t; to %d\",sbx+pc+2);\n    break;\n   case OP_CLOSURE:\n    printf(\"\\t; %p\",VOID(f->p[bx]));\n    break;\n   case OP_SETLIST:\n    if (c==0) printf(\"\\t; %d\",(int)code[++pc]); else printf(\"\\t; %d\",c);\n    break;\n   case OP_EXTRAARG:\n    printf(\"\\t; \"); PrintConstant(f,ax);\n    break;\n   default:\n    break;\n  }\n  printf(\"\\n\");\n }\n}\n\n#define SS(x)\t((x==1)?\"\":\"s\")\n#define S(x)\t(int)(x),SS(x)\n\nstatic void PrintHeader(const Proto* f)\n{\n const char* s=f->source ? getstr(f->source) : \"=?\";\n if (*s=='@' || *s=='=')\n  s++;\n else if (*s==LUA_SIGNATURE[0])\n  s=\"(bstring)\";\n else\n  s=\"(string)\";\n printf(\"\\n%s <%s:%d,%d> (%d instruction%s at %p)\\n\",\n \t(f->linedefined==0)?\"main\":\"function\",s,\n\tf->linedefined,f->lastlinedefined,\n\tS(f->sizecode),VOID(f));\n printf(\"%d%s param%s, %d slot%s, %d upvalue%s, \",\n\t(int)(f->numparams),f->is_vararg?\"+\":\"\",SS(f->numparams),\n\tS(f->maxstacksize),S(f->sizeupvalues));\n printf(\"%d local%s, %d constant%s, %d function%s\\n\",\n\tS(f->sizelocvars),S(f->sizek),S(f->sizep));\n}\n\nstatic void PrintDebug(const Proto* f)\n{\n int i,n;\n n=f->sizek;\n printf(\"constants (%d) for %p:\\n\",n,VOID(f));\n for (i=0; i<n; i++)\n {\n  printf(\"\\t%d\\t\",i+1);\n  PrintConstant(f,i);\n  printf(\"\\n\");\n }\n n=f->sizelocvars;\n printf(\"locals (%d) for %p:\\n\",n,VOID(f));\n for (i=0; i<n; i++)\n {\n  printf(\"\\t%d\\t%s\\t%d\\t%d\\n\",\n  i,getstr(f->locvars[i].varname),f->locvars[i].startpc+1,f->locvars[i].endpc+1);\n }\n n=f->sizeupvalues;\n printf(\"upvalues (%d) for %p:\\n\",n,VOID(f));\n for (i=0; i<n; i++)\n {\n  printf(\"\\t%d\\t%s\\t%d\\t%d\\n\",\n  i,UPVALNAME(i),f->upvalues[i].instack,f->upvalues[i].idx);\n }\n}\n\nstatic void PrintFunction(const Proto* f, int full)\n{\n int i,n=f->sizep;\n PrintHeader(f);\n PrintCode(f);\n if (full) PrintDebug(f);\n for (i=0; i<n; i++) PrintFunction(f->p[i],full);\n}\n"
  },
  {
    "path": "src/lib/lua52/luaconf.h",
    "content": "/*\n** $Id: luaconf.h,v 1.176.1.2 2013/11/21 17:26:16 roberto Exp $\n** Configuration file for Lua\n** See Copyright Notice in lua.h\n*/\n\n\n#ifndef lconfig_h\n#define lconfig_h\n\n#include <limits.h>\n#include <stddef.h>\n\n\n/*\n** ==================================================================\n** Search for \"@@\" to find all configurable definitions.\n** ===================================================================\n*/\n\n\n/*\n@@ LUA_ANSI controls the use of non-ansi features.\n** CHANGE it (define it) if you want Lua to avoid the use of any\n** non-ansi feature or library.\n*/\n#if !defined(LUA_ANSI) && defined(__STRICT_ANSI__)\n#define LUA_ANSI\n#endif\n\n\n#if !defined(LUA_ANSI) && defined(_WIN32) && !defined(_WIN32_WCE)\n#define LUA_WIN\t\t/* enable goodies for regular Windows platforms */\n#endif\n\n#if defined(LUA_WIN)\n#define LUA_DL_DLL\n#define LUA_USE_AFORMAT\t\t/* assume 'printf' handles 'aA' specifiers */\n#endif\n\n\n\n#if defined(LUA_USE_LINUX)\n#define LUA_USE_POSIX\n#define LUA_USE_DLOPEN\t\t/* needs an extra library: -ldl */\n#define LUA_USE_READLINE\t/* needs some extra libraries */\n#define LUA_USE_STRTODHEX\t/* assume 'strtod' handles hex formats */\n#define LUA_USE_AFORMAT\t\t/* assume 'printf' handles 'aA' specifiers */\n#define LUA_USE_LONGLONG\t/* assume support for long long */\n#endif\n\n#if defined(LUA_USE_MACOSX)\n#define LUA_USE_POSIX\n#define LUA_USE_DLOPEN\t\t/* does not need -ldl */\n#define LUA_USE_READLINE\t/* needs an extra library: -lreadline */\n#define LUA_USE_STRTODHEX\t/* assume 'strtod' handles hex formats */\n#define LUA_USE_AFORMAT\t\t/* assume 'printf' handles 'aA' specifiers */\n#define LUA_USE_LONGLONG\t/* assume support for long long */\n#endif\n\n\n\n/*\n@@ LUA_USE_POSIX includes all functionality listed as X/Open System\n@* Interfaces Extension (XSI).\n** CHANGE it (define it) if your system is XSI compatible.\n*/\n#if defined(LUA_USE_POSIX)\n#define LUA_USE_MKSTEMP\n#define LUA_USE_ISATTY\n#define LUA_USE_POPEN\n#define LUA_USE_ULONGJMP\n#define LUA_USE_GMTIME_R\n#endif\n\n\n\n/*\n@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for\n@* Lua libraries.\n@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for\n@* C libraries.\n** CHANGE them if your machine has a non-conventional directory\n** hierarchy or if you want to install your libraries in\n** non-conventional directories.\n*/\n#if defined(_WIN32)\t/* { */\n/*\n** In Windows, any exclamation mark ('!') in the path is replaced by the\n** path of the directory of the executable file of the current process.\n*/\n#define LUA_LDIR\t\"!\\\\lua\\\\\"\n#define LUA_CDIR\t\"!\\\\\"\n#define LUA_PATH_DEFAULT  \\\n\t\tLUA_LDIR\"?.lua;\"  LUA_LDIR\"?\\\\init.lua;\" \\\n\t\tLUA_CDIR\"?.lua;\"  LUA_CDIR\"?\\\\init.lua;\" \".\\\\?.lua\"\n#define LUA_CPATH_DEFAULT \\\n\t\tLUA_CDIR\"?.dll;\" LUA_CDIR\"loadall.dll;\" \".\\\\?.dll\"\n\n#else\t\t\t/* }{ */\n\n#define LUA_VDIR\tLUA_VERSION_MAJOR \".\" LUA_VERSION_MINOR \"/\"\n#define LUA_ROOT\t\"/usr/local/\"\n#define LUA_LDIR\tLUA_ROOT \"share/lua/\" LUA_VDIR\n#define LUA_CDIR\tLUA_ROOT \"lib/lua/\" LUA_VDIR\n#define LUA_PATH_DEFAULT  \\\n\t\tLUA_LDIR\"?.lua;\"  LUA_LDIR\"?/init.lua;\" \\\n\t\tLUA_CDIR\"?.lua;\"  LUA_CDIR\"?/init.lua;\" \"./?.lua\"\n#define LUA_CPATH_DEFAULT \\\n\t\tLUA_CDIR\"?.so;\" LUA_CDIR\"loadall.so;\" \"./?.so\"\n#endif\t\t\t/* } */\n\n\n/*\n@@ LUA_DIRSEP is the directory separator (for submodules).\n** CHANGE it if your machine does not use \"/\" as the directory separator\n** and is not Windows. (On Windows Lua automatically uses \"\\\".)\n*/\n#if defined(_WIN32)\n#define LUA_DIRSEP\t\"\\\\\"\n#else\n#define LUA_DIRSEP\t\"/\"\n#endif\n\n\n/*\n@@ LUA_ENV is the name of the variable that holds the current\n@@ environment, used to access global names.\n** CHANGE it if you do not like this name.\n*/\n#define LUA_ENV\t\t\"_ENV\"\n\n\n/*\n@@ LUA_API is a mark for all core API functions.\n@@ LUALIB_API is a mark for all auxiliary library functions.\n@@ LUAMOD_API is a mark for all standard library opening functions.\n** CHANGE them if you need to define those functions in some special way.\n** For instance, if you want to create one Windows DLL with the core and\n** the libraries, you may want to use the following definition (define\n** LUA_BUILD_AS_DLL to get it).\n*/\n#if defined(LUA_BUILD_AS_DLL)\t/* { */\n\n#if defined(LUA_CORE) || defined(LUA_LIB)\t/* { */\n#define LUA_API __declspec(dllexport)\n#else\t\t\t\t\t\t/* }{ */\n#define LUA_API __declspec(dllimport)\n#endif\t\t\t\t\t\t/* } */\n\n#else\t\t\t\t/* }{ */\n\n#define LUA_API\t\textern\n\n#endif\t\t\t\t/* } */\n\n\n/* more often than not the libs go together with the core */\n#define LUALIB_API\tLUA_API\n#define LUAMOD_API\tLUALIB_API\n\n\n/*\n@@ LUAI_FUNC is a mark for all extern functions that are not to be\n@* exported to outside modules.\n@@ LUAI_DDEF and LUAI_DDEC are marks for all extern (const) variables\n@* that are not to be exported to outside modules (LUAI_DDEF for\n@* definitions and LUAI_DDEC for declarations).\n** CHANGE them if you need to mark them in some special way. Elf/gcc\n** (versions 3.2 and later) mark them as \"hidden\" to optimize access\n** when Lua is compiled as a shared library. Not all elf targets support\n** this attribute. Unfortunately, gcc does not offer a way to check\n** whether the target offers that support, and those without support\n** give a warning about it. To avoid these warnings, change to the\n** default definition.\n*/\n#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \\\n    defined(__ELF__)\t\t/* { */\n#define LUAI_FUNC\t__attribute__((visibility(\"hidden\"))) extern\n#define LUAI_DDEC\tLUAI_FUNC\n#define LUAI_DDEF\t/* empty */\n\n#else\t\t\t\t/* }{ */\n#define LUAI_FUNC\textern\n#define LUAI_DDEC\textern\n#define LUAI_DDEF\t/* empty */\n#endif\t\t\t\t/* } */\n\n\n\n/*\n@@ LUA_QL describes how error messages quote program elements.\n** CHANGE it if you want a different appearance.\n*/\n#define LUA_QL(x)\t\"'\" x \"'\"\n#define LUA_QS\t\tLUA_QL(\"%s\")\n\n\n/*\n@@ LUA_IDSIZE gives the maximum size for the description of the source\n@* of a function in debug information.\n** CHANGE it if you want a different size.\n*/\n#define LUA_IDSIZE\t60\n\n\n/*\n@@ luai_writestring/luai_writeline define how 'print' prints its results.\n** They are only used in libraries and the stand-alone program. (The #if\n** avoids including 'stdio.h' everywhere.)\n*/\n#if defined(LUA_LIB) || defined(lua_c)\n#include <stdio.h>\n#define luai_writestring(s,l)\tfwrite((s), sizeof(char), (l), stdout)\n#define luai_writeline()\t(luai_writestring(\"\\n\", 1), fflush(stdout))\n#endif\n\n/*\n@@ luai_writestringerror defines how to print error messages.\n** (A format string with one argument is enough for Lua...)\n*/\n#define luai_writestringerror(s,p) \\\n\t(fprintf(stderr, (s), (p)), fflush(stderr))\n\n\n/*\n@@ LUAI_MAXSHORTLEN is the maximum length for short strings, that is,\n** strings that are internalized. (Cannot be smaller than reserved words\n** or tags for metamethods, as these strings must be internalized;\n** #(\"function\") = 8, #(\"__newindex\") = 10.)\n*/\n#define LUAI_MAXSHORTLEN        40\n\n\n\n/*\n** {==================================================================\n** Compatibility with previous versions\n** ===================================================================\n*/\n\n/*\n@@ LUA_COMPAT_ALL controls all compatibility options.\n** You can define it to get all options, or change specific options\n** to fit your specific needs.\n*/\n#if defined(LUA_COMPAT_ALL)\t/* { */\n\n/*\n@@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'.\n** You can replace it with 'table.unpack'.\n*/\n#define LUA_COMPAT_UNPACK\n\n/*\n@@ LUA_COMPAT_LOADERS controls the presence of table 'package.loaders'.\n** You can replace it with 'package.searchers'.\n*/\n#define LUA_COMPAT_LOADERS\n\n/*\n@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall.\n** You can call your C function directly (with light C functions).\n*/\n#define lua_cpcall(L,f,u)  \\\n\t(lua_pushcfunction(L, (f)), \\\n\t lua_pushlightuserdata(L,(u)), \\\n\t lua_pcall(L,1,0,0))\n\n\n/*\n@@ LUA_COMPAT_LOG10 defines the function 'log10' in the math library.\n** You can rewrite 'log10(x)' as 'log(x, 10)'.\n*/\n#define LUA_COMPAT_LOG10\n\n/*\n@@ LUA_COMPAT_LOADSTRING defines the function 'loadstring' in the base\n** library. You can rewrite 'loadstring(s)' as 'load(s)'.\n*/\n#define LUA_COMPAT_LOADSTRING\n\n/*\n@@ LUA_COMPAT_MAXN defines the function 'maxn' in the table library.\n*/\n#define LUA_COMPAT_MAXN\n\n/*\n@@ The following macros supply trivial compatibility for some\n** changes in the API. The macros themselves document how to\n** change your code to avoid using them.\n*/\n#define lua_strlen(L,i)\t\tlua_rawlen(L, (i))\n\n#define lua_objlen(L,i)\t\tlua_rawlen(L, (i))\n\n#define lua_equal(L,idx1,idx2)\t\tlua_compare(L,(idx1),(idx2),LUA_OPEQ)\n#define lua_lessthan(L,idx1,idx2)\tlua_compare(L,(idx1),(idx2),LUA_OPLT)\n\n/*\n@@ LUA_COMPAT_MODULE controls compatibility with previous\n** module functions 'module' (Lua) and 'luaL_register' (C).\n*/\n#define LUA_COMPAT_MODULE\n\n#endif\t\t\t\t/* } */\n\n/* }================================================================== */\n\n\n\n/*\n@@ LUAI_BITSINT defines the number of bits in an int.\n** CHANGE here if Lua cannot automatically detect the number of bits of\n** your machine. Probably you do not need to change this.\n*/\n/* avoid overflows in comparison */\n#if INT_MAX-20 < 32760\t\t/* { */\n#define LUAI_BITSINT\t16\n#elif INT_MAX > 2147483640L\t/* }{ */\n/* int has at least 32 bits */\n#define LUAI_BITSINT\t32\n#else\t\t\t\t/* }{ */\n#error \"you must define LUA_BITSINT with number of bits in an integer\"\n#endif\t\t\t\t/* } */\n\n\n/*\n@@ LUA_INT32 is a signed integer with exactly 32 bits.\n@@ LUAI_UMEM is an unsigned integer big enough to count the total\n@* memory used by Lua.\n@@ LUAI_MEM is a signed integer big enough to count the total memory\n@* used by Lua.\n** CHANGE here if for some weird reason the default definitions are not\n** good enough for your machine. Probably you do not need to change\n** this.\n*/\n#if LUAI_BITSINT >= 32\t\t/* { */\n#define LUA_INT32\tint\n#define LUAI_UMEM\tsize_t\n#define LUAI_MEM\tptrdiff_t\n#else\t\t\t\t/* }{ */\n/* 16-bit ints */\n#define LUA_INT32\tlong\n#define LUAI_UMEM\tunsigned long\n#define LUAI_MEM\tlong\n#endif\t\t\t\t/* } */\n\n\n/*\n@@ LUAI_MAXSTACK limits the size of the Lua stack.\n** CHANGE it if you need a different limit. This limit is arbitrary;\n** its only purpose is to stop Lua from consuming unlimited stack\n** space (and to reserve some numbers for pseudo-indices).\n*/\n#if LUAI_BITSINT >= 32\n#define LUAI_MAXSTACK\t\t1000000\n#else\n#define LUAI_MAXSTACK\t\t15000\n#endif\n\n/* reserve some space for error handling */\n#define LUAI_FIRSTPSEUDOIDX\t(-LUAI_MAXSTACK - 1000)\n\n\n\n\n/*\n@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system.\n** CHANGE it if it uses too much C-stack space.\n*/\n#define LUAL_BUFFERSIZE\t\tBUFSIZ\n\n\n\n\n/*\n** {==================================================================\n@@ LUA_NUMBER is the type of numbers in Lua.\n** CHANGE the following definitions only if you want to build Lua\n** with a number type different from double. You may also need to\n** change lua_number2int & lua_number2integer.\n** ===================================================================\n*/\n\n#define LUA_NUMBER_DOUBLE\n#define LUA_NUMBER\tdouble\n\n/*\n@@ LUAI_UACNUMBER is the result of an 'usual argument conversion'\n@* over a number.\n*/\n#define LUAI_UACNUMBER\tdouble\n\n\n/*\n@@ LUA_NUMBER_SCAN is the format for reading numbers.\n@@ LUA_NUMBER_FMT is the format for writing numbers.\n@@ lua_number2str converts a number to a string.\n@@ LUAI_MAXNUMBER2STR is maximum size of previous conversion.\n*/\n#define LUA_NUMBER_SCAN\t\t\"%lf\"\n#define LUA_NUMBER_FMT\t\t\"%.14g\"\n#define lua_number2str(s,n)\tsprintf((s), LUA_NUMBER_FMT, (n))\n#define LUAI_MAXNUMBER2STR\t32 /* 16 digits, sign, point, and \\0 */\n\n\n/*\n@@ l_mathop allows the addition of an 'l' or 'f' to all math operations\n*/\n#define l_mathop(x)\t\t(x)\n\n\n/*\n@@ lua_str2number converts a decimal numeric string to a number.\n@@ lua_strx2number converts an hexadecimal numeric string to a number.\n** In C99, 'strtod' does both conversions. C89, however, has no function\n** to convert floating hexadecimal strings to numbers. For these\n** systems, you can leave 'lua_strx2number' undefined and Lua will\n** provide its own implementation.\n*/\n#define lua_str2number(s,p)\tstrtod((s), (p))\n\n#if defined(LUA_USE_STRTODHEX)\n#define lua_strx2number(s,p)\tstrtod((s), (p))\n#endif\n\n\n/*\n@@ The luai_num* macros define the primitive operations over numbers.\n*/\n\n/* the following operations need the math library */\n#if defined(lobject_c) || defined(lvm_c)\n#include <math.h>\n#define luai_nummod(L,a,b)\t((a) - l_mathop(floor)((a)/(b))*(b))\n#define luai_numpow(L,a,b)\t(l_mathop(pow)(a,b))\n#endif\n\n/* these are quite standard operations */\n#if defined(LUA_CORE)\n#define luai_numadd(L,a,b)\t((a)+(b))\n#define luai_numsub(L,a,b)\t((a)-(b))\n#define luai_nummul(L,a,b)\t((a)*(b))\n#define luai_numdiv(L,a,b)\t((a)/(b))\n#define luai_numunm(L,a)\t(-(a))\n#define luai_numeq(a,b)\t\t((a)==(b))\n#define luai_numlt(L,a,b)\t((a)<(b))\n#define luai_numle(L,a,b)\t((a)<=(b))\n#define luai_numisnan(L,a)\t(!luai_numeq((a), (a)))\n#endif\n\n\n\n/*\n@@ LUA_INTEGER is the integral type used by lua_pushinteger/lua_tointeger.\n** CHANGE that if ptrdiff_t is not adequate on your machine. (On most\n** machines, ptrdiff_t gives a good choice between int or long.)\n*/\n#define LUA_INTEGER\tptrdiff_t\n\n/*\n@@ LUA_UNSIGNED is the integral type used by lua_pushunsigned/lua_tounsigned.\n** It must have at least 32 bits.\n*/\n#define LUA_UNSIGNED\tunsigned LUA_INT32\n\n\n\n/*\n** Some tricks with doubles\n*/\n\n#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI)\t/* { */\n/*\n** The next definitions activate some tricks to speed up the\n** conversion from doubles to integer types, mainly to LUA_UNSIGNED.\n**\n@@ LUA_MSASMTRICK uses Microsoft assembler to avoid clashes with a\n** DirectX idiosyncrasy.\n**\n@@ LUA_IEEE754TRICK uses a trick that should work on any machine\n** using IEEE754 with a 32-bit integer type.\n**\n@@ LUA_IEEELL extends the trick to LUA_INTEGER; should only be\n** defined when LUA_INTEGER is a 32-bit integer.\n**\n@@ LUA_IEEEENDIAN is the endianness of doubles in your machine\n** (0 for little endian, 1 for big endian); if not defined, Lua will\n** check it dynamically for LUA_IEEE754TRICK (but not for LUA_NANTRICK).\n**\n@@ LUA_NANTRICK controls the use of a trick to pack all types into\n** a single double value, using NaN values to represent non-number\n** values. The trick only works on 32-bit machines (ints and pointers\n** are 32-bit values) with numbers represented as IEEE 754-2008 doubles\n** with conventional endianess (12345678 or 87654321), in CPUs that do\n** not produce signaling NaN values (all NaNs are quiet).\n*/\n\n/* Microsoft compiler on a Pentium (32 bit) ? */\n#if defined(LUA_WIN) && defined(_MSC_VER) && defined(_M_IX86)\t/* { */\n\n#define LUA_MSASMTRICK\n#define LUA_IEEEENDIAN\t\t0\n#define LUA_NANTRICK\n\n\n/* pentium 32 bits? */\n#elif defined(__i386__) || defined(__i386) || defined(__X86__) /* }{ */\n\n#define LUA_IEEE754TRICK\n#define LUA_IEEELL\n#define LUA_IEEEENDIAN\t\t0\n#define LUA_NANTRICK\n\n/* pentium 64 bits? */\n#elif defined(__x86_64)\t\t\t\t\t\t/* }{ */\n\n#define LUA_IEEE754TRICK\n#define LUA_IEEEENDIAN\t\t0\n\n#elif defined(__POWERPC__) || defined(__ppc__)\t\t\t/* }{ */\n\n#define LUA_IEEE754TRICK\n#define LUA_IEEEENDIAN\t\t1\n\n#else\t\t\t\t\t\t\t\t/* }{ */\n\n/* assume IEEE754 and a 32-bit integer type */\n#define LUA_IEEE754TRICK\n\n#endif\t\t\t\t\t\t\t\t/* } */\n\n#endif\t\t\t\t\t\t\t/* } */\n\n/* }================================================================== */\n\n\n\n\n/* =================================================================== */\n\n/*\n** Local configuration. You can use this space to add your redefinitions\n** without modifying the main part of the file.\n*/\n\n\n\n#endif\n\n"
  },
  {
    "path": "src/lib/lua52/lualib.h",
    "content": "/*\n** $Id: lualib.h,v 1.43.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua standard libraries\n** See Copyright Notice in lua.h\n*/\n\n\n#ifndef lualib_h\n#define lualib_h\n\n#include \"lua.h\"\n\n\n\nLUAMOD_API int (luaopen_base) (lua_State *L);\n\n#define LUA_COLIBNAME\t\"coroutine\"\nLUAMOD_API int (luaopen_coroutine) (lua_State *L);\n\n#define LUA_TABLIBNAME\t\"table\"\nLUAMOD_API int (luaopen_table) (lua_State *L);\n\n#define LUA_IOLIBNAME\t\"io\"\nLUAMOD_API int (luaopen_io) (lua_State *L);\n\n#define LUA_OSLIBNAME\t\"os\"\nLUAMOD_API int (luaopen_os) (lua_State *L);\n\n#define LUA_STRLIBNAME\t\"string\"\nLUAMOD_API int (luaopen_string) (lua_State *L);\n\n#define LUA_BITLIBNAME\t\"bit32\"\nLUAMOD_API int (luaopen_bit32) (lua_State *L);\n\n#define LUA_MATHLIBNAME\t\"math\"\nLUAMOD_API int (luaopen_math) (lua_State *L);\n\n#define LUA_DBLIBNAME\t\"debug\"\nLUAMOD_API int (luaopen_debug) (lua_State *L);\n\n#define LUA_LOADLIBNAME\t\"package\"\nLUAMOD_API int (luaopen_package) (lua_State *L);\n\n\n/* open all previous libraries */\nLUALIB_API void (luaL_openlibs) (lua_State *L);\n\n\n\n#if !defined(lua_assert)\n#define lua_assert(x)\t((void)0)\n#endif\n\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lundump.c",
    "content": "/*\n** $Id: lundump.c,v 2.22.1.1 2013/04/12 18:48:47 roberto Exp $\n** load precompiled Lua chunks\n** See Copyright Notice in lua.h\n*/\n\n#include <string.h>\n\n#define lundump_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lmem.h\"\n#include \"lobject.h\"\n#include \"lstring.h\"\n#include \"lundump.h\"\n#include \"lzio.h\"\n\ntypedef struct {\n lua_State* L;\n ZIO* Z;\n Mbuffer* b;\n const char* name;\n} LoadState;\n\nstatic l_noret error(LoadState* S, const char* why)\n{\n luaO_pushfstring(S->L,\"%s: %s precompiled chunk\",S->name,why);\n luaD_throw(S->L,LUA_ERRSYNTAX);\n}\n\n#define LoadMem(S,b,n,size)\tLoadBlock(S,b,(n)*(size))\n#define LoadByte(S)\t\t(lu_byte)LoadChar(S)\n#define LoadVar(S,x)\t\tLoadMem(S,&x,1,sizeof(x))\n#define LoadVector(S,b,n,size)\tLoadMem(S,b,n,size)\n\n#if !defined(luai_verifycode)\n#define luai_verifycode(L,b,f)\t/* empty */\n#endif\n\nstatic void LoadBlock(LoadState* S, void* b, size_t size)\n{\n if (luaZ_read(S->Z,b,size)!=0) error(S,\"truncated\");\n}\n\nstatic int LoadChar(LoadState* S)\n{\n char x;\n LoadVar(S,x);\n return x;\n}\n\nstatic int LoadInt(LoadState* S)\n{\n int x;\n LoadVar(S,x);\n if (x<0) error(S,\"corrupted\");\n return x;\n}\n\nstatic lua_Number LoadNumber(LoadState* S)\n{\n lua_Number x;\n LoadVar(S,x);\n return x;\n}\n\nstatic TString* LoadString(LoadState* S)\n{\n size_t size;\n LoadVar(S,size);\n if (size==0)\n  return NULL;\n else\n {\n  char* s=luaZ_openspace(S->L,S->b,size);\n  LoadBlock(S,s,size*sizeof(char));\n  return luaS_newlstr(S->L,s,size-1);\t\t/* remove trailing '\\0' */\n }\n}\n\nstatic void LoadCode(LoadState* S, Proto* f)\n{\n int n=LoadInt(S);\n f->code=luaM_newvector(S->L,n,Instruction);\n f->sizecode=n;\n LoadVector(S,f->code,n,sizeof(Instruction));\n}\n\nstatic void LoadFunction(LoadState* S, Proto* f);\n\nstatic void LoadConstants(LoadState* S, Proto* f)\n{\n int i,n;\n n=LoadInt(S);\n f->k=luaM_newvector(S->L,n,TValue);\n f->sizek=n;\n for (i=0; i<n; i++) setnilvalue(&f->k[i]);\n for (i=0; i<n; i++)\n {\n  TValue* o=&f->k[i];\n  int t=LoadChar(S);\n  switch (t)\n  {\n   case LUA_TNIL:\n\tsetnilvalue(o);\n\tbreak;\n   case LUA_TBOOLEAN:\n\tsetbvalue(o,LoadChar(S));\n\tbreak;\n   case LUA_TNUMBER:\n\tsetnvalue(o,LoadNumber(S));\n\tbreak;\n   case LUA_TSTRING:\n\tsetsvalue2n(S->L,o,LoadString(S));\n\tbreak;\n    default: lua_assert(0);\n  }\n }\n n=LoadInt(S);\n f->p=luaM_newvector(S->L,n,Proto*);\n f->sizep=n;\n for (i=0; i<n; i++) f->p[i]=NULL;\n for (i=0; i<n; i++)\n {\n  f->p[i]=luaF_newproto(S->L);\n  LoadFunction(S,f->p[i]);\n }\n}\n\nstatic void LoadUpvalues(LoadState* S, Proto* f)\n{\n int i,n;\n n=LoadInt(S);\n f->upvalues=luaM_newvector(S->L,n,Upvaldesc);\n f->sizeupvalues=n;\n for (i=0; i<n; i++) f->upvalues[i].name=NULL;\n for (i=0; i<n; i++)\n {\n  f->upvalues[i].instack=LoadByte(S);\n  f->upvalues[i].idx=LoadByte(S);\n }\n}\n\nstatic void LoadDebug(LoadState* S, Proto* f)\n{\n int i,n;\n f->source=LoadString(S);\n n=LoadInt(S);\n f->lineinfo=luaM_newvector(S->L,n,int);\n f->sizelineinfo=n;\n LoadVector(S,f->lineinfo,n,sizeof(int));\n n=LoadInt(S);\n f->locvars=luaM_newvector(S->L,n,LocVar);\n f->sizelocvars=n;\n for (i=0; i<n; i++) f->locvars[i].varname=NULL;\n for (i=0; i<n; i++)\n {\n  f->locvars[i].varname=LoadString(S);\n  f->locvars[i].startpc=LoadInt(S);\n  f->locvars[i].endpc=LoadInt(S);\n }\n n=LoadInt(S);\n for (i=0; i<n; i++) f->upvalues[i].name=LoadString(S);\n}\n\nstatic void LoadFunction(LoadState* S, Proto* f)\n{\n f->linedefined=LoadInt(S);\n f->lastlinedefined=LoadInt(S);\n f->numparams=LoadByte(S);\n f->is_vararg=LoadByte(S);\n f->maxstacksize=LoadByte(S);\n LoadCode(S,f);\n LoadConstants(S,f);\n LoadUpvalues(S,f);\n LoadDebug(S,f);\n}\n\n/* the code below must be consistent with the code in luaU_header */\n#define N0\tLUAC_HEADERSIZE\n#define N1\t(sizeof(LUA_SIGNATURE)-sizeof(char))\n#define N2\tN1+2\n#define N3\tN2+6\n\nstatic void LoadHeader(LoadState* S)\n{\n lu_byte h[LUAC_HEADERSIZE];\n lu_byte s[LUAC_HEADERSIZE];\n luaU_header(h);\n memcpy(s,h,sizeof(char));\t\t\t/* first char already read */\n LoadBlock(S,s+sizeof(char),LUAC_HEADERSIZE-sizeof(char));\n if (memcmp(h,s,N0)==0) return;\n if (memcmp(h,s,N1)!=0) error(S,\"not a\");\n if (memcmp(h,s,N2)!=0) error(S,\"version mismatch in\");\n if (memcmp(h,s,N3)!=0) error(S,\"incompatible\"); else error(S,\"corrupted\");\n}\n\n/*\n** load precompiled chunk\n*/\nClosure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)\n{\n LoadState S;\n Closure* cl;\n if (*name=='@' || *name=='=')\n  S.name=name+1;\n else if (*name==LUA_SIGNATURE[0])\n  S.name=\"binary string\";\n else\n  S.name=name;\n S.L=L;\n S.Z=Z;\n S.b=buff;\n LoadHeader(&S);\n cl=luaF_newLclosure(L,1);\n setclLvalue(L,L->top,cl); incr_top(L);\n cl->l.p=luaF_newproto(L);\n LoadFunction(&S,cl->l.p);\n if (cl->l.p->sizeupvalues != 1)\n {\n  Proto* p=cl->l.p;\n  cl=luaF_newLclosure(L,cl->l.p->sizeupvalues);\n  cl->l.p=p;\n  setclLvalue(L,L->top-1,cl);\n }\n luai_verifycode(L,buff,cl->l.p);\n return cl;\n}\n\n#define MYINT(s)\t(s[0]-'0')\n#define VERSION\t\tMYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR)\n#define FORMAT\t\t0\t\t/* this is the official format */\n\n/*\n* make header for precompiled chunks\n* if you change the code below be sure to update LoadHeader and FORMAT above\n* and LUAC_HEADERSIZE in lundump.h\n*/\nvoid luaU_header (lu_byte* h)\n{\n int x=1;\n memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-sizeof(char));\n h+=sizeof(LUA_SIGNATURE)-sizeof(char);\n *h++=cast_byte(VERSION);\n *h++=cast_byte(FORMAT);\n *h++=cast_byte(*(char*)&x);\t\t\t/* endianness */\n *h++=cast_byte(sizeof(int));\n *h++=cast_byte(sizeof(size_t));\n *h++=cast_byte(sizeof(Instruction));\n *h++=cast_byte(sizeof(lua_Number));\n *h++=cast_byte(((lua_Number)0.5)==0);\t\t/* is lua_Number integral? */\n memcpy(h,LUAC_TAIL,sizeof(LUAC_TAIL)-sizeof(char));\n}\n"
  },
  {
    "path": "src/lib/lua52/lundump.h",
    "content": "/*\n** $Id: lundump.h,v 1.39.1.1 2013/04/12 18:48:47 roberto Exp $\n** load precompiled Lua chunks\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lundump_h\n#define lundump_h\n\n#include \"lobject.h\"\n#include \"lzio.h\"\n\n/* load one chunk; from lundump.c */\nLUAI_FUNC Closure* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name);\n\n/* make header; from lundump.c */\nLUAI_FUNC void luaU_header (lu_byte* h);\n\n/* dump one chunk; from ldump.c */\nLUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip);\n\n/* data to catch conversion errors */\n#define LUAC_TAIL\t\t\"\\x19\\x93\\r\\n\\x1a\\n\"\n\n/* size in bytes of header of binary files */\n#define LUAC_HEADERSIZE\t\t(sizeof(LUA_SIGNATURE)-sizeof(char)+2+6+sizeof(LUAC_TAIL)-sizeof(char))\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lvm.c",
    "content": "/*\n** $Id: lvm.c,v 2.155.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua virtual machine\n** See Copyright Notice in lua.h\n*/\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define lvm_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"ldebug.h\"\n#include \"ldo.h\"\n#include \"lfunc.h\"\n#include \"lgc.h\"\n#include \"lobject.h\"\n#include \"lopcodes.h\"\n#include \"lstate.h\"\n#include \"lstring.h\"\n#include \"ltable.h\"\n#include \"ltm.h\"\n#include \"lvm.h\"\n\n\n\n/* limit for table tag-method chains (to avoid loops) */\n#define MAXTAGLOOP\t100\n\n\nconst TValue *luaV_tonumber (const TValue *obj, TValue *n) {\n  lua_Number num;\n  if (ttisnumber(obj)) return obj;\n  if (ttisstring(obj) && luaO_str2d(svalue(obj), tsvalue(obj)->len, &num)) {\n    setnvalue(n, num);\n    return n;\n  }\n  else\n    return NULL;\n}\n\n\nint luaV_tostring (lua_State *L, StkId obj) {\n  if (!ttisnumber(obj))\n    return 0;\n  else {\n    char s[LUAI_MAXNUMBER2STR];\n    lua_Number n = nvalue(obj);\n    int l = lua_number2str(s, n);\n    setsvalue2s(L, obj, luaS_newlstr(L, s, l));\n    return 1;\n  }\n}\n\n\nstatic void traceexec (lua_State *L) {\n  CallInfo *ci = L->ci;\n  lu_byte mask = L->hookmask;\n  int counthook = ((mask & LUA_MASKCOUNT) && L->hookcount == 0);\n  if (counthook)\n    resethookcount(L);  /* reset count */\n  if (ci->callstatus & CIST_HOOKYIELD) {  /* called hook last time? */\n    ci->callstatus &= ~CIST_HOOKYIELD;  /* erase mark */\n    return;  /* do not call hook again (VM yielded, so it did not move) */\n  }\n  if (counthook)\n    luaD_hook(L, LUA_HOOKCOUNT, -1);  /* call count hook */\n  if (mask & LUA_MASKLINE) {\n    Proto *p = ci_func(ci)->p;\n    int npc = pcRel(ci->u.l.savedpc, p);\n    int newline = getfuncline(p, npc);\n    if (npc == 0 ||  /* call linehook when enter a new function, */\n        ci->u.l.savedpc <= L->oldpc ||  /* when jump back (loop), or when */\n        newline != getfuncline(p, pcRel(L->oldpc, p)))  /* enter a new line */\n      luaD_hook(L, LUA_HOOKLINE, newline);  /* call line hook */\n  }\n  L->oldpc = ci->u.l.savedpc;\n  if (L->status == LUA_YIELD) {  /* did hook yield? */\n    if (counthook)\n      L->hookcount = 1;  /* undo decrement to zero */\n    ci->u.l.savedpc--;  /* undo increment (resume will increment it again) */\n    ci->callstatus |= CIST_HOOKYIELD;  /* mark that it yielded */\n    ci->func = L->top - 1;  /* protect stack below results */\n    luaD_throw(L, LUA_YIELD);\n  }\n}\n\n\nstatic void callTM (lua_State *L, const TValue *f, const TValue *p1,\n                    const TValue *p2, TValue *p3, int hasres) {\n  ptrdiff_t result = savestack(L, p3);\n  setobj2s(L, L->top++, f);  /* push function */\n  setobj2s(L, L->top++, p1);  /* 1st argument */\n  setobj2s(L, L->top++, p2);  /* 2nd argument */\n  if (!hasres)  /* no result? 'p3' is third argument */\n    setobj2s(L, L->top++, p3);  /* 3rd argument */\n  /* metamethod may yield only when called from Lua code */\n  luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci));\n  if (hasres) {  /* if has result, move it to its place */\n    p3 = restorestack(L, result);\n    setobjs2s(L, p3, --L->top);\n  }\n}\n\n\nvoid luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) {\n  int loop;\n  for (loop = 0; loop < MAXTAGLOOP; loop++) {\n    const TValue *tm;\n    if (ttistable(t)) {  /* `t' is a table? */\n      Table *h = hvalue(t);\n      const TValue *res = luaH_get(h, key); /* do a primitive get */\n      if (!ttisnil(res) ||  /* result is not nil? */\n          (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */\n        setobj2s(L, val, res);\n        return;\n      }\n      /* else will try the tag method */\n    }\n    else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_INDEX)))\n      luaG_typeerror(L, t, \"index\");\n    if (ttisfunction(tm)) {\n      callTM(L, tm, t, key, val, 1);\n      return;\n    }\n    t = tm;  /* else repeat with 'tm' */\n  }\n  luaG_runerror(L, \"loop in gettable\");\n}\n\n\nvoid luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {\n  int loop;\n  for (loop = 0; loop < MAXTAGLOOP; loop++) {\n    const TValue *tm;\n    if (ttistable(t)) {  /* `t' is a table? */\n      Table *h = hvalue(t);\n      TValue *oldval = cast(TValue *, luaH_get(h, key));\n      /* if previous value is not nil, there must be a previous entry\n         in the table; moreover, a metamethod has no relevance */\n      if (!ttisnil(oldval) ||\n         /* previous value is nil; must check the metamethod */\n         ((tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL &&\n         /* no metamethod; is there a previous entry in the table? */\n         (oldval != luaO_nilobject ||\n         /* no previous entry; must create one. (The next test is\n            always true; we only need the assignment.) */\n         (oldval = luaH_newkey(L, h, key), 1)))) {\n        /* no metamethod and (now) there is an entry with given key */\n        setobj2t(L, oldval, val);  /* assign new value to that entry */\n        invalidateTMcache(h);\n        luaC_barrierback(L, obj2gco(h), val);\n        return;\n      }\n      /* else will try the metamethod */\n    }\n    else  /* not a table; check metamethod */\n      if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX)))\n        luaG_typeerror(L, t, \"index\");\n    /* there is a metamethod */\n    if (ttisfunction(tm)) {\n      callTM(L, tm, t, key, val, 0);\n      return;\n    }\n    t = tm;  /* else repeat with 'tm' */\n  }\n  luaG_runerror(L, \"loop in settable\");\n}\n\n\nstatic int call_binTM (lua_State *L, const TValue *p1, const TValue *p2,\n                       StkId res, TMS event) {\n  const TValue *tm = luaT_gettmbyobj(L, p1, event);  /* try first operand */\n  if (ttisnil(tm))\n    tm = luaT_gettmbyobj(L, p2, event);  /* try second operand */\n  if (ttisnil(tm)) return 0;\n  callTM(L, tm, p1, p2, res, 1);\n  return 1;\n}\n\n\nstatic const TValue *get_equalTM (lua_State *L, Table *mt1, Table *mt2,\n                                  TMS event) {\n  const TValue *tm1 = fasttm(L, mt1, event);\n  const TValue *tm2;\n  if (tm1 == NULL) return NULL;  /* no metamethod */\n  if (mt1 == mt2) return tm1;  /* same metatables => same metamethods */\n  tm2 = fasttm(L, mt2, event);\n  if (tm2 == NULL) return NULL;  /* no metamethod */\n  if (luaV_rawequalobj(tm1, tm2))  /* same metamethods? */\n    return tm1;\n  return NULL;\n}\n\n\nstatic int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2,\n                         TMS event) {\n  if (!call_binTM(L, p1, p2, L->top, event))\n    return -1;  /* no metamethod */\n  else\n    return !l_isfalse(L->top);\n}\n\n\nstatic int l_strcmp (const TString *ls, const TString *rs) {\n  const char *l = getstr(ls);\n  size_t ll = ls->tsv.len;\n  const char *r = getstr(rs);\n  size_t lr = rs->tsv.len;\n  for (;;) {\n    int temp = strcoll(l, r);\n    if (temp != 0) return temp;\n    else {  /* strings are equal up to a `\\0' */\n      size_t len = strlen(l);  /* index of first `\\0' in both strings */\n      if (len == lr)  /* r is finished? */\n        return (len == ll) ? 0 : 1;\n      else if (len == ll)  /* l is finished? */\n        return -1;  /* l is smaller than r (because r is not finished) */\n      /* both strings longer than `len'; go on comparing (after the `\\0') */\n      len++;\n      l += len; ll -= len; r += len; lr -= len;\n    }\n  }\n}\n\n\nint luaV_lessthan (lua_State *L, const TValue *l, const TValue *r) {\n  int res;\n  if (ttisnumber(l) && ttisnumber(r))\n    return luai_numlt(L, nvalue(l), nvalue(r));\n  else if (ttisstring(l) && ttisstring(r))\n    return l_strcmp(rawtsvalue(l), rawtsvalue(r)) < 0;\n  else if ((res = call_orderTM(L, l, r, TM_LT)) < 0)\n    luaG_ordererror(L, l, r);\n  return res;\n}\n\n\nint luaV_lessequal (lua_State *L, const TValue *l, const TValue *r) {\n  int res;\n  if (ttisnumber(l) && ttisnumber(r))\n    return luai_numle(L, nvalue(l), nvalue(r));\n  else if (ttisstring(l) && ttisstring(r))\n    return l_strcmp(rawtsvalue(l), rawtsvalue(r)) <= 0;\n  else if ((res = call_orderTM(L, l, r, TM_LE)) >= 0)  /* first try `le' */\n    return res;\n  else if ((res = call_orderTM(L, r, l, TM_LT)) < 0)  /* else try `lt' */\n    luaG_ordererror(L, l, r);\n  return !res;\n}\n\n\n/*\n** equality of Lua values. L == NULL means raw equality (no metamethods)\n*/\nint luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2) {\n  const TValue *tm;\n  lua_assert(ttisequal(t1, t2));\n  switch (ttype(t1)) {\n    case LUA_TNIL: return 1;\n    case LUA_TNUMBER: return luai_numeq(nvalue(t1), nvalue(t2));\n    case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2);  /* true must be 1 !! */\n    case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2);\n    case LUA_TLCF: return fvalue(t1) == fvalue(t2);\n    case LUA_TSHRSTR: return eqshrstr(rawtsvalue(t1), rawtsvalue(t2));\n    case LUA_TLNGSTR: return luaS_eqlngstr(rawtsvalue(t1), rawtsvalue(t2));\n    case LUA_TUSERDATA: {\n      if (uvalue(t1) == uvalue(t2)) return 1;\n      else if (L == NULL) return 0;\n      tm = get_equalTM(L, uvalue(t1)->metatable, uvalue(t2)->metatable, TM_EQ);\n      break;  /* will try TM */\n    }\n    case LUA_TTABLE: {\n      if (hvalue(t1) == hvalue(t2)) return 1;\n      else if (L == NULL) return 0;\n      tm = get_equalTM(L, hvalue(t1)->metatable, hvalue(t2)->metatable, TM_EQ);\n      break;  /* will try TM */\n    }\n    default:\n      lua_assert(iscollectable(t1));\n      return gcvalue(t1) == gcvalue(t2);\n  }\n  if (tm == NULL) return 0;  /* no TM? */\n  callTM(L, tm, t1, t2, L->top, 1);  /* call TM */\n  return !l_isfalse(L->top);\n}\n\n\nvoid luaV_concat (lua_State *L, int total) {\n  lua_assert(total >= 2);\n  do {\n    StkId top = L->top;\n    int n = 2;  /* number of elements handled in this pass (at least 2) */\n    if (!(ttisstring(top-2) || ttisnumber(top-2)) || !tostring(L, top-1)) {\n      if (!call_binTM(L, top-2, top-1, top-2, TM_CONCAT))\n        luaG_concaterror(L, top-2, top-1);\n    }\n    else if (tsvalue(top-1)->len == 0)  /* second operand is empty? */\n      (void)tostring(L, top - 2);  /* result is first operand */\n    else if (ttisstring(top-2) && tsvalue(top-2)->len == 0) {\n      setobjs2s(L, top - 2, top - 1);  /* result is second op. */\n    }\n    else {\n      /* at least two non-empty string values; get as many as possible */\n      size_t tl = tsvalue(top-1)->len;\n      char *buffer;\n      int i;\n      /* collect total length */\n      for (i = 1; i < total && tostring(L, top-i-1); i++) {\n        size_t l = tsvalue(top-i-1)->len;\n        if (l >= (MAX_SIZET/sizeof(char)) - tl)\n          luaG_runerror(L, \"string length overflow\");\n        tl += l;\n      }\n      buffer = luaZ_openspace(L, &G(L)->buff, tl);\n      tl = 0;\n      n = i;\n      do {  /* concat all strings */\n        size_t l = tsvalue(top-i)->len;\n        memcpy(buffer+tl, svalue(top-i), l * sizeof(char));\n        tl += l;\n      } while (--i > 0);\n      setsvalue2s(L, top-n, luaS_newlstr(L, buffer, tl));\n    }\n    total -= n-1;  /* got 'n' strings to create 1 new */\n    L->top -= n-1;  /* popped 'n' strings and pushed one */\n  } while (total > 1);  /* repeat until only 1 result left */\n}\n\n\nvoid luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {\n  const TValue *tm;\n  switch (ttypenv(rb)) {\n    case LUA_TTABLE: {\n      Table *h = hvalue(rb);\n      tm = fasttm(L, h->metatable, TM_LEN);\n      if (tm) break;  /* metamethod? break switch to call it */\n      setnvalue(ra, cast_num(luaH_getn(h)));  /* else primitive len */\n      return;\n    }\n    case LUA_TSTRING: {\n      setnvalue(ra, cast_num(tsvalue(rb)->len));\n      return;\n    }\n    default: {  /* try metamethod */\n      tm = luaT_gettmbyobj(L, rb, TM_LEN);\n      if (ttisnil(tm))  /* no metamethod? */\n        luaG_typeerror(L, rb, \"get length of\");\n      break;\n    }\n  }\n  callTM(L, tm, rb, rb, ra, 1);\n}\n\n\nvoid luaV_arith (lua_State *L, StkId ra, const TValue *rb,\n                 const TValue *rc, TMS op) {\n  TValue tempb, tempc;\n  const TValue *b, *c;\n  if ((b = luaV_tonumber(rb, &tempb)) != NULL &&\n      (c = luaV_tonumber(rc, &tempc)) != NULL) {\n    lua_Number res = luaO_arith(op - TM_ADD + LUA_OPADD, nvalue(b), nvalue(c));\n    setnvalue(ra, res);\n  }\n  else if (!call_binTM(L, rb, rc, ra, op))\n    luaG_aritherror(L, rb, rc);\n}\n\n\n/*\n** check whether cached closure in prototype 'p' may be reused, that is,\n** whether there is a cached closure with the same upvalues needed by\n** new closure to be created.\n*/\nstatic Closure *getcached (Proto *p, UpVal **encup, StkId base) {\n  Closure *c = p->cache;\n  if (c != NULL) {  /* is there a cached closure? */\n    int nup = p->sizeupvalues;\n    Upvaldesc *uv = p->upvalues;\n    int i;\n    for (i = 0; i < nup; i++) {  /* check whether it has right upvalues */\n      TValue *v = uv[i].instack ? base + uv[i].idx : encup[uv[i].idx]->v;\n      if (c->l.upvals[i]->v != v)\n        return NULL;  /* wrong upvalue; cannot reuse closure */\n    }\n  }\n  return c;  /* return cached closure (or NULL if no cached closure) */\n}\n\n\n/*\n** create a new Lua closure, push it in the stack, and initialize\n** its upvalues. Note that the call to 'luaC_barrierproto' must come\n** before the assignment to 'p->cache', as the function needs the\n** original value of that field.\n*/\nstatic void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base,\n                         StkId ra) {\n  int nup = p->sizeupvalues;\n  Upvaldesc *uv = p->upvalues;\n  int i;\n  Closure *ncl = luaF_newLclosure(L, nup);\n  ncl->l.p = p;\n  setclLvalue(L, ra, ncl);  /* anchor new closure in stack */\n  for (i = 0; i < nup; i++) {  /* fill in its upvalues */\n    if (uv[i].instack)  /* upvalue refers to local variable? */\n      ncl->l.upvals[i] = luaF_findupval(L, base + uv[i].idx);\n    else  /* get upvalue from enclosing function */\n      ncl->l.upvals[i] = encup[uv[i].idx];\n  }\n  luaC_barrierproto(L, p, ncl);\n  p->cache = ncl;  /* save it on cache for reuse */\n}\n\n\n/*\n** finish execution of an opcode interrupted by an yield\n*/\nvoid luaV_finishOp (lua_State *L) {\n  CallInfo *ci = L->ci;\n  StkId base = ci->u.l.base;\n  Instruction inst = *(ci->u.l.savedpc - 1);  /* interrupted instruction */\n  OpCode op = GET_OPCODE(inst);\n  switch (op) {  /* finish its execution */\n    case OP_ADD: case OP_SUB: case OP_MUL: case OP_DIV:\n    case OP_MOD: case OP_POW: case OP_UNM: case OP_LEN:\n    case OP_GETTABUP: case OP_GETTABLE: case OP_SELF: {\n      setobjs2s(L, base + GETARG_A(inst), --L->top);\n      break;\n    }\n    case OP_LE: case OP_LT: case OP_EQ: {\n      int res = !l_isfalse(L->top - 1);\n      L->top--;\n      /* metamethod should not be called when operand is K */\n      lua_assert(!ISK(GETARG_B(inst)));\n      if (op == OP_LE &&  /* \"<=\" using \"<\" instead? */\n          ttisnil(luaT_gettmbyobj(L, base + GETARG_B(inst), TM_LE)))\n        res = !res;  /* invert result */\n      lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_JMP);\n      if (res != GETARG_A(inst))  /* condition failed? */\n        ci->u.l.savedpc++;  /* skip jump instruction */\n      break;\n    }\n    case OP_CONCAT: {\n      StkId top = L->top - 1;  /* top when 'call_binTM' was called */\n      int b = GETARG_B(inst);      /* first element to concatenate */\n      int total = cast_int(top - 1 - (base + b));  /* yet to concatenate */\n      setobj2s(L, top - 2, top);  /* put TM result in proper position */\n      if (total > 1) {  /* are there elements to concat? */\n        L->top = top - 1;  /* top is one after last element (at top-2) */\n        luaV_concat(L, total);  /* concat them (may yield again) */\n      }\n      /* move final result to final position */\n      setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1);\n      L->top = ci->top;  /* restore top */\n      break;\n    }\n    case OP_TFORCALL: {\n      lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_TFORLOOP);\n      L->top = ci->top;  /* correct top */\n      break;\n    }\n    case OP_CALL: {\n      if (GETARG_C(inst) - 1 >= 0)  /* nresults >= 0? */\n        L->top = ci->top;  /* adjust results */\n      break;\n    }\n    case OP_TAILCALL: case OP_SETTABUP: case OP_SETTABLE:\n      break;\n    default: lua_assert(0);\n  }\n}\n\n\n\n/*\n** some macros for common tasks in `luaV_execute'\n*/\n\n#if !defined luai_runtimecheck\n#define luai_runtimecheck(L, c)\t\t/* void */\n#endif\n\n\n#define RA(i)\t(base+GETARG_A(i))\n/* to be used after possible stack reallocation */\n#define RB(i)\tcheck_exp(getBMode(GET_OPCODE(i)) == OpArgR, base+GETARG_B(i))\n#define RC(i)\tcheck_exp(getCMode(GET_OPCODE(i)) == OpArgR, base+GETARG_C(i))\n#define RKB(i)\tcheck_exp(getBMode(GET_OPCODE(i)) == OpArgK, \\\n\tISK(GETARG_B(i)) ? k+INDEXK(GETARG_B(i)) : base+GETARG_B(i))\n#define RKC(i)\tcheck_exp(getCMode(GET_OPCODE(i)) == OpArgK, \\\n\tISK(GETARG_C(i)) ? k+INDEXK(GETARG_C(i)) : base+GETARG_C(i))\n#define KBx(i)  \\\n  (k + (GETARG_Bx(i) != 0 ? GETARG_Bx(i) - 1 : GETARG_Ax(*ci->u.l.savedpc++)))\n\n\n/* execute a jump instruction */\n#define dojump(ci,i,e) \\\n  { int a = GETARG_A(i); \\\n    if (a > 0) luaF_close(L, ci->u.l.base + a - 1); \\\n    ci->u.l.savedpc += GETARG_sBx(i) + e; }\n\n/* for test instructions, execute the jump instruction that follows it */\n#define donextjump(ci)\t{ i = *ci->u.l.savedpc; dojump(ci, i, 1); }\n\n\n#define Protect(x)\t{ {x;}; base = ci->u.l.base; }\n\n#define checkGC(L,c)  \\\n  Protect( luaC_condGC(L,{L->top = (c);  /* limit of live values */ \\\n                          luaC_step(L); \\\n                          L->top = ci->top;})  /* restore top */ \\\n           luai_threadyield(L); )\n\n\n#define arith_op(op,tm) { \\\n        TValue *rb = RKB(i); \\\n        TValue *rc = RKC(i); \\\n        if (ttisnumber(rb) && ttisnumber(rc)) { \\\n          lua_Number nb = nvalue(rb), nc = nvalue(rc); \\\n          setnvalue(ra, op(L, nb, nc)); \\\n        } \\\n        else { Protect(luaV_arith(L, ra, rb, rc, tm)); } }\n\n\n#define vmdispatch(o)\tswitch(o)\n#define vmcase(l,b)\tcase l: {b}  break;\n#define vmcasenb(l,b)\tcase l: {b}\t\t/* nb = no break */\n\nvoid luaV_execute (lua_State *L) {\n  CallInfo *ci = L->ci;\n  LClosure *cl;\n  TValue *k;\n  StkId base;\n newframe:  /* reentry point when frame changes (call/return) */\n  lua_assert(ci == L->ci);\n  cl = clLvalue(ci->func);\n  k = cl->p->k;\n  base = ci->u.l.base;\n  /* main loop of interpreter */\n  for (;;) {\n    Instruction i = *(ci->u.l.savedpc++);\n    StkId ra;\n    if ((L->hookmask & (LUA_MASKLINE | LUA_MASKCOUNT)) &&\n        (--L->hookcount == 0 || L->hookmask & LUA_MASKLINE)) {\n      Protect(traceexec(L));\n    }\n    /* WARNING: several calls may realloc the stack and invalidate `ra' */\n    ra = RA(i);\n    lua_assert(base == ci->u.l.base);\n    lua_assert(base <= L->top && L->top < L->stack + L->stacksize);\n    vmdispatch (GET_OPCODE(i)) {\n      vmcase(OP_MOVE,\n        setobjs2s(L, ra, RB(i));\n      )\n      vmcase(OP_LOADK,\n        TValue *rb = k + GETARG_Bx(i);\n        setobj2s(L, ra, rb);\n      )\n      vmcase(OP_LOADKX,\n        TValue *rb;\n        lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG);\n        rb = k + GETARG_Ax(*ci->u.l.savedpc++);\n        setobj2s(L, ra, rb);\n      )\n      vmcase(OP_LOADBOOL,\n        setbvalue(ra, GETARG_B(i));\n        if (GETARG_C(i)) ci->u.l.savedpc++;  /* skip next instruction (if C) */\n      )\n      vmcase(OP_LOADNIL,\n        int b = GETARG_B(i);\n        do {\n          setnilvalue(ra++);\n        } while (b--);\n      )\n      vmcase(OP_GETUPVAL,\n        int b = GETARG_B(i);\n        setobj2s(L, ra, cl->upvals[b]->v);\n      )\n      vmcase(OP_GETTABUP,\n        int b = GETARG_B(i);\n        Protect(luaV_gettable(L, cl->upvals[b]->v, RKC(i), ra));\n      )\n      vmcase(OP_GETTABLE,\n        Protect(luaV_gettable(L, RB(i), RKC(i), ra));\n      )\n      vmcase(OP_SETTABUP,\n        int a = GETARG_A(i);\n        Protect(luaV_settable(L, cl->upvals[a]->v, RKB(i), RKC(i)));\n      )\n      vmcase(OP_SETUPVAL,\n        UpVal *uv = cl->upvals[GETARG_B(i)];\n        setobj(L, uv->v, ra);\n        luaC_barrier(L, uv, ra);\n      )\n      vmcase(OP_SETTABLE,\n        Protect(luaV_settable(L, ra, RKB(i), RKC(i)));\n      )\n      vmcase(OP_NEWTABLE,\n        int b = GETARG_B(i);\n        int c = GETARG_C(i);\n        Table *t = luaH_new(L);\n        sethvalue(L, ra, t);\n        if (b != 0 || c != 0)\n          luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c));\n        checkGC(L, ra + 1);\n      )\n      vmcase(OP_SELF,\n        StkId rb = RB(i);\n        setobjs2s(L, ra+1, rb);\n        Protect(luaV_gettable(L, rb, RKC(i), ra));\n      )\n      vmcase(OP_ADD,\n        arith_op(luai_numadd, TM_ADD);\n      )\n      vmcase(OP_SUB,\n        arith_op(luai_numsub, TM_SUB);\n      )\n      vmcase(OP_MUL,\n        arith_op(luai_nummul, TM_MUL);\n      )\n      vmcase(OP_DIV,\n        arith_op(luai_numdiv, TM_DIV);\n      )\n      vmcase(OP_MOD,\n        arith_op(luai_nummod, TM_MOD);\n      )\n      vmcase(OP_POW,\n        arith_op(luai_numpow, TM_POW);\n      )\n      vmcase(OP_UNM,\n        TValue *rb = RB(i);\n        if (ttisnumber(rb)) {\n          lua_Number nb = nvalue(rb);\n          setnvalue(ra, luai_numunm(L, nb));\n        }\n        else {\n          Protect(luaV_arith(L, ra, rb, rb, TM_UNM));\n        }\n      )\n      vmcase(OP_NOT,\n        TValue *rb = RB(i);\n        int res = l_isfalse(rb);  /* next assignment may change this value */\n        setbvalue(ra, res);\n      )\n      vmcase(OP_LEN,\n        Protect(luaV_objlen(L, ra, RB(i)));\n      )\n      vmcase(OP_CONCAT,\n        int b = GETARG_B(i);\n        int c = GETARG_C(i);\n        StkId rb;\n        L->top = base + c + 1;  /* mark the end of concat operands */\n        Protect(luaV_concat(L, c - b + 1));\n        ra = RA(i);  /* 'luav_concat' may invoke TMs and move the stack */\n        rb = b + base;\n        setobjs2s(L, ra, rb);\n        checkGC(L, (ra >= rb ? ra + 1 : rb));\n        L->top = ci->top;  /* restore top */\n      )\n      vmcase(OP_JMP,\n        dojump(ci, i, 0);\n      )\n      vmcase(OP_EQ,\n        TValue *rb = RKB(i);\n        TValue *rc = RKC(i);\n        Protect(\n          if (cast_int(equalobj(L, rb, rc)) != GETARG_A(i))\n            ci->u.l.savedpc++;\n          else\n            donextjump(ci);\n        )\n      )\n      vmcase(OP_LT,\n        Protect(\n          if (luaV_lessthan(L, RKB(i), RKC(i)) != GETARG_A(i))\n            ci->u.l.savedpc++;\n          else\n            donextjump(ci);\n        )\n      )\n      vmcase(OP_LE,\n        Protect(\n          if (luaV_lessequal(L, RKB(i), RKC(i)) != GETARG_A(i))\n            ci->u.l.savedpc++;\n          else\n            donextjump(ci);\n        )\n      )\n      vmcase(OP_TEST,\n        if (GETARG_C(i) ? l_isfalse(ra) : !l_isfalse(ra))\n            ci->u.l.savedpc++;\n          else\n          donextjump(ci);\n      )\n      vmcase(OP_TESTSET,\n        TValue *rb = RB(i);\n        if (GETARG_C(i) ? l_isfalse(rb) : !l_isfalse(rb))\n          ci->u.l.savedpc++;\n        else {\n          setobjs2s(L, ra, rb);\n          donextjump(ci);\n        }\n      )\n      vmcase(OP_CALL,\n        int b = GETARG_B(i);\n        int nresults = GETARG_C(i) - 1;\n        if (b != 0) L->top = ra+b;  /* else previous instruction set top */\n        if (luaD_precall(L, ra, nresults)) {  /* C function? */\n          if (nresults >= 0) L->top = ci->top;  /* adjust results */\n          base = ci->u.l.base;\n        }\n        else {  /* Lua function */\n          ci = L->ci;\n          ci->callstatus |= CIST_REENTRY;\n          goto newframe;  /* restart luaV_execute over new Lua function */\n        }\n      )\n      vmcase(OP_TAILCALL,\n        int b = GETARG_B(i);\n        if (b != 0) L->top = ra+b;  /* else previous instruction set top */\n        lua_assert(GETARG_C(i) - 1 == LUA_MULTRET);\n        if (luaD_precall(L, ra, LUA_MULTRET))  /* C function? */\n          base = ci->u.l.base;\n        else {\n          /* tail call: put called frame (n) in place of caller one (o) */\n          CallInfo *nci = L->ci;  /* called frame */\n          CallInfo *oci = nci->previous;  /* caller frame */\n          StkId nfunc = nci->func;  /* called function */\n          StkId ofunc = oci->func;  /* caller function */\n          /* last stack slot filled by 'precall' */\n          StkId lim = nci->u.l.base + getproto(nfunc)->numparams;\n          int aux;\n          /* close all upvalues from previous call */\n          if (cl->p->sizep > 0) luaF_close(L, oci->u.l.base);\n          /* move new frame into old one */\n          for (aux = 0; nfunc + aux < lim; aux++)\n            setobjs2s(L, ofunc + aux, nfunc + aux);\n          oci->u.l.base = ofunc + (nci->u.l.base - nfunc);  /* correct base */\n          oci->top = L->top = ofunc + (L->top - nfunc);  /* correct top */\n          oci->u.l.savedpc = nci->u.l.savedpc;\n          oci->callstatus |= CIST_TAIL;  /* function was tail called */\n          ci = L->ci = oci;  /* remove new frame */\n          lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize);\n          goto newframe;  /* restart luaV_execute over new Lua function */\n        }\n      )\n      vmcasenb(OP_RETURN,\n        int b = GETARG_B(i);\n        if (b != 0) L->top = ra+b-1;\n        if (cl->p->sizep > 0) luaF_close(L, base);\n        b = luaD_poscall(L, ra);\n        if (!(ci->callstatus & CIST_REENTRY))  /* 'ci' still the called one */\n          return;  /* external invocation: return */\n        else {  /* invocation via reentry: continue execution */\n          ci = L->ci;\n          if (b) L->top = ci->top;\n          lua_assert(isLua(ci));\n          lua_assert(GET_OPCODE(*((ci)->u.l.savedpc - 1)) == OP_CALL);\n          goto newframe;  /* restart luaV_execute over new Lua function */\n        }\n      )\n      vmcase(OP_FORLOOP,\n        lua_Number step = nvalue(ra+2);\n        lua_Number idx = luai_numadd(L, nvalue(ra), step); /* increment index */\n        lua_Number limit = nvalue(ra+1);\n        if (luai_numlt(L, 0, step) ? luai_numle(L, idx, limit)\n                                   : luai_numle(L, limit, idx)) {\n          ci->u.l.savedpc += GETARG_sBx(i);  /* jump back */\n          setnvalue(ra, idx);  /* update internal index... */\n          setnvalue(ra+3, idx);  /* ...and external index */\n        }\n      )\n      vmcase(OP_FORPREP,\n        const TValue *init = ra;\n        const TValue *plimit = ra+1;\n        const TValue *pstep = ra+2;\n        if (!tonumber(init, ra))\n          luaG_runerror(L, LUA_QL(\"for\") \" initial value must be a number\");\n        else if (!tonumber(plimit, ra+1))\n          luaG_runerror(L, LUA_QL(\"for\") \" limit must be a number\");\n        else if (!tonumber(pstep, ra+2))\n          luaG_runerror(L, LUA_QL(\"for\") \" step must be a number\");\n        setnvalue(ra, luai_numsub(L, nvalue(ra), nvalue(pstep)));\n        ci->u.l.savedpc += GETARG_sBx(i);\n      )\n      vmcasenb(OP_TFORCALL,\n        StkId cb = ra + 3;  /* call base */\n        setobjs2s(L, cb+2, ra+2);\n        setobjs2s(L, cb+1, ra+1);\n        setobjs2s(L, cb, ra);\n        L->top = cb + 3;  /* func. + 2 args (state and index) */\n        Protect(luaD_call(L, cb, GETARG_C(i), 1));\n        L->top = ci->top;\n        i = *(ci->u.l.savedpc++);  /* go to next instruction */\n        ra = RA(i);\n        lua_assert(GET_OPCODE(i) == OP_TFORLOOP);\n        goto l_tforloop;\n      )\n      vmcase(OP_TFORLOOP,\n        l_tforloop:\n        if (!ttisnil(ra + 1)) {  /* continue loop? */\n          setobjs2s(L, ra, ra + 1);  /* save control variable */\n           ci->u.l.savedpc += GETARG_sBx(i);  /* jump back */\n        }\n      )\n      vmcase(OP_SETLIST,\n        int n = GETARG_B(i);\n        int c = GETARG_C(i);\n        int last;\n        Table *h;\n        if (n == 0) n = cast_int(L->top - ra) - 1;\n        if (c == 0) {\n          lua_assert(GET_OPCODE(*ci->u.l.savedpc) == OP_EXTRAARG);\n          c = GETARG_Ax(*ci->u.l.savedpc++);\n        }\n        luai_runtimecheck(L, ttistable(ra));\n        h = hvalue(ra);\n        last = ((c-1)*LFIELDS_PER_FLUSH) + n;\n        if (last > h->sizearray)  /* needs more space? */\n          luaH_resizearray(L, h, last);  /* pre-allocate it at once */\n        for (; n > 0; n--) {\n          TValue *val = ra+n;\n          luaH_setint(L, h, last--, val);\n          luaC_barrierback(L, obj2gco(h), val);\n        }\n        L->top = ci->top;  /* correct top (in case of previous open call) */\n      )\n      vmcase(OP_CLOSURE,\n        Proto *p = cl->p->p[GETARG_Bx(i)];\n        Closure *ncl = getcached(p, cl->upvals, base);  /* cached closure */\n        if (ncl == NULL)  /* no match? */\n          pushclosure(L, p, cl->upvals, base, ra);  /* create a new one */\n        else\n          setclLvalue(L, ra, ncl);  /* push cashed closure */\n        checkGC(L, ra + 1);\n      )\n      vmcase(OP_VARARG,\n        int b = GETARG_B(i) - 1;\n        int j;\n        int n = cast_int(base - ci->func) - cl->p->numparams - 1;\n        if (b < 0) {  /* B == 0? */\n          b = n;  /* get all var. arguments */\n          Protect(luaD_checkstack(L, n));\n          ra = RA(i);  /* previous call may change the stack */\n          L->top = ra + n;\n        }\n        for (j = 0; j < b; j++) {\n          if (j < n) {\n            setobjs2s(L, ra + j, base - n + j);\n          }\n          else {\n            setnilvalue(ra + j);\n          }\n        }\n      )\n      vmcase(OP_EXTRAARG,\n        lua_assert(0);\n      )\n    }\n  }\n}\n\n"
  },
  {
    "path": "src/lib/lua52/lvm.h",
    "content": "/*\n** $Id: lvm.h,v 2.18.1.1 2013/04/12 18:48:47 roberto Exp $\n** Lua virtual machine\n** See Copyright Notice in lua.h\n*/\n\n#ifndef lvm_h\n#define lvm_h\n\n\n#include \"ldo.h\"\n#include \"lobject.h\"\n#include \"ltm.h\"\n\n\n#define tostring(L,o) (ttisstring(o) || (luaV_tostring(L, o)))\n\n#define tonumber(o,n)\t(ttisnumber(o) || (((o) = luaV_tonumber(o,n)) != NULL))\n\n#define equalobj(L,o1,o2)  (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))\n\n#define luaV_rawequalobj(o1,o2)\t\tequalobj(NULL,o1,o2)\n\n\n/* not to called directly */\nLUAI_FUNC int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2);\n\n\nLUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);\nLUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);\nLUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n);\nLUAI_FUNC int luaV_tostring (lua_State *L, StkId obj);\nLUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key,\n                                            StkId val);\nLUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key,\n                                            StkId val);\nLUAI_FUNC void luaV_finishOp (lua_State *L);\nLUAI_FUNC void luaV_execute (lua_State *L);\nLUAI_FUNC void luaV_concat (lua_State *L, int total);\nLUAI_FUNC void luaV_arith (lua_State *L, StkId ra, const TValue *rb,\n                           const TValue *rc, TMS op);\nLUAI_FUNC void luaV_objlen (lua_State *L, StkId ra, const TValue *rb);\n\n#endif\n"
  },
  {
    "path": "src/lib/lua52/lzio.c",
    "content": "/*\n** $Id: lzio.c,v 1.35.1.1 2013/04/12 18:48:47 roberto Exp $\n** Buffered streams\n** See Copyright Notice in lua.h\n*/\n\n\n#include <string.h>\n\n#define lzio_c\n#define LUA_CORE\n\n#include \"lua.h\"\n\n#include \"llimits.h\"\n#include \"lmem.h\"\n#include \"lstate.h\"\n#include \"lzio.h\"\n\n\nint luaZ_fill (ZIO *z) {\n  size_t size;\n  lua_State *L = z->L;\n  const char *buff;\n  lua_unlock(L);\n  buff = z->reader(L, z->data, &size);\n  lua_lock(L);\n  if (buff == NULL || size == 0)\n    return EOZ;\n  z->n = size - 1;  /* discount char being returned */\n  z->p = buff;\n  return cast_uchar(*(z->p++));\n}\n\n\nvoid luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) {\n  z->L = L;\n  z->reader = reader;\n  z->data = data;\n  z->n = 0;\n  z->p = NULL;\n}\n\n\n/* --------------------------------------------------------------- read --- */\nsize_t luaZ_read (ZIO *z, void *b, size_t n) {\n  while (n) {\n    size_t m;\n    if (z->n == 0) {  /* no bytes in buffer? */\n      if (luaZ_fill(z) == EOZ)  /* try to read more */\n        return n;  /* no more input; return number of missing bytes */\n      else {\n        z->n++;  /* luaZ_fill consumed first byte; put it back */\n        z->p--;\n      }\n    }\n    m = (n <= z->n) ? n : z->n;  /* min. between n and z->n */\n    memcpy(b, z->p, m);\n    z->n -= m;\n    z->p += m;\n    b = (char *)b + m;\n    n -= m;\n  }\n  return 0;\n}\n\n/* ------------------------------------------------------------------------ */\nchar *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) {\n  if (n > buff->buffsize) {\n    if (n < LUA_MINBUFFER) n = LUA_MINBUFFER;\n    luaZ_resizebuffer(L, buff, n);\n  }\n  return buff->buffer;\n}\n\n\n"
  },
  {
    "path": "src/lib/lua52/lzio.h",
    "content": "/*\n** $Id: lzio.h,v 1.26.1.1 2013/04/12 18:48:47 roberto Exp $\n** Buffered streams\n** See Copyright Notice in lua.h\n*/\n\n\n#ifndef lzio_h\n#define lzio_h\n\n#include \"lua.h\"\n\n#include \"lmem.h\"\n\n\n#define EOZ\t(-1)\t\t\t/* end of stream */\n\ntypedef struct Zio ZIO;\n\n#define zgetc(z)  (((z)->n--)>0 ?  cast_uchar(*(z)->p++) : luaZ_fill(z))\n\n\ntypedef struct Mbuffer {\n  char *buffer;\n  size_t n;\n  size_t buffsize;\n} Mbuffer;\n\n#define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0)\n\n#define luaZ_buffer(buff)\t((buff)->buffer)\n#define luaZ_sizebuffer(buff)\t((buff)->buffsize)\n#define luaZ_bufflen(buff)\t((buff)->n)\n\n#define luaZ_resetbuffer(buff) ((buff)->n = 0)\n\n\n#define luaZ_resizebuffer(L, buff, size) \\\n\t(luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \\\n\t(buff)->buffsize = size)\n\n#define luaZ_freebuffer(L, buff)\tluaZ_resizebuffer(L, buff, 0)\n\n\nLUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n);\nLUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,\n                                        void *data);\nLUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n);\t/* read next n bytes */\n\n\n\n/* --------- Private Part ------------------ */\n\nstruct Zio {\n  size_t n;\t\t\t/* bytes still unread */\n  const char *p;\t\t/* current position in buffer */\n  lua_Reader reader;\t\t/* reader function */\n  void* data;\t\t\t/* additional data */\n  lua_State *L;\t\t\t/* Lua state (for reader) */\n};\n\n\nLUAI_FUNC int luaZ_fill (ZIO *z);\n\n#endif\n"
  },
  {
    "path": "src/lib/stb/stb_truetype.c",
    "content": "#define STB_TRUETYPE_IMPLEMENTATION\n#include \"stb_truetype.h\"\n"
  },
  {
    "path": "src/lib/stb/stb_truetype.h",
    "content": "// stb_truetype.h - v1.24 - public domain\n// authored from 2009-2020 by Sean Barrett / RAD Game Tools\n//\n// =======================================================================\n//\n//    NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES\n//\n// This library does no range checking of the offsets found in the file,\n// meaning an attacker can use it to read arbitrary memory.\n//\n// =======================================================================\n//\n//   This library processes TrueType files:\n//        parse files\n//        extract glyph metrics\n//        extract glyph shapes\n//        render glyphs to one-channel bitmaps with antialiasing (box filter)\n//        render glyphs to one-channel SDF bitmaps (signed-distance field/function)\n//\n//   Todo:\n//        non-MS cmaps\n//        crashproof on bad data\n//        hinting? (no longer patented)\n//        cleartype-style AA?\n//        optimize: use simple memory allocator for intermediates\n//        optimize: build edge-list directly from curves\n//        optimize: rasterize directly from curves?\n//\n// ADDITIONAL CONTRIBUTORS\n//\n//   Mikko Mononen: compound shape support, more cmap formats\n//   Tor Andersson: kerning, subpixel rendering\n//   Dougall Johnson: OpenType / Type 2 font handling\n//   Daniel Ribeiro Maciel: basic GPOS-based kerning\n//\n//   Misc other:\n//       Ryan Gordon\n//       Simon Glass\n//       github:IntellectualKitty\n//       Imanol Celaya\n//       Daniel Ribeiro Maciel\n//\n//   Bug/warning reports/fixes:\n//       \"Zer\" on mollyrocket       Fabian \"ryg\" Giesen   github:NiLuJe\n//       Cass Everitt               Martins Mozeiko       github:aloucks\n//       stoiko (Haemimont Games)   Cap Petschulat        github:oyvindjam\n//       Brian Hook                 Omar Cornut           github:vassvik\n//       Walter van Niftrik         Ryan Griege\n//       David Gow                  Peter LaValle\n//       David Given                Sergey Popov\n//       Ivan-Assen Ivanov          Giumo X. Clanjor\n//       Anthony Pesch              Higor Euripedes\n//       Johan Duparc               Thomas Fields\n//       Hou Qiming                 Derek Vinyard\n//       Rob Loach                  Cort Stratton\n//       Kenney Phillis Jr.         Brian Costabile\n//       Ken Voskuil (kaesve)\n//\n// VERSION HISTORY\n//\n//   1.24 (2020-02-05) fix warning\n//   1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS)\n//   1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined\n//   1.21 (2019-02-25) fix warning\n//   1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics()\n//   1.19 (2018-02-11) GPOS kerning, STBTT_fmod\n//   1.18 (2018-01-29) add missing function\n//   1.17 (2017-07-23) make more arguments const; doc fix\n//   1.16 (2017-07-12) SDF support\n//   1.15 (2017-03-03) make more arguments const\n//   1.14 (2017-01-16) num-fonts-in-TTC function\n//   1.13 (2017-01-02) support OpenType fonts, certain Apple fonts\n//   1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual\n//   1.11 (2016-04-02) fix unused-variable warning\n//   1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef\n//   1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly\n//   1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges\n//   1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;\n//                     variant PackFontRanges to pack and render in separate phases;\n//                     fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);\n//                     fixed an assert() bug in the new rasterizer\n//                     replace assert() with STBTT_assert() in new rasterizer\n//\n//   Full history can be found at the end of this file.\n//\n// LICENSE\n//\n//   See end of file for license information.\n//\n// USAGE\n//\n//   Include this file in whatever places need to refer to it. In ONE C/C++\n//   file, write:\n//      #define STB_TRUETYPE_IMPLEMENTATION\n//   before the #include of this file. This expands out the actual\n//   implementation into that C/C++ file.\n//\n//   To make the implementation private to the file that generates the implementation,\n//      #define STBTT_STATIC\n//\n//   Simple 3D API (don't ship this, but it's fine for tools and quick start)\n//           stbtt_BakeFontBitmap()               -- bake a font to a bitmap for use as texture\n//           stbtt_GetBakedQuad()                 -- compute quad to draw for a given char\n//\n//   Improved 3D API (more shippable):\n//           #include \"stb_rect_pack.h\"           -- optional, but you really want it\n//           stbtt_PackBegin()\n//           stbtt_PackSetOversampling()          -- for improved quality on small fonts\n//           stbtt_PackFontRanges()               -- pack and renders\n//           stbtt_PackEnd()\n//           stbtt_GetPackedQuad()\n//\n//   \"Load\" a font file from a memory buffer (you have to keep the buffer loaded)\n//           stbtt_InitFont()\n//           stbtt_GetFontOffsetForIndex()        -- indexing for TTC font collections\n//           stbtt_GetNumberOfFonts()             -- number of fonts for TTC font collections\n//\n//   Render a unicode codepoint to a bitmap\n//           stbtt_GetCodepointBitmap()           -- allocates and returns a bitmap\n//           stbtt_MakeCodepointBitmap()          -- renders into bitmap you provide\n//           stbtt_GetCodepointBitmapBox()        -- how big the bitmap must be\n//\n//   Character advance/positioning\n//           stbtt_GetCodepointHMetrics()\n//           stbtt_GetFontVMetrics()\n//           stbtt_GetFontVMetricsOS2()\n//           stbtt_GetCodepointKernAdvance()\n//\n//   Starting with version 1.06, the rasterizer was replaced with a new,\n//   faster and generally-more-precise rasterizer. The new rasterizer more\n//   accurately measures pixel coverage for anti-aliasing, except in the case\n//   where multiple shapes overlap, in which case it overestimates the AA pixel\n//   coverage. Thus, anti-aliasing of intersecting shapes may look wrong. If\n//   this turns out to be a problem, you can re-enable the old rasterizer with\n//        #define STBTT_RASTERIZER_VERSION 1\n//   which will incur about a 15% speed hit.\n//\n// ADDITIONAL DOCUMENTATION\n//\n//   Immediately after this block comment are a series of sample programs.\n//\n//   After the sample programs is the \"header file\" section. This section\n//   includes documentation for each API function.\n//\n//   Some important concepts to understand to use this library:\n//\n//      Codepoint\n//         Characters are defined by unicode codepoints, e.g. 65 is\n//         uppercase A, 231 is lowercase c with a cedilla, 0x7e30 is\n//         the hiragana for \"ma\".\n//\n//      Glyph\n//         A visual character shape (every codepoint is rendered as\n//         some glyph)\n//\n//      Glyph index\n//         A font-specific integer ID representing a glyph\n//\n//      Baseline\n//         Glyph shapes are defined relative to a baseline, which is the\n//         bottom of uppercase characters. Characters extend both above\n//         and below the baseline.\n//\n//      Current Point\n//         As you draw text to the screen, you keep track of a \"current point\"\n//         which is the origin of each character. The current point's vertical\n//         position is the baseline. Even \"baked fonts\" use this model.\n//\n//      Vertical Font Metrics\n//         The vertical qualities of the font, used to vertically position\n//         and space the characters. See docs for stbtt_GetFontVMetrics.\n//\n//      Font Size in Pixels or Points\n//         The preferred interface for specifying font sizes in stb_truetype\n//         is to specify how tall the font's vertical extent should be in pixels.\n//         If that sounds good enough, skip the next paragraph.\n//\n//         Most font APIs instead use \"points\", which are a common typographic\n//         measurement for describing font size, defined as 72 points per inch.\n//         stb_truetype provides a point API for compatibility. However, true\n//         \"per inch\" conventions don't make much sense on computer displays\n//         since different monitors have different number of pixels per\n//         inch. For example, Windows traditionally uses a convention that\n//         there are 96 pixels per inch, thus making 'inch' measurements have\n//         nothing to do with inches, and thus effectively defining a point to\n//         be 1.333 pixels. Additionally, the TrueType font data provides\n//         an explicit scale factor to scale a given font's glyphs to points,\n//         but the author has observed that this scale factor is often wrong\n//         for non-commercial fonts, thus making fonts scaled in points\n//         according to the TrueType spec incoherently sized in practice.\n//\n// DETAILED USAGE:\n//\n//  Scale:\n//    Select how high you want the font to be, in points or pixels.\n//    Call ScaleForPixelHeight or ScaleForMappingEmToPixels to compute\n//    a scale factor SF that will be used by all other functions.\n//\n//  Baseline:\n//    You need to select a y-coordinate that is the baseline of where\n//    your text will appear. Call GetFontBoundingBox to get the baseline-relative\n//    bounding box for all characters. SF*-y0 will be the distance in pixels\n//    that the worst-case character could extend above the baseline, so if\n//    you want the top edge of characters to appear at the top of the\n//    screen where y=0, then you would set the baseline to SF*-y0.\n//\n//  Current point:\n//    Set the current point where the first character will appear. The\n//    first character could extend left of the current point; this is font\n//    dependent. You can either choose a current point that is the leftmost\n//    point and hope, or add some padding, or check the bounding box or\n//    left-side-bearing of the first character to be displayed and set\n//    the current point based on that.\n//\n//  Displaying a character:\n//    Compute the bounding box of the character. It will contain signed values\n//    relative to <current_point, baseline>. I.e. if it returns x0,y0,x1,y1,\n//    then the character should be displayed in the rectangle from\n//    <current_point+SF*x0, baseline+SF*y0> to <current_point+SF*x1,baseline+SF*y1).\n//\n//  Advancing for the next character:\n//    Call GlyphHMetrics, and compute 'current_point += SF * advance'.\n//\n//\n// ADVANCED USAGE\n//\n//   Quality:\n//\n//    - Use the functions with Subpixel at the end to allow your characters\n//      to have subpixel positioning. Since the font is anti-aliased, not\n//      hinted, this is very import for quality. (This is not possible with\n//      baked fonts.)\n//\n//    - Kerning is now supported, and if you're supporting subpixel rendering\n//      then kerning is worth using to give your text a polished look.\n//\n//   Performance:\n//\n//    - Convert Unicode codepoints to glyph indexes and operate on the glyphs;\n//      if you don't do this, stb_truetype is forced to do the conversion on\n//      every call.\n//\n//    - There are a lot of memory allocations. We should modify it to take\n//      a temp buffer and allocate from the temp buffer (without freeing),\n//      should help performance a lot.\n//\n// NOTES\n//\n//   The system uses the raw data found in the .ttf file without changing it\n//   and without building auxiliary data structures. This is a bit inefficient\n//   on little-endian systems (the data is big-endian), but assuming you're\n//   caching the bitmaps or glyph shapes this shouldn't be a big deal.\n//\n//   It appears to be very hard to programmatically determine what font a\n//   given file is in a general way. I provide an API for this, but I don't\n//   recommend it.\n//\n//\n// PERFORMANCE MEASUREMENTS FOR 1.06:\n//\n//                      32-bit     64-bit\n//   Previous release:  8.83 s     7.68 s\n//   Pool allocations:  7.72 s     6.34 s\n//   Inline sort     :  6.54 s     5.65 s\n//   New rasterizer  :  5.63 s     5.00 s\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n////\n////  SAMPLE PROGRAMS\n////\n//\n//  Incomplete text-in-3d-api example, which draws quads properly aligned to be lossless\n//\n#if 0\n#define STB_TRUETYPE_IMPLEMENTATION  // force following include to generate implementation\n#include \"stb_truetype.h\"\n\nunsigned char ttf_buffer[1<<20];\nunsigned char temp_bitmap[512*512];\n\nstbtt_bakedchar cdata[96]; // ASCII 32..126 is 95 glyphs\nGLuint ftex;\n\nvoid my_stbtt_initfont(void)\n{\n   fread(ttf_buffer, 1, 1<<20, fopen(\"c:/windows/fonts/times.ttf\", \"rb\"));\n   stbtt_BakeFontBitmap(ttf_buffer,0, 32.0, temp_bitmap,512,512, 32,96, cdata); // no guarantee this fits!\n   // can free ttf_buffer at this point\n   glGenTextures(1, &ftex);\n   glBindTexture(GL_TEXTURE_2D, ftex);\n   glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 512,512, 0, GL_ALPHA, GL_UNSIGNED_BYTE, temp_bitmap);\n   // can free temp_bitmap at this point\n   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n}\n\nvoid my_stbtt_print(float x, float y, char *text)\n{\n   // assume orthographic projection with units = screen pixels, origin at top left\n   glEnable(GL_TEXTURE_2D);\n   glBindTexture(GL_TEXTURE_2D, ftex);\n   glBegin(GL_QUADS);\n   while (*text) {\n      if (*text >= 32 && *text < 128) {\n         stbtt_aligned_quad q;\n         stbtt_GetBakedQuad(cdata, 512,512, *text-32, &x,&y,&q,1);//1=opengl & d3d10+,0=d3d9\n         glTexCoord2f(q.s0,q.t1); glVertex2f(q.x0,q.y0);\n         glTexCoord2f(q.s1,q.t1); glVertex2f(q.x1,q.y0);\n         glTexCoord2f(q.s1,q.t0); glVertex2f(q.x1,q.y1);\n         glTexCoord2f(q.s0,q.t0); glVertex2f(q.x0,q.y1);\n      }\n      ++text;\n   }\n   glEnd();\n}\n#endif\n//\n//\n//////////////////////////////////////////////////////////////////////////////\n//\n// Complete program (this compiles): get a single bitmap, print as ASCII art\n//\n#if 0\n#include <stdio.h>\n#define STB_TRUETYPE_IMPLEMENTATION  // force following include to generate implementation\n#include \"stb_truetype.h\"\n\nchar ttf_buffer[1<<25];\n\nint main(int argc, char **argv)\n{\n   stbtt_fontinfo font;\n   unsigned char *bitmap;\n   int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20);\n\n   fread(ttf_buffer, 1, 1<<25, fopen(argc > 3 ? argv[3] : \"c:/windows/fonts/arialbd.ttf\", \"rb\"));\n\n   stbtt_InitFont(&font, ttf_buffer, stbtt_GetFontOffsetForIndex(ttf_buffer,0));\n   bitmap = stbtt_GetCodepointBitmap(&font, 0,stbtt_ScaleForPixelHeight(&font, s), c, &w, &h, 0,0);\n\n   for (j=0; j < h; ++j) {\n      for (i=0; i < w; ++i)\n         putchar(\" .:ioVM@\"[bitmap[j*w+i]>>5]);\n      putchar('\\n');\n   }\n   return 0;\n}\n#endif\n//\n// Output:\n//\n//     .ii.\n//    @@@@@@.\n//   V@Mio@@o\n//   :i.  V@V\n//     :oM@@M\n//   :@@@MM@M\n//   @@o  o@M\n//  :@@.  M@M\n//   @@@o@@@@\n//   :M@@V:@@.\n//\n//////////////////////////////////////////////////////////////////////////////\n//\n// Complete program: print \"Hello World!\" banner, with bugs\n//\n#if 0\nchar buffer[24<<20];\nunsigned char screen[20][79];\n\nint main(int arg, char **argv)\n{\n   stbtt_fontinfo font;\n   int i,j,ascent,baseline,ch=0;\n   float scale, xpos=2; // leave a little padding in case the character extends left\n   char *text = \"Heljo World!\"; // intentionally misspelled to show 'lj' brokenness\n\n   fread(buffer, 1, 1000000, fopen(\"c:/windows/fonts/arialbd.ttf\", \"rb\"));\n   stbtt_InitFont(&font, buffer, 0);\n\n   scale = stbtt_ScaleForPixelHeight(&font, 15);\n   stbtt_GetFontVMetrics(&font, &ascent,0,0);\n   baseline = (int) (ascent*scale);\n\n   while (text[ch]) {\n      int advance,lsb,x0,y0,x1,y1;\n      float x_shift = xpos - (float) floor(xpos);\n      stbtt_GetCodepointHMetrics(&font, text[ch], &advance, &lsb);\n      stbtt_GetCodepointBitmapBoxSubpixel(&font, text[ch], scale,scale,x_shift,0, &x0,&y0,&x1,&y1);\n      stbtt_MakeCodepointBitmapSubpixel(&font, &screen[baseline + y0][(int) xpos + x0], x1-x0,y1-y0, 79, scale,scale,x_shift,0, text[ch]);\n      // note that this stomps the old data, so where character boxes overlap (e.g. 'lj') it's wrong\n      // because this API is really for baking character bitmaps into textures. if you want to render\n      // a sequence of characters, you really need to render each bitmap to a temp buffer, then\n      // \"alpha blend\" that into the working buffer\n      xpos += (advance * scale);\n      if (text[ch+1])\n         xpos += scale*stbtt_GetCodepointKernAdvance(&font, text[ch],text[ch+1]);\n      ++ch;\n   }\n\n   for (j=0; j < 20; ++j) {\n      for (i=0; i < 78; ++i)\n         putchar(\" .:ioVM@\"[screen[j][i]>>5]);\n      putchar('\\n');\n   }\n\n   return 0;\n}\n#endif\n\n\n//////////////////////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////\n////\n////   INTEGRATION WITH YOUR CODEBASE\n////\n////   The following sections allow you to supply alternate definitions\n////   of C library functions used by stb_truetype, e.g. if you don't\n////   link with the C runtime library.\n\n#ifdef STB_TRUETYPE_IMPLEMENTATION\n   // #define your own (u)stbtt_int8/16/32 before including to override this\n   #ifndef stbtt_uint8\n   typedef unsigned char   stbtt_uint8;\n   typedef signed   char   stbtt_int8;\n   typedef unsigned short  stbtt_uint16;\n   typedef signed   short  stbtt_int16;\n   typedef unsigned int    stbtt_uint32;\n   typedef signed   int    stbtt_int32;\n   #endif\n\n   typedef char stbtt__check_size32[sizeof(stbtt_int32)==4 ? 1 : -1];\n   typedef char stbtt__check_size16[sizeof(stbtt_int16)==2 ? 1 : -1];\n\n   // e.g. #define your own STBTT_ifloor/STBTT_iceil() to avoid math.h\n   #ifndef STBTT_ifloor\n   #include <math.h>\n   #define STBTT_ifloor(x)   ((int) floor(x))\n   #define STBTT_iceil(x)    ((int) ceil(x))\n   #endif\n\n   #ifndef STBTT_sqrt\n   #include <math.h>\n   #define STBTT_sqrt(x)      sqrt(x)\n   #define STBTT_pow(x,y)     pow(x,y)\n   #endif\n\n   #ifndef STBTT_fmod\n   #include <math.h>\n   #define STBTT_fmod(x,y)    fmod(x,y)\n   #endif\n\n   #ifndef STBTT_cos\n   #include <math.h>\n   #define STBTT_cos(x)       cos(x)\n   #define STBTT_acos(x)      acos(x)\n   #endif\n\n   #ifndef STBTT_fabs\n   #include <math.h>\n   #define STBTT_fabs(x)      fabs(x)\n   #endif\n\n   // #define your own functions \"STBTT_malloc\" / \"STBTT_free\" to avoid malloc.h\n   #ifndef STBTT_malloc\n   #include <stdlib.h>\n   #define STBTT_malloc(x,u)  ((void)(u),malloc(x))\n   #define STBTT_free(x,u)    ((void)(u),free(x))\n   #endif\n\n   #ifndef STBTT_assert\n   #include <assert.h>\n   #define STBTT_assert(x)    assert(x)\n   #endif\n\n   #ifndef STBTT_strlen\n   #include <string.h>\n   #define STBTT_strlen(x)    strlen(x)\n   #endif\n\n   #ifndef STBTT_memcpy\n   #include <string.h>\n   #define STBTT_memcpy       memcpy\n   #define STBTT_memset       memset\n   #endif\n#endif\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n////\n////   INTERFACE\n////\n////\n\n#ifndef __STB_INCLUDE_STB_TRUETYPE_H__\n#define __STB_INCLUDE_STB_TRUETYPE_H__\n\n#ifdef STBTT_STATIC\n#define STBTT_DEF static\n#else\n#define STBTT_DEF extern\n#endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n// private structure\ntypedef struct\n{\n   unsigned char *data;\n   int cursor;\n   int size;\n} stbtt__buf;\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// TEXTURE BAKING API\n//\n// If you use this API, you only have to call two functions ever.\n//\n\ntypedef struct\n{\n   unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap\n   float xoff,yoff,xadvance;\n} stbtt_bakedchar;\n\nSTBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,  // font location (use offset=0 for plain .ttf)\n                                float pixel_height,                     // height of font in pixels\n                                unsigned char *pixels, int pw, int ph,  // bitmap to be filled in\n                                int first_char, int num_chars,          // characters to bake\n                                stbtt_bakedchar *chardata);             // you allocate this, it's num_chars long\n// if return is positive, the first unused row of the bitmap\n// if return is negative, returns the negative of the number of characters that fit\n// if return is 0, no characters fit and no rows were used\n// This uses a very crappy packing.\n\ntypedef struct\n{\n   float x0,y0,s0,t0; // top-left\n   float x1,y1,s1,t1; // bottom-right\n} stbtt_aligned_quad;\n\nSTBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph,  // same data as above\n                               int char_index,             // character to display\n                               float *xpos, float *ypos,   // pointers to current position in screen pixel space\n                               stbtt_aligned_quad *q,      // output: quad to draw\n                               int opengl_fillrule);       // true if opengl fill rule; false if DX9 or earlier\n// Call GetBakedQuad with char_index = 'character - first_char', and it\n// creates the quad you need to draw and advances the current position.\n//\n// The coordinate system used assumes y increases downwards.\n//\n// Characters will extend both above and below the current position;\n// see discussion of \"BASELINE\" above.\n//\n// It's inefficient; you might want to c&p it and optimize it.\n\nSTBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap);\n// Query the font vertical metrics without having to create a font first.\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// NEW TEXTURE BAKING API\n//\n// This provides options for packing multiple fonts into one atlas, not\n// perfectly but better than nothing.\n\ntypedef struct\n{\n   unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap\n   float xoff,yoff,xadvance;\n   float xoff2,yoff2;\n} stbtt_packedchar;\n\ntypedef struct stbtt_pack_context stbtt_pack_context;\ntypedef struct stbtt_fontinfo stbtt_fontinfo;\n#ifndef STB_RECT_PACK_VERSION\ntypedef struct stbrp_rect stbrp_rect;\n#endif\n\nSTBTT_DEF int  stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int width, int height, int stride_in_bytes, int padding, void *alloc_context);\n// Initializes a packing context stored in the passed-in stbtt_pack_context.\n// Future calls using this context will pack characters into the bitmap passed\n// in here: a 1-channel bitmap that is width * height. stride_in_bytes is\n// the distance from one row to the next (or 0 to mean they are packed tightly\n// together). \"padding\" is the amount of padding to leave between each\n// character (normally you want '1' for bitmaps you'll use as textures with\n// bilinear filtering).\n//\n// Returns 0 on failure, 1 on success.\n\nSTBTT_DEF void stbtt_PackEnd  (stbtt_pack_context *spc);\n// Cleans up the packing context and frees all memory.\n\n#define STBTT_POINT_SIZE(x)   (-(x))\n\nSTBTT_DEF int  stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size,\n                                int first_unicode_char_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range);\n// Creates character bitmaps from the font_index'th font found in fontdata (use\n// font_index=0 if you don't know what that is). It creates num_chars_in_range\n// bitmaps for characters with unicode values starting at first_unicode_char_in_range\n// and increasing. Data for how to render them is stored in chardata_for_range;\n// pass these to stbtt_GetPackedQuad to get back renderable quads.\n//\n// font_size is the full height of the character from ascender to descender,\n// as computed by stbtt_ScaleForPixelHeight. To use a point size as computed\n// by stbtt_ScaleForMappingEmToPixels, wrap the point size in STBTT_POINT_SIZE()\n// and pass that result as 'font_size':\n//       ...,                  20 , ... // font max minus min y is 20 pixels tall\n//       ..., STBTT_POINT_SIZE(20), ... // 'M' is 20 pixels tall\n\ntypedef struct\n{\n   float font_size;\n   int first_unicode_codepoint_in_range;  // if non-zero, then the chars are continuous, and this is the first codepoint\n   int *array_of_unicode_codepoints;       // if non-zero, then this is an array of unicode codepoints\n   int num_chars;\n   stbtt_packedchar *chardata_for_range; // output\n   unsigned char h_oversample, v_oversample; // don't set these, they're used internally\n} stbtt_pack_range;\n\nSTBTT_DEF int  stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges);\n// Creates character bitmaps from multiple ranges of characters stored in\n// ranges. This will usually create a better-packed bitmap than multiple\n// calls to stbtt_PackFontRange. Note that you can call this multiple\n// times within a single PackBegin/PackEnd.\n\nSTBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample);\n// Oversampling a font increases the quality by allowing higher-quality subpixel\n// positioning, and is especially valuable at smaller text sizes.\n//\n// This function sets the amount of oversampling for all following calls to\n// stbtt_PackFontRange(s) or stbtt_PackFontRangesGatherRects for a given\n// pack context. The default (no oversampling) is achieved by h_oversample=1\n// and v_oversample=1. The total number of pixels required is\n// h_oversample*v_oversample larger than the default; for example, 2x2\n// oversampling requires 4x the storage of 1x1. For best results, render\n// oversampled textures with bilinear filtering. Look at the readme in\n// stb/tests/oversample for information about oversampled fonts\n//\n// To use with PackFontRangesGather etc., you must set it before calls\n// call to PackFontRangesGatherRects.\n\nSTBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip);\n// If skip != 0, this tells stb_truetype to skip any codepoints for which\n// there is no corresponding glyph. If skip=0, which is the default, then\n// codepoints without a glyph recived the font's \"missing character\" glyph,\n// typically an empty box by convention.\n\nSTBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph,  // same data as above\n                               int char_index,             // character to display\n                               float *xpos, float *ypos,   // pointers to current position in screen pixel space\n                               stbtt_aligned_quad *q,      // output: quad to draw\n                               int align_to_integer);\n\nSTBTT_DEF int  stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);\nSTBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects);\nSTBTT_DEF int  stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);\n// Calling these functions in sequence is roughly equivalent to calling\n// stbtt_PackFontRanges(). If you more control over the packing of multiple\n// fonts, or if you want to pack custom data into a font texture, take a look\n// at the source to of stbtt_PackFontRanges() and create a custom version\n// using these functions, e.g. call GatherRects multiple times,\n// building up a single array of rects, then call PackRects once,\n// then call RenderIntoRects repeatedly. This may result in a\n// better packing than calling PackFontRanges multiple times\n// (or it may not).\n\n// this is an opaque structure that you shouldn't mess with which holds\n// all the context needed from PackBegin to PackEnd.\nstruct stbtt_pack_context {\n   void *user_allocator_context;\n   void *pack_info;\n   int   width;\n   int   height;\n   int   stride_in_bytes;\n   int   padding;\n   int   skip_missing;\n   unsigned int   h_oversample, v_oversample;\n   unsigned char *pixels;\n   void  *nodes;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// FONT LOADING\n//\n//\n\nSTBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data);\n// This function will determine the number of fonts in a font file.  TrueType\n// collection (.ttc) files may contain multiple fonts, while TrueType font\n// (.ttf) files only contain one font. The number of fonts can be used for\n// indexing with the previous function where the index is between zero and one\n// less than the total fonts. If an error occurs, -1 is returned.\n\nSTBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index);\n// Each .ttf/.ttc file may have more than one font. Each font has a sequential\n// index number starting from 0. Call this function to get the font offset for\n// a given index; it returns -1 if the index is out of range. A regular .ttf\n// file will only define one font and it always be at offset 0, so it will\n// return '0' for index 0, and -1 for all other indices.\n\n// The following structure is defined publicly so you can declare one on\n// the stack or as a global or etc, but you should treat it as opaque.\nstruct stbtt_fontinfo\n{\n   void           * userdata;\n   unsigned char  * data;              // pointer to .ttf file\n   int              fontstart;         // offset of start of font\n\n   int numGlyphs;                     // number of glyphs, needed for range checking\n\n   int loca,head,glyf,hhea,hmtx,kern,gpos,svg; // table locations as offset from start of .ttf\n   int index_map;                     // a cmap mapping for our chosen character encoding\n   int indexToLocFormat;              // format needed to map from glyph index to glyph\n\n   stbtt__buf cff;                    // cff font data\n   stbtt__buf charstrings;            // the charstring index\n   stbtt__buf gsubrs;                 // global charstring subroutines index\n   stbtt__buf subrs;                  // private charstring subroutines index\n   stbtt__buf fontdicts;              // array of font dicts\n   stbtt__buf fdselect;               // map from glyph to fontdict\n};\n\nSTBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset);\n// Given an offset into the file that defines a font, this function builds\n// the necessary cached info for the rest of the system. You must allocate\n// the stbtt_fontinfo yourself, and stbtt_InitFont will fill it out. You don't\n// need to do anything special to free it, because the contents are pure\n// value data with no additional data structures. Returns 0 on failure.\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// CHARACTER TO GLYPH-INDEX CONVERSIOn\n\nSTBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint);\n// If you're going to perform multiple operations on the same character\n// and you want a speed-up, call this function with the character you're\n// going to process, then use glyph-based functions instead of the\n// codepoint-based functions.\n// Returns 0 if the character codepoint is not defined in the font.\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// CHARACTER PROPERTIES\n//\n\nSTBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float pixels);\n// computes a scale factor to produce a font whose \"height\" is 'pixels' tall.\n// Height is measured as the distance from the highest ascender to the lowest\n// descender; in other words, it's equivalent to calling stbtt_GetFontVMetrics\n// and computing:\n//       scale = pixels / (ascent - descent)\n// so if you prefer to measure height by the ascent only, use a similar calculation.\n\nSTBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels);\n// computes a scale factor to produce a font whose EM size is mapped to\n// 'pixels' tall. This is probably what traditional APIs compute, but\n// I'm not positive.\n\nSTBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap);\n// ascent is the coordinate above the baseline the font extends; descent\n// is the coordinate below the baseline the font extends (i.e. it is typically negative)\n// lineGap is the spacing between one row's descent and the next row's ascent...\n// so you should advance the vertical position by \"*ascent - *descent + *lineGap\"\n//   these are expressed in unscaled coordinates, so you must multiply by\n//   the scale factor for a given size\n\nSTBTT_DEF int  stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap);\n// analogous to GetFontVMetrics, but returns the \"typographic\" values from the OS/2\n// table (specific to MS/Windows TTF files).\n//\n// Returns 1 on success (table present), 0 on failure.\n\nSTBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1);\n// the bounding box around all possible characters\n\nSTBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing);\n// leftSideBearing is the offset from the current horizontal position to the left edge of the character\n// advanceWidth is the offset from the current horizontal position to the next horizontal position\n//   these are expressed in unscaled coordinates\n\nSTBTT_DEF int  stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2);\n// an additional amount to add to the 'advance' value between ch1 and ch2\n\nSTBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1);\n// Gets the bounding box of the visible part of the glyph, in unscaled coordinates\n\nSTBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing);\nSTBTT_DEF int  stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2);\nSTBTT_DEF int  stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1);\n// as above, but takes one or more glyph indices for greater efficiency\n\ntypedef struct stbtt_kerningentry\n{\n   int glyph1; // use stbtt_FindGlyphIndex\n   int glyph2;\n   int advance;\n} stbtt_kerningentry;\n\nSTBTT_DEF int  stbtt_GetKerningTableLength(const stbtt_fontinfo *info);\nSTBTT_DEF int  stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length);\n// Retrieves a complete list of all of the kerning pairs provided by the font\n// stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write.\n// The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1)\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// GLYPH SHAPES (you probably don't need these, but they have to go before\n// the bitmaps for C declaration-order reasons)\n//\n\n#ifndef STBTT_vmove // you can predefine these to use different values (but why?)\n   enum {\n      STBTT_vmove=1,\n      STBTT_vline,\n      STBTT_vcurve,\n      STBTT_vcubic\n   };\n#endif\n\n#ifndef stbtt_vertex // you can predefine this to use different values\n                   // (we share this with other code at RAD)\n   #define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file\n   typedef struct\n   {\n      stbtt_vertex_type x,y,cx,cy,cx1,cy1;\n      unsigned char type,padding;\n   } stbtt_vertex;\n#endif\n\nSTBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index);\n// returns non-zero if nothing is drawn for this glyph\n\nSTBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices);\nSTBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **vertices);\n// returns # of vertices and fills *vertices with the pointer to them\n//   these are expressed in \"unscaled\" coordinates\n//\n// The shape is a series of contours. Each one starts with\n// a STBTT_moveto, then consists of a series of mixed\n// STBTT_lineto and STBTT_curveto segments. A lineto\n// draws a line from previous endpoint to its x,y; a curveto\n// draws a quadratic bezier from previous endpoint to\n// its x,y, using cx,cy as the bezier control point.\n\nSTBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices);\n// frees the data allocated above\n\nSTBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg);\nSTBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg);\n// fills svg with the character's SVG data.\n// returns data size or 0 if SVG not found.\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// BITMAP RENDERING\n//\n\nSTBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata);\n// frees the bitmap allocated below\n\nSTBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff);\n// allocates a large-enough single-channel 8bpp bitmap and renders the\n// specified character/glyph at the specified scale into it, with\n// antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque).\n// *width & *height are filled out with the width & height of the bitmap,\n// which is stored left-to-right, top-to-bottom.\n//\n// xoff/yoff are the offset it pixel space from the glyph origin to the top-left of the bitmap\n\nSTBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff);\n// the same as stbtt_GetCodepoitnBitmap, but you can specify a subpixel\n// shift for the character\n\nSTBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint);\n// the same as stbtt_GetCodepointBitmap, but you pass in storage for the bitmap\n// in the form of 'output', with row spacing of 'out_stride' bytes. the bitmap\n// is clipped to out_w/out_h bytes. Call stbtt_GetCodepointBitmapBox to get the\n// width and height and positioning info for it first.\n\nSTBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint);\n// same as stbtt_MakeCodepointBitmap, but you can specify a subpixel\n// shift for the character\n\nSTBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint);\n// same as stbtt_MakeCodepointBitmapSubpixel, but prefiltering\n// is performed (see stbtt_PackSetOversampling)\n\nSTBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1);\n// get the bbox of the bitmap centered around the glyph origin; so the\n// bitmap width is ix1-ix0, height is iy1-iy0, and location to place\n// the bitmap top left is (leftSideBearing*scale,iy0).\n// (Note that the bitmap uses y-increases-down, but the shape uses\n// y-increases-up, so CodepointBitmapBox and CodepointBox are inverted.)\n\nSTBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1);\n// same as stbtt_GetCodepointBitmapBox, but you can specify a subpixel\n// shift for the character\n\n// the following functions are equivalent to the above functions, but operate\n// on glyph indices instead of Unicode codepoints (for efficiency)\nSTBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff);\nSTBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff);\nSTBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph);\nSTBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph);\nSTBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int glyph);\nSTBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1);\nSTBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1);\n\n\n// @TODO: don't expose this structure\ntypedef struct\n{\n   int w,h,stride;\n   unsigned char *pixels;\n} stbtt__bitmap;\n\n// rasterize a shape with quadratic beziers into a bitmap\nSTBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result,        // 1-channel bitmap to draw into\n                               float flatness_in_pixels,     // allowable error of curve in pixels\n                               stbtt_vertex *vertices,       // array of vertices defining shape\n                               int num_verts,                // number of vertices in above array\n                               float scale_x, float scale_y, // scale applied to input vertices\n                               float shift_x, float shift_y, // translation applied to input vertices\n                               int x_off, int y_off,         // another translation applied to input\n                               int invert,                   // if non-zero, vertically flip shape\n                               void *userdata);              // context for to STBTT_MALLOC\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// Signed Distance Function (or Field) rendering\n\nSTBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata);\n// frees the SDF bitmap allocated below\n\nSTBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff);\nSTBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff);\n// These functions compute a discretized SDF field for a single character, suitable for storing\n// in a single-channel texture, sampling with bilinear filtering, and testing against\n// larger than some threshold to produce scalable fonts.\n//        info              --  the font\n//        scale             --  controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap\n//        glyph/codepoint   --  the character to generate the SDF for\n//        padding           --  extra \"pixels\" around the character which are filled with the distance to the character (not 0),\n//                                 which allows effects like bit outlines\n//        onedge_value      --  value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character)\n//        pixel_dist_scale  --  what value the SDF should increase by when moving one SDF \"pixel\" away from the edge (on the 0..255 scale)\n//                                 if positive, > onedge_value is inside; if negative, < onedge_value is inside\n//        width,height      --  output height & width of the SDF bitmap (including padding)\n//        xoff,yoff         --  output origin of the character\n//        return value      --  a 2D array of bytes 0..255, width*height in size\n//\n// pixel_dist_scale & onedge_value are a scale & bias that allows you to make\n// optimal use of the limited 0..255 for your application, trading off precision\n// and special effects. SDF values outside the range 0..255 are clamped to 0..255.\n//\n// Example:\n//      scale = stbtt_ScaleForPixelHeight(22)\n//      padding = 5\n//      onedge_value = 180\n//      pixel_dist_scale = 180/5.0 = 36.0\n//\n//      This will create an SDF bitmap in which the character is about 22 pixels\n//      high but the whole bitmap is about 22+5+5=32 pixels high. To produce a filled\n//      shape, sample the SDF at each pixel and fill the pixel if the SDF value\n//      is greater than or equal to 180/255. (You'll actually want to antialias,\n//      which is beyond the scope of this example.) Additionally, you can compute\n//      offset outlines (e.g. to stroke the character border inside & outside,\n//      or only outside). For example, to fill outside the character up to 3 SDF\n//      pixels, you would compare against (180-36.0*3)/255 = 72/255. The above\n//      choice of variables maps a range from 5 pixels outside the shape to\n//      2 pixels inside the shape to 0..255; this is intended primarily for apply\n//      outside effects only (the interior range is needed to allow proper\n//      antialiasing of the font at *smaller* sizes)\n//\n// The function computes the SDF analytically at each SDF pixel, not by e.g.\n// building a higher-res bitmap and approximating it. In theory the quality\n// should be as high as possible for an SDF of this size & representation, but\n// unclear if this is true in practice (perhaps building a higher-res bitmap\n// and computing from that can allow drop-out prevention).\n//\n// The algorithm has not been optimized at all, so expect it to be slow\n// if computing lots of characters or very large sizes.\n\n\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// Finding the right font...\n//\n// You should really just solve this offline, keep your own tables\n// of what font is what, and don't try to get it out of the .ttf file.\n// That's because getting it out of the .ttf file is really hard, because\n// the names in the file can appear in many possible encodings, in many\n// possible languages, and e.g. if you need a case-insensitive comparison,\n// the details of that depend on the encoding & language in a complex way\n// (actually underspecified in truetype, but also gigantic).\n//\n// But you can use the provided functions in two possible ways:\n//     stbtt_FindMatchingFont() will use *case-sensitive* comparisons on\n//             unicode-encoded names to try to find the font you want;\n//             you can run this before calling stbtt_InitFont()\n//\n//     stbtt_GetFontNameString() lets you get any of the various strings\n//             from the file yourself and do your own comparisons on them.\n//             You have to have called stbtt_InitFont() first.\n\n\nSTBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags);\n// returns the offset (not index) of the font that matches, or -1 if none\n//   if you use STBTT_MACSTYLE_DONTCARE, use a font name like \"Arial Bold\".\n//   if you use any other flag, use a font name like \"Arial\"; this checks\n//     the 'macStyle' header field; i don't know if fonts set this consistently\n#define STBTT_MACSTYLE_DONTCARE     0\n#define STBTT_MACSTYLE_BOLD         1\n#define STBTT_MACSTYLE_ITALIC       2\n#define STBTT_MACSTYLE_UNDERSCORE   4\n#define STBTT_MACSTYLE_NONE         8   // <= not same as 0, this makes us check the bitfield is 0\n\nSTBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2);\n// returns 1/0 whether the first string interpreted as utf8 is identical to\n// the second string interpreted as big-endian utf16... useful for strings from next func\n\nSTBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID);\n// returns the string (which may be big-endian double byte, e.g. for unicode)\n// and puts the length in bytes in *length.\n//\n// some of the values for the IDs are below; for more see the truetype spec:\n//     http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6name.html\n//     http://www.microsoft.com/typography/otspec/name.htm\n\nenum { // platformID\n   STBTT_PLATFORM_ID_UNICODE   =0,\n   STBTT_PLATFORM_ID_MAC       =1,\n   STBTT_PLATFORM_ID_ISO       =2,\n   STBTT_PLATFORM_ID_MICROSOFT =3\n};\n\nenum { // encodingID for STBTT_PLATFORM_ID_UNICODE\n   STBTT_UNICODE_EID_UNICODE_1_0    =0,\n   STBTT_UNICODE_EID_UNICODE_1_1    =1,\n   STBTT_UNICODE_EID_ISO_10646      =2,\n   STBTT_UNICODE_EID_UNICODE_2_0_BMP=3,\n   STBTT_UNICODE_EID_UNICODE_2_0_FULL=4\n};\n\nenum { // encodingID for STBTT_PLATFORM_ID_MICROSOFT\n   STBTT_MS_EID_SYMBOL        =0,\n   STBTT_MS_EID_UNICODE_BMP   =1,\n   STBTT_MS_EID_SHIFTJIS      =2,\n   STBTT_MS_EID_UNICODE_FULL  =10\n};\n\nenum { // encodingID for STBTT_PLATFORM_ID_MAC; same as Script Manager codes\n   STBTT_MAC_EID_ROMAN        =0,   STBTT_MAC_EID_ARABIC       =4,\n   STBTT_MAC_EID_JAPANESE     =1,   STBTT_MAC_EID_HEBREW       =5,\n   STBTT_MAC_EID_CHINESE_TRAD =2,   STBTT_MAC_EID_GREEK        =6,\n   STBTT_MAC_EID_KOREAN       =3,   STBTT_MAC_EID_RUSSIAN      =7\n};\n\nenum { // languageID for STBTT_PLATFORM_ID_MICROSOFT; same as LCID...\n       // problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs\n   STBTT_MS_LANG_ENGLISH     =0x0409,   STBTT_MS_LANG_ITALIAN     =0x0410,\n   STBTT_MS_LANG_CHINESE     =0x0804,   STBTT_MS_LANG_JAPANESE    =0x0411,\n   STBTT_MS_LANG_DUTCH       =0x0413,   STBTT_MS_LANG_KOREAN      =0x0412,\n   STBTT_MS_LANG_FRENCH      =0x040c,   STBTT_MS_LANG_RUSSIAN     =0x0419,\n   STBTT_MS_LANG_GERMAN      =0x0407,   STBTT_MS_LANG_SPANISH     =0x0409,\n   STBTT_MS_LANG_HEBREW      =0x040d,   STBTT_MS_LANG_SWEDISH     =0x041D\n};\n\nenum { // languageID for STBTT_PLATFORM_ID_MAC\n   STBTT_MAC_LANG_ENGLISH      =0 ,   STBTT_MAC_LANG_JAPANESE     =11,\n   STBTT_MAC_LANG_ARABIC       =12,   STBTT_MAC_LANG_KOREAN       =23,\n   STBTT_MAC_LANG_DUTCH        =4 ,   STBTT_MAC_LANG_RUSSIAN      =32,\n   STBTT_MAC_LANG_FRENCH       =1 ,   STBTT_MAC_LANG_SPANISH      =6 ,\n   STBTT_MAC_LANG_GERMAN       =2 ,   STBTT_MAC_LANG_SWEDISH      =5 ,\n   STBTT_MAC_LANG_HEBREW       =10,   STBTT_MAC_LANG_CHINESE_SIMPLIFIED =33,\n   STBTT_MAC_LANG_ITALIAN      =3 ,   STBTT_MAC_LANG_CHINESE_TRAD =19\n};\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif // __STB_INCLUDE_STB_TRUETYPE_H__\n\n///////////////////////////////////////////////////////////////////////////////\n///////////////////////////////////////////////////////////////////////////////\n////\n////   IMPLEMENTATION\n////\n////\n\n#ifdef STB_TRUETYPE_IMPLEMENTATION\n\n#ifndef STBTT_MAX_OVERSAMPLE\n#define STBTT_MAX_OVERSAMPLE   8\n#endif\n\n#if STBTT_MAX_OVERSAMPLE > 255\n#error \"STBTT_MAX_OVERSAMPLE cannot be > 255\"\n#endif\n\ntypedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERSAMPLE-1)) == 0 ? 1 : -1];\n\n#ifndef STBTT_RASTERIZER_VERSION\n#define STBTT_RASTERIZER_VERSION 2\n#endif\n\n#ifdef _MSC_VER\n#define STBTT__NOTUSED(v)  (void)(v)\n#else\n#define STBTT__NOTUSED(v)  (void)sizeof(v)\n#endif\n\n//////////////////////////////////////////////////////////////////////////\n//\n// stbtt__buf helpers to parse data from file\n//\n\nstatic stbtt_uint8 stbtt__buf_get8(stbtt__buf *b)\n{\n   if (b->cursor >= b->size)\n      return 0;\n   return b->data[b->cursor++];\n}\n\nstatic stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b)\n{\n   if (b->cursor >= b->size)\n      return 0;\n   return b->data[b->cursor];\n}\n\nstatic void stbtt__buf_seek(stbtt__buf *b, int o)\n{\n   STBTT_assert(!(o > b->size || o < 0));\n   b->cursor = (o > b->size || o < 0) ? b->size : o;\n}\n\nstatic void stbtt__buf_skip(stbtt__buf *b, int o)\n{\n   stbtt__buf_seek(b, b->cursor + o);\n}\n\nstatic stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n)\n{\n   stbtt_uint32 v = 0;\n   int i;\n   STBTT_assert(n >= 1 && n <= 4);\n   for (i = 0; i < n; i++)\n      v = (v << 8) | stbtt__buf_get8(b);\n   return v;\n}\n\nstatic stbtt__buf stbtt__new_buf(const void *p, size_t size)\n{\n   stbtt__buf r;\n   STBTT_assert(size < 0x40000000);\n   r.data = (stbtt_uint8*) p;\n   r.size = (int) size;\n   r.cursor = 0;\n   return r;\n}\n\n#define stbtt__buf_get16(b)  stbtt__buf_get((b), 2)\n#define stbtt__buf_get32(b)  stbtt__buf_get((b), 4)\n\nstatic stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s)\n{\n   stbtt__buf r = stbtt__new_buf(NULL, 0);\n   if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r;\n   r.data = b->data + o;\n   r.size = s;\n   return r;\n}\n\nstatic stbtt__buf stbtt__cff_get_index(stbtt__buf *b)\n{\n   int count, start, offsize;\n   start = b->cursor;\n   count = stbtt__buf_get16(b);\n   if (count) {\n      offsize = stbtt__buf_get8(b);\n      STBTT_assert(offsize >= 1 && offsize <= 4);\n      stbtt__buf_skip(b, offsize * count);\n      stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1);\n   }\n   return stbtt__buf_range(b, start, b->cursor - start);\n}\n\nstatic stbtt_uint32 stbtt__cff_int(stbtt__buf *b)\n{\n   int b0 = stbtt__buf_get8(b);\n   if (b0 >= 32 && b0 <= 246)       return b0 - 139;\n   else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108;\n   else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108;\n   else if (b0 == 28)               return stbtt__buf_get16(b);\n   else if (b0 == 29)               return stbtt__buf_get32(b);\n   STBTT_assert(0);\n   return 0;\n}\n\nstatic void stbtt__cff_skip_operand(stbtt__buf *b) {\n   int v, b0 = stbtt__buf_peek8(b);\n   STBTT_assert(b0 >= 28);\n   if (b0 == 30) {\n      stbtt__buf_skip(b, 1);\n      while (b->cursor < b->size) {\n         v = stbtt__buf_get8(b);\n         if ((v & 0xF) == 0xF || (v >> 4) == 0xF)\n            break;\n      }\n   } else {\n      stbtt__cff_int(b);\n   }\n}\n\nstatic stbtt__buf stbtt__dict_get(stbtt__buf *b, int key)\n{\n   stbtt__buf_seek(b, 0);\n   while (b->cursor < b->size) {\n      int start = b->cursor, end, op;\n      while (stbtt__buf_peek8(b) >= 28)\n         stbtt__cff_skip_operand(b);\n      end = b->cursor;\n      op = stbtt__buf_get8(b);\n      if (op == 12)  op = stbtt__buf_get8(b) | 0x100;\n      if (op == key) return stbtt__buf_range(b, start, end-start);\n   }\n   return stbtt__buf_range(b, 0, 0);\n}\n\nstatic void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out)\n{\n   int i;\n   stbtt__buf operands = stbtt__dict_get(b, key);\n   for (i = 0; i < outcount && operands.cursor < operands.size; i++)\n      out[i] = stbtt__cff_int(&operands);\n}\n\nstatic int stbtt__cff_index_count(stbtt__buf *b)\n{\n   stbtt__buf_seek(b, 0);\n   return stbtt__buf_get16(b);\n}\n\nstatic stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i)\n{\n   int count, offsize, start, end;\n   stbtt__buf_seek(&b, 0);\n   count = stbtt__buf_get16(&b);\n   offsize = stbtt__buf_get8(&b);\n   STBTT_assert(i >= 0 && i < count);\n   STBTT_assert(offsize >= 1 && offsize <= 4);\n   stbtt__buf_skip(&b, i*offsize);\n   start = stbtt__buf_get(&b, offsize);\n   end = stbtt__buf_get(&b, offsize);\n   return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start);\n}\n\n//////////////////////////////////////////////////////////////////////////\n//\n// accessors to parse data from file\n//\n\n// on platforms that don't allow misaligned reads, if we want to allow\n// truetype fonts that aren't padded to alignment, define ALLOW_UNALIGNED_TRUETYPE\n\n#define ttBYTE(p)     (* (stbtt_uint8 *) (p))\n#define ttCHAR(p)     (* (stbtt_int8 *) (p))\n#define ttFixed(p)    ttLONG(p)\n\nstatic stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; }\nstatic stbtt_int16 ttSHORT(stbtt_uint8 *p)   { return p[0]*256 + p[1]; }\nstatic stbtt_uint32 ttULONG(stbtt_uint8 *p)  { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }\nstatic stbtt_int32 ttLONG(stbtt_uint8 *p)    { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }\n\n#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3))\n#define stbtt_tag(p,str)           stbtt_tag4(p,str[0],str[1],str[2],str[3])\n\nstatic int stbtt__isfont(stbtt_uint8 *font)\n{\n   // check the version number\n   if (stbtt_tag4(font, '1',0,0,0))  return 1; // TrueType 1\n   if (stbtt_tag(font, \"typ1\"))   return 1; // TrueType with type 1 font -- we don't support this!\n   if (stbtt_tag(font, \"OTTO\"))   return 1; // OpenType with CFF\n   if (stbtt_tag4(font, 0,1,0,0)) return 1; // OpenType 1.0\n   if (stbtt_tag(font, \"true\"))   return 1; // Apple specification for TrueType fonts\n   return 0;\n}\n\n// @OPTIMIZE: binary search\nstatic stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag)\n{\n   stbtt_int32 num_tables = ttUSHORT(data+fontstart+4);\n   stbtt_uint32 tabledir = fontstart + 12;\n   stbtt_int32 i;\n   for (i=0; i < num_tables; ++i) {\n      stbtt_uint32 loc = tabledir + 16*i;\n      if (stbtt_tag(data+loc+0, tag))\n         return ttULONG(data+loc+8);\n   }\n   return 0;\n}\n\nstatic int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index)\n{\n   // if it's just a font, there's only one valid index\n   if (stbtt__isfont(font_collection))\n      return index == 0 ? 0 : -1;\n\n   // check if it's a TTC\n   if (stbtt_tag(font_collection, \"ttcf\")) {\n      // version 1?\n      if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) {\n         stbtt_int32 n = ttLONG(font_collection+8);\n         if (index >= n)\n            return -1;\n         return ttULONG(font_collection+12+index*4);\n      }\n   }\n   return -1;\n}\n\nstatic int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection)\n{\n   // if it's just a font, there's only one valid font\n   if (stbtt__isfont(font_collection))\n      return 1;\n\n   // check if it's a TTC\n   if (stbtt_tag(font_collection, \"ttcf\")) {\n      // version 1?\n      if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) {\n         return ttLONG(font_collection+8);\n      }\n   }\n   return 0;\n}\n\nstatic stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict)\n{\n   stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 };\n   stbtt__buf pdict;\n   stbtt__dict_get_ints(&fontdict, 18, 2, private_loc);\n   if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0);\n   pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]);\n   stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff);\n   if (!subrsoff) return stbtt__new_buf(NULL, 0);\n   stbtt__buf_seek(&cff, private_loc[1]+subrsoff);\n   return stbtt__cff_get_index(&cff);\n}\n\n// since most people won't use this, find this table the first time it's needed\nstatic int stbtt__get_svg(stbtt_fontinfo *info)\n{\n   stbtt_uint32 t;\n   if (info->svg < 0) {\n      t = stbtt__find_table(info->data, info->fontstart, \"SVG \");\n      if (t) {\n         stbtt_uint32 offset = ttULONG(info->data + t + 2);\n         info->svg = t + offset;\n      } else {\n         info->svg = 0;\n      }\n   }\n   return info->svg;\n}\n\nstatic int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart)\n{\n   stbtt_uint32 cmap, t;\n   stbtt_int32 i,numTables;\n\n   info->data = data;\n   info->fontstart = fontstart;\n   info->cff = stbtt__new_buf(NULL, 0);\n\n   cmap = stbtt__find_table(data, fontstart, \"cmap\");       // required\n   info->loca = stbtt__find_table(data, fontstart, \"loca\"); // required\n   info->head = stbtt__find_table(data, fontstart, \"head\"); // required\n   info->glyf = stbtt__find_table(data, fontstart, \"glyf\"); // required\n   info->hhea = stbtt__find_table(data, fontstart, \"hhea\"); // required\n   info->hmtx = stbtt__find_table(data, fontstart, \"hmtx\"); // required\n   info->kern = stbtt__find_table(data, fontstart, \"kern\"); // not required\n   info->gpos = stbtt__find_table(data, fontstart, \"GPOS\"); // not required\n\n   if (!cmap || !info->head || !info->hhea || !info->hmtx)\n      return 0;\n   if (info->glyf) {\n      // required for truetype\n      if (!info->loca) return 0;\n   } else {\n      // initialization for CFF / Type2 fonts (OTF)\n      stbtt__buf b, topdict, topdictidx;\n      stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0;\n      stbtt_uint32 cff;\n\n      cff = stbtt__find_table(data, fontstart, \"CFF \");\n      if (!cff) return 0;\n\n      info->fontdicts = stbtt__new_buf(NULL, 0);\n      info->fdselect = stbtt__new_buf(NULL, 0);\n\n      // @TODO this should use size from table (not 512MB)\n      info->cff = stbtt__new_buf(data+cff, 512*1024*1024);\n      b = info->cff;\n\n      // read the header\n      stbtt__buf_skip(&b, 2);\n      stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize\n\n      // @TODO the name INDEX could list multiple fonts,\n      // but we just use the first one.\n      stbtt__cff_get_index(&b);  // name INDEX\n      topdictidx = stbtt__cff_get_index(&b);\n      topdict = stbtt__cff_index_get(topdictidx, 0);\n      stbtt__cff_get_index(&b);  // string INDEX\n      info->gsubrs = stbtt__cff_get_index(&b);\n\n      stbtt__dict_get_ints(&topdict, 17, 1, &charstrings);\n      stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype);\n      stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff);\n      stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff);\n      info->subrs = stbtt__get_subrs(b, topdict);\n\n      // we only support Type 2 charstrings\n      if (cstype != 2) return 0;\n      if (charstrings == 0) return 0;\n\n      if (fdarrayoff) {\n         // looks like a CID font\n         if (!fdselectoff) return 0;\n         stbtt__buf_seek(&b, fdarrayoff);\n         info->fontdicts = stbtt__cff_get_index(&b);\n         info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff);\n      }\n\n      stbtt__buf_seek(&b, charstrings);\n      info->charstrings = stbtt__cff_get_index(&b);\n   }\n\n   t = stbtt__find_table(data, fontstart, \"maxp\");\n   if (t)\n      info->numGlyphs = ttUSHORT(data+t+4);\n   else\n      info->numGlyphs = 0xffff;\n\n   info->svg = -1;\n\n   // find a cmap encoding table we understand *now* to avoid searching\n   // later. (todo: could make this installable)\n   // the same regardless of glyph.\n   numTables = ttUSHORT(data + cmap + 2);\n   info->index_map = 0;\n   for (i=0; i < numTables; ++i) {\n      stbtt_uint32 encoding_record = cmap + 4 + 8 * i;\n      // find an encoding we understand:\n      switch(ttUSHORT(data+encoding_record)) {\n         case STBTT_PLATFORM_ID_MICROSOFT:\n            switch (ttUSHORT(data+encoding_record+2)) {\n               case STBTT_MS_EID_UNICODE_BMP:\n               case STBTT_MS_EID_UNICODE_FULL:\n                  // MS/Unicode\n                  info->index_map = cmap + ttULONG(data+encoding_record+4);\n                  break;\n            }\n            break;\n        case STBTT_PLATFORM_ID_UNICODE:\n            // Mac/iOS has these\n            // all the encodingIDs are unicode, so we don't bother to check it\n            info->index_map = cmap + ttULONG(data+encoding_record+4);\n            break;\n      }\n   }\n   if (info->index_map == 0)\n      return 0;\n\n   info->indexToLocFormat = ttUSHORT(data+info->head + 50);\n   return 1;\n}\n\nSTBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)\n{\n   stbtt_uint8 *data = info->data;\n   stbtt_uint32 index_map = info->index_map;\n\n   stbtt_uint16 format = ttUSHORT(data + index_map + 0);\n   if (format == 0) { // apple byte encoding\n      stbtt_int32 bytes = ttUSHORT(data + index_map + 2);\n      if (unicode_codepoint < bytes-6)\n         return ttBYTE(data + index_map + 6 + unicode_codepoint);\n      return 0;\n   } else if (format == 6) {\n      stbtt_uint32 first = ttUSHORT(data + index_map + 6);\n      stbtt_uint32 count = ttUSHORT(data + index_map + 8);\n      if ((stbtt_uint32) unicode_codepoint >= first && (stbtt_uint32) unicode_codepoint < first+count)\n         return ttUSHORT(data + index_map + 10 + (unicode_codepoint - first)*2);\n      return 0;\n   } else if (format == 2) {\n      STBTT_assert(0); // @TODO: high-byte mapping for japanese/chinese/korean\n      return 0;\n   } else if (format == 4) { // standard mapping for windows fonts: binary search collection of ranges\n      stbtt_uint16 segcount = ttUSHORT(data+index_map+6) >> 1;\n      stbtt_uint16 searchRange = ttUSHORT(data+index_map+8) >> 1;\n      stbtt_uint16 entrySelector = ttUSHORT(data+index_map+10);\n      stbtt_uint16 rangeShift = ttUSHORT(data+index_map+12) >> 1;\n\n      // do a binary search of the segments\n      stbtt_uint32 endCount = index_map + 14;\n      stbtt_uint32 search = endCount;\n\n      if (unicode_codepoint > 0xffff)\n         return 0;\n\n      // they lie from endCount .. endCount + segCount\n      // but searchRange is the nearest power of two, so...\n      if (unicode_codepoint >= ttUSHORT(data + search + rangeShift*2))\n         search += rangeShift*2;\n\n      // now decrement to bias correctly to find smallest\n      search -= 2;\n      while (entrySelector) {\n         stbtt_uint16 end;\n         searchRange >>= 1;\n         end = ttUSHORT(data + search + searchRange*2);\n         if (unicode_codepoint > end)\n            search += searchRange*2;\n         --entrySelector;\n      }\n      search += 2;\n\n      {\n         stbtt_uint16 offset, start;\n         stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1);\n\n         STBTT_assert(unicode_codepoint <= ttUSHORT(data + endCount + 2*item));\n         start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item);\n         if (unicode_codepoint < start)\n            return 0;\n\n         offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item);\n         if (offset == 0)\n            return (stbtt_uint16) (unicode_codepoint + ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item));\n\n         return ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item);\n      }\n   } else if (format == 12 || format == 13) {\n      stbtt_uint32 ngroups = ttULONG(data+index_map+12);\n      stbtt_int32 low,high;\n      low = 0; high = (stbtt_int32)ngroups;\n      // Binary search the right group.\n      while (low < high) {\n         stbtt_int32 mid = low + ((high-low) >> 1); // rounds down, so low <= mid < high\n         stbtt_uint32 start_char = ttULONG(data+index_map+16+mid*12);\n         stbtt_uint32 end_char = ttULONG(data+index_map+16+mid*12+4);\n         if ((stbtt_uint32) unicode_codepoint < start_char)\n            high = mid;\n         else if ((stbtt_uint32) unicode_codepoint > end_char)\n            low = mid+1;\n         else {\n            stbtt_uint32 start_glyph = ttULONG(data+index_map+16+mid*12+8);\n            if (format == 12)\n               return start_glyph + unicode_codepoint-start_char;\n            else // format == 13\n               return start_glyph;\n         }\n      }\n      return 0; // not found\n   }\n   // @TODO\n   STBTT_assert(0);\n   return 0;\n}\n\nSTBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices)\n{\n   return stbtt_GetGlyphShape(info, stbtt_FindGlyphIndex(info, unicode_codepoint), vertices);\n}\n\nstatic void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy)\n{\n   v->type = type;\n   v->x = (stbtt_int16) x;\n   v->y = (stbtt_int16) y;\n   v->cx = (stbtt_int16) cx;\n   v->cy = (stbtt_int16) cy;\n}\n\nstatic int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index)\n{\n   int g1,g2;\n\n   STBTT_assert(!info->cff.size);\n\n   if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range\n   if (info->indexToLocFormat >= 2)    return -1; // unknown index->glyph map format\n\n   if (info->indexToLocFormat == 0) {\n      g1 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2) * 2;\n      g2 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2;\n   } else {\n      g1 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4);\n      g2 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4 + 4);\n   }\n\n   return g1==g2 ? -1 : g1; // if length is 0, return -1\n}\n\nstatic int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1);\n\nSTBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)\n{\n   if (info->cff.size) {\n      stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1);\n   } else {\n      int g = stbtt__GetGlyfOffset(info, glyph_index);\n      if (g < 0) return 0;\n\n      if (x0) *x0 = ttSHORT(info->data + g + 2);\n      if (y0) *y0 = ttSHORT(info->data + g + 4);\n      if (x1) *x1 = ttSHORT(info->data + g + 6);\n      if (y1) *y1 = ttSHORT(info->data + g + 8);\n   }\n   return 1;\n}\n\nSTBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1)\n{\n   return stbtt_GetGlyphBox(info, stbtt_FindGlyphIndex(info,codepoint), x0,y0,x1,y1);\n}\n\nSTBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index)\n{\n   stbtt_int16 numberOfContours;\n   int g;\n   if (info->cff.size)\n      return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0;\n   g = stbtt__GetGlyfOffset(info, glyph_index);\n   if (g < 0) return 1;\n   numberOfContours = ttSHORT(info->data + g);\n   return numberOfContours == 0;\n}\n\nstatic int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_off, int start_off,\n    stbtt_int32 sx, stbtt_int32 sy, stbtt_int32 scx, stbtt_int32 scy, stbtt_int32 cx, stbtt_int32 cy)\n{\n   if (start_off) {\n      if (was_off)\n         stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy);\n      stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx,sy,scx,scy);\n   } else {\n      if (was_off)\n         stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve,sx,sy,cx,cy);\n      else\n         stbtt_setvertex(&vertices[num_vertices++], STBTT_vline,sx,sy,0,0);\n   }\n   return num_vertices;\n}\n\nstatic int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)\n{\n   stbtt_int16 numberOfContours;\n   stbtt_uint8 *endPtsOfContours;\n   stbtt_uint8 *data = info->data;\n   stbtt_vertex *vertices=0;\n   int num_vertices=0;\n   int g = stbtt__GetGlyfOffset(info, glyph_index);\n\n   *pvertices = NULL;\n\n   if (g < 0) return 0;\n\n   numberOfContours = ttSHORT(data + g);\n\n   if (numberOfContours > 0) {\n      stbtt_uint8 flags=0,flagcount;\n      stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0;\n      stbtt_int32 x,y,cx,cy,sx,sy, scx,scy;\n      stbtt_uint8 *points;\n      endPtsOfContours = (data + g + 10);\n      ins = ttUSHORT(data + g + 10 + numberOfContours * 2);\n      points = data + g + 10 + numberOfContours * 2 + 2 + ins;\n\n      n = 1+ttUSHORT(endPtsOfContours + numberOfContours*2-2);\n\n      m = n + 2*numberOfContours;  // a loose bound on how many vertices we might need\n      vertices = (stbtt_vertex *) STBTT_malloc(m * sizeof(vertices[0]), info->userdata);\n      if (vertices == 0)\n         return 0;\n\n      next_move = 0;\n      flagcount=0;\n\n      // in first pass, we load uninterpreted data into the allocated array\n      // above, shifted to the end of the array so we won't overwrite it when\n      // we create our final data starting from the front\n\n      off = m - n; // starting offset for uninterpreted data, regardless of how m ends up being calculated\n\n      // first load flags\n\n      for (i=0; i < n; ++i) {\n         if (flagcount == 0) {\n            flags = *points++;\n            if (flags & 8)\n               flagcount = *points++;\n         } else\n            --flagcount;\n         vertices[off+i].type = flags;\n      }\n\n      // now load x coordinates\n      x=0;\n      for (i=0; i < n; ++i) {\n         flags = vertices[off+i].type;\n         if (flags & 2) {\n            stbtt_int16 dx = *points++;\n            x += (flags & 16) ? dx : -dx; // ???\n         } else {\n            if (!(flags & 16)) {\n               x = x + (stbtt_int16) (points[0]*256 + points[1]);\n               points += 2;\n            }\n         }\n         vertices[off+i].x = (stbtt_int16) x;\n      }\n\n      // now load y coordinates\n      y=0;\n      for (i=0; i < n; ++i) {\n         flags = vertices[off+i].type;\n         if (flags & 4) {\n            stbtt_int16 dy = *points++;\n            y += (flags & 32) ? dy : -dy; // ???\n         } else {\n            if (!(flags & 32)) {\n               y = y + (stbtt_int16) (points[0]*256 + points[1]);\n               points += 2;\n            }\n         }\n         vertices[off+i].y = (stbtt_int16) y;\n      }\n\n      // now convert them to our format\n      num_vertices=0;\n      sx = sy = cx = cy = scx = scy = 0;\n      for (i=0; i < n; ++i) {\n         flags = vertices[off+i].type;\n         x     = (stbtt_int16) vertices[off+i].x;\n         y     = (stbtt_int16) vertices[off+i].y;\n\n         if (next_move == i) {\n            if (i != 0)\n               num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);\n\n            // now start the new one\n            start_off = !(flags & 1);\n            if (start_off) {\n               // if we start off with an off-curve point, then when we need to find a point on the curve\n               // where we can start, and we need to save some state for when we wraparound.\n               scx = x;\n               scy = y;\n               if (!(vertices[off+i+1].type & 1)) {\n                  // next point is also a curve point, so interpolate an on-point curve\n                  sx = (x + (stbtt_int32) vertices[off+i+1].x) >> 1;\n                  sy = (y + (stbtt_int32) vertices[off+i+1].y) >> 1;\n               } else {\n                  // otherwise just use the next point as our start point\n                  sx = (stbtt_int32) vertices[off+i+1].x;\n                  sy = (stbtt_int32) vertices[off+i+1].y;\n                  ++i; // we're using point i+1 as the starting point, so skip it\n               }\n            } else {\n               sx = x;\n               sy = y;\n            }\n            stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove,sx,sy,0,0);\n            was_off = 0;\n            next_move = 1 + ttUSHORT(endPtsOfContours+j*2);\n            ++j;\n         } else {\n            if (!(flags & 1)) { // if it's a curve\n               if (was_off) // two off-curve control points in a row means interpolate an on-curve midpoint\n                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy);\n               cx = x;\n               cy = y;\n               was_off = 1;\n            } else {\n               if (was_off)\n                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x,y, cx, cy);\n               else\n                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x,y,0,0);\n               was_off = 0;\n            }\n         }\n      }\n      num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);\n   } else if (numberOfContours < 0) {\n      // Compound shapes.\n      int more = 1;\n      stbtt_uint8 *comp = data + g + 10;\n      num_vertices = 0;\n      vertices = 0;\n      while (more) {\n         stbtt_uint16 flags, gidx;\n         int comp_num_verts = 0, i;\n         stbtt_vertex *comp_verts = 0, *tmp = 0;\n         float mtx[6] = {1,0,0,1,0,0}, m, n;\n\n         flags = ttSHORT(comp); comp+=2;\n         gidx = ttSHORT(comp); comp+=2;\n\n         if (flags & 2) { // XY values\n            if (flags & 1) { // shorts\n               mtx[4] = ttSHORT(comp); comp+=2;\n               mtx[5] = ttSHORT(comp); comp+=2;\n            } else {\n               mtx[4] = ttCHAR(comp); comp+=1;\n               mtx[5] = ttCHAR(comp); comp+=1;\n            }\n         }\n         else {\n            // @TODO handle matching point\n            STBTT_assert(0);\n         }\n         if (flags & (1<<3)) { // WE_HAVE_A_SCALE\n            mtx[0] = mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;\n            mtx[1] = mtx[2] = 0;\n         } else if (flags & (1<<6)) { // WE_HAVE_AN_X_AND_YSCALE\n            mtx[0] = ttSHORT(comp)/16384.0f; comp+=2;\n            mtx[1] = mtx[2] = 0;\n            mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;\n         } else if (flags & (1<<7)) { // WE_HAVE_A_TWO_BY_TWO\n            mtx[0] = ttSHORT(comp)/16384.0f; comp+=2;\n            mtx[1] = ttSHORT(comp)/16384.0f; comp+=2;\n            mtx[2] = ttSHORT(comp)/16384.0f; comp+=2;\n            mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;\n         }\n\n         // Find transformation scales.\n         m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]);\n         n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]);\n\n         // Get indexed glyph.\n         comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts);\n         if (comp_num_verts > 0) {\n            // Transform vertices.\n            for (i = 0; i < comp_num_verts; ++i) {\n               stbtt_vertex* v = &comp_verts[i];\n               stbtt_vertex_type x,y;\n               x=v->x; y=v->y;\n               v->x = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));\n               v->y = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));\n               x=v->cx; y=v->cy;\n               v->cx = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));\n               v->cy = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));\n            }\n            // Append vertices.\n            tmp = (stbtt_vertex*)STBTT_malloc((num_vertices+comp_num_verts)*sizeof(stbtt_vertex), info->userdata);\n            if (!tmp) {\n               if (vertices) STBTT_free(vertices, info->userdata);\n               if (comp_verts) STBTT_free(comp_verts, info->userdata);\n               return 0;\n            }\n            if (num_vertices > 0) STBTT_memcpy(tmp, vertices, num_vertices*sizeof(stbtt_vertex));\n            STBTT_memcpy(tmp+num_vertices, comp_verts, comp_num_verts*sizeof(stbtt_vertex));\n            if (vertices) STBTT_free(vertices, info->userdata);\n            vertices = tmp;\n            STBTT_free(comp_verts, info->userdata);\n            num_vertices += comp_num_verts;\n         }\n         // More components ?\n         more = flags & (1<<5);\n      }\n   } else {\n      // numberOfCounters == 0, do nothing\n   }\n\n   *pvertices = vertices;\n   return num_vertices;\n}\n\ntypedef struct\n{\n   int bounds;\n   int started;\n   float first_x, first_y;\n   float x, y;\n   stbtt_int32 min_x, max_x, min_y, max_y;\n\n   stbtt_vertex *pvertices;\n   int num_vertices;\n} stbtt__csctx;\n\n#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0}\n\nstatic void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y)\n{\n   if (x > c->max_x || !c->started) c->max_x = x;\n   if (y > c->max_y || !c->started) c->max_y = y;\n   if (x < c->min_x || !c->started) c->min_x = x;\n   if (y < c->min_y || !c->started) c->min_y = y;\n   c->started = 1;\n}\n\nstatic void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1)\n{\n   if (c->bounds) {\n      stbtt__track_vertex(c, x, y);\n      if (type == STBTT_vcubic) {\n         stbtt__track_vertex(c, cx, cy);\n         stbtt__track_vertex(c, cx1, cy1);\n      }\n   } else {\n      stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy);\n      c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1;\n      c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1;\n   }\n   c->num_vertices++;\n}\n\nstatic void stbtt__csctx_close_shape(stbtt__csctx *ctx)\n{\n   if (ctx->first_x != ctx->x || ctx->first_y != ctx->y)\n      stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0);\n}\n\nstatic void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy)\n{\n   stbtt__csctx_close_shape(ctx);\n   ctx->first_x = ctx->x = ctx->x + dx;\n   ctx->first_y = ctx->y = ctx->y + dy;\n   stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);\n}\n\nstatic void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy)\n{\n   ctx->x += dx;\n   ctx->y += dy;\n   stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);\n}\n\nstatic void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3)\n{\n   float cx1 = ctx->x + dx1;\n   float cy1 = ctx->y + dy1;\n   float cx2 = cx1 + dx2;\n   float cy2 = cy1 + dy2;\n   ctx->x = cx2 + dx3;\n   ctx->y = cy2 + dy3;\n   stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2);\n}\n\nstatic stbtt__buf stbtt__get_subr(stbtt__buf idx, int n)\n{\n   int count = stbtt__cff_index_count(&idx);\n   int bias = 107;\n   if (count >= 33900)\n      bias = 32768;\n   else if (count >= 1240)\n      bias = 1131;\n   n += bias;\n   if (n < 0 || n >= count)\n      return stbtt__new_buf(NULL, 0);\n   return stbtt__cff_index_get(idx, n);\n}\n\nstatic stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index)\n{\n   stbtt__buf fdselect = info->fdselect;\n   int nranges, start, end, v, fmt, fdselector = -1, i;\n\n   stbtt__buf_seek(&fdselect, 0);\n   fmt = stbtt__buf_get8(&fdselect);\n   if (fmt == 0) {\n      // untested\n      stbtt__buf_skip(&fdselect, glyph_index);\n      fdselector = stbtt__buf_get8(&fdselect);\n   } else if (fmt == 3) {\n      nranges = stbtt__buf_get16(&fdselect);\n      start = stbtt__buf_get16(&fdselect);\n      for (i = 0; i < nranges; i++) {\n         v = stbtt__buf_get8(&fdselect);\n         end = stbtt__buf_get16(&fdselect);\n         if (glyph_index >= start && glyph_index < end) {\n            fdselector = v;\n            break;\n         }\n         start = end;\n      }\n   }\n   if (fdselector == -1) stbtt__new_buf(NULL, 0);\n   return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector));\n}\n\nstatic int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c)\n{\n   int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0;\n   int has_subrs = 0, clear_stack;\n   float s[48];\n   stbtt__buf subr_stack[10], subrs = info->subrs, b;\n   float f;\n\n#define STBTT__CSERR(s) (0)\n\n   // this currently ignores the initial width value, which isn't needed if we have hmtx\n   b = stbtt__cff_index_get(info->charstrings, glyph_index);\n   while (b.cursor < b.size) {\n      i = 0;\n      clear_stack = 1;\n      b0 = stbtt__buf_get8(&b);\n      switch (b0) {\n      // @TODO implement hinting\n      case 0x13: // hintmask\n      case 0x14: // cntrmask\n         if (in_header)\n            maskbits += (sp / 2); // implicit \"vstem\"\n         in_header = 0;\n         stbtt__buf_skip(&b, (maskbits + 7) / 8);\n         break;\n\n      case 0x01: // hstem\n      case 0x03: // vstem\n      case 0x12: // hstemhm\n      case 0x17: // vstemhm\n         maskbits += (sp / 2);\n         break;\n\n      case 0x15: // rmoveto\n         in_header = 0;\n         if (sp < 2) return STBTT__CSERR(\"rmoveto stack\");\n         stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]);\n         break;\n      case 0x04: // vmoveto\n         in_header = 0;\n         if (sp < 1) return STBTT__CSERR(\"vmoveto stack\");\n         stbtt__csctx_rmove_to(c, 0, s[sp-1]);\n         break;\n      case 0x16: // hmoveto\n         in_header = 0;\n         if (sp < 1) return STBTT__CSERR(\"hmoveto stack\");\n         stbtt__csctx_rmove_to(c, s[sp-1], 0);\n         break;\n\n      case 0x05: // rlineto\n         if (sp < 2) return STBTT__CSERR(\"rlineto stack\");\n         for (; i + 1 < sp; i += 2)\n            stbtt__csctx_rline_to(c, s[i], s[i+1]);\n         break;\n\n      // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical\n      // starting from a different place.\n\n      case 0x07: // vlineto\n         if (sp < 1) return STBTT__CSERR(\"vlineto stack\");\n         goto vlineto;\n      case 0x06: // hlineto\n         if (sp < 1) return STBTT__CSERR(\"hlineto stack\");\n         for (;;) {\n            if (i >= sp) break;\n            stbtt__csctx_rline_to(c, s[i], 0);\n            i++;\n      vlineto:\n            if (i >= sp) break;\n            stbtt__csctx_rline_to(c, 0, s[i]);\n            i++;\n         }\n         break;\n\n      case 0x1F: // hvcurveto\n         if (sp < 4) return STBTT__CSERR(\"hvcurveto stack\");\n         goto hvcurveto;\n      case 0x1E: // vhcurveto\n         if (sp < 4) return STBTT__CSERR(\"vhcurveto stack\");\n         for (;;) {\n            if (i + 3 >= sp) break;\n            stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f);\n            i += 4;\n      hvcurveto:\n            if (i + 3 >= sp) break;\n            stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]);\n            i += 4;\n         }\n         break;\n\n      case 0x08: // rrcurveto\n         if (sp < 6) return STBTT__CSERR(\"rcurveline stack\");\n         for (; i + 5 < sp; i += 6)\n            stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);\n         break;\n\n      case 0x18: // rcurveline\n         if (sp < 8) return STBTT__CSERR(\"rcurveline stack\");\n         for (; i + 5 < sp - 2; i += 6)\n            stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);\n         if (i + 1 >= sp) return STBTT__CSERR(\"rcurveline stack\");\n         stbtt__csctx_rline_to(c, s[i], s[i+1]);\n         break;\n\n      case 0x19: // rlinecurve\n         if (sp < 8) return STBTT__CSERR(\"rlinecurve stack\");\n         for (; i + 1 < sp - 6; i += 2)\n            stbtt__csctx_rline_to(c, s[i], s[i+1]);\n         if (i + 5 >= sp) return STBTT__CSERR(\"rlinecurve stack\");\n         stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);\n         break;\n\n      case 0x1A: // vvcurveto\n      case 0x1B: // hhcurveto\n         if (sp < 4) return STBTT__CSERR(\"(vv|hh)curveto stack\");\n         f = 0.0;\n         if (sp & 1) { f = s[i]; i++; }\n         for (; i + 3 < sp; i += 4) {\n            if (b0 == 0x1B)\n               stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0);\n            else\n               stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]);\n            f = 0.0;\n         }\n         break;\n\n      case 0x0A: // callsubr\n         if (!has_subrs) {\n            if (info->fdselect.size)\n               subrs = stbtt__cid_get_glyph_subrs(info, glyph_index);\n            has_subrs = 1;\n         }\n         // fallthrough\n      case 0x1D: // callgsubr\n         if (sp < 1) return STBTT__CSERR(\"call(g|)subr stack\");\n         v = (int) s[--sp];\n         if (subr_stack_height >= 10) return STBTT__CSERR(\"recursion limit\");\n         subr_stack[subr_stack_height++] = b;\n         b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v);\n         if (b.size == 0) return STBTT__CSERR(\"subr not found\");\n         b.cursor = 0;\n         clear_stack = 0;\n         break;\n\n      case 0x0B: // return\n         if (subr_stack_height <= 0) return STBTT__CSERR(\"return outside subr\");\n         b = subr_stack[--subr_stack_height];\n         clear_stack = 0;\n         break;\n\n      case 0x0E: // endchar\n         stbtt__csctx_close_shape(c);\n         return 1;\n\n      case 0x0C: { // two-byte escape\n         float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6;\n         float dx, dy;\n         int b1 = stbtt__buf_get8(&b);\n         switch (b1) {\n         // @TODO These \"flex\" implementations ignore the flex-depth and resolution,\n         // and always draw beziers.\n         case 0x22: // hflex\n            if (sp < 7) return STBTT__CSERR(\"hflex stack\");\n            dx1 = s[0];\n            dx2 = s[1];\n            dy2 = s[2];\n            dx3 = s[3];\n            dx4 = s[4];\n            dx5 = s[5];\n            dx6 = s[6];\n            stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0);\n            stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0);\n            break;\n\n         case 0x23: // flex\n            if (sp < 13) return STBTT__CSERR(\"flex stack\");\n            dx1 = s[0];\n            dy1 = s[1];\n            dx2 = s[2];\n            dy2 = s[3];\n            dx3 = s[4];\n            dy3 = s[5];\n            dx4 = s[6];\n            dy4 = s[7];\n            dx5 = s[8];\n            dy5 = s[9];\n            dx6 = s[10];\n            dy6 = s[11];\n            //fd is s[12]\n            stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);\n            stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);\n            break;\n\n         case 0x24: // hflex1\n            if (sp < 9) return STBTT__CSERR(\"hflex1 stack\");\n            dx1 = s[0];\n            dy1 = s[1];\n            dx2 = s[2];\n            dy2 = s[3];\n            dx3 = s[4];\n            dx4 = s[5];\n            dx5 = s[6];\n            dy5 = s[7];\n            dx6 = s[8];\n            stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0);\n            stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5));\n            break;\n\n         case 0x25: // flex1\n            if (sp < 11) return STBTT__CSERR(\"flex1 stack\");\n            dx1 = s[0];\n            dy1 = s[1];\n            dx2 = s[2];\n            dy2 = s[3];\n            dx3 = s[4];\n            dy3 = s[5];\n            dx4 = s[6];\n            dy4 = s[7];\n            dx5 = s[8];\n            dy5 = s[9];\n            dx6 = dy6 = s[10];\n            dx = dx1+dx2+dx3+dx4+dx5;\n            dy = dy1+dy2+dy3+dy4+dy5;\n            if (STBTT_fabs(dx) > STBTT_fabs(dy))\n               dy6 = -dy;\n            else\n               dx6 = -dx;\n            stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);\n            stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);\n            break;\n\n         default:\n            return STBTT__CSERR(\"unimplemented\");\n         }\n      } break;\n\n      default:\n         if (b0 != 255 && b0 != 28 && (b0 < 32 || b0 > 254))\n            return STBTT__CSERR(\"reserved operator\");\n\n         // push immediate\n         if (b0 == 255) {\n            f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000;\n         } else {\n            stbtt__buf_skip(&b, -1);\n            f = (float)(stbtt_int16)stbtt__cff_int(&b);\n         }\n         if (sp >= 48) return STBTT__CSERR(\"push stack overflow\");\n         s[sp++] = f;\n         clear_stack = 0;\n         break;\n      }\n      if (clear_stack) sp = 0;\n   }\n   return STBTT__CSERR(\"no endchar\");\n\n#undef STBTT__CSERR\n}\n\nstatic int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)\n{\n   // runs the charstring twice, once to count and once to output (to avoid realloc)\n   stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1);\n   stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0);\n   if (stbtt__run_charstring(info, glyph_index, &count_ctx)) {\n      *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata);\n      output_ctx.pvertices = *pvertices;\n      if (stbtt__run_charstring(info, glyph_index, &output_ctx)) {\n         STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices);\n         return output_ctx.num_vertices;\n      }\n   }\n   *pvertices = NULL;\n   return 0;\n}\n\nstatic int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)\n{\n   stbtt__csctx c = STBTT__CSCTX_INIT(1);\n   int r = stbtt__run_charstring(info, glyph_index, &c);\n   if (x0)  *x0 = r ? c.min_x : 0;\n   if (y0)  *y0 = r ? c.min_y : 0;\n   if (x1)  *x1 = r ? c.max_x : 0;\n   if (y1)  *y1 = r ? c.max_y : 0;\n   return r ? c.num_vertices : 0;\n}\n\nSTBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)\n{\n   if (!info->cff.size)\n      return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices);\n   else\n      return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices);\n}\n\nSTBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing)\n{\n   stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34);\n   if (glyph_index < numOfLongHorMetrics) {\n      if (advanceWidth)     *advanceWidth    = ttSHORT(info->data + info->hmtx + 4*glyph_index);\n      if (leftSideBearing)  *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2);\n   } else {\n      if (advanceWidth)     *advanceWidth    = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1));\n      if (leftSideBearing)  *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics));\n   }\n}\n\nSTBTT_DEF int  stbtt_GetKerningTableLength(const stbtt_fontinfo *info)\n{\n   stbtt_uint8 *data = info->data + info->kern;\n\n   // we only look at the first table. it must be 'horizontal' and format 0.\n   if (!info->kern)\n      return 0;\n   if (ttUSHORT(data+2) < 1) // number of tables, need at least 1\n      return 0;\n   if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format\n      return 0;\n\n   return ttUSHORT(data+10);\n}\n\nSTBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length)\n{\n   stbtt_uint8 *data = info->data + info->kern;\n   int k, length;\n\n   // we only look at the first table. it must be 'horizontal' and format 0.\n   if (!info->kern)\n      return 0;\n   if (ttUSHORT(data+2) < 1) // number of tables, need at least 1\n      return 0;\n   if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format\n      return 0;\n\n   length = ttUSHORT(data+10);\n   if (table_length < length)\n      length = table_length;\n\n   for (k = 0; k < length; k++)\n   {\n      table[k].glyph1 = ttUSHORT(data+18+(k*6));\n      table[k].glyph2 = ttUSHORT(data+20+(k*6));\n      table[k].advance = ttSHORT(data+22+(k*6));\n   }\n\n   return length;\n}\n\nstatic int  stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2)\n{\n   stbtt_uint8 *data = info->data + info->kern;\n   stbtt_uint32 needle, straw;\n   int l, r, m;\n\n   // we only look at the first table. it must be 'horizontal' and format 0.\n   if (!info->kern)\n      return 0;\n   if (ttUSHORT(data+2) < 1) // number of tables, need at least 1\n      return 0;\n   if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format\n      return 0;\n\n   l = 0;\n   r = ttUSHORT(data+10) - 1;\n   needle = glyph1 << 16 | glyph2;\n   while (l <= r) {\n      m = (l + r) >> 1;\n      straw = ttULONG(data+18+(m*6)); // note: unaligned read\n      if (needle < straw)\n         r = m - 1;\n      else if (needle > straw)\n         l = m + 1;\n      else\n         return ttSHORT(data+22+(m*6));\n   }\n   return 0;\n}\n\nstatic stbtt_int32  stbtt__GetCoverageIndex(stbtt_uint8 *coverageTable, int glyph)\n{\n    stbtt_uint16 coverageFormat = ttUSHORT(coverageTable);\n    switch(coverageFormat) {\n        case 1: {\n            stbtt_uint16 glyphCount = ttUSHORT(coverageTable + 2);\n\n            // Binary search.\n            stbtt_int32 l=0, r=glyphCount-1, m;\n            int straw, needle=glyph;\n            while (l <= r) {\n                stbtt_uint8 *glyphArray = coverageTable + 4;\n                stbtt_uint16 glyphID;\n                m = (l + r) >> 1;\n                glyphID = ttUSHORT(glyphArray + 2 * m);\n                straw = glyphID;\n                if (needle < straw)\n                    r = m - 1;\n                else if (needle > straw)\n                    l = m + 1;\n                else {\n                     return m;\n                }\n            }\n        } break;\n\n        case 2: {\n            stbtt_uint16 rangeCount = ttUSHORT(coverageTable + 2);\n            stbtt_uint8 *rangeArray = coverageTable + 4;\n\n            // Binary search.\n            stbtt_int32 l=0, r=rangeCount-1, m;\n            int strawStart, strawEnd, needle=glyph;\n            while (l <= r) {\n                stbtt_uint8 *rangeRecord;\n                m = (l + r) >> 1;\n                rangeRecord = rangeArray + 6 * m;\n                strawStart = ttUSHORT(rangeRecord);\n                strawEnd = ttUSHORT(rangeRecord + 2);\n                if (needle < strawStart)\n                    r = m - 1;\n                else if (needle > strawEnd)\n                    l = m + 1;\n                else {\n                    stbtt_uint16 startCoverageIndex = ttUSHORT(rangeRecord + 4);\n                    return startCoverageIndex + glyph - strawStart;\n                }\n            }\n        } break;\n\n        default: {\n            // There are no other cases.\n            STBTT_assert(0);\n        } break;\n    }\n\n    return -1;\n}\n\nstatic stbtt_int32  stbtt__GetGlyphClass(stbtt_uint8 *classDefTable, int glyph)\n{\n    stbtt_uint16 classDefFormat = ttUSHORT(classDefTable);\n    switch(classDefFormat)\n    {\n        case 1: {\n            stbtt_uint16 startGlyphID = ttUSHORT(classDefTable + 2);\n            stbtt_uint16 glyphCount = ttUSHORT(classDefTable + 4);\n            stbtt_uint8 *classDef1ValueArray = classDefTable + 6;\n\n            if (glyph >= startGlyphID && glyph < startGlyphID + glyphCount)\n                return (stbtt_int32)ttUSHORT(classDef1ValueArray + 2 * (glyph - startGlyphID));\n\n            classDefTable = classDef1ValueArray + 2 * glyphCount;\n        } break;\n\n        case 2: {\n            stbtt_uint16 classRangeCount = ttUSHORT(classDefTable + 2);\n            stbtt_uint8 *classRangeRecords = classDefTable + 4;\n\n            // Binary search.\n            stbtt_int32 l=0, r=classRangeCount-1, m;\n            int strawStart, strawEnd, needle=glyph;\n            while (l <= r) {\n                stbtt_uint8 *classRangeRecord;\n                m = (l + r) >> 1;\n                classRangeRecord = classRangeRecords + 6 * m;\n                strawStart = ttUSHORT(classRangeRecord);\n                strawEnd = ttUSHORT(classRangeRecord + 2);\n                if (needle < strawStart)\n                    r = m - 1;\n                else if (needle > strawEnd)\n                    l = m + 1;\n                else\n                    return (stbtt_int32)ttUSHORT(classRangeRecord + 4);\n            }\n\n            classDefTable = classRangeRecords + 6 * classRangeCount;\n        } break;\n\n        default: {\n            // There are no other cases.\n            STBTT_assert(0);\n        } break;\n    }\n\n    return -1;\n}\n\n// Define to STBTT_assert(x) if you want to break on unimplemented formats.\n#define STBTT_GPOS_TODO_assert(x)\n\nstatic stbtt_int32  stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2)\n{\n    stbtt_uint16 lookupListOffset;\n    stbtt_uint8 *lookupList;\n    stbtt_uint16 lookupCount;\n    stbtt_uint8 *data;\n    stbtt_int32 i;\n\n    if (!info->gpos) return 0;\n\n    data = info->data + info->gpos;\n\n    if (ttUSHORT(data+0) != 1) return 0; // Major version 1\n    if (ttUSHORT(data+2) != 0) return 0; // Minor version 0\n\n    lookupListOffset = ttUSHORT(data+8);\n    lookupList = data + lookupListOffset;\n    lookupCount = ttUSHORT(lookupList);\n\n    for (i=0; i<lookupCount; ++i) {\n        stbtt_uint16 lookupOffset = ttUSHORT(lookupList + 2 + 2 * i);\n        stbtt_uint8 *lookupTable = lookupList + lookupOffset;\n\n        stbtt_uint16 lookupType = ttUSHORT(lookupTable);\n        stbtt_uint16 subTableCount = ttUSHORT(lookupTable + 4);\n        stbtt_uint8 *subTableOffsets = lookupTable + 6;\n        switch(lookupType) {\n            case 2: { // Pair Adjustment Positioning Subtable\n                stbtt_int32 sti;\n                for (sti=0; sti<subTableCount; sti++) {\n                    stbtt_uint16 subtableOffset = ttUSHORT(subTableOffsets + 2 * sti);\n                    stbtt_uint8 *table = lookupTable + subtableOffset;\n                    stbtt_uint16 posFormat = ttUSHORT(table);\n                    stbtt_uint16 coverageOffset = ttUSHORT(table + 2);\n                    stbtt_int32 coverageIndex = stbtt__GetCoverageIndex(table + coverageOffset, glyph1);\n                    if (coverageIndex == -1) continue;\n\n                    switch (posFormat) {\n                        case 1: {\n                            stbtt_int32 l, r, m;\n                            int straw, needle;\n                            stbtt_uint16 valueFormat1 = ttUSHORT(table + 4);\n                            stbtt_uint16 valueFormat2 = ttUSHORT(table + 6);\n                            stbtt_int32 valueRecordPairSizeInBytes = 2;\n                            stbtt_uint16 pairSetCount = ttUSHORT(table + 8);\n                            stbtt_uint16 pairPosOffset = ttUSHORT(table + 10 + 2 * coverageIndex);\n                            stbtt_uint8 *pairValueTable = table + pairPosOffset;\n                            stbtt_uint16 pairValueCount = ttUSHORT(pairValueTable);\n                            stbtt_uint8 *pairValueArray = pairValueTable + 2;\n                            // TODO: Support more formats.\n                            STBTT_GPOS_TODO_assert(valueFormat1 == 4);\n                            if (valueFormat1 != 4) return 0;\n                            STBTT_GPOS_TODO_assert(valueFormat2 == 0);\n                            if (valueFormat2 != 0) return 0;\n\n                            STBTT_assert(coverageIndex < pairSetCount);\n                            STBTT__NOTUSED(pairSetCount);\n\n                            needle=glyph2;\n                            r=pairValueCount-1;\n                            l=0;\n\n                            // Binary search.\n                            while (l <= r) {\n                                stbtt_uint16 secondGlyph;\n                                stbtt_uint8 *pairValue;\n                                m = (l + r) >> 1;\n                                pairValue = pairValueArray + (2 + valueRecordPairSizeInBytes) * m;\n                                secondGlyph = ttUSHORT(pairValue);\n                                straw = secondGlyph;\n                                if (needle < straw)\n                                    r = m - 1;\n                                else if (needle > straw)\n                                    l = m + 1;\n                                else {\n                                    stbtt_int16 xAdvance = ttSHORT(pairValue + 2);\n                                    return xAdvance;\n                                }\n                            }\n                        } break;\n\n                        case 2: {\n                            stbtt_uint16 valueFormat1 = ttUSHORT(table + 4);\n                            stbtt_uint16 valueFormat2 = ttUSHORT(table + 6);\n\n                            stbtt_uint16 classDef1Offset = ttUSHORT(table + 8);\n                            stbtt_uint16 classDef2Offset = ttUSHORT(table + 10);\n                            int glyph1class = stbtt__GetGlyphClass(table + classDef1Offset, glyph1);\n                            int glyph2class = stbtt__GetGlyphClass(table + classDef2Offset, glyph2);\n\n                            stbtt_uint16 class1Count = ttUSHORT(table + 12);\n                            stbtt_uint16 class2Count = ttUSHORT(table + 14);\n                            STBTT_assert(glyph1class < class1Count);\n                            STBTT_assert(glyph2class < class2Count);\n\n                            // TODO: Support more formats.\n                            STBTT_GPOS_TODO_assert(valueFormat1 == 4);\n                            if (valueFormat1 != 4) return 0;\n                            STBTT_GPOS_TODO_assert(valueFormat2 == 0);\n                            if (valueFormat2 != 0) return 0;\n\n                            if (glyph1class >= 0 && glyph1class < class1Count && glyph2class >= 0 && glyph2class < class2Count) {\n                                stbtt_uint8 *class1Records = table + 16;\n                                stbtt_uint8 *class2Records = class1Records + 2 * (glyph1class * class2Count);\n                                stbtt_int16 xAdvance = ttSHORT(class2Records + 2 * glyph2class);\n                                return xAdvance;\n                            }\n                        } break;\n\n                        default: {\n                            // There are no other cases.\n                            STBTT_assert(0);\n                            break;\n                        };\n                    }\n                }\n                break;\n            };\n\n            default:\n                // TODO: Implement other stuff.\n                break;\n        }\n    }\n\n    return 0;\n}\n\nSTBTT_DEF int  stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int g1, int g2)\n{\n   int xAdvance = 0;\n\n   if (info->gpos)\n      xAdvance += stbtt__GetGlyphGPOSInfoAdvance(info, g1, g2);\n   else if (info->kern)\n      xAdvance += stbtt__GetGlyphKernInfoAdvance(info, g1, g2);\n\n   return xAdvance;\n}\n\nSTBTT_DEF int  stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2)\n{\n   if (!info->kern && !info->gpos) // if no kerning table, don't waste time looking up both codepoint->glyphs\n      return 0;\n   return stbtt_GetGlyphKernAdvance(info, stbtt_FindGlyphIndex(info,ch1), stbtt_FindGlyphIndex(info,ch2));\n}\n\nSTBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing)\n{\n   stbtt_GetGlyphHMetrics(info, stbtt_FindGlyphIndex(info,codepoint), advanceWidth, leftSideBearing);\n}\n\nSTBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap)\n{\n   if (ascent ) *ascent  = ttSHORT(info->data+info->hhea + 4);\n   if (descent) *descent = ttSHORT(info->data+info->hhea + 6);\n   if (lineGap) *lineGap = ttSHORT(info->data+info->hhea + 8);\n}\n\nSTBTT_DEF int  stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap)\n{\n   int tab = stbtt__find_table(info->data, info->fontstart, \"OS/2\");\n   if (!tab)\n      return 0;\n   if (typoAscent ) *typoAscent  = ttSHORT(info->data+tab + 68);\n   if (typoDescent) *typoDescent = ttSHORT(info->data+tab + 70);\n   if (typoLineGap) *typoLineGap = ttSHORT(info->data+tab + 72);\n   return 1;\n}\n\nSTBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1)\n{\n   *x0 = ttSHORT(info->data + info->head + 36);\n   *y0 = ttSHORT(info->data + info->head + 38);\n   *x1 = ttSHORT(info->data + info->head + 40);\n   *y1 = ttSHORT(info->data + info->head + 42);\n}\n\nSTBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float height)\n{\n   int fheight = ttSHORT(info->data + info->hhea + 4) - ttSHORT(info->data + info->hhea + 6);\n   return (float) height / fheight;\n}\n\nSTBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels)\n{\n   int unitsPerEm = ttUSHORT(info->data + info->head + 18);\n   return pixels / unitsPerEm;\n}\n\nSTBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)\n{\n   STBTT_free(v, info->userdata);\n}\n\nSTBTT_DEF stbtt_uint8 *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl)\n{\n   int i;\n   stbtt_uint8 *data = info->data;\n   stbtt_uint8 *svg_doc_list = data + stbtt__get_svg((stbtt_fontinfo *) info);\n\n   int numEntries = ttUSHORT(svg_doc_list);\n   stbtt_uint8 *svg_docs = svg_doc_list + 2;\n\n   for(i=0; i<numEntries; i++) {\n      stbtt_uint8 *svg_doc = svg_docs + (12 * i);\n      if ((gl >= ttUSHORT(svg_doc)) && (gl <= ttUSHORT(svg_doc + 2)))\n         return svg_doc;\n   }\n   return 0;\n}\n\nSTBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg)\n{\n   stbtt_uint8 *data = info->data;\n   stbtt_uint8 *svg_doc;\n\n   if (info->svg == 0)\n      return 0;\n\n   svg_doc = stbtt_FindSVGDoc(info, gl);\n   if (svg_doc != NULL) {\n      *svg = (char *) data + info->svg + ttULONG(svg_doc + 4);\n      return ttULONG(svg_doc + 8);\n   } else {\n      return 0;\n   }\n}\n\nSTBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg)\n{\n   return stbtt_GetGlyphSVG(info, stbtt_FindGlyphIndex(info, unicode_codepoint), svg);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// antialiasing software rasterizer\n//\n\nSTBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1)\n{\n   int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning\n   if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) {\n      // e.g. space character\n      if (ix0) *ix0 = 0;\n      if (iy0) *iy0 = 0;\n      if (ix1) *ix1 = 0;\n      if (iy1) *iy1 = 0;\n   } else {\n      // move to integral bboxes (treating pixels as little squares, what pixels get touched)?\n      if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x);\n      if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y);\n      if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x);\n      if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y);\n   }\n}\n\nSTBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1)\n{\n   stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y,0.0f,0.0f, ix0, iy0, ix1, iy1);\n}\n\nSTBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1)\n{\n   stbtt_GetGlyphBitmapBoxSubpixel(font, stbtt_FindGlyphIndex(font,codepoint), scale_x, scale_y,shift_x,shift_y, ix0,iy0,ix1,iy1);\n}\n\nSTBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1)\n{\n   stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y,0.0f,0.0f, ix0,iy0,ix1,iy1);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n//  Rasterizer\n\ntypedef struct stbtt__hheap_chunk\n{\n   struct stbtt__hheap_chunk *next;\n} stbtt__hheap_chunk;\n\ntypedef struct stbtt__hheap\n{\n   struct stbtt__hheap_chunk *head;\n   void   *first_free;\n   int    num_remaining_in_head_chunk;\n} stbtt__hheap;\n\nstatic void *stbtt__hheap_alloc(stbtt__hheap *hh, size_t size, void *userdata)\n{\n   if (hh->first_free) {\n      void *p = hh->first_free;\n      hh->first_free = * (void **) p;\n      return p;\n   } else {\n      if (hh->num_remaining_in_head_chunk == 0) {\n         int count = (size < 32 ? 2000 : size < 128 ? 800 : 100);\n         stbtt__hheap_chunk *c = (stbtt__hheap_chunk *) STBTT_malloc(sizeof(stbtt__hheap_chunk) + size * count, userdata);\n         if (c == NULL)\n            return NULL;\n         c->next = hh->head;\n         hh->head = c;\n         hh->num_remaining_in_head_chunk = count;\n      }\n      --hh->num_remaining_in_head_chunk;\n      return (char *) (hh->head) + sizeof(stbtt__hheap_chunk) + size * hh->num_remaining_in_head_chunk;\n   }\n}\n\nstatic void stbtt__hheap_free(stbtt__hheap *hh, void *p)\n{\n   *(void **) p = hh->first_free;\n   hh->first_free = p;\n}\n\nstatic void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata)\n{\n   stbtt__hheap_chunk *c = hh->head;\n   while (c) {\n      stbtt__hheap_chunk *n = c->next;\n      STBTT_free(c, userdata);\n      c = n;\n   }\n}\n\ntypedef struct stbtt__edge {\n   float x0,y0, x1,y1;\n   int invert;\n} stbtt__edge;\n\n\ntypedef struct stbtt__active_edge\n{\n   struct stbtt__active_edge *next;\n   #if STBTT_RASTERIZER_VERSION==1\n   int x,dx;\n   float ey;\n   int direction;\n   #elif STBTT_RASTERIZER_VERSION==2\n   float fx,fdx,fdy;\n   float direction;\n   float sy;\n   float ey;\n   #else\n   #error \"Unrecognized value of STBTT_RASTERIZER_VERSION\"\n   #endif\n} stbtt__active_edge;\n\n#if STBTT_RASTERIZER_VERSION == 1\n#define STBTT_FIXSHIFT   10\n#define STBTT_FIX        (1 << STBTT_FIXSHIFT)\n#define STBTT_FIXMASK    (STBTT_FIX-1)\n\nstatic stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata)\n{\n   stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata);\n   float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);\n   STBTT_assert(z != NULL);\n   if (!z) return z;\n\n   // round dx down to avoid overshooting\n   if (dxdy < 0)\n      z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy);\n   else\n      z->dx = STBTT_ifloor(STBTT_FIX * dxdy);\n\n   z->x = STBTT_ifloor(STBTT_FIX * e->x0 + z->dx * (start_point - e->y0)); // use z->dx so when we offset later it's by the same amount\n   z->x -= off_x * STBTT_FIX;\n\n   z->ey = e->y1;\n   z->next = 0;\n   z->direction = e->invert ? 1 : -1;\n   return z;\n}\n#elif STBTT_RASTERIZER_VERSION == 2\nstatic stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata)\n{\n   stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata);\n   float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);\n   STBTT_assert(z != NULL);\n   //STBTT_assert(e->y0 <= start_point);\n   if (!z) return z;\n   z->fdx = dxdy;\n   z->fdy = dxdy != 0.0f ? (1.0f/dxdy) : 0.0f;\n   z->fx = e->x0 + dxdy * (start_point - e->y0);\n   z->fx -= off_x;\n   z->direction = e->invert ? 1.0f : -1.0f;\n   z->sy = e->y0;\n   z->ey = e->y1;\n   z->next = 0;\n   return z;\n}\n#else\n#error \"Unrecognized value of STBTT_RASTERIZER_VERSION\"\n#endif\n\n#if STBTT_RASTERIZER_VERSION == 1\n// note: this routine clips fills that extend off the edges... ideally this\n// wouldn't happen, but it could happen if the truetype glyph bounding boxes\n// are wrong, or if the user supplies a too-small bitmap\nstatic void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__active_edge *e, int max_weight)\n{\n   // non-zero winding fill\n   int x0=0, w=0;\n\n   while (e) {\n      if (w == 0) {\n         // if we're currently at zero, we need to record the edge start point\n         x0 = e->x; w += e->direction;\n      } else {\n         int x1 = e->x; w += e->direction;\n         // if we went to zero, we need to draw\n         if (w == 0) {\n            int i = x0 >> STBTT_FIXSHIFT;\n            int j = x1 >> STBTT_FIXSHIFT;\n\n            if (i < len && j >= 0) {\n               if (i == j) {\n                  // x0,x1 are the same pixel, so compute combined coverage\n                  scanline[i] = scanline[i] + (stbtt_uint8) ((x1 - x0) * max_weight >> STBTT_FIXSHIFT);\n               } else {\n                  if (i >= 0) // add antialiasing for x0\n                     scanline[i] = scanline[i] + (stbtt_uint8) (((STBTT_FIX - (x0 & STBTT_FIXMASK)) * max_weight) >> STBTT_FIXSHIFT);\n                  else\n                     i = -1; // clip\n\n                  if (j < len) // add antialiasing for x1\n                     scanline[j] = scanline[j] + (stbtt_uint8) (((x1 & STBTT_FIXMASK) * max_weight) >> STBTT_FIXSHIFT);\n                  else\n                     j = len; // clip\n\n                  for (++i; i < j; ++i) // fill pixels between x0 and x1\n                     scanline[i] = scanline[i] + (stbtt_uint8) max_weight;\n               }\n            }\n         }\n      }\n\n      e = e->next;\n   }\n}\n\nstatic void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata)\n{\n   stbtt__hheap hh = { 0, 0, 0 };\n   stbtt__active_edge *active = NULL;\n   int y,j=0;\n   int max_weight = (255 / vsubsample);  // weight per vertical scanline\n   int s; // vertical subsample index\n   unsigned char scanline_data[512], *scanline;\n\n   if (result->w > 512)\n      scanline = (unsigned char *) STBTT_malloc(result->w, userdata);\n   else\n      scanline = scanline_data;\n\n   y = off_y * vsubsample;\n   e[n].y0 = (off_y + result->h) * (float) vsubsample + 1;\n\n   while (j < result->h) {\n      STBTT_memset(scanline, 0, result->w);\n      for (s=0; s < vsubsample; ++s) {\n         // find center of pixel for this scanline\n         float scan_y = y + 0.5f;\n         stbtt__active_edge **step = &active;\n\n         // update all active edges;\n         // remove all active edges that terminate before the center of this scanline\n         while (*step) {\n            stbtt__active_edge * z = *step;\n            if (z->ey <= scan_y) {\n               *step = z->next; // delete from list\n               STBTT_assert(z->direction);\n               z->direction = 0;\n               stbtt__hheap_free(&hh, z);\n            } else {\n               z->x += z->dx; // advance to position for current scanline\n               step = &((*step)->next); // advance through list\n            }\n         }\n\n         // resort the list if needed\n         for(;;) {\n            int changed=0;\n            step = &active;\n            while (*step && (*step)->next) {\n               if ((*step)->x > (*step)->next->x) {\n                  stbtt__active_edge *t = *step;\n                  stbtt__active_edge *q = t->next;\n\n                  t->next = q->next;\n                  q->next = t;\n                  *step = q;\n                  changed = 1;\n               }\n               step = &(*step)->next;\n            }\n            if (!changed) break;\n         }\n\n         // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline\n         while (e->y0 <= scan_y) {\n            if (e->y1 > scan_y) {\n               stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata);\n               if (z != NULL) {\n                  // find insertion point\n                  if (active == NULL)\n                     active = z;\n                  else if (z->x < active->x) {\n                     // insert at front\n                     z->next = active;\n                     active = z;\n                  } else {\n                     // find thing to insert AFTER\n                     stbtt__active_edge *p = active;\n                     while (p->next && p->next->x < z->x)\n                        p = p->next;\n                     // at this point, p->next->x is NOT < z->x\n                     z->next = p->next;\n                     p->next = z;\n                  }\n               }\n            }\n            ++e;\n         }\n\n         // now process all active edges in XOR fashion\n         if (active)\n            stbtt__fill_active_edges(scanline, result->w, active, max_weight);\n\n         ++y;\n      }\n      STBTT_memcpy(result->pixels + j * result->stride, scanline, result->w);\n      ++j;\n   }\n\n   stbtt__hheap_cleanup(&hh, userdata);\n\n   if (scanline != scanline_data)\n      STBTT_free(scanline, userdata);\n}\n\n#elif STBTT_RASTERIZER_VERSION == 2\n\n// the edge passed in here does not cross the vertical line at x or the vertical line at x+1\n// (i.e. it has already been clipped to those)\nstatic void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edge *e, float x0, float y0, float x1, float y1)\n{\n   if (y0 == y1) return;\n   STBTT_assert(y0 < y1);\n   STBTT_assert(e->sy <= e->ey);\n   if (y0 > e->ey) return;\n   if (y1 < e->sy) return;\n   if (y0 < e->sy) {\n      x0 += (x1-x0) * (e->sy - y0) / (y1-y0);\n      y0 = e->sy;\n   }\n   if (y1 > e->ey) {\n      x1 += (x1-x0) * (e->ey - y1) / (y1-y0);\n      y1 = e->ey;\n   }\n\n   if (x0 == x)\n      STBTT_assert(x1 <= x+1);\n   else if (x0 == x+1)\n      STBTT_assert(x1 >= x);\n   else if (x0 <= x)\n      STBTT_assert(x1 <= x);\n   else if (x0 >= x+1)\n      STBTT_assert(x1 >= x+1);\n   else\n      STBTT_assert(x1 >= x && x1 <= x+1);\n\n   if (x0 <= x && x1 <= x)\n      scanline[x] += e->direction * (y1-y0);\n   else if (x0 >= x+1 && x1 >= x+1)\n      ;\n   else {\n      STBTT_assert(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1);\n      scanline[x] += e->direction * (y1-y0) * (1-((x0-x)+(x1-x))/2); // coverage = 1 - average x position\n   }\n}\n\nstatic void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, int len, stbtt__active_edge *e, float y_top)\n{\n   float y_bottom = y_top+1;\n\n   while (e) {\n      // brute force every pixel\n\n      // compute intersection points with top & bottom\n      STBTT_assert(e->ey >= y_top);\n\n      if (e->fdx == 0) {\n         float x0 = e->fx;\n         if (x0 < len) {\n            if (x0 >= 0) {\n               stbtt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom);\n               stbtt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom);\n            } else {\n               stbtt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom);\n            }\n         }\n      } else {\n         float x0 = e->fx;\n         float dx = e->fdx;\n         float xb = x0 + dx;\n         float x_top, x_bottom;\n         float sy0,sy1;\n         float dy = e->fdy;\n         STBTT_assert(e->sy <= y_bottom && e->ey >= y_top);\n\n         // compute endpoints of line segment clipped to this scanline (if the\n         // line segment starts on this scanline. x0 is the intersection of the\n         // line with y_top, but that may be off the line segment.\n         if (e->sy > y_top) {\n            x_top = x0 + dx * (e->sy - y_top);\n            sy0 = e->sy;\n         } else {\n            x_top = x0;\n            sy0 = y_top;\n         }\n         if (e->ey < y_bottom) {\n            x_bottom = x0 + dx * (e->ey - y_top);\n            sy1 = e->ey;\n         } else {\n            x_bottom = xb;\n            sy1 = y_bottom;\n         }\n\n         if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) {\n            // from here on, we don't have to range check x values\n\n            if ((int) x_top == (int) x_bottom) {\n               float height;\n               // simple case, only spans one pixel\n               int x = (int) x_top;\n               height = sy1 - sy0;\n               STBTT_assert(x >= 0 && x < len);\n               scanline[x] += e->direction * (1-((x_top - x) + (x_bottom-x))/2)  * height;\n               scanline_fill[x] += e->direction * height; // everything right of this pixel is filled\n            } else {\n               int x,x1,x2;\n               float y_crossing, step, sign, area;\n               // covers 2+ pixels\n               if (x_top > x_bottom) {\n                  // flip scanline vertically; signed area is the same\n                  float t;\n                  sy0 = y_bottom - (sy0 - y_top);\n                  sy1 = y_bottom - (sy1 - y_top);\n                  t = sy0, sy0 = sy1, sy1 = t;\n                  t = x_bottom, x_bottom = x_top, x_top = t;\n                  dx = -dx;\n                  dy = -dy;\n                  t = x0, x0 = xb, xb = t;\n               }\n\n               x1 = (int) x_top;\n               x2 = (int) x_bottom;\n               // compute intersection with y axis at x1+1\n               y_crossing = (x1+1 - x0) * dy + y_top;\n\n               sign = e->direction;\n               // area of the rectangle covered from y0..y_crossing\n               area = sign * (y_crossing-sy0);\n               // area of the triangle (x_top,y0), (x+1,y0), (x+1,y_crossing)\n               scanline[x1] += area * (1-((x_top - x1)+(x1+1-x1))/2);\n\n               step = sign * dy;\n               for (x = x1+1; x < x2; ++x) {\n                  scanline[x] += area + step/2;\n                  area += step;\n               }\n               y_crossing += dy * (x2 - (x1+1));\n\n               STBTT_assert(STBTT_fabs(area) <= 1.01f);\n\n               scanline[x2] += area + sign * (1-((x2-x2)+(x_bottom-x2))/2) * (sy1-y_crossing);\n\n               scanline_fill[x2] += sign * (sy1-sy0);\n            }\n         } else {\n            // if edge goes outside of box we're drawing, we require\n            // clipping logic. since this does not match the intended use\n            // of this library, we use a different, very slow brute\n            // force implementation\n            int x;\n            for (x=0; x < len; ++x) {\n               // cases:\n               //\n               // there can be up to two intersections with the pixel. any intersection\n               // with left or right edges can be handled by splitting into two (or three)\n               // regions. intersections with top & bottom do not necessitate case-wise logic.\n               //\n               // the old way of doing this found the intersections with the left & right edges,\n               // then used some simple logic to produce up to three segments in sorted order\n               // from top-to-bottom. however, this had a problem: if an x edge was epsilon\n               // across the x border, then the corresponding y position might not be distinct\n               // from the other y segment, and it might ignored as an empty segment. to avoid\n               // that, we need to explicitly produce segments based on x positions.\n\n               // rename variables to clearly-defined pairs\n               float y0 = y_top;\n               float x1 = (float) (x);\n               float x2 = (float) (x+1);\n               float x3 = xb;\n               float y3 = y_bottom;\n\n               // x = e->x + e->dx * (y-y_top)\n               // (y-y_top) = (x - e->x) / e->dx\n               // y = (x - e->x) / e->dx + y_top\n               float y1 = (x - x0) / dx + y_top;\n               float y2 = (x+1 - x0) / dx + y_top;\n\n               if (x0 < x1 && x3 > x2) {         // three segments descending down-right\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1);\n                  stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x2,y2);\n                  stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n               } else if (x3 < x1 && x0 > x2) {  // three segments descending down-left\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2);\n                  stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x1,y1);\n                  stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3);\n               } else if (x0 < x1 && x3 > x1) {  // two segments across x, down-right\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1);\n                  stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3);\n               } else if (x3 < x1 && x0 > x1) {  // two segments across x, down-left\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1);\n                  stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3);\n               } else if (x0 < x2 && x3 > x2) {  // two segments across x+1, down-right\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2);\n                  stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n               } else if (x3 < x2 && x0 > x2) {  // two segments across x+1, down-left\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2);\n                  stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3);\n               } else {  // one segment\n                  stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x3,y3);\n               }\n            }\n         }\n      }\n      e = e->next;\n   }\n}\n\n// directly AA rasterize edges w/o supersampling\nstatic void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata)\n{\n   stbtt__hheap hh = { 0, 0, 0 };\n   stbtt__active_edge *active = NULL;\n   int y,j=0, i;\n   float scanline_data[129], *scanline, *scanline2;\n\n   STBTT__NOTUSED(vsubsample);\n\n   if (result->w > 64)\n      scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata);\n   else\n      scanline = scanline_data;\n\n   scanline2 = scanline + result->w;\n\n   y = off_y;\n   e[n].y0 = (float) (off_y + result->h) + 1;\n\n   while (j < result->h) {\n      // find center of pixel for this scanline\n      float scan_y_top    = y + 0.0f;\n      float scan_y_bottom = y + 1.0f;\n      stbtt__active_edge **step = &active;\n\n      STBTT_memset(scanline , 0, result->w*sizeof(scanline[0]));\n      STBTT_memset(scanline2, 0, (result->w+1)*sizeof(scanline[0]));\n\n      // update all active edges;\n      // remove all active edges that terminate before the top of this scanline\n      while (*step) {\n         stbtt__active_edge * z = *step;\n         if (z->ey <= scan_y_top) {\n            *step = z->next; // delete from list\n            STBTT_assert(z->direction);\n            z->direction = 0;\n            stbtt__hheap_free(&hh, z);\n         } else {\n            step = &((*step)->next); // advance through list\n         }\n      }\n\n      // insert all edges that start before the bottom of this scanline\n      while (e->y0 <= scan_y_bottom) {\n         if (e->y0 != e->y1) {\n            stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata);\n            if (z != NULL) {\n               if (j == 0 && off_y != 0) {\n                  if (z->ey < scan_y_top) {\n                     // this can happen due to subpixel positioning and some kind of fp rounding error i think\n                     z->ey = scan_y_top;\n                  }\n               }\n               STBTT_assert(z->ey >= scan_y_top); // if we get really unlucky a tiny bit of an edge can be out of bounds\n               // insert at front\n               z->next = active;\n               active = z;\n            }\n         }\n         ++e;\n      }\n\n      // now process all active edges\n      if (active)\n         stbtt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top);\n\n      {\n         float sum = 0;\n         for (i=0; i < result->w; ++i) {\n            float k;\n            int m;\n            sum += scanline2[i];\n            k = scanline[i] + sum;\n            k = (float) STBTT_fabs(k)*255 + 0.5f;\n            m = (int) k;\n            if (m > 255) m = 255;\n            result->pixels[j*result->stride + i] = (unsigned char) m;\n         }\n      }\n      // advance all the edges\n      step = &active;\n      while (*step) {\n         stbtt__active_edge *z = *step;\n         z->fx += z->fdx; // advance to position for current scanline\n         step = &((*step)->next); // advance through list\n      }\n\n      ++y;\n      ++j;\n   }\n\n   stbtt__hheap_cleanup(&hh, userdata);\n\n   if (scanline != scanline_data)\n      STBTT_free(scanline, userdata);\n}\n#else\n#error \"Unrecognized value of STBTT_RASTERIZER_VERSION\"\n#endif\n\n#define STBTT__COMPARE(a,b)  ((a)->y0 < (b)->y0)\n\nstatic void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n)\n{\n   int i,j;\n   for (i=1; i < n; ++i) {\n      stbtt__edge t = p[i], *a = &t;\n      j = i;\n      while (j > 0) {\n         stbtt__edge *b = &p[j-1];\n         int c = STBTT__COMPARE(a,b);\n         if (!c) break;\n         p[j] = p[j-1];\n         --j;\n      }\n      if (i != j)\n         p[j] = t;\n   }\n}\n\nstatic void stbtt__sort_edges_quicksort(stbtt__edge *p, int n)\n{\n   /* threshold for transitioning to insertion sort */\n   while (n > 12) {\n      stbtt__edge t;\n      int c01,c12,c,m,i,j;\n\n      /* compute median of three */\n      m = n >> 1;\n      c01 = STBTT__COMPARE(&p[0],&p[m]);\n      c12 = STBTT__COMPARE(&p[m],&p[n-1]);\n      /* if 0 >= mid >= end, or 0 < mid < end, then use mid */\n      if (c01 != c12) {\n         /* otherwise, we'll need to swap something else to middle */\n         int z;\n         c = STBTT__COMPARE(&p[0],&p[n-1]);\n         /* 0>mid && mid<n:  0>n => n; 0<n => 0 */\n         /* 0<mid && mid>n:  0>n => 0; 0<n => n */\n         z = (c == c12) ? 0 : n-1;\n         t = p[z];\n         p[z] = p[m];\n         p[m] = t;\n      }\n      /* now p[m] is the median-of-three */\n      /* swap it to the beginning so it won't move around */\n      t = p[0];\n      p[0] = p[m];\n      p[m] = t;\n\n      /* partition loop */\n      i=1;\n      j=n-1;\n      for(;;) {\n         /* handling of equality is crucial here */\n         /* for sentinels & efficiency with duplicates */\n         for (;;++i) {\n            if (!STBTT__COMPARE(&p[i], &p[0])) break;\n         }\n         for (;;--j) {\n            if (!STBTT__COMPARE(&p[0], &p[j])) break;\n         }\n         /* make sure we haven't crossed */\n         if (i >= j) break;\n         t = p[i];\n         p[i] = p[j];\n         p[j] = t;\n\n         ++i;\n         --j;\n      }\n      /* recurse on smaller side, iterate on larger */\n      if (j < (n-i)) {\n         stbtt__sort_edges_quicksort(p,j);\n         p = p+i;\n         n = n-i;\n      } else {\n         stbtt__sort_edges_quicksort(p+i, n-i);\n         n = j;\n      }\n   }\n}\n\nstatic void stbtt__sort_edges(stbtt__edge *p, int n)\n{\n   stbtt__sort_edges_quicksort(p, n);\n   stbtt__sort_edges_ins_sort(p, n);\n}\n\ntypedef struct\n{\n   float x,y;\n} stbtt__point;\n\nstatic void stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, int *wcount, int windings, float scale_x, float scale_y, float shift_x, float shift_y, int off_x, int off_y, int invert, void *userdata)\n{\n   float y_scale_inv = invert ? -scale_y : scale_y;\n   stbtt__edge *e;\n   int n,i,j,k,m;\n#if STBTT_RASTERIZER_VERSION == 1\n   int vsubsample = result->h < 8 ? 15 : 5;\n#elif STBTT_RASTERIZER_VERSION == 2\n   int vsubsample = 1;\n#else\n   #error \"Unrecognized value of STBTT_RASTERIZER_VERSION\"\n#endif\n   // vsubsample should divide 255 evenly; otherwise we won't reach full opacity\n\n   // now we have to blow out the windings into explicit edge lists\n   n = 0;\n   for (i=0; i < windings; ++i)\n      n += wcount[i];\n\n   e = (stbtt__edge *) STBTT_malloc(sizeof(*e) * (n+1), userdata); // add an extra one as a sentinel\n   if (e == 0) return;\n   n = 0;\n\n   m=0;\n   for (i=0; i < windings; ++i) {\n      stbtt__point *p = pts + m;\n      m += wcount[i];\n      j = wcount[i]-1;\n      for (k=0; k < wcount[i]; j=k++) {\n         int a=k,b=j;\n         // skip the edge if horizontal\n         if (p[j].y == p[k].y)\n            continue;\n         // add edge from j to k to the list\n         e[n].invert = 0;\n         if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) {\n            e[n].invert = 1;\n            a=j,b=k;\n         }\n         e[n].x0 = p[a].x * scale_x + shift_x;\n         e[n].y0 = (p[a].y * y_scale_inv + shift_y) * vsubsample;\n         e[n].x1 = p[b].x * scale_x + shift_x;\n         e[n].y1 = (p[b].y * y_scale_inv + shift_y) * vsubsample;\n         ++n;\n      }\n   }\n\n   // now sort the edges by their highest point (should snap to integer, and then by x)\n   //STBTT_sort(e, n, sizeof(e[0]), stbtt__edge_compare);\n   stbtt__sort_edges(e, n);\n\n   // now, traverse the scanlines and find the intersections on each scanline, use xor winding rule\n   stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, userdata);\n\n   STBTT_free(e, userdata);\n}\n\nstatic void stbtt__add_point(stbtt__point *points, int n, float x, float y)\n{\n   if (!points) return; // during first pass, it's unallocated\n   points[n].x = x;\n   points[n].y = y;\n}\n\n// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching\nstatic int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int n)\n{\n   // midpoint\n   float mx = (x0 + 2*x1 + x2)/4;\n   float my = (y0 + 2*y1 + y2)/4;\n   // versus directly drawn line\n   float dx = (x0+x2)/2 - mx;\n   float dy = (y0+y2)/2 - my;\n   if (n > 16) // 65536 segments on one curve better be enough!\n      return 1;\n   if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA\n      stbtt__tesselate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1);\n      stbtt__tesselate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);\n   } else {\n      stbtt__add_point(points, *num_points,x2,y2);\n      *num_points = *num_points+1;\n   }\n   return 1;\n}\n\nstatic void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n)\n{\n   // @TODO this \"flatness\" calculation is just made-up nonsense that seems to work well enough\n   float dx0 = x1-x0;\n   float dy0 = y1-y0;\n   float dx1 = x2-x1;\n   float dy1 = y2-y1;\n   float dx2 = x3-x2;\n   float dy2 = y3-y2;\n   float dx = x3-x0;\n   float dy = y3-y0;\n   float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2));\n   float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy);\n   float flatness_squared = longlen*longlen-shortlen*shortlen;\n\n   if (n > 16) // 65536 segments on one curve better be enough!\n      return;\n\n   if (flatness_squared > objspace_flatness_squared) {\n      float x01 = (x0+x1)/2;\n      float y01 = (y0+y1)/2;\n      float x12 = (x1+x2)/2;\n      float y12 = (y1+y2)/2;\n      float x23 = (x2+x3)/2;\n      float y23 = (y2+y3)/2;\n\n      float xa = (x01+x12)/2;\n      float ya = (y01+y12)/2;\n      float xb = (x12+x23)/2;\n      float yb = (y12+y23)/2;\n\n      float mx = (xa+xb)/2;\n      float my = (ya+yb)/2;\n\n      stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);\n      stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);\n   } else {\n      stbtt__add_point(points, *num_points,x3,y3);\n      *num_points = *num_points+1;\n   }\n}\n\n// returns number of contours\nstatic stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata)\n{\n   stbtt__point *points=0;\n   int num_points=0;\n\n   float objspace_flatness_squared = objspace_flatness * objspace_flatness;\n   int i,n=0,start=0, pass;\n\n   // count how many \"moves\" there are to get the contour count\n   for (i=0; i < num_verts; ++i)\n      if (vertices[i].type == STBTT_vmove)\n         ++n;\n\n   *num_contours = n;\n   if (n == 0) return 0;\n\n   *contour_lengths = (int *) STBTT_malloc(sizeof(**contour_lengths) * n, userdata);\n\n   if (*contour_lengths == 0) {\n      *num_contours = 0;\n      return 0;\n   }\n\n   // make two passes through the points so we don't need to realloc\n   for (pass=0; pass < 2; ++pass) {\n      float x=0,y=0;\n      if (pass == 1) {\n         points = (stbtt__point *) STBTT_malloc(num_points * sizeof(points[0]), userdata);\n         if (points == NULL) goto error;\n      }\n      num_points = 0;\n      n= -1;\n      for (i=0; i < num_verts; ++i) {\n         switch (vertices[i].type) {\n            case STBTT_vmove:\n               // start the next contour\n               if (n >= 0)\n                  (*contour_lengths)[n] = num_points - start;\n               ++n;\n               start = num_points;\n\n               x = vertices[i].x, y = vertices[i].y;\n               stbtt__add_point(points, num_points++, x,y);\n               break;\n            case STBTT_vline:\n               x = vertices[i].x, y = vertices[i].y;\n               stbtt__add_point(points, num_points++, x, y);\n               break;\n            case STBTT_vcurve:\n               stbtt__tesselate_curve(points, &num_points, x,y,\n                                        vertices[i].cx, vertices[i].cy,\n                                        vertices[i].x,  vertices[i].y,\n                                        objspace_flatness_squared, 0);\n               x = vertices[i].x, y = vertices[i].y;\n               break;\n            case STBTT_vcubic:\n               stbtt__tesselate_cubic(points, &num_points, x,y,\n                                        vertices[i].cx, vertices[i].cy,\n                                        vertices[i].cx1, vertices[i].cy1,\n                                        vertices[i].x,  vertices[i].y,\n                                        objspace_flatness_squared, 0);\n               x = vertices[i].x, y = vertices[i].y;\n               break;\n         }\n      }\n      (*contour_lengths)[n] = num_points - start;\n   }\n\n   return points;\nerror:\n   STBTT_free(points, userdata);\n   STBTT_free(*contour_lengths, userdata);\n   *contour_lengths = 0;\n   *num_contours = 0;\n   return NULL;\n}\n\nSTBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, stbtt_vertex *vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void *userdata)\n{\n   float scale            = scale_x > scale_y ? scale_y : scale_x;\n   int winding_count      = 0;\n   int *winding_lengths   = NULL;\n   stbtt__point *windings = stbtt_FlattenCurves(vertices, num_verts, flatness_in_pixels / scale, &winding_lengths, &winding_count, userdata);\n   if (windings) {\n      stbtt__rasterize(result, windings, winding_lengths, winding_count, scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, userdata);\n      STBTT_free(winding_lengths, userdata);\n      STBTT_free(windings, userdata);\n   }\n}\n\nSTBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata)\n{\n   STBTT_free(bitmap, userdata);\n}\n\nSTBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff)\n{\n   int ix0,iy0,ix1,iy1;\n   stbtt__bitmap gbm;\n   stbtt_vertex *vertices;\n   int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);\n\n   if (scale_x == 0) scale_x = scale_y;\n   if (scale_y == 0) {\n      if (scale_x == 0) {\n         STBTT_free(vertices, info->userdata);\n         return NULL;\n      }\n      scale_y = scale_x;\n   }\n\n   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,&ix1,&iy1);\n\n   // now we get the size\n   gbm.w = (ix1 - ix0);\n   gbm.h = (iy1 - iy0);\n   gbm.pixels = NULL; // in case we error\n\n   if (width ) *width  = gbm.w;\n   if (height) *height = gbm.h;\n   if (xoff  ) *xoff   = ix0;\n   if (yoff  ) *yoff   = iy0;\n\n   if (gbm.w && gbm.h) {\n      gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata);\n      if (gbm.pixels) {\n         gbm.stride = gbm.w;\n\n         stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata);\n      }\n   }\n   STBTT_free(vertices, info->userdata);\n   return gbm.pixels;\n}\n\nSTBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff)\n{\n   return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, 0.0f, 0.0f, glyph, width, height, xoff, yoff);\n}\n\nSTBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph)\n{\n   int ix0,iy0;\n   stbtt_vertex *vertices;\n   int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);\n   stbtt__bitmap gbm;\n\n   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0);\n   gbm.pixels = output;\n   gbm.w = out_w;\n   gbm.h = out_h;\n   gbm.stride = out_stride;\n\n   if (gbm.w && gbm.h)\n      stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0,iy0, 1, info->userdata);\n\n   STBTT_free(vertices, info->userdata);\n}\n\nSTBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph)\n{\n   stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, glyph);\n}\n\nSTBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff)\n{\n   return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff);\n}\n\nSTBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint)\n{\n   stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, stbtt_FindGlyphIndex(info,codepoint));\n}\n\nSTBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint)\n{\n   stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, stbtt_FindGlyphIndex(info,codepoint));\n}\n\nSTBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff)\n{\n   return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff);\n}\n\nSTBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint)\n{\n   stbtt_MakeCodepointBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, codepoint);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// bitmap baking\n//\n// This is SUPER-CRAPPY packing to keep source code small\n\nstatic int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset,  // font location (use offset=0 for plain .ttf)\n                                float pixel_height,                     // height of font in pixels\n                                unsigned char *pixels, int pw, int ph,  // bitmap to be filled in\n                                int first_char, int num_chars,          // characters to bake\n                                stbtt_bakedchar *chardata)\n{\n   float scale;\n   int x,y,bottom_y, i;\n   stbtt_fontinfo f;\n   f.userdata = NULL;\n   if (!stbtt_InitFont(&f, data, offset))\n      return -1;\n   STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels\n   x=y=1;\n   bottom_y = 1;\n\n   scale = stbtt_ScaleForPixelHeight(&f, pixel_height);\n\n   for (i=0; i < num_chars; ++i) {\n      int advance, lsb, x0,y0,x1,y1,gw,gh;\n      int g = stbtt_FindGlyphIndex(&f, first_char + i);\n      stbtt_GetGlyphHMetrics(&f, g, &advance, &lsb);\n      stbtt_GetGlyphBitmapBox(&f, g, scale,scale, &x0,&y0,&x1,&y1);\n      gw = x1-x0;\n      gh = y1-y0;\n      if (x + gw + 1 >= pw)\n         y = bottom_y, x = 1; // advance to next row\n      if (y + gh + 1 >= ph) // check if it fits vertically AFTER potentially moving to next row\n         return -i;\n      STBTT_assert(x+gw < pw);\n      STBTT_assert(y+gh < ph);\n      stbtt_MakeGlyphBitmap(&f, pixels+x+y*pw, gw,gh,pw, scale,scale, g);\n      chardata[i].x0 = (stbtt_int16) x;\n      chardata[i].y0 = (stbtt_int16) y;\n      chardata[i].x1 = (stbtt_int16) (x + gw);\n      chardata[i].y1 = (stbtt_int16) (y + gh);\n      chardata[i].xadvance = scale * advance;\n      chardata[i].xoff     = (float) x0;\n      chardata[i].yoff     = (float) y0;\n      x = x + gw + 1;\n      if (y+gh+1 > bottom_y)\n         bottom_y = y+gh+1;\n   }\n   return bottom_y;\n}\n\nSTBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule)\n{\n   float d3d_bias = opengl_fillrule ? 0 : -0.5f;\n   float ipw = 1.0f / pw, iph = 1.0f / ph;\n   const stbtt_bakedchar *b = chardata + char_index;\n   int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f);\n   int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f);\n\n   q->x0 = round_x + d3d_bias;\n   q->y0 = round_y + d3d_bias;\n   q->x1 = round_x + b->x1 - b->x0 + d3d_bias;\n   q->y1 = round_y + b->y1 - b->y0 + d3d_bias;\n\n   q->s0 = b->x0 * ipw;\n   q->t0 = b->y0 * iph;\n   q->s1 = b->x1 * ipw;\n   q->t1 = b->y1 * iph;\n\n   *xpos += b->xadvance;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// rectangle packing replacement routines if you don't have stb_rect_pack.h\n//\n\n#ifndef STB_RECT_PACK_VERSION\n\ntypedef int stbrp_coord;\n\n////////////////////////////////////////////////////////////////////////////////////\n//                                                                                //\n//                                                                                //\n// COMPILER WARNING ?!?!?                                                         //\n//                                                                                //\n//                                                                                //\n// if you get a compile warning due to these symbols being defined more than      //\n// once, move #include \"stb_rect_pack.h\" before #include \"stb_truetype.h\"         //\n//                                                                                //\n////////////////////////////////////////////////////////////////////////////////////\n\ntypedef struct\n{\n   int width,height;\n   int x,y,bottom_y;\n} stbrp_context;\n\ntypedef struct\n{\n   unsigned char x;\n} stbrp_node;\n\nstruct stbrp_rect\n{\n   stbrp_coord x,y;\n   int id,w,h,was_packed;\n};\n\nstatic void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *nodes, int num_nodes)\n{\n   con->width  = pw;\n   con->height = ph;\n   con->x = 0;\n   con->y = 0;\n   con->bottom_y = 0;\n   STBTT__NOTUSED(nodes);\n   STBTT__NOTUSED(num_nodes);\n}\n\nstatic void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects)\n{\n   int i;\n   for (i=0; i < num_rects; ++i) {\n      if (con->x + rects[i].w > con->width) {\n         con->x = 0;\n         con->y = con->bottom_y;\n      }\n      if (con->y + rects[i].h > con->height)\n         break;\n      rects[i].x = con->x;\n      rects[i].y = con->y;\n      rects[i].was_packed = 1;\n      con->x += rects[i].w;\n      if (con->y + rects[i].h > con->bottom_y)\n         con->bottom_y = con->y + rects[i].h;\n   }\n   for (   ; i < num_rects; ++i)\n      rects[i].was_packed = 0;\n}\n#endif\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// bitmap baking\n//\n// This is SUPER-AWESOME (tm Ryan Gordon) packing using stb_rect_pack.h. If\n// stb_rect_pack.h isn't available, it uses the BakeFontBitmap strategy.\n\nSTBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int pw, int ph, int stride_in_bytes, int padding, void *alloc_context)\n{\n   stbrp_context *context = (stbrp_context *) STBTT_malloc(sizeof(*context)            ,alloc_context);\n   int            num_nodes = pw - padding;\n   stbrp_node    *nodes   = (stbrp_node    *) STBTT_malloc(sizeof(*nodes  ) * num_nodes,alloc_context);\n\n   if (context == NULL || nodes == NULL) {\n      if (context != NULL) STBTT_free(context, alloc_context);\n      if (nodes   != NULL) STBTT_free(nodes  , alloc_context);\n      return 0;\n   }\n\n   spc->user_allocator_context = alloc_context;\n   spc->width = pw;\n   spc->height = ph;\n   spc->pixels = pixels;\n   spc->pack_info = context;\n   spc->nodes = nodes;\n   spc->padding = padding;\n   spc->stride_in_bytes = stride_in_bytes != 0 ? stride_in_bytes : pw;\n   spc->h_oversample = 1;\n   spc->v_oversample = 1;\n   spc->skip_missing = 0;\n\n   stbrp_init_target(context, pw-padding, ph-padding, nodes, num_nodes);\n\n   if (pixels)\n      STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels\n\n   return 1;\n}\n\nSTBTT_DEF void stbtt_PackEnd  (stbtt_pack_context *spc)\n{\n   STBTT_free(spc->nodes    , spc->user_allocator_context);\n   STBTT_free(spc->pack_info, spc->user_allocator_context);\n}\n\nSTBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample)\n{\n   STBTT_assert(h_oversample <= STBTT_MAX_OVERSAMPLE);\n   STBTT_assert(v_oversample <= STBTT_MAX_OVERSAMPLE);\n   if (h_oversample <= STBTT_MAX_OVERSAMPLE)\n      spc->h_oversample = h_oversample;\n   if (v_oversample <= STBTT_MAX_OVERSAMPLE)\n      spc->v_oversample = v_oversample;\n}\n\nSTBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip)\n{\n   spc->skip_missing = skip;\n}\n\n#define STBTT__OVER_MASK  (STBTT_MAX_OVERSAMPLE-1)\n\nstatic void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)\n{\n   unsigned char buffer[STBTT_MAX_OVERSAMPLE];\n   int safe_w = w - kernel_width;\n   int j;\n   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze\n   for (j=0; j < h; ++j) {\n      int i;\n      unsigned int total;\n      STBTT_memset(buffer, 0, kernel_width);\n\n      total = 0;\n\n      // make kernel_width a constant in common cases so compiler can optimize out the divide\n      switch (kernel_width) {\n         case 2:\n            for (i=0; i <= safe_w; ++i) {\n               total += pixels[i] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];\n               pixels[i] = (unsigned char) (total / 2);\n            }\n            break;\n         case 3:\n            for (i=0; i <= safe_w; ++i) {\n               total += pixels[i] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];\n               pixels[i] = (unsigned char) (total / 3);\n            }\n            break;\n         case 4:\n            for (i=0; i <= safe_w; ++i) {\n               total += pixels[i] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];\n               pixels[i] = (unsigned char) (total / 4);\n            }\n            break;\n         case 5:\n            for (i=0; i <= safe_w; ++i) {\n               total += pixels[i] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];\n               pixels[i] = (unsigned char) (total / 5);\n            }\n            break;\n         default:\n            for (i=0; i <= safe_w; ++i) {\n               total += pixels[i] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];\n               pixels[i] = (unsigned char) (total / kernel_width);\n            }\n            break;\n      }\n\n      for (; i < w; ++i) {\n         STBTT_assert(pixels[i] == 0);\n         total -= buffer[i & STBTT__OVER_MASK];\n         pixels[i] = (unsigned char) (total / kernel_width);\n      }\n\n      pixels += stride_in_bytes;\n   }\n}\n\nstatic void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)\n{\n   unsigned char buffer[STBTT_MAX_OVERSAMPLE];\n   int safe_h = h - kernel_width;\n   int j;\n   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze\n   for (j=0; j < w; ++j) {\n      int i;\n      unsigned int total;\n      STBTT_memset(buffer, 0, kernel_width);\n\n      total = 0;\n\n      // make kernel_width a constant in common cases so compiler can optimize out the divide\n      switch (kernel_width) {\n         case 2:\n            for (i=0; i <= safe_h; ++i) {\n               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];\n               pixels[i*stride_in_bytes] = (unsigned char) (total / 2);\n            }\n            break;\n         case 3:\n            for (i=0; i <= safe_h; ++i) {\n               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];\n               pixels[i*stride_in_bytes] = (unsigned char) (total / 3);\n            }\n            break;\n         case 4:\n            for (i=0; i <= safe_h; ++i) {\n               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];\n               pixels[i*stride_in_bytes] = (unsigned char) (total / 4);\n            }\n            break;\n         case 5:\n            for (i=0; i <= safe_h; ++i) {\n               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];\n               pixels[i*stride_in_bytes] = (unsigned char) (total / 5);\n            }\n            break;\n         default:\n            for (i=0; i <= safe_h; ++i) {\n               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];\n               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];\n               pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width);\n            }\n            break;\n      }\n\n      for (; i < h; ++i) {\n         STBTT_assert(pixels[i*stride_in_bytes] == 0);\n         total -= buffer[i & STBTT__OVER_MASK];\n         pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width);\n      }\n\n      pixels += 1;\n   }\n}\n\nstatic float stbtt__oversample_shift(int oversample)\n{\n   if (!oversample)\n      return 0.0f;\n\n   // The prefilter is a box filter of width \"oversample\",\n   // which shifts phase by (oversample - 1)/2 pixels in\n   // oversampled space. We want to shift in the opposite\n   // direction to counter this.\n   return (float)-(oversample - 1) / (2.0f * (float)oversample);\n}\n\n// rects array must be big enough to accommodate all characters in the given ranges\nSTBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)\n{\n   int i,j,k;\n   int missing_glyph_added = 0;\n\n   k=0;\n   for (i=0; i < num_ranges; ++i) {\n      float fh = ranges[i].font_size;\n      float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh);\n      ranges[i].h_oversample = (unsigned char) spc->h_oversample;\n      ranges[i].v_oversample = (unsigned char) spc->v_oversample;\n      for (j=0; j < ranges[i].num_chars; ++j) {\n         int x0,y0,x1,y1;\n         int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];\n         int glyph = stbtt_FindGlyphIndex(info, codepoint);\n         if (glyph == 0 && (spc->skip_missing || missing_glyph_added)) {\n            rects[k].w = rects[k].h = 0;\n         } else {\n            stbtt_GetGlyphBitmapBoxSubpixel(info,glyph,\n                                            scale * spc->h_oversample,\n                                            scale * spc->v_oversample,\n                                            0,0,\n                                            &x0,&y0,&x1,&y1);\n            rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1);\n            rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1);\n            if (glyph == 0)\n               missing_glyph_added = 1;\n         }\n         ++k;\n      }\n   }\n\n   return k;\n}\n\nSTBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y, float *sub_x, float *sub_y, int glyph)\n{\n   stbtt_MakeGlyphBitmapSubpixel(info,\n                                 output,\n                                 out_w - (prefilter_x - 1),\n                                 out_h - (prefilter_y - 1),\n                                 out_stride,\n                                 scale_x,\n                                 scale_y,\n                                 shift_x,\n                                 shift_y,\n                                 glyph);\n\n   if (prefilter_x > 1)\n      stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x);\n\n   if (prefilter_y > 1)\n      stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y);\n\n   *sub_x = stbtt__oversample_shift(prefilter_x);\n   *sub_y = stbtt__oversample_shift(prefilter_y);\n}\n\n// rects array must be big enough to accommodate all characters in the given ranges\nSTBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)\n{\n   int i,j,k, missing_glyph = -1, return_value = 1;\n\n   // save current values\n   int old_h_over = spc->h_oversample;\n   int old_v_over = spc->v_oversample;\n\n   k = 0;\n   for (i=0; i < num_ranges; ++i) {\n      float fh = ranges[i].font_size;\n      float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh);\n      float recip_h,recip_v,sub_x,sub_y;\n      spc->h_oversample = ranges[i].h_oversample;\n      spc->v_oversample = ranges[i].v_oversample;\n      recip_h = 1.0f / spc->h_oversample;\n      recip_v = 1.0f / spc->v_oversample;\n      sub_x = stbtt__oversample_shift(spc->h_oversample);\n      sub_y = stbtt__oversample_shift(spc->v_oversample);\n      for (j=0; j < ranges[i].num_chars; ++j) {\n         stbrp_rect *r = &rects[k];\n         if (r->was_packed && r->w != 0 && r->h != 0) {\n            stbtt_packedchar *bc = &ranges[i].chardata_for_range[j];\n            int advance, lsb, x0,y0,x1,y1;\n            int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];\n            int glyph = stbtt_FindGlyphIndex(info, codepoint);\n            stbrp_coord pad = (stbrp_coord) spc->padding;\n\n            // pad on left and top\n            r->x += pad;\n            r->y += pad;\n            r->w -= pad;\n            r->h -= pad;\n            stbtt_GetGlyphHMetrics(info, glyph, &advance, &lsb);\n            stbtt_GetGlyphBitmapBox(info, glyph,\n                                    scale * spc->h_oversample,\n                                    scale * spc->v_oversample,\n                                    &x0,&y0,&x1,&y1);\n            stbtt_MakeGlyphBitmapSubpixel(info,\n                                          spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                                          r->w - spc->h_oversample+1,\n                                          r->h - spc->v_oversample+1,\n                                          spc->stride_in_bytes,\n                                          scale * spc->h_oversample,\n                                          scale * spc->v_oversample,\n                                          0,0,\n                                          glyph);\n\n            if (spc->h_oversample > 1)\n               stbtt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                                  r->w, r->h, spc->stride_in_bytes,\n                                  spc->h_oversample);\n\n            if (spc->v_oversample > 1)\n               stbtt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,\n                                  r->w, r->h, spc->stride_in_bytes,\n                                  spc->v_oversample);\n\n            bc->x0       = (stbtt_int16)  r->x;\n            bc->y0       = (stbtt_int16)  r->y;\n            bc->x1       = (stbtt_int16) (r->x + r->w);\n            bc->y1       = (stbtt_int16) (r->y + r->h);\n            bc->xadvance =                scale * advance;\n            bc->xoff     =       (float)  x0 * recip_h + sub_x;\n            bc->yoff     =       (float)  y0 * recip_v + sub_y;\n            bc->xoff2    =                (x0 + r->w) * recip_h + sub_x;\n            bc->yoff2    =                (y0 + r->h) * recip_v + sub_y;\n\n            if (glyph == 0)\n               missing_glyph = j;\n         } else if (spc->skip_missing) {\n            return_value = 0;\n         } else if (r->was_packed && r->w == 0 && r->h == 0 && missing_glyph >= 0) {\n            ranges[i].chardata_for_range[j] = ranges[i].chardata_for_range[missing_glyph];\n         } else {\n            return_value = 0; // if any fail, report failure\n         }\n\n         ++k;\n      }\n   }\n\n   // restore original values\n   spc->h_oversample = old_h_over;\n   spc->v_oversample = old_v_over;\n\n   return return_value;\n}\n\nSTBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects)\n{\n   stbrp_pack_rects((stbrp_context *) spc->pack_info, rects, num_rects);\n}\n\nSTBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges)\n{\n   stbtt_fontinfo info;\n   int i,j,n, return_value = 1;\n   //stbrp_context *context = (stbrp_context *) spc->pack_info;\n   stbrp_rect    *rects;\n\n   // flag all characters as NOT packed\n   for (i=0; i < num_ranges; ++i)\n      for (j=0; j < ranges[i].num_chars; ++j)\n         ranges[i].chardata_for_range[j].x0 =\n         ranges[i].chardata_for_range[j].y0 =\n         ranges[i].chardata_for_range[j].x1 =\n         ranges[i].chardata_for_range[j].y1 = 0;\n\n   n = 0;\n   for (i=0; i < num_ranges; ++i)\n      n += ranges[i].num_chars;\n\n   rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context);\n   if (rects == NULL)\n      return 0;\n\n   info.userdata = spc->user_allocator_context;\n   stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata,font_index));\n\n   n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects);\n\n   stbtt_PackFontRangesPackRects(spc, rects, n);\n\n   return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects);\n\n   STBTT_free(rects, spc->user_allocator_context);\n   return return_value;\n}\n\nSTBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size,\n            int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range)\n{\n   stbtt_pack_range range;\n   range.first_unicode_codepoint_in_range = first_unicode_codepoint_in_range;\n   range.array_of_unicode_codepoints = NULL;\n   range.num_chars                   = num_chars_in_range;\n   range.chardata_for_range          = chardata_for_range;\n   range.font_size                   = font_size;\n   return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1);\n}\n\nSTBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap)\n{\n   int i_ascent, i_descent, i_lineGap;\n   float scale;\n   stbtt_fontinfo info;\n   stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, index));\n   scale = size > 0 ? stbtt_ScaleForPixelHeight(&info, size) : stbtt_ScaleForMappingEmToPixels(&info, -size);\n   stbtt_GetFontVMetrics(&info, &i_ascent, &i_descent, &i_lineGap);\n   *ascent  = (float) i_ascent  * scale;\n   *descent = (float) i_descent * scale;\n   *lineGap = (float) i_lineGap * scale;\n}\n\nSTBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer)\n{\n   float ipw = 1.0f / pw, iph = 1.0f / ph;\n   const stbtt_packedchar *b = chardata + char_index;\n\n   if (align_to_integer) {\n      float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f);\n      float y = (float) STBTT_ifloor((*ypos + b->yoff) + 0.5f);\n      q->x0 = x;\n      q->y0 = y;\n      q->x1 = x + b->xoff2 - b->xoff;\n      q->y1 = y + b->yoff2 - b->yoff;\n   } else {\n      q->x0 = *xpos + b->xoff;\n      q->y0 = *ypos + b->yoff;\n      q->x1 = *xpos + b->xoff2;\n      q->y1 = *ypos + b->yoff2;\n   }\n\n   q->s0 = b->x0 * ipw;\n   q->t0 = b->y0 * iph;\n   q->s1 = b->x1 * ipw;\n   q->t1 = b->y1 * iph;\n\n   *xpos += b->xadvance;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// sdf computation\n//\n\n#define STBTT_min(a,b)  ((a) < (b) ? (a) : (b))\n#define STBTT_max(a,b)  ((a) < (b) ? (b) : (a))\n\nstatic int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2], float q1[2], float q2[2], float hits[2][2])\n{\n   float q0perp = q0[1]*ray[0] - q0[0]*ray[1];\n   float q1perp = q1[1]*ray[0] - q1[0]*ray[1];\n   float q2perp = q2[1]*ray[0] - q2[0]*ray[1];\n   float roperp = orig[1]*ray[0] - orig[0]*ray[1];\n\n   float a = q0perp - 2*q1perp + q2perp;\n   float b = q1perp - q0perp;\n   float c = q0perp - roperp;\n\n   float s0 = 0., s1 = 0.;\n   int num_s = 0;\n\n   if (a != 0.0) {\n      float discr = b*b - a*c;\n      if (discr > 0.0) {\n         float rcpna = -1 / a;\n         float d = (float) STBTT_sqrt(discr);\n         s0 = (b+d) * rcpna;\n         s1 = (b-d) * rcpna;\n         if (s0 >= 0.0 && s0 <= 1.0)\n            num_s = 1;\n         if (d > 0.0 && s1 >= 0.0 && s1 <= 1.0) {\n            if (num_s == 0) s0 = s1;\n            ++num_s;\n         }\n      }\n   } else {\n      // 2*b*s + c = 0\n      // s = -c / (2*b)\n      s0 = c / (-2 * b);\n      if (s0 >= 0.0 && s0 <= 1.0)\n         num_s = 1;\n   }\n\n   if (num_s == 0)\n      return 0;\n   else {\n      float rcp_len2 = 1 / (ray[0]*ray[0] + ray[1]*ray[1]);\n      float rayn_x = ray[0] * rcp_len2, rayn_y = ray[1] * rcp_len2;\n\n      float q0d =   q0[0]*rayn_x +   q0[1]*rayn_y;\n      float q1d =   q1[0]*rayn_x +   q1[1]*rayn_y;\n      float q2d =   q2[0]*rayn_x +   q2[1]*rayn_y;\n      float rod = orig[0]*rayn_x + orig[1]*rayn_y;\n\n      float q10d = q1d - q0d;\n      float q20d = q2d - q0d;\n      float q0rd = q0d - rod;\n\n      hits[0][0] = q0rd + s0*(2.0f - 2.0f*s0)*q10d + s0*s0*q20d;\n      hits[0][1] = a*s0+b;\n\n      if (num_s > 1) {\n         hits[1][0] = q0rd + s1*(2.0f - 2.0f*s1)*q10d + s1*s1*q20d;\n         hits[1][1] = a*s1+b;\n         return 2;\n      } else {\n         return 1;\n      }\n   }\n}\n\nstatic int equal(float *a, float *b)\n{\n   return (a[0] == b[0] && a[1] == b[1]);\n}\n\nstatic int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts)\n{\n   int i;\n   float orig[2], ray[2] = { 1, 0 };\n   float y_frac;\n   int winding = 0;\n\n   orig[0] = x;\n   orig[1] = y;\n\n   // make sure y never passes through a vertex of the shape\n   y_frac = (float) STBTT_fmod(y, 1.0f);\n   if (y_frac < 0.01f)\n      y += 0.01f;\n   else if (y_frac > 0.99f)\n      y -= 0.01f;\n   orig[1] = y;\n\n   // test a ray from (-infinity,y) to (x,y)\n   for (i=0; i < nverts; ++i) {\n      if (verts[i].type == STBTT_vline) {\n         int x0 = (int) verts[i-1].x, y0 = (int) verts[i-1].y;\n         int x1 = (int) verts[i  ].x, y1 = (int) verts[i  ].y;\n         if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {\n            float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;\n            if (x_inter < x)\n               winding += (y0 < y1) ? 1 : -1;\n         }\n      }\n      if (verts[i].type == STBTT_vcurve) {\n         int x0 = (int) verts[i-1].x , y0 = (int) verts[i-1].y ;\n         int x1 = (int) verts[i  ].cx, y1 = (int) verts[i  ].cy;\n         int x2 = (int) verts[i  ].x , y2 = (int) verts[i  ].y ;\n         int ax = STBTT_min(x0,STBTT_min(x1,x2)), ay = STBTT_min(y0,STBTT_min(y1,y2));\n         int by = STBTT_max(y0,STBTT_max(y1,y2));\n         if (y > ay && y < by && x > ax) {\n            float q0[2],q1[2],q2[2];\n            float hits[2][2];\n            q0[0] = (float)x0;\n            q0[1] = (float)y0;\n            q1[0] = (float)x1;\n            q1[1] = (float)y1;\n            q2[0] = (float)x2;\n            q2[1] = (float)y2;\n            if (equal(q0,q1) || equal(q1,q2)) {\n               x0 = (int)verts[i-1].x;\n               y0 = (int)verts[i-1].y;\n               x1 = (int)verts[i  ].x;\n               y1 = (int)verts[i  ].y;\n               if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {\n                  float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;\n                  if (x_inter < x)\n                     winding += (y0 < y1) ? 1 : -1;\n               }\n            } else {\n               int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits);\n               if (num_hits >= 1)\n                  if (hits[0][0] < 0)\n                     winding += (hits[0][1] < 0 ? -1 : 1);\n               if (num_hits >= 2)\n                  if (hits[1][0] < 0)\n                     winding += (hits[1][1] < 0 ? -1 : 1);\n            }\n         }\n      }\n   }\n   return winding;\n}\n\nstatic float stbtt__cuberoot( float x )\n{\n   if (x<0)\n      return -(float) STBTT_pow(-x,1.0f/3.0f);\n   else\n      return  (float) STBTT_pow( x,1.0f/3.0f);\n}\n\n// x^3 + c*x^2 + b*x + a = 0\nstatic int stbtt__solve_cubic(float a, float b, float c, float* r)\n{\n\tfloat s = -a / 3;\n\tfloat p = b - a*a / 3;\n\tfloat q = a * (2*a*a - 9*b) / 27 + c;\n   float p3 = p*p*p;\n\tfloat d = q*q + 4*p3 / 27;\n\tif (d >= 0) {\n\t\tfloat z = (float) STBTT_sqrt(d);\n\t\tfloat u = (-q + z) / 2;\n\t\tfloat v = (-q - z) / 2;\n\t\tu = stbtt__cuberoot(u);\n\t\tv = stbtt__cuberoot(v);\n\t\tr[0] = s + u + v;\n\t\treturn 1;\n\t} else {\n\t   float u = (float) STBTT_sqrt(-p/3);\n\t   float v = (float) STBTT_acos(-STBTT_sqrt(-27/p3) * q / 2) / 3; // p3 must be negative, since d is negative\n\t   float m = (float) STBTT_cos(v);\n      float n = (float) STBTT_cos(v-3.141592/2)*1.732050808f;\n\t   r[0] = s + u * 2 * m;\n\t   r[1] = s - u * (m + n);\n\t   r[2] = s - u * (m - n);\n\n      //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f);  // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe?\n      //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f);\n      //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f);\n   \treturn 3;\n   }\n}\n\nSTBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)\n{\n   float scale_x = scale, scale_y = scale;\n   int ix0,iy0,ix1,iy1;\n   int w,h;\n   unsigned char *data;\n\n   if (scale == 0) return NULL;\n\n   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f,0.0f, &ix0,&iy0,&ix1,&iy1);\n\n   // if empty, return NULL\n   if (ix0 == ix1 || iy0 == iy1)\n      return NULL;\n\n   ix0 -= padding;\n   iy0 -= padding;\n   ix1 += padding;\n   iy1 += padding;\n\n   w = (ix1 - ix0);\n   h = (iy1 - iy0);\n\n   if (width ) *width  = w;\n   if (height) *height = h;\n   if (xoff  ) *xoff   = ix0;\n   if (yoff  ) *yoff   = iy0;\n\n   // invert for y-downwards bitmaps\n   scale_y = -scale_y;\n\n   {\n      int x,y,i,j;\n      float *precompute;\n      stbtt_vertex *verts;\n      int num_verts = stbtt_GetGlyphShape(info, glyph, &verts);\n      data = (unsigned char *) STBTT_malloc(w * h, info->userdata);\n      precompute = (float *) STBTT_malloc(num_verts * sizeof(float), info->userdata);\n\n      for (i=0,j=num_verts-1; i < num_verts; j=i++) {\n         if (verts[i].type == STBTT_vline) {\n            float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;\n            float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y;\n            float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));\n            precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist;\n         } else if (verts[i].type == STBTT_vcurve) {\n            float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y;\n            float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y;\n            float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y;\n            float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;\n            float len2 = bx*bx + by*by;\n            if (len2 != 0.0f)\n               precompute[i] = 1.0f / (bx*bx + by*by);\n            else\n               precompute[i] = 0.0f;\n         } else\n            precompute[i] = 0.0f;\n      }\n\n      for (y=iy0; y < iy1; ++y) {\n         for (x=ix0; x < ix1; ++x) {\n            float val;\n            float min_dist = 999999.0f;\n            float sx = (float) x + 0.5f;\n            float sy = (float) y + 0.5f;\n            float x_gspace = (sx / scale_x);\n            float y_gspace = (sy / scale_y);\n\n            int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path\n\n            for (i=0; i < num_verts; ++i) {\n               float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;\n\n               // check against every point here rather than inside line/curve primitives -- @TODO: wrong if multiple 'moves' in a row produce a garbage point, and given culling, probably more efficient to do within line/curve\n               float dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy);\n               if (dist2 < min_dist*min_dist)\n                  min_dist = (float) STBTT_sqrt(dist2);\n\n               if (verts[i].type == STBTT_vline) {\n                  float x1 = verts[i-1].x*scale_x, y1 = verts[i-1].y*scale_y;\n\n                  // coarse culling against bbox\n                  //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist &&\n                  //    sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist)\n                  float dist = (float) STBTT_fabs((x1-x0)*(y0-sy) - (y1-y0)*(x0-sx)) * precompute[i];\n                  STBTT_assert(i != 0);\n                  if (dist < min_dist) {\n                     // check position along line\n                     // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0)\n                     // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy)\n                     float dx = x1-x0, dy = y1-y0;\n                     float px = x0-sx, py = y0-sy;\n                     // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy\n                     // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve\n                     float t = -(px*dx + py*dy) / (dx*dx + dy*dy);\n                     if (t >= 0.0f && t <= 1.0f)\n                        min_dist = dist;\n                  }\n               } else if (verts[i].type == STBTT_vcurve) {\n                  float x2 = verts[i-1].x *scale_x, y2 = verts[i-1].y *scale_y;\n                  float x1 = verts[i  ].cx*scale_x, y1 = verts[i  ].cy*scale_y;\n                  float box_x0 = STBTT_min(STBTT_min(x0,x1),x2);\n                  float box_y0 = STBTT_min(STBTT_min(y0,y1),y2);\n                  float box_x1 = STBTT_max(STBTT_max(x0,x1),x2);\n                  float box_y1 = STBTT_max(STBTT_max(y0,y1),y2);\n                  // coarse culling against bbox to avoid computing cubic unnecessarily\n                  if (sx > box_x0-min_dist && sx < box_x1+min_dist && sy > box_y0-min_dist && sy < box_y1+min_dist) {\n                     int num=0;\n                     float ax = x1-x0, ay = y1-y0;\n                     float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;\n                     float mx = x0 - sx, my = y0 - sy;\n                     float res[3],px,py,t,it;\n                     float a_inv = precompute[i];\n                     if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula\n                        float a = 3*(ax*bx + ay*by);\n                        float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by);\n                        float c = mx*ax+my*ay;\n                        if (a == 0.0) { // if a is 0, it's linear\n                           if (b != 0.0) {\n                              res[num++] = -c/b;\n                           }\n                        } else {\n                           float discriminant = b*b - 4*a*c;\n                           if (discriminant < 0)\n                              num = 0;\n                           else {\n                              float root = (float) STBTT_sqrt(discriminant);\n                              res[0] = (-b - root)/(2*a);\n                              res[1] = (-b + root)/(2*a);\n                              num = 2; // don't bother distinguishing 1-solution case, as code below will still work\n                           }\n                        }\n                     } else {\n                        float b = 3*(ax*bx + ay*by) * a_inv; // could precompute this as it doesn't depend on sample point\n                        float c = (2*(ax*ax + ay*ay) + (mx*bx+my*by)) * a_inv;\n                        float d = (mx*ax+my*ay) * a_inv;\n                        num = stbtt__solve_cubic(b, c, d, res);\n                     }\n                     if (num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) {\n                        t = res[0], it = 1.0f - t;\n                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;\n                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;\n                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);\n                        if (dist2 < min_dist * min_dist)\n                           min_dist = (float) STBTT_sqrt(dist2);\n                     }\n                     if (num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) {\n                        t = res[1], it = 1.0f - t;\n                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;\n                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;\n                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);\n                        if (dist2 < min_dist * min_dist)\n                           min_dist = (float) STBTT_sqrt(dist2);\n                     }\n                     if (num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) {\n                        t = res[2], it = 1.0f - t;\n                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;\n                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;\n                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);\n                        if (dist2 < min_dist * min_dist)\n                           min_dist = (float) STBTT_sqrt(dist2);\n                     }\n                  }\n               }\n            }\n            if (winding == 0)\n               min_dist = -min_dist;  // if outside the shape, value is negative\n            val = onedge_value + pixel_dist_scale * min_dist;\n            if (val < 0)\n               val = 0;\n            else if (val > 255)\n               val = 255;\n            data[(y-iy0)*w+(x-ix0)] = (unsigned char) val;\n         }\n      }\n      STBTT_free(precompute, info->userdata);\n      STBTT_free(verts, info->userdata);\n   }\n   return data;\n}\n\nSTBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)\n{\n   return stbtt_GetGlyphSDF(info, scale, stbtt_FindGlyphIndex(info, codepoint), padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff);\n}\n\nSTBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)\n{\n   STBTT_free(bitmap, userdata);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//\n// font name matching -- recommended not to use this\n//\n\n// check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string\nstatic stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2)\n{\n   stbtt_int32 i=0;\n\n   // convert utf16 to utf8 and compare the results while converting\n   while (len2) {\n      stbtt_uint16 ch = s2[0]*256 + s2[1];\n      if (ch < 0x80) {\n         if (i >= len1) return -1;\n         if (s1[i++] != ch) return -1;\n      } else if (ch < 0x800) {\n         if (i+1 >= len1) return -1;\n         if (s1[i++] != 0xc0 + (ch >> 6)) return -1;\n         if (s1[i++] != 0x80 + (ch & 0x3f)) return -1;\n      } else if (ch >= 0xd800 && ch < 0xdc00) {\n         stbtt_uint32 c;\n         stbtt_uint16 ch2 = s2[2]*256 + s2[3];\n         if (i+3 >= len1) return -1;\n         c = ((ch - 0xd800) << 10) + (ch2 - 0xdc00) + 0x10000;\n         if (s1[i++] != 0xf0 + (c >> 18)) return -1;\n         if (s1[i++] != 0x80 + ((c >> 12) & 0x3f)) return -1;\n         if (s1[i++] != 0x80 + ((c >>  6) & 0x3f)) return -1;\n         if (s1[i++] != 0x80 + ((c      ) & 0x3f)) return -1;\n         s2 += 2; // plus another 2 below\n         len2 -= 2;\n      } else if (ch >= 0xdc00 && ch < 0xe000) {\n         return -1;\n      } else {\n         if (i+2 >= len1) return -1;\n         if (s1[i++] != 0xe0 + (ch >> 12)) return -1;\n         if (s1[i++] != 0x80 + ((ch >> 6) & 0x3f)) return -1;\n         if (s1[i++] != 0x80 + ((ch     ) & 0x3f)) return -1;\n      }\n      s2 += 2;\n      len2 -= 2;\n   }\n   return i;\n}\n\nstatic int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2)\n{\n   return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2);\n}\n\n// returns results in whatever encoding you request... but note that 2-byte encodings\n// will be BIG-ENDIAN... use stbtt_CompareUTF8toUTF16_bigendian() to compare\nSTBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID)\n{\n   stbtt_int32 i,count,stringOffset;\n   stbtt_uint8 *fc = font->data;\n   stbtt_uint32 offset = font->fontstart;\n   stbtt_uint32 nm = stbtt__find_table(fc, offset, \"name\");\n   if (!nm) return NULL;\n\n   count = ttUSHORT(fc+nm+2);\n   stringOffset = nm + ttUSHORT(fc+nm+4);\n   for (i=0; i < count; ++i) {\n      stbtt_uint32 loc = nm + 6 + 12 * i;\n      if (platformID == ttUSHORT(fc+loc+0) && encodingID == ttUSHORT(fc+loc+2)\n          && languageID == ttUSHORT(fc+loc+4) && nameID == ttUSHORT(fc+loc+6)) {\n         *length = ttUSHORT(fc+loc+8);\n         return (const char *) (fc+stringOffset+ttUSHORT(fc+loc+10));\n      }\n   }\n   return NULL;\n}\n\nstatic int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint8 *name, stbtt_int32 nlen, stbtt_int32 target_id, stbtt_int32 next_id)\n{\n   stbtt_int32 i;\n   stbtt_int32 count = ttUSHORT(fc+nm+2);\n   stbtt_int32 stringOffset = nm + ttUSHORT(fc+nm+4);\n\n   for (i=0; i < count; ++i) {\n      stbtt_uint32 loc = nm + 6 + 12 * i;\n      stbtt_int32 id = ttUSHORT(fc+loc+6);\n      if (id == target_id) {\n         // find the encoding\n         stbtt_int32 platform = ttUSHORT(fc+loc+0), encoding = ttUSHORT(fc+loc+2), language = ttUSHORT(fc+loc+4);\n\n         // is this a Unicode encoding?\n         if (platform == 0 || (platform == 3 && encoding == 1) || (platform == 3 && encoding == 10)) {\n            stbtt_int32 slen = ttUSHORT(fc+loc+8);\n            stbtt_int32 off = ttUSHORT(fc+loc+10);\n\n            // check if there's a prefix match\n            stbtt_int32 matchlen = stbtt__CompareUTF8toUTF16_bigendian_prefix(name, nlen, fc+stringOffset+off,slen);\n            if (matchlen >= 0) {\n               // check for target_id+1 immediately following, with same encoding & language\n               if (i+1 < count && ttUSHORT(fc+loc+12+6) == next_id && ttUSHORT(fc+loc+12) == platform && ttUSHORT(fc+loc+12+2) == encoding && ttUSHORT(fc+loc+12+4) == language) {\n                  slen = ttUSHORT(fc+loc+12+8);\n                  off = ttUSHORT(fc+loc+12+10);\n                  if (slen == 0) {\n                     if (matchlen == nlen)\n                        return 1;\n                  } else if (matchlen < nlen && name[matchlen] == ' ') {\n                     ++matchlen;\n                     if (stbtt_CompareUTF8toUTF16_bigendian_internal((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen))\n                        return 1;\n                  }\n               } else {\n                  // if nothing immediately following\n                  if (matchlen == nlen)\n                     return 1;\n               }\n            }\n         }\n\n         // @TODO handle other encodings\n      }\n   }\n   return 0;\n}\n\nstatic int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *name, stbtt_int32 flags)\n{\n   stbtt_int32 nlen = (stbtt_int32) STBTT_strlen((char *) name);\n   stbtt_uint32 nm,hd;\n   if (!stbtt__isfont(fc+offset)) return 0;\n\n   // check italics/bold/underline flags in macStyle...\n   if (flags) {\n      hd = stbtt__find_table(fc, offset, \"head\");\n      if ((ttUSHORT(fc+hd+44) & 7) != (flags & 7)) return 0;\n   }\n\n   nm = stbtt__find_table(fc, offset, \"name\");\n   if (!nm) return 0;\n\n   if (flags) {\n      // if we checked the macStyle flags, then just check the family and ignore the subfamily\n      if (stbtt__matchpair(fc, nm, name, nlen, 16, -1))  return 1;\n      if (stbtt__matchpair(fc, nm, name, nlen,  1, -1))  return 1;\n      if (stbtt__matchpair(fc, nm, name, nlen,  3, -1))  return 1;\n   } else {\n      if (stbtt__matchpair(fc, nm, name, nlen, 16, 17))  return 1;\n      if (stbtt__matchpair(fc, nm, name, nlen,  1,  2))  return 1;\n      if (stbtt__matchpair(fc, nm, name, nlen,  3, -1))  return 1;\n   }\n\n   return 0;\n}\n\nstatic int stbtt_FindMatchingFont_internal(unsigned char *font_collection, char *name_utf8, stbtt_int32 flags)\n{\n   stbtt_int32 i;\n   for (i=0;;++i) {\n      stbtt_int32 off = stbtt_GetFontOffsetForIndex(font_collection, i);\n      if (off < 0) return off;\n      if (stbtt__matches((stbtt_uint8 *) font_collection, off, (stbtt_uint8*) name_utf8, flags))\n         return off;\n   }\n}\n\n#if defined(__GNUC__) || defined(__clang__)\n#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wcast-qual\"\n#endif\n\nSTBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,\n                                float pixel_height, unsigned char *pixels, int pw, int ph,\n                                int first_char, int num_chars, stbtt_bakedchar *chardata)\n{\n   return stbtt_BakeFontBitmap_internal((unsigned char *) data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata);\n}\n\nSTBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index)\n{\n   return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index);\n}\n\nSTBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data)\n{\n   return stbtt_GetNumberOfFonts_internal((unsigned char *) data);\n}\n\nSTBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset)\n{\n   return stbtt_InitFont_internal(info, (unsigned char *) data, offset);\n}\n\nSTBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags)\n{\n   return stbtt_FindMatchingFont_internal((unsigned char *) fontdata, (char *) name, flags);\n}\n\nSTBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2)\n{\n   return stbtt_CompareUTF8toUTF16_bigendian_internal((char *) s1, len1, (char *) s2, len2);\n}\n\n#if defined(__GNUC__) || defined(__clang__)\n#pragma GCC diagnostic pop\n#endif\n\n#endif // STB_TRUETYPE_IMPLEMENTATION\n\n\n// FULL VERSION HISTORY\n//\n//   1.19 (2018-02-11) OpenType GPOS kerning (horizontal only), STBTT_fmod\n//   1.18 (2018-01-29) add missing function\n//   1.17 (2017-07-23) make more arguments const; doc fix\n//   1.16 (2017-07-12) SDF support\n//   1.15 (2017-03-03) make more arguments const\n//   1.14 (2017-01-16) num-fonts-in-TTC function\n//   1.13 (2017-01-02) support OpenType fonts, certain Apple fonts\n//   1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual\n//   1.11 (2016-04-02) fix unused-variable warning\n//   1.10 (2016-04-02) allow user-defined fabs() replacement\n//                     fix memory leak if fontsize=0.0\n//                     fix warning from duplicate typedef\n//   1.09 (2016-01-16) warning fix; avoid crash on outofmem; use alloc userdata for PackFontRanges\n//   1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges\n//   1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints;\n//                     allow PackFontRanges to pack and render in separate phases;\n//                     fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);\n//                     fixed an assert() bug in the new rasterizer\n//                     replace assert() with STBTT_assert() in new rasterizer\n//   1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine)\n//                     also more precise AA rasterizer, except if shapes overlap\n//                     remove need for STBTT_sort\n//   1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC\n//   1.04 (2015-04-15) typo in example\n//   1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes\n//   1.02 (2014-12-10) fix various warnings & compile issues w/ stb_rect_pack, C++\n//   1.01 (2014-12-08) fix subpixel position when oversampling to exactly match\n//                        non-oversampled; STBTT_POINT_SIZE for packed case only\n//   1.00 (2014-12-06) add new PackBegin etc. API, w/ support for oversampling\n//   0.99 (2014-09-18) fix multiple bugs with subpixel rendering (ryg)\n//   0.9  (2014-08-07) support certain mac/iOS fonts without an MS platformID\n//   0.8b (2014-07-07) fix a warning\n//   0.8  (2014-05-25) fix a few more warnings\n//   0.7  (2013-09-25) bugfix: subpixel glyph bug fixed in 0.5 had come back\n//   0.6c (2012-07-24) improve documentation\n//   0.6b (2012-07-20) fix a few more warnings\n//   0.6  (2012-07-17) fix warnings; added stbtt_ScaleForMappingEmToPixels,\n//                        stbtt_GetFontBoundingBox, stbtt_IsGlyphEmpty\n//   0.5  (2011-12-09) bugfixes:\n//                        subpixel glyph renderer computed wrong bounding box\n//                        first vertex of shape can be off-curve (FreeSans)\n//   0.4b (2011-12-03) fixed an error in the font baking example\n//   0.4  (2011-12-01) kerning, subpixel rendering (tor)\n//                    bugfixes for:\n//                        codepoint-to-glyph conversion using table fmt=12\n//                        codepoint-to-glyph conversion using table fmt=4\n//                        stbtt_GetBakedQuad with non-square texture (Zer)\n//                    updated Hello World! sample to use kerning and subpixel\n//                    fixed some warnings\n//   0.3  (2009-06-24) cmap fmt=12, compound shapes (MM)\n//                    userdata, malloc-from-userdata, non-zero fill (stb)\n//   0.2  (2009-03-11) Fix unsigned/signed char warnings\n//   0.1  (2009-03-09) First public release\n//\n\n/*\n------------------------------------------------------------------------------\nThis software is available under 2 licenses -- choose whichever you prefer.\n------------------------------------------------------------------------------\nALTERNATIVE A - MIT License\nCopyright (c) 2017 Sean Barrett\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n------------------------------------------------------------------------------\nALTERNATIVE B - Public Domain (www.unlicense.org)\nThis is free and unencumbered software released into the public domain.\nAnyone is free to copy, modify, publish, use, compile, sell, or distribute this\nsoftware, either in source code form or as a compiled binary, for any purpose,\ncommercial or non-commercial, and by any means.\nIn jurisdictions that recognize copyright laws, the author or authors of this\nsoftware dedicate any and all copyright interest in the software to the public\ndomain. We make this dedication for the benefit of the public at large and to\nthe detriment of our heirs and successors. We intend this dedication to be an\novert act of relinquishment in perpetuity of all present and future rights to\nthis software under copyright law.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n------------------------------------------------------------------------------\n*/\n"
  },
  {
    "path": "src/main.c",
    "content": "#include <stdio.h>\n#include <SDL2/SDL.h>\n#include \"api/api.h\"\n#include \"renderer.h\"\n\n#ifdef _WIN32\n  #include <windows.h>\n#elif __linux__\n  #include <unistd.h>\n#elif __APPLE__\n  #include <mach-o/dyld.h>\n#endif\n\n\nSDL_Window *window;\n\n\nstatic double get_scale(void) {\n  float dpi;\n  SDL_GetDisplayDPI(0, NULL, &dpi, NULL);\n#if _WIN32\n  return dpi / 96.0;\n#else\n  return 1.0;\n#endif\n}\n\n\nstatic void get_exe_filename(char *buf, int sz) {\n#if _WIN32\n  int len = GetModuleFileName(NULL, buf, sz - 1);\n  buf[len] = '\\0';\n#elif __linux__\n  char path[512];\n  sprintf(path, \"/proc/%d/exe\", getpid());\n  int len = readlink(path, buf, sz - 1);\n  buf[len] = '\\0';\n#elif __APPLE__\n  unsigned size = sz;\n  _NSGetExecutablePath(buf, &size);\n#else\n  strcpy(buf, \"./lite\");\n#endif\n}\n\n\nstatic void init_window_icon(void) {\n#ifndef _WIN32\n  #include \"../icon.inl\"\n  (void) icon_rgba_len; /* unused */\n  SDL_Surface *surf = SDL_CreateRGBSurfaceFrom(\n    icon_rgba, 64, 64,\n    32, 64 * 4,\n    0x000000ff,\n    0x0000ff00,\n    0x00ff0000,\n    0xff000000);\n  SDL_SetWindowIcon(window, surf);\n  SDL_FreeSurface(surf);\n#endif\n}\n\n\nint main(int argc, char **argv) {\n#ifdef _WIN32\n  HINSTANCE lib = LoadLibrary(\"user32.dll\");\n  int (*SetProcessDPIAware)() = (void*) GetProcAddress(lib, \"SetProcessDPIAware\");\n  SetProcessDPIAware();\n#endif\n\n  SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS);\n  SDL_EnableScreenSaver();\n  SDL_EventState(SDL_DROPFILE, SDL_ENABLE);\n  atexit(SDL_Quit);\n\n#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* Available since 2.0.8 */\n  SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, \"0\");\n#endif\n#if SDL_VERSION_ATLEAST(2, 0, 5)\n  SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, \"1\");\n#endif\n\n  SDL_DisplayMode dm;\n  SDL_GetCurrentDisplayMode(0, &dm);\n\n  window = SDL_CreateWindow(\n    \"\", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, dm.w * 0.8, dm.h * 0.8,\n    SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_HIDDEN);\n  init_window_icon();\n  ren_init(window);\n\n\n  lua_State *L = luaL_newstate();\n  luaL_openlibs(L);\n  api_load_libs(L);\n\n\n  lua_newtable(L);\n  for (int i = 0; i < argc; i++) {\n    lua_pushstring(L, argv[i]);\n    lua_rawseti(L, -2, i + 1);\n  }\n  lua_setglobal(L, \"ARGS\");\n\n  lua_pushstring(L, \"1.11\");\n  lua_setglobal(L, \"VERSION\");\n\n  lua_pushstring(L, SDL_GetPlatform());\n  lua_setglobal(L, \"PLATFORM\");\n\n  lua_pushnumber(L, get_scale());\n  lua_setglobal(L, \"SCALE\");\n\n  char exename[2048];\n  get_exe_filename(exename, sizeof(exename));\n  lua_pushstring(L, exename);\n  lua_setglobal(L, \"EXEFILE\");\n\n\n  (void) luaL_dostring(L,\n    \"local core\\n\"\n    \"xpcall(function()\\n\"\n    \"  SCALE = tonumber(os.getenv(\\\"LITE_SCALE\\\")) or SCALE\\n\"\n    \"  PATHSEP = package.config:sub(1, 1)\\n\"\n    \"  EXEDIR = EXEFILE:match(\\\"^(.+)[/\\\\\\\\].*$\\\")\\n\"\n    \"  package.path = EXEDIR .. '/data/?.lua;' .. package.path\\n\"\n    \"  package.path = EXEDIR .. '/data/?/init.lua;' .. package.path\\n\"\n    \"  core = require('core')\\n\"\n    \"  core.init()\\n\"\n    \"  core.run()\\n\"\n    \"end, function(err)\\n\"\n    \"  print('Error: ' .. tostring(err))\\n\"\n    \"  print(debug.traceback(nil, 2))\\n\"\n    \"  if core and core.on_error then\\n\"\n    \"    pcall(core.on_error, err)\\n\"\n    \"  end\\n\"\n    \"  os.exit(1)\\n\"\n    \"end)\");\n\n\n  lua_close(L);\n  SDL_DestroyWindow(window);\n\n  return EXIT_SUCCESS;\n}\n"
  },
  {
    "path": "src/rencache.c",
    "content": "#include <stdio.h>\n#include \"rencache.h\"\n\n/* a cache over the software renderer -- all drawing operations are stored as\n** commands when issued. At the end of the frame we write the commands to a grid\n** of hash values, take the cells that have changed since the previous frame,\n** merge them into dirty rectangles and redraw only those regions */\n\n#define CELLS_X 80\n#define CELLS_Y 50\n#define CELL_SIZE 96\n#define COMMAND_BUF_SIZE (1024 * 512)\n\nenum { FREE_FONT, SET_CLIP, DRAW_TEXT, DRAW_RECT };\n\ntypedef struct {\n  int type, size;\n  RenRect rect;\n  RenColor color;\n  RenFont *font;\n  int tab_width;\n  char text[0];\n} Command;\n\n\nstatic unsigned cells_buf1[CELLS_X * CELLS_Y];\nstatic unsigned cells_buf2[CELLS_X * CELLS_Y];\nstatic unsigned *cells_prev = cells_buf1;\nstatic unsigned *cells = cells_buf2;\nstatic RenRect rect_buf[CELLS_X * CELLS_Y / 2];\nstatic char command_buf[COMMAND_BUF_SIZE];\nstatic int command_buf_idx;\nstatic RenRect screen_rect;\nstatic bool show_debug;\n\n\nstatic inline int min(int a, int b) { return a < b ? a : b; }\nstatic inline int max(int a, int b) { return a > b ? a : b; }\n\n/* 32bit fnv-1a hash */\n#define HASH_INITIAL 2166136261\n\nstatic void hash(unsigned *h, const void *data, int size) {\n  const unsigned char *p = data;\n  while (size--) {\n    *h = (*h ^ *p++) * 16777619;\n  }\n}\n\n\nstatic inline int cell_idx(int x, int y) {\n  return x + y * CELLS_X;\n}\n\n\nstatic inline bool rects_overlap(RenRect a, RenRect b) {\n  return b.x + b.width  >= a.x && b.x <= a.x + a.width\n      && b.y + b.height >= a.y && b.y <= a.y + a.height;\n}\n\n\nstatic RenRect intersect_rects(RenRect a, RenRect b) {\n  int x1 = max(a.x, b.x);\n  int y1 = max(a.y, b.y);\n  int x2 = min(a.x + a.width, b.x + b.width);\n  int y2 = min(a.y + a.height, b.y + b.height);\n  return (RenRect) { x1, y1, max(0, x2 - x1), max(0, y2 - y1) };\n}\n\n\nstatic RenRect merge_rects(RenRect a, RenRect b) {\n  int x1 = min(a.x, b.x);\n  int y1 = min(a.y, b.y);\n  int x2 = max(a.x + a.width, b.x + b.width);\n  int y2 = max(a.y + a.height, b.y + b.height);\n  return (RenRect) { x1, y1, x2 - x1, y2 - y1 };\n}\n\n\nstatic Command* push_command(int type, int size) {\n  Command *cmd = (Command*) (command_buf + command_buf_idx);\n  int n = command_buf_idx + size;\n  if (n > COMMAND_BUF_SIZE) {\n    fprintf(stderr, \"Warning: (\" __FILE__ \"): exhausted command buffer\\n\");\n    return NULL;\n  }\n  command_buf_idx = n;\n  memset(cmd, 0, sizeof(Command));\n  cmd->type = type;\n  cmd->size = size;\n  return cmd;\n}\n\n\nstatic bool next_command(Command **prev) {\n  if (*prev == NULL) {\n    *prev = (Command*) command_buf;\n  } else {\n    *prev = (Command*) (((char*) *prev) + (*prev)->size);\n  }\n  return *prev != ((Command*) (command_buf + command_buf_idx));\n}\n\n\nvoid rencache_show_debug(bool enable) {\n  show_debug = enable;\n}\n\n\nvoid rencache_free_font(RenFont *font) {\n  Command *cmd = push_command(FREE_FONT, sizeof(Command));\n  if (cmd) { cmd->font = font; }\n}\n\n\nvoid rencache_set_clip_rect(RenRect rect) {\n  Command *cmd = push_command(SET_CLIP, sizeof(Command));\n  if (cmd) { cmd->rect = intersect_rects(rect, screen_rect); }\n}\n\n\nvoid rencache_draw_rect(RenRect rect, RenColor color) {\n  if (!rects_overlap(screen_rect, rect)) { return; }\n  Command *cmd = push_command(DRAW_RECT, sizeof(Command));\n  if (cmd) {\n    cmd->rect = rect;\n    cmd->color = color;\n  }\n}\n\n\nint rencache_draw_text(RenFont *font, const char *text, int x, int y, RenColor color) {\n  RenRect rect;\n  rect.x = x;\n  rect.y = y;\n  rect.width = ren_get_font_width(font, text);\n  rect.height = ren_get_font_height(font);\n\n  if (rects_overlap(screen_rect, rect)) {\n    int sz = strlen(text) + 1;\n    Command *cmd = push_command(DRAW_TEXT, sizeof(Command) + sz);\n    if (cmd) {\n      memcpy(cmd->text, text, sz);\n      cmd->color = color;\n      cmd->font = font;\n      cmd->rect = rect;\n      cmd->tab_width = ren_get_font_tab_width(font);\n    }\n  }\n\n  return x + rect.width;\n}\n\n\nvoid rencache_invalidate(void) {\n  memset(cells_prev, 0xff, sizeof(cells_buf1));\n}\n\n\nvoid rencache_begin_frame(void) {\n  /* reset all cells if the screen width/height has changed */\n  int w, h;\n  ren_get_size(&w, &h);\n  if (screen_rect.width != w || h != screen_rect.height) {\n    screen_rect.width = w;\n    screen_rect.height = h;\n    rencache_invalidate();\n  }\n}\n\n\nstatic void update_overlapping_cells(RenRect r, unsigned h) {\n  int x1 = r.x / CELL_SIZE;\n  int y1 = r.y / CELL_SIZE;\n  int x2 = (r.x + r.width) / CELL_SIZE;\n  int y2 = (r.y + r.height) / CELL_SIZE;\n\n  for (int y = y1; y <= y2; y++) {\n    for (int x = x1; x <= x2; x++) {\n      int idx = cell_idx(x, y);\n      hash(&cells[idx], &h, sizeof(h));\n    }\n  }\n}\n\n\nstatic void push_rect(RenRect r, int *count) {\n  /* try to merge with existing rectangle */\n  for (int i = *count - 1; i >= 0; i--) {\n    RenRect *rp = &rect_buf[i];\n    if (rects_overlap(*rp, r)) {\n      *rp = merge_rects(*rp, r);\n      return;\n    }\n  }\n  /* couldn't merge with previous rectangle: push */\n  rect_buf[(*count)++] = r;\n}\n\n\nvoid rencache_end_frame(void) {\n  /* update cells from commands */\n  Command *cmd = NULL;\n  RenRect cr = screen_rect;\n  while (next_command(&cmd)) {\n    if (cmd->type == SET_CLIP) { cr = cmd->rect; }\n    RenRect r = intersect_rects(cmd->rect, cr);\n    if (r.width == 0 || r.height == 0) { continue; }\n    unsigned h = HASH_INITIAL;\n    hash(&h, cmd, cmd->size);\n    update_overlapping_cells(r, h);\n  }\n\n  /* push rects for all cells changed from last frame, reset cells */\n  int rect_count = 0;\n  int max_x = screen_rect.width / CELL_SIZE + 1;\n  int max_y = screen_rect.height / CELL_SIZE + 1;\n  for (int y = 0; y < max_y; y++) {\n    for (int x = 0; x < max_x; x++) {\n      /* compare previous and current cell for change */\n      int idx = cell_idx(x, y);\n      if (cells[idx] != cells_prev[idx]) {\n        push_rect((RenRect) { x, y, 1, 1 }, &rect_count);\n      }\n      cells_prev[idx] = HASH_INITIAL;\n    }\n  }\n\n  /* expand rects from cells to pixels */\n  for (int i = 0; i < rect_count; i++) {\n    RenRect *r = &rect_buf[i];\n    r->x *= CELL_SIZE;\n    r->y *= CELL_SIZE;\n    r->width *= CELL_SIZE;\n    r->height *= CELL_SIZE;\n    *r = intersect_rects(*r, screen_rect);\n  }\n\n  /* redraw updated regions */\n  bool has_free_commands = false;\n  for (int i = 0; i < rect_count; i++) {\n    /* draw */\n    RenRect r = rect_buf[i];\n    ren_set_clip_rect(r);\n\n    cmd = NULL;\n    while (next_command(&cmd)) {\n      switch (cmd->type) {\n        case FREE_FONT:\n          has_free_commands = true;\n          break;\n        case SET_CLIP:\n          ren_set_clip_rect(intersect_rects(cmd->rect, r));\n          break;\n        case DRAW_RECT:\n          ren_draw_rect(cmd->rect, cmd->color);\n          break;\n        case DRAW_TEXT:\n          ren_set_font_tab_width(cmd->font, cmd->tab_width);\n          ren_draw_text(cmd->font, cmd->text, cmd->rect.x, cmd->rect.y, cmd->color);\n          break;\n      }\n    }\n\n    if (show_debug) {\n      RenColor color = { rand(), rand(), rand(), 50 };\n      ren_draw_rect(r, color);\n    }\n  }\n\n  /* update dirty rects */\n  if (rect_count > 0) {\n    ren_update_rects(rect_buf, rect_count);\n  }\n\n  /* free fonts */\n  if (has_free_commands) {\n    cmd = NULL;\n    while (next_command(&cmd)) {\n      if (cmd->type == FREE_FONT) {\n        ren_free_font(cmd->font);\n      }\n    }\n  }\n\n  /* swap cell buffer and reset */\n  unsigned *tmp = cells;\n  cells = cells_prev;\n  cells_prev = tmp;\n  command_buf_idx = 0;\n}\n"
  },
  {
    "path": "src/rencache.h",
    "content": "#ifndef RENCACHE_H\n#define RENCACHE_H\n\n#include <stdbool.h>\n#include \"renderer.h\"\n\nvoid rencache_show_debug(bool enable);\nvoid rencache_free_font(RenFont *font);\nvoid rencache_set_clip_rect(RenRect rect);\nvoid rencache_draw_rect(RenRect rect, RenColor color);\nint  rencache_draw_text(RenFont *font, const char *text, int x, int y, RenColor color);\nvoid rencache_invalidate(void);\nvoid rencache_begin_frame(void);\nvoid rencache_end_frame(void);\n\n#endif\n"
  },
  {
    "path": "src/renderer.c",
    "content": "#include <stdio.h>\n#include <stdbool.h>\n#include <assert.h>\n#include <math.h>\n#include \"lib/stb/stb_truetype.h\"\n#include \"renderer.h\"\n\n#define MAX_GLYPHSET 256\n\nstruct RenImage {\n  RenColor *pixels;\n  int width, height;\n};\n\ntypedef struct {\n  RenImage *image;\n  stbtt_bakedchar glyphs[256];\n} GlyphSet;\n\nstruct RenFont {\n  void *data;\n  stbtt_fontinfo stbfont;\n  GlyphSet *sets[MAX_GLYPHSET];\n  float size;\n  int height;\n};\n\n\nstatic SDL_Window *window;\nstatic struct { int left, top, right, bottom; } clip;\n\n\nstatic void* check_alloc(void *ptr) {\n  if (!ptr) {\n    fprintf(stderr, \"Fatal error: memory allocation failed\\n\");\n    exit(EXIT_FAILURE);\n  }\n  return ptr;\n}\n\n\nstatic const char* utf8_to_codepoint(const char *p, unsigned *dst) {\n  unsigned res, n;\n  switch (*p & 0xf0) {\n    case 0xf0 :  res = *p & 0x07;  n = 3;  break;\n    case 0xe0 :  res = *p & 0x0f;  n = 2;  break;\n    case 0xd0 :\n    case 0xc0 :  res = *p & 0x1f;  n = 1;  break;\n    default   :  res = *p;         n = 0;  break;\n  }\n  while (n--) {\n    res = (res << 6) | (*(++p) & 0x3f);\n  }\n  *dst = res;\n  return p + 1;\n}\n\n\nvoid ren_init(SDL_Window *win) {\n  assert(win);\n  window = win;\n  SDL_Surface *surf = SDL_GetWindowSurface(window);\n  ren_set_clip_rect( (RenRect) { 0, 0, surf->w, surf->h } );\n}\n\n\nvoid ren_update_rects(RenRect *rects, int count) {\n  SDL_UpdateWindowSurfaceRects(window, (SDL_Rect*) rects, count);\n  static bool initial_frame = true;\n  if (initial_frame) {\n    SDL_ShowWindow(window);\n    initial_frame = false;\n  }\n}\n\n\nvoid ren_set_clip_rect(RenRect rect) {\n  clip.left   = rect.x;\n  clip.top    = rect.y;\n  clip.right  = rect.x + rect.width;\n  clip.bottom = rect.y + rect.height;\n}\n\n\nvoid ren_get_size(int *x, int *y) {\n  SDL_Surface *surf = SDL_GetWindowSurface(window);\n  *x = surf->w;\n  *y = surf->h;\n}\n\n\nRenImage* ren_new_image(int width, int height) {\n  assert(width > 0 && height > 0);\n  RenImage *image = malloc(sizeof(RenImage) + width * height * sizeof(RenColor));\n  check_alloc(image);\n  image->pixels = (void*) (image + 1);\n  image->width = width;\n  image->height = height;\n  return image;\n}\n\n\nvoid ren_free_image(RenImage *image) {\n  free(image);\n}\n\n\nstatic GlyphSet* load_glyphset(RenFont *font, int idx) {\n  GlyphSet *set = check_alloc(calloc(1, sizeof(GlyphSet)));\n\n  /* init image */\n  int width = 128;\n  int height = 128;\nretry:\n  set->image = ren_new_image(width, height);\n\n  /* load glyphs */\n  float s =\n    stbtt_ScaleForMappingEmToPixels(&font->stbfont, 1) /\n    stbtt_ScaleForPixelHeight(&font->stbfont, 1);\n  int res = stbtt_BakeFontBitmap(\n    font->data, 0, font->size * s, (void*) set->image->pixels,\n    width, height, idx * 256, 256, set->glyphs);\n\n  /* retry with a larger image buffer if the buffer wasn't large enough */\n  if (res < 0) {\n    width *= 2;\n    height *= 2;\n    ren_free_image(set->image);\n    goto retry;\n  }\n\n  /* adjust glyph yoffsets and xadvance */\n  int ascent, descent, linegap;\n  stbtt_GetFontVMetrics(&font->stbfont, &ascent, &descent, &linegap);\n  float scale = stbtt_ScaleForMappingEmToPixels(&font->stbfont, font->size);\n  int scaled_ascent = ascent * scale + 0.5;\n  for (int i = 0; i < 256; i++) {\n    set->glyphs[i].yoff += scaled_ascent;\n    set->glyphs[i].xadvance = floor(set->glyphs[i].xadvance);\n  }\n\n  /* convert 8bit data to 32bit */\n  for (int i = width * height - 1; i >= 0; i--) {\n    uint8_t n = *((uint8_t*) set->image->pixels + i);\n    set->image->pixels[i] = (RenColor) { .r = 255, .g = 255, .b = 255, .a = n };\n  }\n\n  return set;\n}\n\n\nstatic GlyphSet* get_glyphset(RenFont *font, int codepoint) {\n  int idx = (codepoint >> 8) % MAX_GLYPHSET;\n  if (!font->sets[idx]) {\n    font->sets[idx] = load_glyphset(font, idx);\n  }\n  return font->sets[idx];\n}\n\n\nRenFont* ren_load_font(const char *filename, float size) {\n  RenFont *font = NULL;\n  FILE *fp = NULL;\n\n  /* init font */\n  font = check_alloc(calloc(1, sizeof(RenFont)));\n  font->size = size;\n\n  /* load font into buffer */\n  fp = fopen(filename, \"rb\");\n  if (!fp) { return NULL; }\n  /* get size */\n  fseek(fp, 0, SEEK_END); int buf_size = ftell(fp); fseek(fp, 0, SEEK_SET);\n  /* load */\n  font->data = check_alloc(malloc(buf_size));\n  int _ = fread(font->data, 1, buf_size, fp); (void) _;\n  fclose(fp);\n  fp = NULL;\n\n  /* init stbfont */\n  int ok = stbtt_InitFont(&font->stbfont, font->data, 0);\n  if (!ok) { goto fail; }\n\n  /* get height and scale */\n  int ascent, descent, linegap;\n  stbtt_GetFontVMetrics(&font->stbfont, &ascent, &descent, &linegap);\n  float scale = stbtt_ScaleForMappingEmToPixels(&font->stbfont, size);\n  font->height = (ascent - descent + linegap) * scale + 0.5;\n\n  /* make tab and newline glyphs invisible */\n  stbtt_bakedchar *g = get_glyphset(font, '\\n')->glyphs;\n  g['\\t'].x1 = g['\\t'].x0;\n  g['\\n'].x1 = g['\\n'].x0;\n\n  return font;\n\nfail:\n  if (fp) { fclose(fp); }\n  if (font) { free(font->data); }\n  free(font);\n  return NULL;\n}\n\n\nvoid ren_free_font(RenFont *font) {\n  for (int i = 0; i < MAX_GLYPHSET; i++) {\n    GlyphSet *set = font->sets[i];\n    if (set) {\n      ren_free_image(set->image);\n      free(set);\n    }\n  }\n  free(font->data);\n  free(font);\n}\n\n\nvoid ren_set_font_tab_width(RenFont *font, int n) {\n  GlyphSet *set = get_glyphset(font, '\\t');\n  set->glyphs['\\t'].xadvance = n;\n}\n\n\nint ren_get_font_tab_width(RenFont *font) {\n  GlyphSet *set = get_glyphset(font, '\\t');\n  return set->glyphs['\\t'].xadvance;\n}\n\n\nint ren_get_font_width(RenFont *font, const char *text) {\n  int x = 0;\n  const char *p = text;\n  unsigned codepoint;\n  while (*p) {\n    p = utf8_to_codepoint(p, &codepoint);\n    GlyphSet *set = get_glyphset(font, codepoint);\n    stbtt_bakedchar *g = &set->glyphs[codepoint & 0xff];\n    x += g->xadvance;\n  }\n  return x;\n}\n\n\nint ren_get_font_height(RenFont *font) {\n  return font->height;\n}\n\n\nstatic inline RenColor blend_pixel(RenColor dst, RenColor src) {\n  int ia = 0xff - src.a;\n  dst.r = ((src.r * src.a) + (dst.r * ia)) >> 8;\n  dst.g = ((src.g * src.a) + (dst.g * ia)) >> 8;\n  dst.b = ((src.b * src.a) + (dst.b * ia)) >> 8;\n  return dst;\n}\n\n\nstatic inline RenColor blend_pixel2(RenColor dst, RenColor src, RenColor color) {\n  src.a = (src.a * color.a) >> 8;\n  int ia = 0xff - src.a;\n  dst.r = ((src.r * color.r * src.a) >> 16) + ((dst.r * ia) >> 8);\n  dst.g = ((src.g * color.g * src.a) >> 16) + ((dst.g * ia) >> 8);\n  dst.b = ((src.b * color.b * src.a) >> 16) + ((dst.b * ia) >> 8);\n  return dst;\n}\n\n\n#define rect_draw_loop(expr)        \\\n  for (int j = y1; j < y2; j++) {   \\\n    for (int i = x1; i < x2; i++) { \\\n      *d = expr;                    \\\n      d++;                          \\\n    }                               \\\n    d += dr;                        \\\n  }\n\nvoid ren_draw_rect(RenRect rect, RenColor color) {\n  if (color.a == 0) { return; }\n\n  int x1 = rect.x < clip.left ? clip.left : rect.x;\n  int y1 = rect.y < clip.top  ? clip.top  : rect.y;\n  int x2 = rect.x + rect.width;\n  int y2 = rect.y + rect.height;\n  x2 = x2 > clip.right  ? clip.right  : x2;\n  y2 = y2 > clip.bottom ? clip.bottom : y2;\n\n  SDL_Surface *surf = SDL_GetWindowSurface(window);\n  RenColor *d = (RenColor*) surf->pixels;\n  d += x1 + y1 * surf->w;\n  int dr = surf->w - (x2 - x1);\n\n  if (color.a == 0xff) {\n    rect_draw_loop(color);\n  } else {\n    rect_draw_loop(blend_pixel(*d, color));\n  }\n}\n\n\nvoid ren_draw_image(RenImage *image, RenRect *sub, int x, int y, RenColor color) {\n  if (color.a == 0) { return; }\n\n  /* clip */\n  int n;\n  if ((n = clip.left - x) > 0) { sub->width  -= n; sub->x += n; x += n; }\n  if ((n = clip.top  - y) > 0) { sub->height -= n; sub->y += n; y += n; }\n  if ((n = x + sub->width  - clip.right ) > 0) { sub->width  -= n; }\n  if ((n = y + sub->height - clip.bottom) > 0) { sub->height -= n; }\n\n  if (sub->width <= 0 || sub->height <= 0) {\n    return;\n  }\n\n  /* draw */\n  SDL_Surface *surf = SDL_GetWindowSurface(window);\n  RenColor *s = image->pixels;\n  RenColor *d = (RenColor*) surf->pixels;\n  s += sub->x + sub->y * image->width;\n  d += x + y * surf->w;\n  int sr = image->width - sub->width;\n  int dr = surf->w - sub->width;\n\n  for (int j = 0; j < sub->height; j++) {\n    for (int i = 0; i < sub->width; i++) {\n      *d = blend_pixel2(*d, *s, color);\n      d++;\n      s++;\n    }\n    d += dr;\n    s += sr;\n  }\n}\n\n\nint ren_draw_text(RenFont *font, const char *text, int x, int y, RenColor color) {\n  RenRect rect;\n  const char *p = text;\n  unsigned codepoint;\n  while (*p) {\n    p = utf8_to_codepoint(p, &codepoint);\n    GlyphSet *set = get_glyphset(font, codepoint);\n    stbtt_bakedchar *g = &set->glyphs[codepoint & 0xff];\n    rect.x = g->x0;\n    rect.y = g->y0;\n    rect.width = g->x1 - g->x0;\n    rect.height = g->y1 - g->y0;\n    ren_draw_image(set->image, &rect, x + g->xoff, y + g->yoff, color);\n    x += g->xadvance;\n  }\n  return x;\n}\n"
  },
  {
    "path": "src/renderer.h",
    "content": "#ifndef RENDERER_H\n#define RENDERER_H\n\n#include <SDL2/SDL.h>\n#include <stdint.h>\n\ntypedef struct RenImage RenImage;\ntypedef struct RenFont RenFont;\n\ntypedef struct { uint8_t b, g, r, a; } RenColor;\ntypedef struct { int x, y, width, height; } RenRect;\n\n\nvoid ren_init(SDL_Window *win);\nvoid ren_update_rects(RenRect *rects, int count);\nvoid ren_set_clip_rect(RenRect rect);\nvoid ren_get_size(int *x, int *y);\n\nRenImage* ren_new_image(int width, int height);\nvoid ren_free_image(RenImage *image);\n\nRenFont* ren_load_font(const char *filename, float size);\nvoid ren_free_font(RenFont *font);\nvoid ren_set_font_tab_width(RenFont *font, int n);\nint ren_get_font_tab_width(RenFont *font);\nint ren_get_font_width(RenFont *font, const char *text);\nint ren_get_font_height(RenFont *font);\n\nvoid ren_draw_rect(RenRect rect, RenColor color);\nvoid ren_draw_image(RenImage *image, RenRect *sub, int x, int y, RenColor color);\nint ren_draw_text(RenFont *font, const char *text, int x, int y, RenColor color);\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/BUGS.txt",
    "content": "\r\nBugs are now managed in the SDL bug tracker, here:\r\n\r\n    https://bugzilla.libsdl.org/\r\n\r\nYou may report bugs there, and search to see if a given issue has already\r\n been reported, discussed, and maybe even fixed.\r\n\r\n\r\nYou may also find help at the SDL forums/mailing list:\r\n\r\n    https://discourse.libsdl.org/\r\n\r\nBug reports are welcome here, but we really appreciate if you use Bugzilla, as\r\n bugs discussed on the mailing list may be forgotten or missed.\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/COPYING.txt",
    "content": "\r\nSimple DirectMedia Layer\r\nCopyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\r\n  \r\nThis software is provided 'as-is', without any express or implied\r\nwarranty.  In no event will the authors be held liable for any damages\r\narising from the use of this software.\r\n\r\nPermission is granted to anyone to use this software for any purpose,\r\nincluding commercial applications, and to alter it and redistribute it\r\nfreely, subject to the following restrictions:\r\n  \r\n1. The origin of this software must not be misrepresented; you must not\r\n   claim that you wrote the original software. If you use this software\r\n   in a product, an acknowledgment in the product documentation would be\r\n   appreciated but is not required. \r\n2. Altered source versions must be plainly marked as such, and must not be\r\n   misrepresented as being the original software.\r\n3. This notice may not be removed or altered from any source distribution.\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/CREDITS.txt",
    "content": "\r\nSimple DirectMedia Layer CREDITS\r\nThanks to everyone who made this possible, including:\r\n\r\n* Cliff Matthews, for giving me a reason to start this project. :)\r\n -- Executor rocks!  *grin*\r\n\r\n* Ryan Gordon for helping everybody out and keeping the dream alive. :)\r\n\r\n* Gabriel Jacobo for his work on the Android port and generally helping out all around.\r\n \r\n* Philipp Wiesemann for his attention to detail reviewing the entire SDL code base and proposes patches.\r\n\r\n* Andreas Schiffler for his dedication to unit tests, Visual Studio projects, and managing the Google Summer of Code.\r\n\r\n* Mike Sartain for incorporating SDL into Team Fortress 2 and cheering me on at Valve.\r\n\r\n* Alfred Reynolds for the game controller API and general (in)sanity\r\n\r\n* Jørgen Tjernø for numerous magical Mac OS X fixes.\r\n\r\n* Pierre-Loup Griffais for his deep knowledge of OpenGL drivers.\r\n \r\n* Julian Winter for the SDL 2.0 website.\r\n\r\n* Sheena Smith for many months of great work on the SDL wiki creating the API documentation and style guides.\r\n\r\n* Paul Hunkin for his port of SDL to Android during the Google Summer of Code 2010.\r\n\r\n* Eli Gottlieb for his work on shaped windows during the Google Summer of Code 2010.\r\n\r\n* Jim Grandpre for his work on multi-touch and gesture recognition during\r\n  the Google Summer of Code 2010.\r\n\r\n* Edgar \"bobbens\" Simo for his force feedback API development during the\r\n  Google Summer of Code 2008.\r\n\r\n* Aaron Wishnick for his work on audio resampling and pitch shifting during\r\n  the Google Summer of Code 2008.\r\n\r\n* Holmes Futrell for his port of SDL to the iPhone and iPod Touch during the\r\n  Google Summer of Code 2008.\r\n\r\n* Jon Atkins for SDL_image, SDL_mixer and SDL_net documentation.\r\n\r\n* Everybody at Loki Software, Inc. for their great contributions!\r\n\r\n And a big hand to everyone else who has contributed over the years.\r\n\r\nTHANKS! :)\r\n\r\n  -- Sam Lantinga\t\t\t<slouken@libsdl.org>\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/INSTALL.txt",
    "content": "\r\nThe 32-bit files are in i686-w64-mingw32\r\nThe 64-bit files are in x86_64-w64-mingw32\r\n\r\nTo install SDL for native development:\r\n    make native\r\n\r\nTo install SDL for cross-compiling development:\r\n    make cross\r\n\r\nLook at the example programs in ./test, and check out online documentation:\r\n    http://wiki.libsdl.org/\r\n\r\nJoin the SDL developer mailing list if you want to join the community:\r\n    http://www.libsdl.org/mailing-list.php\r\n\r\nThat's it!\r\nSam Lantinga <slouken@libsdl.org>\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/Makefile",
    "content": "#\n# Makefile for installing the mingw32 version of the SDL library\n\nCROSS_PATH := /usr/local\nARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32\n\nall install:\n\t@echo \"Type \\\"make native\\\" to install 32-bit to /usr\"\n\t@echo \"Type \\\"make cross\\\" to install 32-bit and 64-bit to $(CROSS_PATH)\"\n\nnative:\n\tmake install-package arch=i686-w64-mingw32 prefix=/usr\n\ncross:\n\tfor arch in $(ARCHITECTURES); do \\\n\t    make install-package arch=$$arch prefix=$(CROSS_PATH)/$$arch; \\\n\tdone\n\ninstall-package:\n\t@if test -d $(arch) && test -d $(prefix); then \\\n\t    (cd $(arch) && cp -rv bin include lib share $(prefix)/); \\\n\t    sed \"s|^prefix=.*|prefix=$(prefix)|\" <$(arch)/bin/sdl2-config >$(prefix)/bin/sdl2-config; \\\n\t    chmod 755 $(prefix)/bin/sdl2-config; \\\n\t    sed \"s|^libdir=.*|libdir=\\'$(prefix)/lib\\'|\" <$(arch)/lib/libSDL2.la >$(prefix)/lib/libSDL2.la; \\\n\t    sed \"s|^libdir=.*|libdir=\\'$(prefix)/lib\\'|\" <$(arch)/lib/libSDL2main.la >$(prefix)/lib/libSDL2main.la; \\\n\t    sed \"s|^prefix=.*|prefix=$(prefix)|\" <$(arch)/lib/pkgconfig/sdl2.pc >$(prefix)/lib/pkgconfig/sdl2.pc; \\\n\telse \\\n\t    echo \"*** ERROR: $(arch) or $(prefix) does not exist!\"; \\\n\t    exit 1; \\\n\tfi\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/README-SDL.txt",
    "content": "\r\nPlease distribute this file with the SDL runtime environment:\r\n\r\nThe Simple DirectMedia Layer (SDL for short) is a cross-platform library\r\ndesigned to make it easy to write multi-media software, such as games\r\nand emulators.\r\n\r\nThe Simple DirectMedia Layer library source code is available from:\r\nhttps://www.libsdl.org/\r\n\r\nThis library is distributed under the terms of the zlib license:\r\nhttp://www.zlib.net/zlib_license.html\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/README.txt",
    "content": "\r\n                         Simple DirectMedia Layer\r\n\r\n                                  (SDL)\r\n\r\n                                Version 2.0\r\n\r\n---\r\nhttps://www.libsdl.org/\r\n\r\nSimple DirectMedia Layer is a cross-platform development library designed\r\nto provide low level access to audio, keyboard, mouse, joystick, and graphics\r\nhardware via OpenGL and Direct3D. It is used by video playback software,\r\nemulators, and popular games including Valve's award winning catalog\r\nand many Humble Bundle games.\r\n\r\nMore extensive documentation is available in the docs directory, starting\r\nwith README.md\r\n\r\nEnjoy!\r\n\tSam Lantinga\t\t\t\t(slouken@libsdl.org)\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/WhatsNew.txt",
    "content": "\r\nThis is a list of major changes in SDL's version history.\r\n\r\n---------------------------------------------------------------------------\r\n2.0.10:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward\r\n* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU\r\n* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.\r\n* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.\r\n* The SDL rendering API now uses batched rendering by default, for improved performance\r\n* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering\r\n* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to \"1\" if you don't specify what rendering driver to use when creating the renderer.\r\n* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes\r\n* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings\r\n* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events\r\n* Improved handling of malformed WAVE and BMP files, fixing potential security exploits\r\n\r\nLinux:\r\n* Removed the Mir video driver in favor of Wayland\r\n\r\niOS / tvOS:\r\n* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13\r\n* Added support for text input using Bluetooth keyboards\r\n\r\nAndroid:\r\n* Added low latency audio using OpenSL ES\r\n* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)\r\n  SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0.\r\n  SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1.\r\n* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.9:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added a new sensor API, initialized by passing SDL_INIT_SENSOR to SDL_Init(), and defined in SDL_sensor.h\r\n* Added an event SDL_SENSORUPDATE which is sent when a sensor is updated\r\n* Added SDL_GetDisplayOrientation() to return the current display orientation\r\n* Added an event SDL_DISPLAYEVENT which is sent when the display orientation changes\r\n* Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. (Thanks to Valve for contributing the PS4 and Nintendo Switch Pro controller support)\r\n* Added support for many other popular game controllers\r\n* Added SDL_JoystickGetDevicePlayerIndex(), SDL_JoystickGetPlayerIndex(), and SDL_GameControllerGetPlayerIndex() to get the player index for a controller. For XInput controllers this returns the XInput index for the controller.\r\n* Added SDL_GameControllerRumble() and SDL_JoystickRumble() which allow simple rumble without using the haptics API\r\n* Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened\r\n* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_TIME to control the mouse double-click time\r\n* Added the hint SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS to control the mouse double-click radius, in pixels\r\n* Added SDL_HasColorKey() to return whether a surface has a colorkey active\r\n* Added SDL_HasAVX512F() to return whether the CPU has AVX-512F features\r\n* Added SDL_IsTablet() to return whether the application is running on a tablet\r\n* Added SDL_THREAD_PRIORITY_TIME_CRITICAL for threads that must run at the highest priority\r\n\r\nMac OS X:\r\n* Fixed black screen at start on Mac OS X Mojave\r\n\r\nLinux:\r\n* Added SDL_LinuxSetThreadPriority() to allow adjusting the thread priority of native threads using RealtimeKit if available.\r\n\r\niOS:\r\n* Fixed Asian IME input\r\n\r\nAndroid:\r\n* Updated required Android SDK to API 26, to match Google's new App Store requirements\r\n* Added support for wired USB Xbox, PS4, and Nintendo Switch Pro controllers\r\n* Added support for relative mouse mode on Android 7.0 and newer (except where it's broken, on Chromebooks and when in DeX mode with Samsung Experience 9.0)\r\n* Added support for custom mouse cursors on Android 7.0 and newer\r\n* Added the hint SDL_HINT_ANDROID_TRAP_BACK_BUTTON to control whether the back button will back out of the app (the default) or be passed to the application as SDL_SCANCODE_AC_BACK\r\n* Added SDL_AndroidBackButton() to trigger the Android system back button behavior when handling the back button in the application\r\n* Added SDL_IsChromebook() to return whether the app is running in the Chromebook Android runtime\r\n* Added SDL_IsDeXMode() to return whether the app is running while docked in the Samsung DeX\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.8:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added SDL_fmod() and SDL_log10()\r\n* Each of the SDL math functions now has the corresponding float version\r\n* Added SDL_SetYUVConversionMode() and SDL_GetYUVConversionMode() to control the formula used when converting to and from YUV colorspace. The options are JPEG, BT.601, and BT.709\r\n\r\nWindows:\r\n* Implemented WASAPI support on Windows UWP and removed the deprecated XAudio2 implementation\r\n* Added resampling support on WASAPI on Windows 7 and above\r\n\r\nWindows UWP:\r\n* Added SDL_WinRTGetDeviceFamily() to find out what type of device your application is running on\r\n\r\nMac OS X:\r\n* Added support for the Vulkan SDK for Mac:\r\n  https://www.lunarg.com/lunarg-releases-vulkan-sdk-1-0-69-0-for-mac/\r\n* Added support for OpenGL ES using ANGLE when it's available\r\n\r\nMac OS X / iOS / tvOS:\r\n* Added a Metal 2D render implementation\r\n* Added SDL_RenderGetMetalLayer() and SDL_RenderGetMetalCommandEncoder() to insert your own drawing into SDL rendering when using the Metal implementation\r\n\r\niOS:\r\n* Added the hint SDL_HINT_IOS_HIDE_HOME_INDICATOR to control whether the home indicator bar on iPhone X should be hidden. This defaults to dimming the indicator for fullscreen applications and showing the indicator for windowed applications.\r\n\r\niOS / Android:\r\n* Added the hint SDL_HINT_RETURN_KEY_HIDES_IME to control whether the return key on the software keyboard should hide the keyboard or send a key event (the default)\r\n\r\nAndroid:\r\n* SDL now supports building with Android Studio and Gradle by default, and the old Ant project is available in android-project-ant\r\n* SDL now requires the API 19 SDK to build, but can still target devices down to API 14 (Android 4.0.1)\r\n* Added SDL_IsAndroidTV() to tell whether the application is running on Android TV\r\n\r\nAndroid / tvOS:\r\n* Added the hint SDL_HINT_TV_REMOTE_AS_JOYSTICK to control whether TV remotes should be listed as joystick devices (the default) or send keyboard events.\r\n\r\nLinux:\r\n* Added the hint SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR to control whether the X server should skip the compositor for the SDL application. This defaults to \"1\"\r\n* Added the hint SDL_HINT_VIDEO_DOUBLE_BUFFER to control whether the Raspberry Pi and KMSDRM video drivers should use double or triple buffering (the default)\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.7:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added audio stream conversion functions:\r\n\tSDL_NewAudioStream\r\n\tSDL_AudioStreamPut\r\n\tSDL_AudioStreamGet\r\n\tSDL_AudioStreamAvailable\r\n\tSDL_AudioStreamFlush\r\n\tSDL_AudioStreamClear\r\n\tSDL_FreeAudioStream\r\n* Added functions to query and set the SDL memory allocation functions:\r\n\tSDL_GetMemoryFunctions()\r\n\tSDL_SetMemoryFunctions()\r\n\tSDL_GetNumAllocations()\r\n* Added locking functions for multi-threaded access to the joystick and game controller APIs:\r\n\tSDL_LockJoysticks()\r\n\tSDL_UnlockJoysticks()\r\n* The following functions are now thread-safe:\r\n\tSDL_SetEventFilter()\r\n\tSDL_GetEventFilter()\r\n\tSDL_AddEventWatch()\r\n\tSDL_DelEventWatch()\r\n\r\n\r\nGeneral:\r\n---------------------------------------------------------------------------\r\n2.0.6:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added cross-platform Vulkan graphics support in SDL_vulkan.h\r\n\tSDL_Vulkan_LoadLibrary()\r\n\tSDL_Vulkan_GetVkGetInstanceProcAddr()\r\n\tSDL_Vulkan_GetInstanceExtensions()\r\n\tSDL_Vulkan_CreateSurface()\r\n\tSDL_Vulkan_GetDrawableSize()\r\n\tSDL_Vulkan_UnloadLibrary()\r\n  This is all the platform-specific code you need to bring up Vulkan on all SDL platforms. You can look at an example in test/testvulkan.c\r\n* Added SDL_ComposeCustomBlendMode() to create custom blend modes for 2D rendering\r\n* Added SDL_HasNEON() which returns whether the CPU has NEON instruction support\r\n* Added support for many game controllers, including the Nintendo Switch Pro Controller\r\n* Added support for inverted axes and separate axis directions in game controller mappings\r\n* Added functions to return information about a joystick before it's opened:\r\n\tSDL_JoystickGetDeviceVendor()\r\n\tSDL_JoystickGetDeviceProduct()\r\n\tSDL_JoystickGetDeviceProductVersion()\r\n\tSDL_JoystickGetDeviceType()\r\n\tSDL_JoystickGetDeviceInstanceID()\r\n* Added functions to return information about an open joystick:\r\n\tSDL_JoystickGetVendor()\r\n\tSDL_JoystickGetProduct()\r\n\tSDL_JoystickGetProductVersion()\r\n\tSDL_JoystickGetType()\r\n\tSDL_JoystickGetAxisInitialState()\r\n* Added functions to return information about an open game controller:\r\n\tSDL_GameControllerGetVendor()\r\n\tSDL_GameControllerGetProduct()\r\n\tSDL_GameControllerGetProductVersion()\r\n* Added SDL_GameControllerNumMappings() and SDL_GameControllerMappingForIndex() to be able to enumerate the built-in game controller mappings\r\n* Added SDL_LoadFile() and SDL_LoadFile_RW() to load a file into memory\r\n* Added SDL_DuplicateSurface() to make a copy of a surface\r\n* Added an experimental JACK audio driver\r\n* Implemented non-power-of-two audio resampling, optionally using libsamplerate to perform the resampling\r\n* Added the hint SDL_HINT_AUDIO_RESAMPLING_MODE to control the quality of resampling\r\n* Added the hint SDL_HINT_RENDER_LOGICAL_SIZE_MODE to control the scaling policy for SDL_RenderSetLogicalSize():\r\n\t\"0\" or \"letterbox\" - Uses letterbox/sidebars to fit the entire rendering on screen (the default)\r\n\t\"1\" or \"overscan\"  - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen\r\n* Added the hints SDL_HINT_MOUSE_NORMAL_SPEED_SCALE and SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE to scale the mouse speed when being read from raw mouse input\r\n* Added the hint SDL_HINT_TOUCH_MOUSE_EVENTS to control whether SDL will synthesize mouse events from touch events\r\n\r\nWindows:\r\n* The new default audio driver on Windows is WASAPI and supports hot-plugging devices and changing the default audio device\r\n* The old XAudio2 audio driver is deprecated and will be removed in the next release\r\n* Added hints SDL_HINT_WINDOWS_INTRESOURCE_ICON and SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL to specify a custom icon resource ID for SDL windows\r\n* The hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING is now on by default for compatibility with .NET languages and various Windows debuggers\r\n* Updated the GUID format for game controller mappings, older mappings will be automatically converted on load\r\n* Implemented the SDL_WINDOW_ALWAYS_ON_TOP flag on Windows\r\n\r\nLinux:\r\n* Added an experimental KMS/DRM video driver for embedded development\r\n\r\niOS:\r\n* Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category, determining whether the phone mute switch affects the audio\r\n\r\n---------------------------------------------------------------------------\r\n2.0.5:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Implemented audio capture support for some platforms\r\n* Added SDL_DequeueAudio() to retrieve audio when buffer queuing is turned on for audio capture\r\n* Added events for dragging and dropping text\r\n* Added events for dragging and dropping multiple items\r\n* By default the click raising a window will not be delivered to the SDL application. You can set the hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH to \"1\" to allow that click through to the window.\r\n* Saving a surface with an alpha channel as a BMP will use a newer BMP format that supports alpha information. You can set the hint SDL_HINT_BMP_SAVE_LEGACY_FORMAT to \"1\" to use the old format.\r\n* Added SDL_GetHintBoolean() to get the boolean value of a hint\r\n* Added SDL_RenderSetIntegerScale() to set whether to smoothly scale or use integral multiples of the viewport size when scaling the rendering output\r\n* Added SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() to create an SDL surface with a specific pixel format\r\n* Added SDL_GetDisplayUsableBounds() which returns the area usable for windows. For example, on Mac OS X, this subtracts the area occupied by the menu bar and dock.\r\n* Added SDL_GetWindowBordersSize() which returns the size of the window's borders around the client area\r\n* Added a window event SDL_WINDOWEVENT_HIT_TEST when a window had a hit test that wasn't SDL_HITTEST_NORMAL (e.g. in the title bar or window frame)\r\n* Added SDL_SetWindowResizable() to change whether a window is resizable\r\n* Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity() to affect the window transparency\r\n* Added SDL_SetWindowModalFor() to set a window as modal for another window\r\n* Added support for AUDIO_U16LSB and AUDIO_U16MSB to SDL_MixAudioFormat()\r\n* Fixed flipped images when reading back from target textures when using the OpenGL renderer\r\n* Fixed texture color modulation with SDL_BLENDMODE_NONE when using the OpenGL renderer\r\n* Fixed bug where the alpha value of colorkeys was ignored when blitting in some cases\r\n\r\nWindows:\r\n* Added a hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING to prevent SDL from raising a debugger exception to name threads. This exception can cause problems with .NET applications when running under a debugger.\r\n* The hint SDL_HINT_THREAD_STACK_SIZE is now supported on Windows\r\n* Fixed XBox controller triggers automatically being pulled at startup\r\n* The first icon from the executable is used as the default window icon at runtime\r\n* Fixed SDL log messages being printed twice if SDL was built with C library support\r\n* Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications.\r\n\r\nMac OS X:\r\n* Fixed selecting the dummy video driver\r\n* The caps lock key now generates a pressed event when pressed and a released event when released, instead of a press/release event pair when pressed.\r\n* Fixed mouse wheel events on Mac OS X 10.12\r\n* The audio driver has been updated to use AVFoundation for better compatibility with newer versions of Mac OS X\r\n\r\nLinux:\r\n* Added support for the Fcitx IME\r\n* Added a window event SDL_WINDOWEVENT_TAKE_FOCUS when a window manager asks the SDL window whether it wants to take focus.\r\n* Refresh rates are now rounded instead of truncated, e.g. 59.94 Hz is rounded up to 60 Hz instead of 59.\r\n* Added initial support for touchscreens on Raspberry Pi\r\n\r\nOpenBSD:\r\n* SDL_GetBasePath() is now implemented on OpenBSD\r\n\r\niOS:\r\n* Added support for dynamically loaded objects on iOS 8 and newer\r\n\r\ntvOS:\r\n* Added support for Apple TV\r\n* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote.  \r\n\r\nAndroid:\r\n* Fixed SDL not resizing window when Android screen resolution changes\r\n* Corrected the joystick Z axis reporting for the accelerometer\r\n\r\nEmscripten (running in a web browser):\r\n* Many bug fixes and improvements\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.4:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added support for web applications using Emscripten, see docs/README-emscripten.md for more information\r\n* Added support for web applications using Native Client (NaCl), see docs/README-nacl.md for more information\r\n* Added an API to queue audio instead of using the audio callback:\r\n    SDL_QueueAudio(), SDL_GetQueuedAudioSize(), SDL_ClearQueuedAudio()\r\n* Added events for audio device hot plug support:\r\n    SDL_AUDIODEVICEADDED, SDL_AUDIODEVICEREMOVED\r\n* Added SDL_PointInRect()\r\n* Added SDL_HasAVX2() to detect CPUs with AVX2 support\r\n* Added SDL_SetWindowHitTest() to let apps treat parts of their SDL window like traditional window decorations (drag areas, resize areas)\r\n* Added SDL_GetGrabbedWindow() to get the window that currently has input grab, if any\r\n* Added SDL_RenderIsClipEnabled() to tell whether clipping is currently enabled in a renderer\r\n* Added SDL_CaptureMouse() to capture the mouse to get events while the mouse is not in your window\r\n* Added SDL_WarpMouseGlobal() to warp the mouse cursor in global screen space\r\n* Added SDL_GetGlobalMouseState() to get the current mouse state outside of an SDL window\r\n* Added a direction field to mouse wheel events to tell whether they are flipped (natural) or not\r\n* Added GL_CONTEXT_RELEASE_BEHAVIOR GL attribute (maps to [WGL|GLX]_ARB_context_flush_control extension)\r\n* Added EGL_KHR_create_context support to allow OpenGL ES version selection on some platforms\r\n* Added NV12 and NV21 YUV texture support for OpenGL and OpenGL ES 2.0 renderers\r\n* Added a Vivante video driver that is used on various SoC platforms\r\n* Added an event SDL_RENDER_DEVICE_RESET that is sent from the D3D renderers when the D3D device is lost, and from Android's event loop when the GLES context had to be recreated\r\n* Added a hint SDL_HINT_NO_SIGNAL_HANDLERS to disable SDL's built in signal handling\r\n* Added a hint SDL_HINT_THREAD_STACK_SIZE to set the stack size of SDL's threads\r\n* Added SDL_sqrtf(), SDL_tan(), and SDL_tanf() to the stdlib routines\r\n* Improved support for WAV and BMP files with unusual chunks in them\r\n* Renamed SDL_assert_data to SDL_AssertData and SDL_assert_state to SDL_AssertState\r\n* Added a hint SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN to prevent window interaction while cursor is hidden\r\n* Added SDL_GetDisplayDPI() to get the DPI information for a display\r\n* Added SDL_JoystickCurrentPowerLevel() to get the battery level of a joystick\r\n* Added SDL_JoystickFromInstanceID(), as a helper function, to get the SDL_Joystick* that an event is referring to.\r\n* Added SDL_GameControllerFromInstanceID(), as a helper function, to get the SDL_GameController* that an event is referring to.\r\n\r\nWindows:\r\n* Added support for Windows Phone 8.1 and Windows 10/UWP (Universal Windows Platform)\r\n* Timer resolution is now 1 ms by default, adjustable with the SDL_HINT_TIMER_RESOLUTION hint\r\n* SDLmain no longer depends on the C runtime, so you can use the same .lib in both Debug and Release builds\r\n* Added SDL_SetWindowsMessageHook() to set a function to be called for every windows message before TranslateMessage()\r\n* Added a hint SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP to control whether SDL_PumpEvents() processes the Windows message loop\r\n* You can distinguish between real mouse and touch events by looking for SDL_TOUCH_MOUSEID in the mouse event \"which\" field\r\n* SDL_SysWMinfo now contains the window HDC\r\n* Added support for Unicode command line options\r\n* Prevent beeping when Alt-key combos are pressed\r\n* SDL_SetTextInputRect() re-positions the OS-rendered IME\r\n* Added a hint SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 to prevent generating SDL_WINDOWEVENT_CLOSE events when Alt-F4 is pressed\r\n* Added a hint SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING to use the old axis and button mapping for XInput devices (deprecated)\r\n\r\nMac OS X:\r\n* Implemented drag-and-drop support\r\n* Improved joystick hot-plug detection\r\n* The SDL_WINDOWEVENT_EXPOSED window event is triggered in the appropriate situations\r\n* Fixed relative mouse mode when the application loses/regains focus\r\n* Fixed bugs related to transitioning to and from Spaces-aware fullscreen-desktop mode\r\n* Fixed the refresh rate of display modes\r\n* SDL_SysWMInfo is now ARC-compatible\r\n* Added a hint SDL_HINT_MAC_BACKGROUND_APP to prevent forcing the application to become a foreground process\r\n\r\nLinux:\r\n* Enabled building with Mir and Wayland support by default.\r\n* Added IBus IME support\r\n* Added a hint SDL_HINT_IME_INTERNAL_EDITING to control whether IBus should handle text editing internally instead of sending SDL_TEXTEDITING events\r\n* Added a hint SDL_HINT_VIDEO_X11_NET_WM_PING to allow disabling _NET_WM_PING protocol handling in SDL_CreateWindow()\r\n* Added support for multiple audio devices when using Pulseaudio\r\n* Fixed duplicate mouse events when using relative mouse motion\r\n\r\niOS:\r\n* Added support for iOS 8\r\n* The SDL_WINDOW_ALLOW_HIGHDPI window flag now enables high-dpi support, and SDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() gets the window resolution in pixels\r\n* SDL_GetWindowSize() and display mode sizes are in the \"DPI-independent points\" / \"screen coordinates\" coordinate space rather than pixels (matches OS X behavior)\r\n* Added native resolution support for the iPhone 6 Plus\r\n* Added support for MFi game controllers\r\n* Added support for the hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK\r\n* Added sRGB OpenGL ES context support on iOS 7+\r\n* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER\r\n* SDL_SysWMinfo now contains the OpenGL ES framebuffer and color renderbuffer objects used by the window's active GLES view\r\n* Fixed various rotation and orientation issues\r\n* Fixed memory leaks\r\n\r\nAndroid:\r\n* Added a hint SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH to prevent mouse events from being registered as touch events\r\n* Added hints SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION and SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION\r\n* Added support for SDL_DisableScreenSaver(), SDL_EnableScreenSaver() and the hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER\r\n* Added support for SDL_ShowMessageBox() and SDL_ShowSimpleMessageBox()\r\n\r\nRaspberry Pi:\r\n* Added support for the Raspberry Pi 2\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.3:\r\n---------------------------------------------------------------------------\r\n\r\nMac OS X:\r\n* Fixed creating an OpenGL context by default on Mac OS X 10.6\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.2:\r\n---------------------------------------------------------------------------\r\nGeneral:\r\n* Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default values\r\n* Added an API to load a database of game controller mappings from a file:\r\n    SDL_GameControllerAddMappingsFromFile(), SDL_GameControllerAddMappingsFromRW()\r\n* Added game controller mappings for the PS4 and OUYA controllers\r\n* Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler()\r\n* Added SDL_DetachThread()\r\n* Added SDL_HasAVX() to determine if the CPU has AVX features\r\n* Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines\r\n* EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share\r\n  them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT\r\n* Added a field \"clicks\" to the mouse button event which records whether the event is a single click, double click, etc.\r\n* The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior.\r\n* Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping.\r\n* testgl2 does not need to link with libGL anymore\r\n* Added testgles2 test program to demonstrate working with OpenGL ES 2.0\r\n* Added controllermap test program to visually map a game controller\r\n\r\nWindows:\r\n* Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via\r\n  the driver or emulated through ANGLE)\r\n* Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader compiler to use for OpenGL ES 2 support through ANGLE\r\n* Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when creating multiple windows that should share the same OpenGL context.\r\n* Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render targets are reset after the device has been restored.\r\n\r\nMac OS X:\r\n* Added a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control whether Ctrl+click should be treated as a right click on Mac OS X. This is off by default.\r\n\r\nLinux:\r\n* Fixed fullscreen and focused behavior when receiving NotifyGrab events\r\n* Added experimental Wayland and Mir support, disabled by default\r\n\r\nAndroid:\r\n* Joystick support (minimum SDK version required to build SDL is now 12, \r\n  the required runtime version remains at 10, but on such devices joystick \r\n  support won't be available).\r\n* Hotplugging support for joysticks\r\n* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.\r\n\r\n\r\n---------------------------------------------------------------------------\r\n2.0.1:\r\n---------------------------------------------------------------------------\r\n\r\nGeneral:\r\n* Added an API to get common filesystem paths in SDL_filesystem.h:\r\n    SDL_GetBasePath(), SDL_GetPrefPath()\r\n* Added an API to do optimized YV12 and IYUV texture updates:\r\n    SDL_UpdateYUVTexture()\r\n* Added an API to get the amount of RAM on the system:\r\n    SDL_GetSystemRAM()\r\n* Added a macro to perform timestamp comparisons with SDL_GetTicks():\r\n    SDL_TICKS_PASSED()\r\n* Dramatically improved OpenGL ES 2.0 rendering performance\r\n* Added OpenGL attribute SDL_GL_FRAMEBUFFER_SRGB_CAPABLE\r\n\r\nWindows:\r\n* Created a static library configuration for the Visual Studio 2010 project\r\n* Added a hint to create the Direct3D device with support for multi-threading:\r\n    SDL_HINT_RENDER_DIRECT3D_THREADSAFE\r\n* Added a function to get the D3D9 adapter index for a display:\r\n    SDL_Direct3D9GetAdapterIndex()\r\n* Added a function to get the D3D9 device for a D3D9 renderer:\r\n    SDL_RenderGetD3D9Device()\r\n* Fixed building SDL with the mingw32 toolchain (mingw-w64 is preferred)\r\n* Fixed crash when using two XInput controllers at the same time\r\n* Fixed detecting a mixture of XInput and DirectInput controllers\r\n* Fixed clearing a D3D render target larger than the window\r\n* Improved support for format specifiers in SDL_snprintf()\r\n\r\nMac OS X:\r\n* Added support for retina displays:\r\n  Create your window with the SDL_WINDOW_ALLOW_HIGHDPI flag, and then use SDL_GL_GetDrawableSize() to find the actual drawable size. You are responsible for scaling mouse and drawing coordinates appropriately.\r\n* Fixed mouse warping in fullscreen mode\r\n* Right mouse click is emulated by holding the Ctrl key while left clicking\r\n\r\nLinux:\r\n* Fixed float audio support with the PulseAudio driver\r\n* Fixed missing line endpoints in the OpenGL renderer on some drivers\r\n* X11 symbols are no longer defined to avoid collisions when linking statically\r\n\r\niOS:\r\n* Fixed status bar visibility on iOS 7\r\n* Flipped the accelerometer Y axis to match expected values\r\n\r\nAndroid:\r\nIMPORTANT: You MUST get the updated SDLActivity.java to match C code\r\n* Moved EGL initialization to native code \r\n* Fixed the accelerometer axis rotation relative to the device rotation\r\n* Fixed race conditions when handling the EGL context on pause/resume\r\n* Touch devices are available for enumeration immediately after init\r\n\r\nRaspberry Pi:\r\n* Added support for the Raspberry Pi, see README-raspberrypi.txt for details\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-android.md",
    "content": "Android\r\n================================================================================\r\n\r\nMatt Styles wrote a tutorial on building SDL for Android with Visual Studio:\r\nhttp://trederia.blogspot.de/2017/03/building-sdl2-for-android-with-visual.html\r\n\r\nThe rest of this README covers the Android gradle style build process.\r\n\r\nIf you are using the older ant build process, it is no longer officially\r\nsupported, but you can use the \"android-project-ant\" directory as a template.\r\n\r\n\r\n================================================================================\r\n Requirements\r\n================================================================================\r\n\r\nAndroid SDK (version 26 or later)\r\nhttps://developer.android.com/sdk/index.html\r\n\r\nAndroid NDK r15c or later\r\nhttps://developer.android.com/tools/sdk/ndk/index.html\r\n\r\nMinimum API level supported by SDL: 16 (Android 4.1)\r\n\r\n\r\n================================================================================\r\n How the port works\r\n================================================================================\r\n\r\n- Android applications are Java-based, optionally with parts written in C\r\n- As SDL apps are C-based, we use a small Java shim that uses JNI to talk to \r\n  the SDL library\r\n- This means that your application C code must be placed inside an Android \r\n  Java project, along with some C support code that communicates with Java\r\n- This eventually produces a standard Android .apk package\r\n\r\nThe Android Java code implements an \"Activity\" and can be found in:\r\nandroid-project/app/src/main/java/org/libsdl/app/SDLActivity.java\r\n\r\nThe Java code loads your game code, the SDL shared library, and\r\ndispatches to native functions implemented in the SDL library:\r\nsrc/core/android/SDL_android.c\r\n\r\n\r\n================================================================================\r\n Building an app\r\n================================================================================\r\n\r\nFor simple projects you can use the script located at build-scripts/androidbuild.sh\r\n\r\nThere's two ways of using it:\r\n\r\n    androidbuild.sh com.yourcompany.yourapp < sources.list\r\n    androidbuild.sh com.yourcompany.yourapp source1.c source2.c ...sourceN.c\r\n\r\nsources.list should be a text file with a source file name in each line\r\nFilenames should be specified relative to the current directory, for example if\r\nyou are in the build-scripts directory and want to create the testgles.c test, you'll\r\nrun:\r\n\r\n    ./androidbuild.sh org.libsdl.testgles ../test/testgles.c\r\n\r\nOne limitation of this script is that all sources provided will be aggregated into\r\na single directory, thus all your source files should have a unique name.\r\n\r\nOnce the project is complete the script will tell you where the debug APK is located.\r\nIf you want to create a signed release APK, you can use the project created by this\r\nutility to generate it.\r\n\r\nFinally, a word of caution: re running androidbuild.sh wipes any changes you may have\r\ndone in the build directory for the app!\r\n\r\n\r\nFor more complex projects, follow these instructions:\r\n    \r\n1. Copy the android-project directory wherever you want to keep your projects\r\n   and rename it to the name of your project.\r\n2. Move or symlink this SDL directory into the \"<project>/app/jni\" directory\r\n3. Edit \"<project>/app/jni/src/Android.mk\" to include your source files\r\n\r\n4a. If you want to use Android Studio, simply open your <project> directory and start building.\r\n\r\n4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device\r\n\r\nHere's an explanation of the files in the Android project, so you can customize them:\r\n\r\n    android-project/app\r\n        build.gradle            - build info including the application version and SDK\r\n        src/main/AndroidManifest.xml\t- package manifest. Among others, it contains the class name of the main Activity and the package name of the application.\r\n        jni/\t\t\t- directory holding native code\r\n        jni/Application.mk\t- Application JNI settings, including target platform and STL library\r\n        jni/Android.mk\t\t- Android makefile that can call recursively the Android.mk files in all subdirectories\r\n        jni/SDL/\t\t- (symlink to) directory holding the SDL library files\r\n        jni/SDL/Android.mk\t- Android makefile for creating the SDL shared library\r\n        jni/src/\t\t- directory holding your C/C++ source\r\n        jni/src/Android.mk\t- Android makefile that you should customize to include your source code and any library references\r\n        src/main/assets/\t- directory holding asset files for your application\r\n        src/main/res/\t\t- directory holding resources for your application\r\n        src/main/res/mipmap-*\t- directories holding icons for different phone hardware\r\n        src/main/res/values/strings.xml\t- strings used in your application, including the application name\r\n        src/main/java/org/libsdl/app/SDLActivity.java - the Java class handling the initialization and binding to SDL. Be very careful changing this, as the SDL library relies on this implementation. You should instead subclass this for your application.\r\n\r\n\r\n================================================================================\r\n Customizing your application name\r\n================================================================================\r\n\r\nTo customize your application name, edit AndroidManifest.xml and replace\r\n\"org.libsdl.app\" with an identifier for your product package.\r\n\r\nThen create a Java class extending SDLActivity and place it in a directory\r\nunder src matching your package, e.g.\r\n\r\n    src/com/gamemaker/game/MyGame.java\r\n\r\nHere's an example of a minimal class file:\r\n\r\n    --- MyGame.java --------------------------\r\n    package com.gamemaker.game;\r\n    \r\n    import org.libsdl.app.SDLActivity; \r\n    \r\n    /**\r\n     * A sample wrapper class that just calls SDLActivity \r\n     */ \r\n    \r\n    public class MyGame extends SDLActivity { }\r\n    \r\n    ------------------------------------------\r\n\r\nThen replace \"SDLActivity\" in AndroidManifest.xml with the name of your\r\nclass, .e.g. \"MyGame\"\r\n\r\n\r\n================================================================================\r\n Customizing your application icon\r\n================================================================================\r\n\r\nConceptually changing your icon is just replacing the \"ic_launcher.png\" files in\r\nthe drawable directories under the res directory. There are several directories\r\nfor different screen sizes.\r\n\r\n\r\n================================================================================\r\n Loading assets\r\n================================================================================\r\n\r\nAny files you put in the \"app/src/main/assets\" directory of your project\r\ndirectory will get bundled into the application package and you can load\r\nthem using the standard functions in SDL_rwops.h.\r\n\r\nThere are also a few Android specific functions that allow you to get other\r\nuseful paths for saving and loading data:\r\n* SDL_AndroidGetInternalStoragePath()\r\n* SDL_AndroidGetExternalStorageState()\r\n* SDL_AndroidGetExternalStoragePath()\r\n\r\nSee SDL_system.h for more details on these functions.\r\n\r\nThe asset packaging system will, by default, compress certain file extensions.\r\nSDL includes two asset file access mechanisms, the preferred one is the so\r\ncalled \"File Descriptor\" method, which is faster and doesn't involve the Dalvik\r\nGC, but given this method does not work on compressed assets, there is also the\r\n\"Input Stream\" method, which is automatically used as a fall back by SDL. You\r\nmay want to keep this fact in mind when building your APK, specially when large\r\nfiles are involved.\r\nFor more information on which extensions get compressed by default and how to\r\ndisable this behaviour, see for example:\r\n    \r\nhttp://ponystyle.com/blog/2010/03/26/dealing-with-asset-compression-in-android-apps/\r\n\r\n\r\n================================================================================\r\n Pause / Resume behaviour\r\n================================================================================\r\n\r\nIf SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),\r\nthe event loop will block itself when the app is paused (ie, when the user\r\nreturns to the main Android dashboard). Blocking is better in terms of battery\r\nuse, and it allows your app to spring back to life instantaneously after resume\r\n(versus polling for a resume message).\r\n\r\nUpon resume, SDL will attempt to restore the GL context automatically.\r\nIn modern devices (Android 3.0 and up) this will most likely succeed and your\r\napp can continue to operate as it was.\r\n\r\nHowever, there's a chance (on older hardware, or on systems under heavy load),\r\nwhere the GL context can not be restored. In that case you have to listen for\r\na specific message, (which is not yet implemented!) and restore your textures\r\nmanually or quit the app (which is actually the kind of behaviour you'll see\r\nunder iOS, if the OS can not restore your GL context it will just kill your app)\r\n\r\n\r\n================================================================================\r\n Threads and the Java VM\r\n================================================================================\r\n\r\nFor a quick tour on how Linux native threads interoperate with the Java VM, take\r\na look here: https://developer.android.com/guide/practices/jni.html\r\n\r\nIf you want to use threads in your SDL app, it's strongly recommended that you\r\ndo so by creating them using SDL functions. This way, the required attach/detach\r\nhandling is managed by SDL automagically. If you have threads created by other\r\nmeans and they make calls to SDL functions, make sure that you call\r\nAndroid_JNI_SetupThread() before doing anything else otherwise SDL will attach\r\nyour thread automatically anyway (when you make an SDL call), but it'll never\r\ndetach it.\r\n\r\n\r\n================================================================================\r\n Using STL\r\n================================================================================\r\n\r\nYou can use STL in your project by creating an Application.mk file in the jni\r\nfolder and adding the following line:\r\n\r\n    APP_STL := c++_shared\r\n\r\nFor more information go here:\r\n\thttps://developer.android.com/ndk/guides/cpp-support\r\n\r\n\r\n================================================================================\r\n Using the emulator\r\n================================================================================\r\n\r\nThere are some good tips and tricks for getting the most out of the\r\nemulator here: https://developer.android.com/tools/devices/emulator.html\r\n\r\nEspecially useful is the info on setting up OpenGL ES 2.0 emulation.\r\n\r\nNotice that this software emulator is incredibly slow and needs a lot of disk space.\r\nUsing a real device works better.\r\n\r\n\r\n================================================================================\r\n Troubleshooting\r\n================================================================================\r\n\r\nYou can see if adb can see any devices with the following command:\r\n\r\n    adb devices\r\n\r\nYou can see the output of log messages on the default device with:\r\n\r\n    adb logcat\r\n\r\nYou can push files to the device with:\r\n\r\n    adb push local_file remote_path_and_file\r\n\r\nYou can push files to the SD Card at /sdcard, for example:\r\n\r\n    adb push moose.dat /sdcard/moose.dat\r\n\r\nYou can see the files on the SD card with a shell command:\r\n\r\n    adb shell ls /sdcard/\r\n\r\nYou can start a command shell on the default device with:\r\n\r\n    adb shell\r\n\r\nYou can remove the library files of your project (and not the SDL lib files) with:\r\n\r\n    ndk-build clean\r\n\r\nYou can do a build with the following command:\r\n\r\n    ndk-build\r\n\r\nYou can see the complete command line that ndk-build is using by passing V=1 on the command line:\r\n\r\n    ndk-build V=1\r\n\r\nIf your application crashes in native code, you can use ndk-stack to get a symbolic stack trace:\r\n\thttps://developer.android.com/ndk/guides/ndk-stack\r\n\r\nIf you want to go through the process manually, you can use addr2line to convert the\r\naddresses in the stack trace to lines in your code.\r\n\r\nFor example, if your crash looks like this:\r\n\r\n    I/DEBUG   (   31): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 400085d0\r\n    I/DEBUG   (   31):  r0 00000000  r1 00001000  r2 00000003  r3 400085d4\r\n    I/DEBUG   (   31):  r4 400085d0  r5 40008000  r6 afd41504  r7 436c6a7c\r\n    I/DEBUG   (   31):  r8 436c6b30  r9 435c6fb0  10 435c6f9c  fp 4168d82c\r\n    I/DEBUG   (   31):  ip 8346aff0  sp 436c6a60  lr afd1c8ff  pc afd1c902  cpsr 60000030\r\n    I/DEBUG   (   31):          #00  pc 0001c902  /system/lib/libc.so\r\n    I/DEBUG   (   31):          #01  pc 0001ccf6  /system/lib/libc.so\r\n    I/DEBUG   (   31):          #02  pc 000014bc  /data/data/org.libsdl.app/lib/libmain.so\r\n    I/DEBUG   (   31):          #03  pc 00001506  /data/data/org.libsdl.app/lib/libmain.so\r\n\r\nYou can see that there's a crash in the C library being called from the main code.\r\nI run addr2line with the debug version of my code:\r\n\r\n    arm-eabi-addr2line -C -f -e obj/local/armeabi/libmain.so\r\n\r\nand then paste in the number after \"pc\" in the call stack, from the line that I care about:\r\n000014bc\r\n\r\nI get output from addr2line showing that it's in the quit function, in testspriteminimal.c, on line 23.\r\n\r\nYou can add logging to your code to help show what's happening:\r\n\r\n    #include <android/log.h>\r\n    \r\n    __android_log_print(ANDROID_LOG_INFO, \"foo\", \"Something happened! x = %d\", x);\r\n\r\nIf you need to build without optimization turned on, you can create a file called\r\n\"Application.mk\" in the jni directory, with the following line in it:\r\n\r\n    APP_OPTIM := debug\r\n\r\n\r\n================================================================================\r\n Memory debugging\r\n================================================================================\r\n\r\nThe best (and slowest) way to debug memory issues on Android is valgrind.\r\nValgrind has support for Android out of the box, just grab code using:\r\n\r\n    svn co svn://svn.valgrind.org/valgrind/trunk valgrind\r\n\r\n... and follow the instructions in the file README.android to build it.\r\n\r\nOne thing I needed to do on Mac OS X was change the path to the toolchain,\r\nand add ranlib to the environment variables:\r\nexport RANLIB=$NDKROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-ranlib\r\n\r\nOnce valgrind is built, you can create a wrapper script to launch your\r\napplication with it, changing org.libsdl.app to your package identifier:\r\n\r\n    --- start_valgrind_app -------------------\r\n    #!/system/bin/sh\r\n    export TMPDIR=/data/data/org.libsdl.app\r\n    exec /data/local/Inst/bin/valgrind --log-file=/sdcard/valgrind.log --error-limit=no $*\r\n    ------------------------------------------\r\n\r\nThen push it to the device:\r\n\r\n    adb push start_valgrind_app /data/local\r\n\r\nand make it executable:\r\n\r\n    adb shell chmod 755 /data/local/start_valgrind_app\r\n\r\nand tell Android to use the script to launch your application:\r\n\r\n    adb shell setprop wrap.org.libsdl.app \"logwrapper /data/local/start_valgrind_app\"\r\n\r\nIf the setprop command says \"could not set property\", it's likely that\r\nyour package name is too long and you should make it shorter by changing\r\nAndroidManifest.xml and the path to your class file in android-project/src\r\n\r\nYou can then launch your application normally and waaaaaaaiiittt for it.\r\nYou can monitor the startup process with the logcat command above, and\r\nwhen it's done (or even while it's running) you can grab the valgrind\r\noutput file:\r\n\r\n    adb pull /sdcard/valgrind.log\r\n\r\nWhen you're done instrumenting with valgrind, you can disable the wrapper:\r\n\r\n    adb shell setprop wrap.org.libsdl.app \"\"\r\n\r\n\r\n================================================================================\r\n Graphics debugging\r\n================================================================================\r\n\r\nIf you are developing on a compatible Tegra-based tablet, NVidia provides\r\nTegra Graphics Debugger at their website. Because SDL2 dynamically loads EGL\r\nand GLES libraries, you must follow their instructions for installing the\r\ninterposer library on a rooted device. The non-rooted instructions are not\r\ncompatible with applications that use SDL2 for video.\r\n\r\nThe Tegra Graphics Debugger is available from NVidia here:\r\nhttps://developer.nvidia.com/tegra-graphics-debugger\r\n\r\n\r\n================================================================================\r\n Why is API level 16 the minimum required?\r\n================================================================================\r\n\r\nThe latest NDK toolchain doesn't support targeting earlier than API level 16.\r\nAs of this writing, according to https://developer.android.com/about/dashboards/index.html\r\nabout 99% of the Android devices accessing Google Play support API level 16 or\r\nhigher (January 2018).\r\n\r\n\r\n================================================================================\r\n A note regarding the use of the \"dirty rectangles\" rendering technique\r\n================================================================================\r\n\r\nIf your app uses a variation of the \"dirty rectangles\" rendering technique,\r\nwhere you only update a portion of the screen on each frame, you may notice a\r\nvariety of visual glitches on Android, that are not present on other platforms.\r\nThis is caused by SDL's use of EGL as the support system to handle OpenGL ES/ES2\r\ncontexts, in particular the use of the eglSwapBuffers function. As stated in the\r\ndocumentation for the function \"The contents of ancillary buffers are always \r\nundefined after calling eglSwapBuffers\".\r\nSetting the EGL_SWAP_BEHAVIOR attribute of the surface to EGL_BUFFER_PRESERVED\r\nis not possible for SDL as it requires EGL 1.4, available only on the API level\r\n17+, so the only workaround available on this platform is to redraw the entire\r\nscreen each frame.\r\n\r\nReference: http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html\r\n\r\n\r\n================================================================================\r\n Ending your application\r\n================================================================================\r\n\r\nTwo legitimate ways:\r\n\r\n- return from your main() function. Java side will automatically terminate the\r\nActivity by calling Activity.finish().\r\n\r\n- Android OS can decide to terminate your application by calling onDestroy()\r\n(see Activity life cycle). Your application will receive a SDL_QUIT event you \r\ncan handle to save things and quit.\r\n\r\nDon't call exit() as it stops the activity badly.\r\n\r\nNB: \"Back button\" can be handled as a SDL_KEYDOWN/UP events, with Keycode\r\nSDLK_AC_BACK, for any purpose.\r\n\r\n================================================================================\r\n Known issues\r\n================================================================================\r\n\r\n- The number of buttons reported for each joystick is hardcoded to be 36, which\r\nis the current maximum number of buttons Android can report.\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-cmake.md",
    "content": "CMake\r\n================================================================================\r\n(www.cmake.org)\r\n\r\nSDL's build system was traditionally based on autotools. Over time, this\r\napproach has suffered from several issues across the different supported \r\nplatforms.\r\nTo solve these problems, a new build system based on CMake is under development.\r\nIt works in parallel to the legacy system, so users can experiment with it\r\nwithout complication.\r\nWhile still experimental, the build system should be usable on the following\r\nplatforms:\r\n\r\n* FreeBSD\r\n* Linux\r\n* VS.NET 2010\r\n* MinGW and Msys\r\n* OS X with support for XCode\r\n\r\n\r\n================================================================================\r\nUsage\r\n================================================================================\r\n\r\nAssuming the source for SDL is located at ~/sdl\r\n\r\n    cd ~\r\n    mkdir build\r\n    cd build\r\n    cmake ../sdl\r\n\r\nThis will build the static and dynamic versions of SDL in the ~/build directory.\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-directfb.md",
    "content": "DirectFB\r\n========\r\n\r\nSupports:\r\n\r\n- Hardware YUV overlays\r\n- OpenGL - software only\r\n- 2D/3D accelerations (depends on directfb driver)\r\n- multiple displays\r\n- windows\r\n\r\nWhat you need:\r\n\r\n* DirectFB 1.0.1, 1.2.x, 1.3.0\r\n* Kernel-Framebuffer support: required: vesafb, radeonfb .... \r\n* Mesa 7.0.x\t   - optional for OpenGL\r\n\r\n/etc/directfbrc\r\n\r\nThis file should contain the following lines to make\r\nyour joystick work and avoid crashes:\r\n------------------------\r\ndisable-module=joystick\r\ndisable-module=cle266\r\ndisable-module=cyber5k\r\nno-linux-input-grab\r\n------------------------\r\n\r\nTo disable to use x11 backend when DISPLAY variable is found use\r\n\r\nexport SDL_DIRECTFB_X11_CHECK=0\r\n\r\nTo disable the use of linux input devices, i.e. multimice/multikeyboard support,\r\nuse\r\n\r\nexport SDL_DIRECTFB_LINUX_INPUT=0\r\n\r\nTo use hardware accelerated YUV-overlays for YUV-textures, use:\r\n\r\nexport SDL_DIRECTFB_YUV_DIRECT=1\r\n\r\nThis is disabled by default. It will only support one \r\nYUV texture, namely the first. Every other YUV texture will be\r\nrendered in software.\r\n\r\nIn addition, you may use (directfb-1.2.x)\r\n\r\nexport SDL_DIRECTFB_YUV_UNDERLAY=1\r\n\r\nto make the YUV texture an underlay. This will make the cursor to\r\nbe shown.\r\n\r\nSimple Window Manager\r\n=====================\r\n\r\nThe driver has support for a very, very basic window manager you may\r\nwant to use when running with \"wm=default\". Use\r\n\r\nexport SDL_DIRECTFB_WM=1\r\n\r\nto enable basic window borders. In order to have the window title rendered,\r\nyou need to have the following font installed:\r\n\r\n/usr/share/fonts/truetype/freefont/FreeSans.ttf\r\n\r\nOpenGL Support\r\n==============\r\n\r\nThe following instructions will give you *software* OpenGL. However this\r\nworks at least on all directfb supported platforms.\r\n\r\nAs of this writing 20100802 you need to pull Mesa from git and do the following:\r\n\r\n------------------------\r\ngit clone git://anongit.freedesktop.org/git/mesa/mesa\r\ncd mesa \r\ngit checkout 2c9fdaf7292423c157fc79b5ce43f0f199dd753a\r\n------------------------\r\n\r\nEdit configs/linux-directfb so that the Directories-section looks like\r\n------------------------\r\n# Directories\r\nSRC_DIRS     = mesa glu \r\nGLU_DIRS     = sgi\r\nDRIVER_DIRS  = directfb\r\nPROGRAM_DIRS = \r\n------------------------\r\n\r\nmake linux-directfb\r\nmake\r\n\r\necho Installing - please enter sudo pw.\r\n\r\nsudo make install INSTALL_DIR=/usr/local/dfb_GL\r\ncd src/mesa/drivers/directfb\r\nmake\r\nsudo make install INSTALL_DIR=/usr/local/dfb_GL\r\n------------------------\r\n\r\nTo run the SDL - testprograms:\r\n\r\nexport SDL_VIDEODRIVER=directfb\r\nexport LD_LIBRARY_PATH=/usr/local/dfb_GL/lib\r\nexport LD_PRELOAD=/usr/local/dfb_GL/libGL.so.7\r\n\r\n./testgl\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-dynapi.md",
    "content": "Dynamic API\r\n================================================================================\r\nOriginally posted by Ryan at:\r\n  https://plus.google.com/103391075724026391227/posts/TB8UfnDYu4U\r\n\r\nBackground:\r\n\r\n- The Steam Runtime has (at least in theory) a really kick-ass build of SDL2, \r\n  but developers are shipping their own SDL2 with individual Steam games. \r\n  These games might stop getting updates, but a newer SDL2 might be needed later. \r\n  Certainly we'll always be fixing bugs in SDL, even if a new video target isn't \r\n  ever needed, and these fixes won't make it to a game shipping its own SDL.\r\n- Even if we replace the SDL2 in those games with a compatible one, that is to \r\n  say, edit a developer's Steam depot (yuck!), there are developers that are \r\n  statically linking SDL2 that we can't do this for. We can't even force the \r\n  dynamic loader to ignore their SDL2 in this case, of course.\r\n- If you don't ship an SDL2 with the game in some form, people that disabled the\r\n  Steam Runtime, or just tried to run the game from the command line instead of \r\n  Steam might find themselves unable to run the game, due to a missing dependency.\r\n- If you want to ship on non-Steam platforms like GOG or Humble Bundle, or target\r\n  generic Linux boxes that may or may not have SDL2 installed, you have to ship \r\n  the library or risk a total failure to launch. So now, you might have to have \r\n  a non-Steam build plus a Steam build (that is, one with and one without SDL2 \r\n  included), which is inconvenient if you could have had one universal build \r\n  that works everywhere.\r\n- We like the zlib license, but the biggest complaint from the open source \r\n  community about the license change is the static linking. The LGPL forced this \r\n  as a legal, not technical issue, but zlib doesn't care. Even those that aren't\r\n  concerned about the GNU freedoms found themselves solving the same problems: \r\n  swapping in a newer SDL to an older game often times can save the day. \r\n  Static linking stops this dead.\r\n\r\nSo here's what we did:\r\n\r\nSDL now has, internally, a table of function pointers. So, this is what SDL_Init\r\nnow looks like:\r\n\r\n    UInt32 SDL_Init(Uint32 flags)\r\n    {\r\n        return jump_table.SDL_Init(flags);\r\n    }\r\n\r\nExcept that is all done with a bunch of macro magic so we don't have to maintain\r\nevery one of these.\r\n\r\nWhat is jump_table.SDL_init()? Eventually, that's a function pointer of the real\r\nSDL_Init() that you've been calling all this time. But at startup, it looks more \r\nlike this:\r\n\r\n    Uint32 SDL_Init_DEFAULT(Uint32 flags)\r\n    {\r\n        SDL_InitDynamicAPI();\r\n        return jump_table.SDL_Init(flags);\r\n    }\r\n\r\nSDL_InitDynamicAPI() fills in jump_table with all the actual SDL function \r\npointers, which means that this _DEFAULT function never gets called again. \r\nFirst call to any SDL function sets the whole thing up.\r\n\r\nSo you might be asking, what was the value in that? Isn't this what the operating\r\nsystem's dynamic loader was supposed to do for us? Yes, but now we've got this \r\nlevel of indirection, we can do things like this:\r\n\r\n    export SDL_DYNAMIC_API=/my/actual/libSDL-2.0.so.0\r\n    ./MyGameThatIsStaticallyLinkedToSDL2\r\n\r\nAnd now, this game that is statically linked to SDL, can still be overridden \r\nwith a newer, or better, SDL. The statically linked one will only be used as \r\nfar as calling into the jump table in this case. But in cases where no override\r\nis desired, the statically linked version will provide its own jump table, \r\nand everyone is happy.\r\n\r\nSo now:\r\n- Developers can statically link SDL, and users can still replace it. \r\n  (We'd still rather you ship a shared library, though!)\r\n- Developers can ship an SDL with their game, Valve can override it for, say, \r\n  new features on SteamOS, or distros can override it for their own needs, \r\n  but it'll also just work in the default case.\r\n- Developers can ship the same package to everyone (Humble Bundle, GOG, etc), \r\n  and it'll do the right thing.\r\n- End users (and Valve) can update a game's SDL in almost any case, \r\n  to keep abandoned games running on newer platforms.\r\n- Everyone develops with SDL exactly as they have been doing all along. \r\n  Same headers, same ABI. Just get the latest version to enable this magic.\r\n\r\n\r\nA little more about SDL_InitDynamicAPI():\r\n\r\nInternally, InitAPI does some locking to make sure everything waits until a \r\nsingle thread initializes everything (although even SDL_CreateThread() goes \r\nthrough here before spinning a thread, too), and then decides if it should use\r\nan external SDL library. If not, it sets up the jump table using the current \r\nSDL's function pointers (which might be statically linked into a program, or in\r\na shared library of its own). If so, it loads that library and looks for and \r\ncalls a single function:\r\n\r\n    SInt32 SDL_DYNAPI_entry(Uint32 version, void *table, Uint32 tablesize);\r\n\r\nThat function takes a version number (more on that in a moment), the address of\r\nthe jump table, and the size, in bytes, of the table. \r\nNow, we've got policy here: this table's layout never changes; new stuff gets \r\nadded to the end. Therefore SDL_DYNAPI_entry() knows that it can provide all \r\nthe needed functions if tablesize <= sizeof its own jump table. If tablesize is\r\nbigger (say, SDL 2.0.4 is trying to load SDL 2.0.3), then we know to abort, but\r\nif it's smaller, we know we can provide the entire API that the caller needs.\r\n\r\nThe version variable is a failsafe switch. \r\nRight now it's always 1. This number changes when there are major API changes \r\n(so we know if the tablesize might be smaller, or entries in it have changed). \r\nRight now SDL_DYNAPI_entry gives up if the version doesn't match, but it's not \r\ninconceivable to have a small dispatch library that only supplies this one \r\nfunction and loads different, otherwise-incompatible SDL libraries and has the\r\nright one initialize the jump table based on the version. For something that \r\nmust generically catch lots of different versions of SDL over time, like the \r\nSteam Client, this isn't a bad option.\r\n\r\nFinally, I'm sure some people are reading this and thinking,\r\n\"I don't want that overhead in my project!\"  \r\nTo which I would point out that the extra function call through the jump table \r\nprobably wouldn't even show up in a profile, but lucky you: this can all be \r\ndisabled. You can build SDL without this if you absolutely must, but we would \r\nencourage you not to do that. However, on heavily locked down platforms like \r\niOS, or maybe when debugging, it makes sense to disable it. The way this is\r\ndesigned in SDL, you just have to change one #define, and the entire system \r\nvaporizes out, and SDL functions exactly like it always did. Most of it is \r\nmacro magic, so the system is contained to one C file and a few headers. \r\nHowever, this is on by default and you have to edit a header file to turn it \r\noff. Our hopes is that if we make it easy to disable, but not too easy, \r\neveryone will ultimately be able to get what they want, but we've gently \r\nnudged everyone towards what we think is the best solution.\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-emscripten.md",
    "content": "Emscripten\r\n================================================================================\r\n\r\nBuild:\r\n\r\n    $ mkdir build\r\n    $ cd build\r\n    $ emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS=\"-O2\"\r\n    $ emmake make\r\n\r\nOr with cmake:\r\n\r\n    $ mkdir build\r\n    $ cd build\r\n    $ emcmake cmake ..\r\n    $ emmake make\r\n\r\nTo build one of the tests:\r\n\r\n    $ cd test/\r\n    $ emcc -O2 --js-opts 0 -g4 testdraw2.c -I../include ../build/.libs/libSDL2.a ../build/libSDL2_test.a -o a.html\r\n\r\nUses GLES2 renderer or software\r\n\r\nSome other SDL2 libraries can be easily built (assuming SDL2 is installed somewhere):\r\n\r\nSDL_mixer (http://www.libsdl.org/projects/SDL_mixer/):\r\n\r\n    $ EMCONFIGURE_JS=1 emconfigure ../configure\r\n    build as usual...\r\n\r\nSDL_gfx (http://cms.ferzkopp.net/index.php/software/13-sdl-gfx):\r\n\r\n    $ EMCONFIGURE_JS=1 emconfigure ../configure --disable-mmx\r\n    build as usual...\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-gesture.md",
    "content": "Dollar Gestures\r\n===========================================================================\r\nSDL provides an implementation of the $1 gesture recognition system. This allows for recording, saving, loading, and performing single stroke gestures.\r\n\r\nGestures can be performed with any number of fingers (the centroid of the fingers must follow the path of the gesture), but the number of fingers must be constant (a finger cannot go down in the middle of a gesture). The path of a gesture is considered the path from the time when the final finger went down, to the first time any finger comes up. \r\n\r\nDollar gestures are assigned an Id based on a hash function. This is guaranteed to remain constant for a given gesture. There is a (small) chance that two different gestures will be assigned the same ID. In this case, simply re-recording one of the gestures should result in a different ID.\r\n\r\nRecording:\r\n----------\r\nTo begin recording on a touch device call:\r\nSDL_RecordGesture(SDL_TouchID touchId), where touchId is the id of the touch device you wish to record on, or -1 to record on all connected devices.\r\n\r\nRecording terminates as soon as a finger comes up. Recording is acknowledged by an SDL_DOLLARRECORD event.\r\nA SDL_DOLLARRECORD event is a dgesture with the following fields:\r\n\r\n* event.dgesture.touchId   - the Id of the touch used to record the gesture.\r\n* event.dgesture.gestureId - the unique id of the recorded gesture.\r\n\r\n\r\nPerforming:\r\n-----------\r\nAs long as there is a dollar gesture assigned to a touch, every finger-up event will also cause an SDL_DOLLARGESTURE event with the following fields:\r\n\r\n* event.dgesture.touchId    - the Id of the touch which performed the gesture.\r\n* event.dgesture.gestureId  - the unique id of the closest gesture to the performed stroke.\r\n* event.dgesture.error      - the difference between the gesture template and the actual performed gesture. Lower error is a better match.\r\n* event.dgesture.numFingers - the number of fingers used to draw the stroke.\r\n\r\nMost programs will want to define an appropriate error threshold and check to be sure that the error of a gesture is not abnormally high (an indicator that no gesture was performed).\r\n\r\n\r\n\r\nSaving:\r\n-------\r\nTo save a template, call SDL_SaveDollarTemplate(gestureId, dst) where gestureId is the id of the gesture you want to save, and dst is an SDL_RWops pointer to the file where the gesture will be stored.\r\n\r\nTo save all currently loaded templates, call SDL_SaveAllDollarTemplates(dst) where dst is an SDL_RWops pointer to the file where the gesture will be stored.\r\n\r\nBoth functions return the number of gestures successfully saved.\r\n\r\n\r\nLoading:\r\n--------\r\nTo load templates from a file, call SDL_LoadDollarTemplates(touchId,src) where touchId is the id of the touch to load to (or -1 to load to all touch devices), and src is an SDL_RWops pointer to a gesture save file. \r\n\r\nSDL_LoadDollarTemplates returns the number of templates successfully loaded.\r\n\r\n\r\n\r\n===========================================================================\r\nMulti Gestures\r\n===========================================================================\r\nSDL provides simple support for pinch/rotate/swipe gestures. \r\nEvery time a finger is moved an SDL_MULTIGESTURE event is sent with the following fields:\r\n\r\n* event.mgesture.touchId - the Id of the touch on which the gesture was performed.\r\n* event.mgesture.x       - the normalized x coordinate of the gesture. (0..1)\r\n* event.mgesture.y       - the normalized y coordinate of the gesture. (0..1)\r\n* event.mgesture.dTheta  - the amount that the fingers rotated during this motion.\r\n* event.mgesture.dDist   - the amount that the fingers pinched during this motion.\r\n* event.mgesture.numFingers - the number of fingers used in the gesture.\r\n\r\n\r\n===========================================================================\r\nNotes\r\n===========================================================================\r\nFor a complete example see test/testgesture.c\r\n\r\nPlease direct questions/comments to:\r\n   jim.tla+sdl_touch@gmail.com\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-hg.md",
    "content": "Mercurial\r\n=========\r\n\r\nThe latest development version of SDL is available via Mercurial.\r\nMercurial allows you to get up-to-the-minute fixes and enhancements;\r\nas a developer works on a source tree, you can use \"hg\" to mirror that\r\nsource tree instead of waiting for an official release. Please look\r\nat the Mercurial website ( https://www.mercurial-scm.org/ ) for more\r\ninformation on using hg, where you can also download software for\r\nMac OS X, Windows, and Unix systems.\r\n\r\n    hg clone http://hg.libsdl.org/SDL\r\n\r\nIf you are building SDL via configure, you will need to run autogen.sh\r\nbefore running configure.\r\n\r\nThere is a web interface to the subversion repository at:\r\n\thttp://hg.libsdl.org/SDL/\r\n\r\nThere is an RSS feed available at that URL, for those that want to\r\ntrack commits in real time.\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-ios.md",
    "content": "iOS\r\n======\r\n\r\n==============================================================================\r\nBuilding the Simple DirectMedia Layer for iOS 5.1+\r\n==============================================================================\r\n\r\nRequirements: Mac OS X 10.8 or later and the iOS 7+ SDK.\r\n\r\nInstructions:\r\n\r\n1.  Open SDL.xcodeproj (located in Xcode-iOS/SDL) in Xcode.\r\n2.  Select your desired target, and hit build.\r\n\r\nThere are three build targets:\r\n- libSDL.a:\r\n\tBuild SDL as a statically linked library\r\n- testsdl:\r\n\tBuild a test program (there are known test failures which are fine)\r\n- Template:\r\n\tPackage a project template together with the SDL for iPhone static libraries and copies of the SDL headers.  The template includes proper references to the SDL library and headers, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.\r\n\r\n\r\n==============================================================================\r\nBuild SDL for iOS from the command line\r\n==============================================================================\r\n\r\n1. cd (PATH WHERE THE SDL CODE IS)/build-scripts\r\n2. ./iosbuild.sh\r\n\r\nIf everything goes fine, you should see a build/ios directory, inside there's\r\ntwo directories \"lib\" and \"include\". \r\n\"include\" contains a copy of the SDL headers that you'll need for your project,\r\nmake sure to configure XCode to look for headers there.\r\n\"lib\" contains find two files, libSDL2.a and libSDL2main.a, you have to add both \r\nto your XCode project. These libraries contain three architectures in them,\r\narmv6 for legacy devices, armv7, and i386 (for the simulator).\r\nBy default, iosbuild.sh will autodetect the SDK version you have installed using \r\nxcodebuild -showsdks, and build for iOS >= 3.0, you can override this behaviour \r\nby setting the MIN_OS_VERSION variable, ie:\r\n\r\nMIN_OS_VERSION=4.2 ./iosbuild.sh\r\n\r\n==============================================================================\r\nUsing the Simple DirectMedia Layer for iOS\r\n==============================================================================\r\n\r\nFIXME: This needs to be updated for the latest methods\r\n\r\nHere is the easiest method:\r\n1.  Build the SDL library (libSDL2.a) and the iPhone SDL Application template.\r\n2.  Install the iPhone SDL Application template by copying it to one of Xcode's template directories.  I recommend creating a directory called \"SDL\" in \"/Developer/Platforms/iOS.platform/Developer/Library/Xcode/Project Templates/\" and placing it there.\r\n3.  Start a new project using the template.  The project should be immediately ready for use with SDL.\r\n\r\nHere is a more manual method:\r\n1.  Create a new iOS view based application.\r\n2.  Build the SDL static library (libSDL2.a) for iOS and include them in your project.  Xcode will ignore the library that is not currently of the correct architecture, hence your app will work both on iOS and in the iOS Simulator.\r\n3.  Include the SDL header files in your project.\r\n4.  Remove the ApplicationDelegate.h and ApplicationDelegate.m files -- SDL for iOS provides its own UIApplicationDelegate.  Remove MainWindow.xib -- SDL for iOS produces its user interface programmatically.\r\n5.  Delete the contents of main.m and program your app as a regular SDL program instead.  You may replace main.m with your own main.c, but you must tell Xcode not to use the project prefix file, as it includes Objective-C code.\r\n\r\n==============================================================================\r\nNotes -- Retina / High-DPI and window sizes\r\n==============================================================================\r\n\r\nWindow and display mode sizes in SDL are in \"screen coordinates\" (or \"points\",\r\nin Apple's terminology) rather than in pixels. On iOS this means that a window\r\ncreated on an iPhone 6 will have a size in screen coordinates of 375 x 667,\r\nrather than a size in pixels of 750 x 1334. All iOS apps are expected to\r\nsize their content based on screen coordinates / points rather than pixels,\r\nas this allows different iOS devices to have different pixel densities\r\n(Retina versus non-Retina screens, etc.) without apps caring too much.\r\n\r\nBy default SDL will not use the full pixel density of the screen on\r\nRetina/high-dpi capable devices. Use the SDL_WINDOW_ALLOW_HIGHDPI flag when\r\ncreating your window to enable high-dpi support.\r\n\r\nWhen high-dpi support is enabled, SDL_GetWindowSize() and display mode sizes\r\nwill still be in \"screen coordinates\" rather than pixels, but the window will\r\nhave a much greater pixel density when the device supports it, and the\r\nSDL_GL_GetDrawableSize() or SDL_GetRendererOutputSize() functions (depending on\r\nwhether raw OpenGL or the SDL_Render API is used) can be queried to determine\r\nthe size in pixels of the drawable screen framebuffer.\r\n\r\nSome OpenGL ES functions such as glViewport expect sizes in pixels rather than\r\nsizes in screen coordinates. When doing 2D rendering with OpenGL ES, an\r\northographic projection matrix using the size in screen coordinates\r\n(SDL_GetWindowSize()) can be used in order to display content at the same scale\r\nno matter whether a Retina device is used or not.\r\n\r\n==============================================================================\r\nNotes -- Application events\r\n==============================================================================\r\n\r\nOn iOS the application goes through a fixed life cycle and you will get\r\nnotifications of state changes via application events. When these events\r\nare delivered you must handle them in an event callback because the OS may\r\nnot give you any processing time after the events are delivered.\r\n\r\ne.g.\r\n\r\n    int HandleAppEvents(void *userdata, SDL_Event *event)\r\n    {\r\n        switch (event->type)\r\n        {\r\n        case SDL_APP_TERMINATING:\r\n            /* Terminate the app.\r\n               Shut everything down before returning from this function.\r\n            */\r\n            return 0;\r\n        case SDL_APP_LOWMEMORY:\r\n            /* You will get this when your app is paused and iOS wants more memory.\r\n               Release as much memory as possible.\r\n            */\r\n            return 0;\r\n        case SDL_APP_WILLENTERBACKGROUND:\r\n            /* Prepare your app to go into the background.  Stop loops, etc.\r\n               This gets called when the user hits the home button, or gets a call.\r\n            */\r\n            return 0;\r\n        case SDL_APP_DIDENTERBACKGROUND:\r\n            /* This will get called if the user accepted whatever sent your app to the background.\r\n               If the user got a phone call and canceled it, you'll instead get an SDL_APP_DIDENTERFOREGROUND event and restart your loops.\r\n               When you get this, you have 5 seconds to save all your state or the app will be terminated.\r\n               Your app is NOT active at this point.\r\n            */\r\n            return 0;\r\n        case SDL_APP_WILLENTERFOREGROUND:\r\n            /* This call happens when your app is coming back to the foreground.\r\n               Restore all your state here.\r\n            */\r\n            return 0;\r\n        case SDL_APP_DIDENTERFOREGROUND:\r\n            /* Restart your loops here.\r\n               Your app is interactive and getting CPU again.\r\n            */\r\n            return 0;\r\n        default:\r\n            /* No special processing, add it to the event queue */\r\n            return 1;\r\n        }\r\n    }\r\n    \r\n    int main(int argc, char *argv[])\r\n    {\r\n        SDL_SetEventFilter(HandleAppEvents, NULL);\r\n    \r\n        ... run your main loop\r\n    \r\n        return 0;\r\n    }\r\n\r\n    \r\n==============================================================================\r\nNotes -- Accelerometer as Joystick\r\n==============================================================================\r\n\r\nSDL for iPhone supports polling the built in accelerometer as a joystick device.  For an example on how to do this, see the accelerometer.c in the demos directory.\r\n\r\nThe main thing to note when using the accelerometer with SDL is that while the iPhone natively reports accelerometer as floating point values in units of g-force, SDL_JoystickGetAxis() reports joystick values as signed integers.  Hence, in order to convert between the two, some clamping and scaling is necessary on the part of the iPhone SDL joystick driver.  To convert SDL_JoystickGetAxis() reported values BACK to units of g-force, simply multiply the values by SDL_IPHONE_MAX_GFORCE / 0x7FFF.\r\n\r\n==============================================================================\r\nNotes -- OpenGL ES\r\n==============================================================================\r\n\r\nYour SDL application for iOS uses OpenGL ES for video by default.\r\n\r\nOpenGL ES for iOS supports several display pixel formats, such as RGBA8 and RGB565, which provide a 32 bit and 16 bit color buffer respectively. By default, the implementation uses RGB565, but you may use RGBA8 by setting each color component to 8 bits in SDL_GL_SetAttribute().\r\n\r\nIf your application doesn't use OpenGL's depth buffer, you may find significant performance improvement by setting SDL_GL_DEPTH_SIZE to 0.\r\n\r\nFinally, if your application completely redraws the screen each frame, you may find significant performance improvement by setting the attribute SDL_GL_RETAINED_BACKING to 0.\r\n\r\nOpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided in other operating systems. Special care must be taken because of this:\r\n\r\n- The drawable Renderbuffer must be bound to the GL_RENDERBUFFER binding point when SDL_GL_SwapWindow() is called.\r\n- The drawable Framebuffer Object must be bound while rendering to the screen and when SDL_GL_SwapWindow() is called.\r\n- If multisample antialiasing (MSAA) is used and glReadPixels is used on the screen, the drawable framebuffer must be resolved to the MSAA resolve framebuffer (via glBlitFramebuffer or glResolveMultisampleFramebufferAPPLE), and the MSAA resolve framebuffer must be bound to the GL_READ_FRAMEBUFFER binding point, before glReadPixels is called.\r\n\r\nThe above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).\r\n\r\n==============================================================================\r\nNotes -- Keyboard\r\n==============================================================================\r\n\r\nThe SDL keyboard API has been extended to support on-screen keyboards:\r\n\r\nvoid SDL_StartTextInput()\r\n\t-- enables text events and reveals the onscreen keyboard.\r\n\r\nvoid SDL_StopTextInput()\r\n\t-- disables text events and hides the onscreen keyboard.\r\n\r\nSDL_bool SDL_IsTextInputActive()\r\n\t-- returns whether or not text events are enabled (and the onscreen keyboard is visible)\r\n\r\n\r\n==============================================================================\r\nNotes -- Reading and Writing files\r\n==============================================================================\r\n\r\nEach application installed on iPhone resides in a sandbox which includes its own Application Home directory.  Your application may not access files outside this directory.\r\n\r\nOnce your application is installed its directory tree looks like:\r\n\r\n    MySDLApp Home/\r\n        MySDLApp.app\r\n        Documents/\r\n        Library/\r\n            Preferences/\r\n        tmp/\r\n\r\nWhen your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored.  You cannot write to this directory.  Instead, I advise you to write document files to \"../Documents/\" and preferences to \"../Library/Preferences\".  \r\n\r\nMore information on this subject is available here:\r\nhttp://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html\r\n\r\n==============================================================================\r\nNotes -- iPhone SDL limitations\r\n==============================================================================\r\n\r\nWindows:\r\n\tFull-size, single window applications only.  You cannot create multi-window SDL applications for iPhone OS.  The application window will fill the display, though you have the option of turning on or off the menu-bar (pass SDL_CreateWindow() the flag SDL_WINDOW_BORDERLESS).\r\n\r\nTextures:\r\n\tThe optimal texture formats on iOS are SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_ABGR8888, SDL_PIXELFORMAT_BGR888, and SDL_PIXELFORMAT_RGB24 pixel formats.\r\n\r\nLoading Shared Objects:\r\n\tThis is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h.\r\n\r\n==============================================================================\r\nGame Center \r\n==============================================================================\r\n\r\nGame Center integration might require that you break up your main loop in order to yield control back to the system. In other words, instead of running an endless main loop, you run each frame in a callback function, using:\r\n\r\n    int SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);\r\n\r\nThis will set up the given function to be called back on the animation callback, and then you have to return from main() to let the Cocoa event loop run.\r\n\r\ne.g.\r\n\r\n    extern \"C\"\r\n    void ShowFrame(void*)\r\n    {\r\n        ... do event handling, frame logic and rendering ...\r\n    }\r\n    \r\n    int main(int argc, char *argv[])\r\n    {\r\n        ... initialize game ...\r\n    \r\n    #if __IPHONEOS__\r\n        // Initialize the Game Center for scoring and matchmaking\r\n        InitGameCenter();\r\n    \r\n        // Set up the game to run in the window animation callback on iOS\r\n        // so that Game Center and so forth works correctly.\r\n        SDL_iPhoneSetAnimationCallback(window, 1, ShowFrame, NULL);\r\n    #else\r\n        while ( running ) {\r\n            ShowFrame(0);\r\n            DelayFrame();\r\n        }\r\n    #endif\r\n        return 0;\r\n    }\r\n\r\n==============================================================================\r\nDeploying to older versions of iOS\r\n==============================================================================\r\n\r\nSDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1\r\n\r\nIn order to do that you need to download an older version of Xcode:\r\nhttps://developer.apple.com/download/more/?name=Xcode\r\n\r\nOpen the package contents of the older Xcode and your newer version of Xcode and copy over the folders in Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport\r\n\r\nThen open the file Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist and add the versions of iOS you want to deploy to the key Root/DefaultProperties/DEPLOYMENT_TARGET_SUGGESTED_VALUES\r\n\r\nOpen your project and set your deployment target to the desired version of iOS\r\n\r\nFinally, remove GameController from the list of frameworks linked by your application and edit the build settings for \"Other Linker Flags\" and add -weak_framework GameController\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-linux.md",
    "content": "Linux\r\n================================================================================\r\n\r\nBy default SDL will only link against glibc, the rest of the features will be\r\nenabled dynamically at runtime depending on the available features on the target\r\nsystem. So, for example if you built SDL with Xinerama support and the target\r\nsystem does not have the Xinerama libraries installed, it will be disabled\r\nat runtime, and you won't get a missing library error, at least with the \r\ndefault configuration parameters.\r\n\r\n\r\n================================================================================\r\nBuild Dependencies\r\n================================================================================\r\n    \r\nUbuntu 13.04, all available features enabled:\r\n\r\nsudo apt-get install build-essential mercurial make cmake autoconf automake \\\r\nlibtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \\\r\nlibxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \\\r\nlibxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \\\r\nlibgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \\\r\nfcitx-libs-dev libsamplerate0-dev libsndio-dev\r\n\r\nUbuntu 16.04+ can also add \"libwayland-dev libxkbcommon-dev wayland-protocols\"\r\nto that command line for Wayland support.\r\n\r\nNOTES:\r\n- This includes all the audio targets except arts, because Ubuntu pulled the \r\n  artsc0-dev package, but in theory SDL still supports it.\r\n- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime\n  for higher-quality audio resampling. SDL will work without it if the library\n  is missing, so it's safe to build in support even if the end user doesn't\n  have this library installed.\n- DirectFB isn't included because the configure script (currently) fails to find\r\n  it at all. You can do \"sudo apt-get install libdirectfb-dev\" and fix the \r\n  configure script to include DirectFB support. Send patches.  :)\r\n\r\n\r\n================================================================================\r\nJoystick does not work\r\n================================================================================\r\n\r\nIf you compiled or are using a version of SDL with udev support (and you should!)\r\nthere's a few issues that may cause SDL to fail to detect your joystick. To\r\ndebug this, start by installing the evtest utility. On Ubuntu/Debian:\r\n\r\n    sudo apt-get install evtest\r\n    \r\nThen run:\r\n    \r\n    sudo evtest\r\n    \r\nYou'll hopefully see your joystick listed along with a name like \"/dev/input/eventXX\"\r\nNow run:\r\n    \r\n    cat /dev/input/event/XX\r\n\r\nIf you get a permission error, you need to set a udev rule to change the mode of\r\nyour device (see below)    \r\n    \r\nAlso, try:\r\n    \r\n    sudo udevadm info --query=all --name=input/eventXX\r\n    \r\nIf you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,\r\nyou need to set up an udev rule to force this variable.\r\n\r\nA combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks \r\nlike:\r\n    \r\n   SUBSYSTEM==\"input\", ATTRS{idProduct}==\"0763\", ATTRS{idVendor}==\"06a3\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\r\n   SUBSYSTEM==\"input\", ATTRS{idProduct}==\"0764\", ATTRS{idVendor}==\"06a3\", MODE=\"0666\", ENV{ID_INPUT_JOYSTICK}=\"1\"\r\n   \r\nYou can set up similar rules for your device by changing the values listed in\r\nidProduct and idVendor. To obtain these values, try:\r\n    \r\n    sudo udevadm info -a --name=input/eventXX | grep idVendor\r\n    sudo udevadm info -a --name=input/eventXX | grep idProduct\r\n    \r\nIf multiple values come up for each of these, the one you want is the first one of each.    \r\n\r\nOn other systems which ship with an older udev (such as CentOS), you may need\r\nto set up a rule such as:\r\n    \r\n    SUBSYSTEM==\"input\", ENV{ID_CLASS}==\"joystick\", ENV{ID_INPUT_JOYSTICK}=\"1\"\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-macosx.md",
    "content": "Mac OS X\r\n==============================================================================\r\n\r\nThese instructions are for people using Apple's Mac OS X (pronounced\r\n\"ten\").\r\n\r\nFrom the developer's point of view, OS X is a sort of hybrid Mac and\r\nUnix system, and you have the option of using either traditional\r\ncommand line tools or Apple's IDE Xcode.\r\n\r\nCommand Line Build\r\n==================\r\n\r\nTo build SDL using the command line, use the standard configure and make\r\nprocess:\r\n\r\n    ./configure\r\n    make\r\n    sudo make install\r\n\r\nYou can also build SDL as a Universal library (a single binary for both\r\n32-bit and 64-bit Intel architectures), on Mac OS X 10.7 and newer, by using\r\nthe gcc-fat.sh script in build-scripts:\r\n\r\n    mkdir mybuild\r\n    cd mybuild\r\n    CC=$PWD/../build-scripts/gcc-fat.sh CXX=$PWD/../build-scripts/g++-fat.sh ../configure\r\n    make\r\n    sudo make install\r\n\r\nThis script builds SDL with 10.5 ABI compatibility on i386 and 10.6\r\nABI compatibility on x86_64 architectures.  For best compatibility you\r\nshould compile your application the same way.\r\n\r\nPlease note that building SDL requires at least Xcode 4.6 and the 10.7 SDK\r\n(even if you target back to 10.5 systems). PowerPC support for Mac OS X has\r\nbeen officially dropped as of SDL 2.0.2.\r\n\r\nTo use the library once it's built, you essential have two possibilities:\r\nuse the traditional autoconf/automake/make method, or use Xcode.\r\n\r\n==============================================================================\r\nCaveats for using SDL with Mac OS X\r\n==============================================================================\r\n\r\nSome things you have to be aware of when using SDL on Mac OS X:\r\n\r\n- If you register your own NSApplicationDelegate (using [NSApp setDelegate:]),\r\n  SDL will not register its own. This means that SDL will not terminate using\r\n  SDL_Quit if it receives a termination request, it will terminate like a \r\n  normal app, and it will not send a SDL_DROPFILE when you request to open a\r\n  file with the app. To solve these issues, put the following code in your \r\n  NSApplicationDelegate implementation:\r\n\r\n\r\n    - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender\r\n    {\r\n        if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {\r\n            SDL_Event event;\r\n            event.type = SDL_QUIT;\r\n            SDL_PushEvent(&event);\r\n        }\r\n    \r\n        return NSTerminateCancel;\r\n    }\r\n    \r\n    - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename\r\n    {\r\n        if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {\r\n            SDL_Event event;\r\n            event.type = SDL_DROPFILE;\r\n            event.drop.file = SDL_strdup([filename UTF8String]);\r\n            return (SDL_PushEvent(&event) > 0);\r\n        }\r\n    \r\n        return NO;\r\n    }\r\n\r\n==============================================================================\r\nUsing the Simple DirectMedia Layer with a traditional Makefile\r\n==============================================================================\r\n\r\nAn existing autoconf/automake build system for your SDL app has good chances\r\nto work almost unchanged on OS X. However, to produce a \"real\" Mac OS X binary\r\nthat you can distribute to users, you need to put the generated binary into a\r\nso called \"bundle\", which basically is a fancy folder with a name like\r\n\"MyCoolGame.app\".\r\n\r\nTo get this build automatically, add something like the following rule to\r\nyour Makefile.am:\r\n\r\n    bundle_contents = APP_NAME.app/Contents\r\n    APP_NAME_bundle: EXE_NAME\r\n    \tmkdir -p $(bundle_contents)/MacOS\r\n    \tmkdir -p $(bundle_contents)/Resources\r\n    \techo \"APPL????\" > $(bundle_contents)/PkgInfo\r\n    \t$(INSTALL_PROGRAM) $< $(bundle_contents)/MacOS/\r\n\r\nYou should replace EXE_NAME with the name of the executable. APP_NAME is what\r\nwill be visible to the user in the Finder. Usually it will be the same\r\nas EXE_NAME but capitalized. E.g. if EXE_NAME is \"testgame\" then APP_NAME \r\nusually is \"TestGame\". You might also want to use `@PACKAGE@` to use the package\r\nname as specified in your configure.ac file.\r\n\r\nIf your project builds more than one application, you will have to do a bit\r\nmore. For each of your target applications, you need a separate rule.\r\n\r\nIf you want the created bundles to be installed, you may want to add this\r\nrule to your Makefile.am:\r\n\r\n    install-exec-hook: APP_NAME_bundle\r\n    \trm -rf $(DESTDIR)$(prefix)/Applications/APP_NAME.app\r\n    \tmkdir -p $(DESTDIR)$(prefix)/Applications/\r\n    \tcp -r $< /$(DESTDIR)$(prefix)Applications/\r\n\r\nThis rule takes the Bundle created by the rule from step 3 and installs them\r\ninto \"$(DESTDIR)$(prefix)/Applications/\".\r\n\r\nAgain, if you want to install multiple applications, you will have to augment\r\nthe make rule accordingly.\r\n\r\n\r\nBut beware! That is only part of the story! With the above, you end up with\r\na bare bone .app bundle, which is double clickable from the Finder. But\r\nthere are some more things you should do before shipping your product...\r\n\r\n1) The bundle right now probably is dynamically linked against SDL. That \r\n   means that when you copy it to another computer, *it will not run*,\r\n   unless you also install SDL on that other computer. A good solution\r\n   for this dilemma is to static link against SDL. On OS X, you can\r\n   achieve that by linking against the libraries listed by\r\n\r\n       sdl-config --static-libs\r\n\r\n   instead of those listed by\r\n\r\n       sdl-config --libs\r\n\r\n   Depending on how exactly SDL is integrated into your build systems, the\r\n   way to achieve that varies, so I won't describe it here in detail\r\n\r\n2) Add an 'Info.plist' to your application. That is a special XML file which\r\n   contains some meta-information about your application (like some copyright\r\n   information, the version of your app, the name of an optional icon file,\r\n   and other things). Part of that information is displayed by the Finder\r\n   when you click on the .app, or if you look at the \"Get Info\" window.\r\n   More information about Info.plist files can be found on Apple's homepage.\r\n\r\n\r\nAs a final remark, let me add that I use some of the techniques (and some\r\nvariations of them) in Exult and ScummVM; both are available in source on\r\nthe net, so feel free to take a peek at them for inspiration!\r\n\r\n\r\n==============================================================================\r\nUsing the Simple DirectMedia Layer with Xcode\r\n==============================================================================\r\n\r\nThese instructions are for using Apple's Xcode IDE to build SDL applications.\r\n\r\n- First steps\r\n\r\nThe first thing to do is to unpack the Xcode.tar.gz archive in the\r\ntop level SDL directory (where the Xcode.tar.gz archive resides).\r\nBecause Stuffit Expander will unpack the archive into a subdirectory,\r\nyou should unpack the archive manually from the command line:\r\n\r\n    cd [path_to_SDL_source]\r\n    tar zxf Xcode.tar.gz\r\n\r\nThis will create a new folder called Xcode, which you can browse\r\nnormally from the Finder.\r\n\r\n- Building the Framework\r\n\r\nThe SDL Library is packaged as a framework bundle, an organized\r\nrelocatable folder hierarchy of executable code, interface headers,\r\nand additional resources. For practical purposes, you can think of a \r\nframework as a more user and system-friendly shared library, whose library\r\nfile behaves more or less like a standard UNIX shared library.\r\n\r\nTo build the framework, simply open the framework project and build it. \r\nBy default, the framework bundle \"SDL.framework\" is installed in \r\n/Library/Frameworks. Therefore, the testers and project stationary expect\r\nit to be located there. However, it will function the same in any of the\r\nfollowing locations:\r\n\r\n    ~/Library/Frameworks\r\n    /Local/Library/Frameworks\r\n    /System/Library/Frameworks\r\n\r\n- Build Options\r\n    There are two \"Build Styles\" (See the \"Targets\" tab) for SDL.\r\n    \"Deployment\" should be used if you aren't tweaking the SDL library.\r\n    \"Development\" should be used to debug SDL apps or the library itself.\r\n\r\n- Building the Testers\r\n    Open the SDLTest project and build away!\r\n\r\n- Using the Project Stationary\r\n    Copy the stationary to the indicated folders to access it from\r\n    the \"New Project\" and \"Add target\" menus. What could be easier?\r\n\r\n- Setting up a new project by hand\r\n    Some of you won't want to use the Stationary so I'll give some tips:\r\n    * Create a new \"Cocoa Application\"\r\n    * Add src/main/macosx/SDLMain.m , .h and .nib to your project\r\n    * Remove \"main.c\" from your project\r\n    * Remove \"MainMenu.nib\" from your project\r\n    * Add \"$(HOME)/Library/Frameworks/SDL.framework/Headers\" to include path\r\n    * Add \"$(HOME)/Library/Frameworks\" to the frameworks search path\r\n    * Add \"-framework SDL -framework Foundation -framework AppKit\" to \"OTHER_LDFLAGS\"\r\n    * Set the \"Main Nib File\" under \"Application Settings\" to \"SDLMain.nib\"\r\n    * Add your files\r\n    * Clean and build\r\n\r\n- Building from command line\r\n    Use pbxbuild in the same directory as your .pbproj file\r\n\r\n- Running your app\r\n    You can send command line args to your app by either invoking it from\r\n    the command line (in *.app/Contents/MacOS) or by entering them in the\r\n    \"Executables\" panel of the target settings.\r\n    \r\n- Implementation Notes\r\n    Some things that may be of interest about how it all works...\r\n    * Working directory\r\n        As defined in the SDL_main.m file, the working directory of your SDL app\r\n        is by default set to its parent. You may wish to change this to better\r\n        suit your needs.\r\n    * You have a Cocoa App!\r\n        Your SDL app is essentially a Cocoa application. When your app\r\n        starts up and the libraries finish loading, a Cocoa procedure is called,\r\n        which sets up the working directory and calls your main() method.\r\n        You are free to modify your Cocoa app with generally no consequence \r\n        to SDL. You cannot, however, easily change the SDL window itself.\r\n        Functionality may be added in the future to help this.\r\n\r\n\r\nKnown bugs are listed in the file \"BUGS.txt\".\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-nacl.md",
    "content": "Native Client\r\n================================================================================\r\n\r\nRequirements: \r\n\r\n* Native Client SDK (https://developer.chrome.com/native-client), \r\n  (tested with Pepper version 33 or higher).\r\n\r\nThe SDL backend for Chrome's Native Client has been tested only with the PNaCl\r\ntoolchain, which generates binaries designed to run on ARM and x86_32/64 \r\nplatforms. This does not mean it won't work with the other toolchains!\r\n\r\n================================================================================\r\nBuilding SDL for NaCl\r\n================================================================================\r\n\r\nSet up the right environment variables (see naclbuild.sh), then configure SDL with:\r\n\r\n    configure --host=pnacl --prefix some/install/destination\r\n    \r\nThen \"make\". \r\n\r\nAs an example of how to create a deployable app a Makefile project is provided \r\nin test/nacl/Makefile, which includes some monkey patching of the common.mk file \r\nprovided by NaCl, without which linking properly to SDL won't work (the search \r\npath can't be modified externally, so the linker won't find SDL's binaries unless \r\nyou dump them into the SDK path, which is inconvenient).\r\nAlso provided in test/nacl is the required support file, such as index.html, \r\nmanifest.json, etc.\r\nSDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.\r\nThis allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),\r\nhiding the asynchronous nature of the browser behind the scenes...which is not the\r\nsame as making it disappear!\r\n\r\n\r\n================================================================================\r\nRunning tests\r\n================================================================================\r\n\r\nDue to the nature of NaCl programs, building and running SDL tests is not as\r\nstraightforward as one would hope. The script naclbuild.sh in build-scripts \r\nautomates the process and should serve as a guide for users of SDL trying to build \r\ntheir own applications.\r\n\r\nBasic usage:\r\n    \r\n    ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)\r\n    \r\nThis will build testgles2.c by default.\r\n\r\nIf you want to build a different test, for example testrendercopyex.c:\r\n    \r\n    SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35\r\n    \r\nOnce the build finishes, you have to serve the contents with a web server (the\r\nscript will give you instructions on how to do that with Python).\r\n\r\n================================================================================\r\nRWops and nacl_io\r\n================================================================================\r\n\r\nSDL_RWops work transparently with nacl_io. Two functions control the mount points:\r\n    \r\n    int mount(const char* source, const char* target, \r\n                      const char* filesystemtype, \r\n                      unsigned long mountflags, const void *data);\r\n    int umount(const char *target);\r\n    \r\n    For convenience, SDL will by default mount an httpfs tree at / before calling \r\nthe app's main function. Such setting can be overridden by calling:\r\n    \r\n    umount(\"/\");\r\n\r\nAnd then mounting a different filesystem at /\r\n\r\nIt's important to consider that the asynchronous nature of file operations on a\r\nbrowser is hidden from the application, effectively providing the developer with\r\na set of blocking file operations just like you get in a regular desktop \r\nenvironment, which eases the job of porting to Native Client, but also introduces \r\na set of challenges of its own, in particular when big file sizes and slow \r\nconnections are involved.\r\n\r\nFor more information on how nacl_io and mount points work, see:\r\n    \r\n    https://developer.chrome.com/native-client/devguide/coding/nacl_io\r\n    https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h\r\n\r\nTo be able to save into the directory \"/save/\" (like backup of game) :\r\n\r\n    mount(\"\", \"/save\", \"html5fs\", 0, \"type=PERSISTENT\");\r\n\r\nAnd add to manifest.json :\r\n\r\n    \"permissions\": [\r\n        \"unlimitedStorage\"\r\n    ]\r\n\r\n================================================================================\r\nTODO - Known Issues\r\n================================================================================\r\n* Testing of all systems with a real application (something other than SDL's tests)\r\n* Key events don't seem to work properly\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-pandora.md",
    "content": "Pandora \r\n=====================================================================\r\n\r\n( http://openpandora.org/ )\r\n- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES\r\nsupport to work on the pandora under the framebuffer. This driver do not have\r\ninput support for now, so if you use it you will have to add your own control code.\r\nThe video driver name is \"pandora\" so if you have problem running it from\r\nthe framebuffer, try to set the following variable before starting your application :\r\n\"export SDL_VIDEODRIVER=pandora\"\r\n\r\n- OpenGL ES support was added to the x11 driver, so it's working like the normal\r\nx11 driver one with OpenGLX support, with SDL input event's etc..\r\n\r\n\r\nDavid Carré (Cpasjuste)\r\ncpasjuste@gmail.com\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-platforms.md",
    "content": "Platforms\r\n=========\r\n\r\nWe maintain the list of supported platforms on our wiki now, and how to\r\nbuild and install SDL for those platforms:\r\n\r\n    https://wiki.libsdl.org/Installation\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-porting.md",
    "content": "Porting\r\n=======\r\n\r\n* Porting To A New Platform\r\n\r\n  The first thing you have to do when porting to a new platform, is look at\r\ninclude/SDL_platform.h and create an entry there for your operating system.\r\nThe standard format is \"__PLATFORM__\", where PLATFORM is the name of the OS.\r\nIdeally SDL_platform.h will be able to auto-detect the system it's building\r\non based on C preprocessor symbols.\r\n\r\nThere are two basic ways of building SDL at the moment:\r\n\r\n1. The \"UNIX\" way:  ./configure; make; make install\r\n\r\n   If you have a GNUish system, then you might try this.  Edit configure.ac,\r\n   take a look at the large section labelled:\r\n\r\n\t\"Set up the configuration based on the host platform!\"\r\n\r\n   Add a section for your platform, and then re-run autogen.sh and build!\r\n\r\n2. Using an IDE:\r\n\r\n   If you're using an IDE or other non-configure build system, you'll probably\r\n   want to create a custom SDL_config.h for your platform.  Edit SDL_config.h,\r\n   add a section for your platform, and create a custom SDL_config_{platform}.h,\r\n   based on SDL_config_minimal.h and SDL_config.h.in\r\n\r\n   Add the top level include directory to the header search path, and then add\r\n   the following sources to the project:\r\n\r\n\tsrc/*.c\r\n\tsrc/atomic/*.c\r\n\tsrc/audio/*.c\r\n\tsrc/cpuinfo/*.c\r\n\tsrc/events/*.c\r\n\tsrc/file/*.c\r\n\tsrc/haptic/*.c\r\n\tsrc/joystick/*.c\r\n\tsrc/power/*.c\r\n\tsrc/render/*.c\r\n\tsrc/render/software/*.c\r\n\tsrc/stdlib/*.c\r\n\tsrc/thread/*.c\r\n\tsrc/timer/*.c\r\n\tsrc/video/*.c\r\n\tsrc/audio/disk/*.c\r\n\tsrc/audio/dummy/*.c\r\n\tsrc/filesystem/dummy/*.c\r\n\tsrc/video/dummy/*.c\r\n\tsrc/haptic/dummy/*.c\r\n\tsrc/joystick/dummy/*.c\r\n\tsrc/main/dummy/*.c\r\n\tsrc/thread/generic/*.c\r\n\tsrc/timer/dummy/*.c\r\n\tsrc/loadso/dummy/*.c\r\n\r\n\r\nOnce you have a working library without any drivers, you can go back to each\r\nof the major subsystems and start implementing drivers for your platform.\r\n\r\nIf you have any questions, don't hesitate to ask on the SDL mailing list:\r\n\thttp://www.libsdl.org/mailing-list.php\r\n\r\nEnjoy!\r\n\tSam Lantinga\t\t\t\t(slouken@libsdl.org)\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-psp.md",
    "content": "PSP\r\n======\r\nSDL port for the Sony PSP contributed by \r\n   Captian Lex \r\n\r\nCredit to\r\n   Marcus R.Brown,Jim Paris,Matthew H for the original SDL 1.2 for PSP\r\n   Geecko for his PSP GU lib \"Glib2d\"\r\n\r\nBuilding\r\n--------\r\nTo build for the PSP, make sure psp-config is in the path and run:\r\n   make -f Makefile.psp\r\n\r\n\r\n\r\nTo Do\r\n------\r\nPSP Screen Keyboard\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-raspberrypi.md",
    "content": "Raspberry Pi\r\n================================================================================\r\n\r\nRequirements:\r\n\r\nRaspbian (other Linux distros may work as well).\r\n\r\n================================================================================\r\n Features\r\n================================================================================\r\n\r\n* Works without X11\r\n* Hardware accelerated OpenGL ES 2.x\r\n* Sound via ALSA\r\n* Input (mouse/keyboard/joystick) via EVDEV\r\n* Hotplugging of input devices via UDEV\r\n\r\n\r\n================================================================================\r\n Raspbian Build Dependencies\r\n================================================================================\r\n\r\nsudo apt-get install libudev-dev libasound2-dev libdbus-1-dev\r\n\r\nYou also need the VideoCore binary stuff that ships in /opt/vc for EGL and \r\nOpenGL ES 2.x, it usually comes pre-installed, but in any case:\r\n    \r\nsudo apt-get install libraspberrypi0 libraspberrypi-bin libraspberrypi-dev\r\n\r\n\r\n================================================================================\r\n NEON\r\n================================================================================\r\n\r\nIf your Pi has NEON support, make sure you add -mfpu=neon to your CFLAGS so\r\nthat SDL will select some otherwise-disabled highly-optimized code. The\r\noriginal Pi units don't have NEON, the Pi2 probably does, and the Pi3\r\ndefinitely does.\r\n\r\n================================================================================\r\n Cross compiling from x86 Linux\r\n================================================================================\r\n\r\nTo cross compile SDL for Raspbian from your desktop machine, you'll need a\r\nRaspbian system root and the cross compilation tools. We'll assume these tools\r\nwill be placed in /opt/rpi-tools\r\n\r\n    sudo git clone --depth 1 https://github.com/raspberrypi/tools /opt/rpi-tools\r\n\r\nYou'll also need a Raspbian binary image.\r\nGet it from: http://downloads.raspberrypi.org/raspbian_latest \r\nAfter unzipping, you'll get file with a name like: \"<date>-wheezy-raspbian.img\"\r\nLet's assume the sysroot will be built in /opt/rpi-sysroot.\r\n\r\n    export SYSROOT=/opt/rpi-sysroot\r\n    sudo kpartx -a -v <path_to_raspbian_image>.img\r\n    sudo mount -o loop /dev/mapper/loop0p2 /mnt\r\n    sudo cp -r /mnt $SYSROOT\r\n    sudo apt-get install qemu binfmt-support qemu-user-static\r\n    sudo cp /usr/bin/qemu-arm-static $SYSROOT/usr/bin\r\n    sudo mount --bind /dev $SYSROOT/dev\r\n    sudo mount --bind /proc $SYSROOT/proc\r\n    sudo mount --bind /sys $SYSROOT/sys\r\n\r\nNow, before chrooting into the ARM sysroot, you'll need to apply a workaround,\r\nedit $SYSROOT/etc/ld.so.preload and comment out all lines in it.\r\n\r\n    sudo chroot $SYSROOT\r\n    apt-get install libudev-dev libasound2-dev libdbus-1-dev libraspberrypi0 libraspberrypi-bin libraspberrypi-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev\r\n    exit\r\n    sudo umount $SYSROOT/dev\r\n    sudo umount $SYSROOT/proc\r\n    sudo umount $SYSROOT/sys\r\n    sudo umount /mnt\r\n    \r\nThere's one more fix required, as the libdl.so symlink uses an absolute path \r\nwhich doesn't quite work in our setup.\r\n\r\n    sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so\r\n    sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so\r\n\r\nThe final step is compiling SDL itself.\r\n\r\n    export CC=\"/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux\"\r\n    cd <SDL SOURCE>\r\n    mkdir -p build;cd build\r\n    LDFLAGS=\"-L$SYSROOT/opt/vc/lib\" ../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd\r\n    make\r\n    make install\r\n\r\nTo be able to deploy this to /usr/local in the Raspbian system you need to fix up a few paths:\r\n    \r\n    perl -w -pi -e \"s#$PWD/rpi-sdl2-installed#/usr/local#g;\" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config\r\n    \r\n================================================================================\r\n Apps don't work or poor video/audio performance\r\n================================================================================\r\n\r\nIf you get sound problems, buffer underruns, etc, run \"sudo rpi-update\" to \r\nupdate the RPi's firmware. Note that doing so will fix these problems, but it\r\nwill also render the CMA - Dynamic Memory Split functionality useless.\r\n\r\nAlso, by default the Raspbian distro configures the GPU RAM at 64MB, this is too\r\nlow in general, specially if a 1080p TV is hooked up.\r\n\r\nSee here how to configure this setting: http://elinux.org/RPiconfig\r\n\r\nUsing a fixed gpu_mem=128 is the best option (specially if you updated the \r\nfirmware, using CMA probably won't work, at least it's the current case).\r\n\r\n================================================================================\r\n No input\r\n================================================================================\r\n\r\nMake sure you belong to the \"input\" group.\r\n\r\n    sudo usermod -aG input `whoami`\r\n\r\n================================================================================\r\n No HDMI Audio\r\n================================================================================\r\n\r\nIf you notice that ALSA works but there's no audio over HDMI, try adding:\r\n    \r\n    hdmi_drive=2\r\n    \r\nto your config.txt file and reboot.\r\n\r\nReference: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=5062\r\n\r\n================================================================================\r\n Text Input API support\r\n================================================================================\r\n\r\nThe Text Input API is supported, with translation of scan codes done via the\r\nkernel symbol tables. For this to work, SDL needs access to a valid console.\r\nIf you notice there's no SDL_TEXTINPUT message being emitted, double check that\r\nyour app has read access to one of the following:\r\n    \r\n* /proc/self/fd/0\r\n* /dev/tty\r\n* /dev/tty[0...6]\r\n* /dev/vc/0\r\n* /dev/console\r\n\r\nThis is usually not a problem if you run from the physical terminal (as opposed\r\nto running from a pseudo terminal, such as via SSH). If running from a PTS, a \r\nquick workaround is to run your app as root or add yourself to the tty group,\r\nthen re-login to the system.\r\n\r\n    sudo usermod -aG tty `whoami`\r\n    \r\nThe keyboard layout used by SDL is the same as the one the kernel uses.\r\nTo configure the layout on Raspbian:\r\n    \r\n    sudo dpkg-reconfigure keyboard-configuration\r\n    \r\nTo configure the locale, which controls which keys are interpreted as letters,\r\nthis determining the CAPS LOCK behavior:\r\n\r\n    sudo dpkg-reconfigure locales\r\n\r\n================================================================================\r\n OpenGL problems\r\n================================================================================\r\n\r\nIf you have desktop OpenGL headers installed at build time in your RPi or cross \r\ncompilation environment, support for it will be built in. However, the chipset \r\ndoes not actually have support for it, which causes issues in certain SDL apps \r\nsince the presence of OpenGL support supersedes the ES/ES2 variants.\r\nThe workaround is to disable OpenGL at configuration time:\r\n\r\n    ./configure --disable-video-opengl\r\n\r\nOr if the application uses the Render functions, you can use the SDL_RENDER_DRIVER\r\nenvironment variable:\r\n\r\n    export SDL_RENDER_DRIVER=opengles2\r\n\r\n================================================================================\r\n Notes\r\n================================================================================\r\n\r\n* When launching apps remotely (via SSH), SDL can prevent local keystrokes from\r\n  leaking into the console only if it has root privileges. Launching apps locally\r\n  does not suffer from this issue.\r\n  \r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-touch.md",
    "content": "Touch\r\n===========================================================================\r\nSystem Specific Notes\r\n===========================================================================\r\nLinux:\r\nThe linux touch system is currently based off event streams, and proc/bus/devices. The active user must be given permissions to read /dev/input/TOUCHDEVICE, where TOUCHDEVICE is the event stream for your device. Currently only Wacom tablets are supported. If you have an unsupported tablet contact me at jim.tla+sdl_touch@gmail.com and I will help you get support for it.\r\n\r\nMac:\r\nThe Mac and iPhone APIs are pretty. If your touch device supports them then you'll be fine. If it doesn't, then there isn't much we can do.\r\n\r\niPhone: \r\nWorks out of box.\r\n\r\nWindows:\r\nUnfortunately there is no windows support as of yet. Support for Windows 7 is planned, but we currently have no way to test. If you have a Windows 7 WM_TOUCH supported device, and are willing to help test please contact me at jim.tla+sdl_touch@gmail.com\r\n\r\n===========================================================================\r\nEvents\r\n===========================================================================\r\nSDL_FINGERDOWN:\r\nSent when a finger (or stylus) is placed on a touch device.\r\nFields:\r\n* event.tfinger.touchId  - the Id of the touch device.\r\n* event.tfinger.fingerId - the Id of the finger which just went down.\r\n* event.tfinger.x        - the x coordinate of the touch (0..1)\r\n* event.tfinger.y        - the y coordinate of the touch (0..1)\r\n* event.tfinger.pressure - the pressure of the touch (0..1)\r\n\r\nSDL_FINGERMOTION:\r\nSent when a finger (or stylus) is moved on the touch device.\r\nFields:\r\nSame as SDL_FINGERDOWN but with additional:\r\n* event.tfinger.dx       - change in x coordinate during this motion event.\r\n* event.tfinger.dy       - change in y coordinate during this motion event.\r\n\r\nSDL_FINGERUP:\r\nSent when a finger (or stylus) is lifted from the touch device.\r\nFields:\r\nSame as SDL_FINGERDOWN.\r\n\r\n\r\n===========================================================================\r\nFunctions\r\n===========================================================================\r\nSDL provides the ability to access the underlying SDL_Finger structures.\r\nThese structures should _never_ be modified.\r\n\r\nThe following functions are included from SDL_touch.h\r\n\r\nTo get a SDL_TouchID call SDL_GetTouchDevice(int index).\r\nThis returns a SDL_TouchID.\r\nIMPORTANT: If the touch has been removed, or there is no touch with the given index, SDL_GetTouchDevice() will return 0. Be sure to check for this!\r\n\r\nThe number of touch devices can be queried with SDL_GetNumTouchDevices().\r\n\r\nA SDL_TouchID may be used to get pointers to SDL_Finger.\r\n\r\nSDL_GetNumTouchFingers(touchID) may be used to get the number of fingers currently down on the device.\r\n\r\nThe most common reason to access SDL_Finger is to query the fingers outside the event. In most cases accessing the fingers is using the event. This would be accomplished by code like the following:\r\n\r\n      float x = event.tfinger.x;\r\n      float y = event.tfinger.y;\r\n\r\n\r\n\r\nTo get a SDL_Finger, call SDL_GetTouchFinger(SDL_TouchID touchID, int index), where touchID is a SDL_TouchID, and index is the requested finger.\r\nThis returns a SDL_Finger *, or NULL if the finger does not exist, or has been removed.\r\nA SDL_Finger is guaranteed to be persistent for the duration of a touch, but it will be de-allocated as soon as the finger is removed. This occurs when the SDL_FINGERUP event is _added_ to the event queue, and thus _before_ the SDL_FINGERUP event is polled.\r\nAs a result, be very careful to check for NULL return values.\r\n\r\nA SDL_Finger has the following fields:\r\n* x, y:\r\n\tThe current coordinates of the touch.\r\n* pressure:\r\n\tThe pressure of the touch.\r\n\r\n\r\n===========================================================================\r\nNotes\r\n===========================================================================\r\nFor a complete example see test/testgesture.c\r\n\r\nPlease direct questions/comments to:\r\n   jim.tla+sdl_touch@gmail.com\r\n   (original author, API was changed since)\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-wince.md",
    "content": "WinCE\r\n=====\r\n\r\nWindows CE is no longer supported by SDL.\r\n\r\nWe have left the CE support in SDL 1.2 for those that must have it, and we\r\nhave support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3.\r\n\r\n--ryan.\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-windows.md",
    "content": "Windows\n================================================================================\n\n================================================================================\nOpenGL ES 2.x support\n================================================================================\n\nSDL has support for OpenGL ES 2.x under Windows via two alternative \nimplementations. \nThe most straightforward method consists in running your app in a system with \na graphic card paired with a relatively recent (as of November of 2013) driver \nwhich supports the WGL_EXT_create_context_es2_profile extension. Vendors known \nto ship said extension on Windows currently include nVidia and Intel.\n\nThe other method involves using the ANGLE library (https://code.google.com/p/angleproject/)\nIf an OpenGL ES 2.x context is requested and no WGL_EXT_create_context_es2_profile\nextension is found, SDL will try to load the libEGL.dll library provided by\nANGLE.\nTo obtain the ANGLE binaries, you can either compile from source from\nhttps://chromium.googlesource.com/angle/angle or copy the relevant binaries from\na recent Chrome/Chromium install for Windows. The files you need are:\n    \n    * libEGL.dll\n    * libGLESv2.dll\n    * d3dcompiler_46.dll (supports Windows Vista or later, better shader compiler)\n    or...\n    * d3dcompiler_43.dll (supports Windows XP or later)\n    \nIf you compile ANGLE from source, you can configure it so it does not need the\nd3dcompiler_* DLL at all (for details on this, see their documentation). \nHowever, by default SDL will try to preload the d3dcompiler_46.dll to\ncomply with ANGLE's requirements. If you wish SDL to preload d3dcompiler_43.dll (to\nsupport Windows XP) or to skip this step at all, you can use the \nSDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more details).\n\nKnown Bugs:\n    \n    * SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears\n      that there's a bug in the library which prevents the window contents from\n      refreshing if this is set to anything other than the default value.\n     \nVulkan Surface Support\n==============\n\nSupport for creating Vulkan surfaces is configured on by default. To disable it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to use Vulkan graphics in your application.\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README-winrt.md",
    "content": "WinRT\r\n=====\r\n\r\nThis port allows SDL applications to run on Microsoft's platforms that require\r\nuse of \"Windows Runtime\", aka. \"WinRT\", APIs.  Microsoft may, in some cases,\r\nrefer to them as either \"Windows Store\", or for Windows 10, \"UWP\" apps.\r\n\r\nSome of the operating systems that include WinRT, are:\r\n\r\n* Windows 10, via its Universal Windows Platform (UWP) APIs\r\n* Windows 8.x\r\n* Windows RT 8.x (aka. Windows 8.x for ARM processors)\r\n* Windows Phone 8.x\r\n\r\n\r\nRequirements\r\n------------\r\n\r\n* Microsoft Visual C++ (aka Visual Studio), either 2017, 2015, 2013, or 2012\r\n  - Free, \"Community\" or \"Express\" editions may be used, so long as they\r\n    include  support for either \"Windows Store\" or \"Windows Phone\" apps.\r\n    \"Express\" versions marked as supporting \"Windows Desktop\" development\r\n    typically do not include support for creating WinRT apps, to note.\r\n    (The \"Community\" editions of Visual C++ do, however, support both\r\n    desktop/Win32 and WinRT development).\r\n  - Visual Studio 2017 can be used, however it is recommended that you install\r\n    the Visual C++ 2015 build tools.  These build tools can be installed\r\n    using VS 2017's installer.  Be sure to also install the workload for\r\n    \"Universal Windows Platform development\", its optional component, the\r\n    \"C++ Universal Windows Platform tools\", and for UWP / Windows 10\r\n    development, the \"Windows 10 SDK (10.0.10240.0)\".  Please note that\r\n    targeting UWP / Windows 10 apps from development machine(s) running\r\n    earlier versions of Windows, such as Windows 7, is not always supported\r\n    by Visual Studio, and you may get error(s) when attempting to do so.\r\n  - Visual C++ 2012 can only build apps that target versions 8.0 of Windows,\r\n    or  Windows Phone.  8.0-targeted apps will run on devices running 8.1\r\n    editions of Windows, however they will not be able to take advantage of\r\n    8.1-specific features.\r\n  - Visual C++ 2013 cannot create app projects that target Windows 8.0.\r\n    Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0,\r\n    Windows Phone 8.1, and Windows 8.1, but not Windows 8.0.  An optional\r\n    Visual Studio add-in, \"Tools for Maintaining Store apps for Windows 8\",\r\n    allows Visual C++ 2013 to load and build Windows 8.0 projects that were\r\n    created with Visual C++ 2012, so long as Visual C++ 2012 is installed\r\n    on the same machine.  More details on targeting different versions of\r\n    Windows can found at the following web pages:\r\n      - [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx)\r\n      - [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools)\r\n* A valid Microsoft account - This requirement is not imposed by SDL, but\r\n  rather by Microsoft's Visual C++ toolchain.  This is required to launch or \r\n  debug apps.\r\n\r\n\r\nStatus\r\n------\r\n\r\nHere is a rough list of what works, and what doesn't:\r\n\r\n* What works:\r\n  * compilation via Visual C++ 2012 through 2015\r\n  * compile-time platform detection for SDL programs.  The C/C++ #define,\r\n    `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.\r\n  * GPU-accelerated 2D rendering, via SDL_Renderer.\r\n  * OpenGL ES 2, via the ANGLE library (included separately from SDL)\r\n  * software rendering, via either SDL_Surface (optionally in conjunction with\r\n    SDL_GetWindowSurface() and SDL_UpdateWindowSurface()) or via the\r\n    SDL_Renderer APIs\r\n  * threads\r\n  * timers (via SDL_GetTicks(), SDL_AddTimer(), SDL_GetPerformanceCounter(),\r\n    SDL_GetPerformanceFrequency(), etc.)\r\n  * file I/O via SDL_RWops\r\n  * mouse input  (unsupported on Windows Phone)\r\n  * audio, via SDL's WASAPI backend (if you want to record, your app must \r\n    have \"Microphone\" capabilities enabled in its manifest, and the user must \r\n    not have blocked access. Otherwise, capture devices will fail to work,\r\n    presenting as a device disconnect shortly after opening it.)\r\n  * .DLL file loading.  Libraries *MUST* be packaged inside applications.  Loading\r\n    anything outside of the app is not supported.\r\n  * system path retrieval via SDL's filesystem APIs\r\n  * game controllers.  Support is provided via the SDL_Joystick and\r\n    SDL_GameController APIs, and is backed by Microsoft's XInput API.  Please\r\n    note, however, that Windows limits game-controller support in UWP apps to,\r\n    \"Xbox compatible controllers\" (many controllers that work in Win32 apps,\r\n    do not work in UWP, due to restrictions in UWP itself.) \r\n  * multi-touch input\r\n  * app events.  SDL_APP_WILLENTER* and SDL_APP_DIDENTER* events get sent out as\r\n    appropriate.\r\n  * window events\r\n  * using Direct3D 11.x APIs outside of SDL.  Non-XAML / Direct3D-only apps can\r\n    choose to render content directly via Direct3D, using SDL to manage the\r\n    internal WinRT window, as well as input and audio.  (Use\r\n    SDL_GetWindowWMInfo() to get the WinRT 'CoreWindow', and pass it into\r\n    IDXGIFactory2::CreateSwapChainForCoreWindow() as appropriate.)\r\n\r\n* What partially works:\r\n  * keyboard input.  Most of WinRT's documented virtual keys are supported, as\r\n    well as many keys with documented hardware scancodes.  Converting\r\n    SDL_Scancodes to or from SDL_Keycodes may not work, due to missing APIs\r\n    (MapVirtualKey()) in Microsoft's Windows Store / UWP APIs.\r\n  * SDLmain.  WinRT uses a different signature for each app's main() function.\r\n    SDL-based apps that use this port must compile in SDL_winrt_main_NonXAML.cpp\r\n    (in `SDL\\src\\main\\winrt\\`) directly in order for their C-style main()\r\n    functions to be called.\r\n\r\n* What doesn't work:\r\n  * compilation with anything other than Visual C++\r\n  * programmatically-created custom cursors.  These don't appear to be supported\r\n    by WinRT.  Different OS-provided cursors can, however, be created via\r\n    SDL_CreateSystemCursor() (unsupported on Windows Phone)\r\n  * SDL_WarpMouseInWindow() or SDL_WarpMouseGlobal().  This are not currently\r\n    supported by WinRT itself.\r\n  * joysticks and game controllers that either are not supported by\r\n    Microsoft's XInput API, or are not supported within UWP apps (many\r\n    controllers that work in Win32, do not work in UWP, due to restrictions in\r\n    UWP itself).\r\n  * turning off VSync when rendering on Windows Phone.  Attempts to turn VSync\r\n    off on Windows Phone result either in Direct3D not drawing anything, or it\r\n    forcing VSync back on.  As such, SDL_RENDERER_PRESENTVSYNC will always get\r\n    turned-on on Windows Phone.  This limitation is not present in non-Phone\r\n    WinRT (such as Windows 8.x), where turning off VSync appears to work.\r\n  * probably anything else that's not listed as supported\r\n\r\n\r\n\r\nUpgrade Notes\r\n-------------\r\n\r\n#### SDL_GetPrefPath() usage when upgrading WinRT apps from SDL 2.0.3\r\n\r\nSDL 2.0.4 fixes two bugs found in the WinRT version of SDL_GetPrefPath().\r\nThe fixes may affect older, SDL 2.0.3-based apps' save data.  Please note\r\nthat these changes only apply to SDL-based WinRT apps, and not to apps for\r\nany other platform.\r\n\r\n1. SDL_GetPrefPath() would return an invalid path, one in which the path's\r\n   directory had not been created.  Attempts to create files there\r\n   (via fopen(), for example), would fail, unless that directory was\r\n   explicitly created beforehand.\r\n\r\n2. SDL_GetPrefPath(), for non-WinPhone-based apps, would return a path inside\r\n   a WinRT 'Roaming' folder, the contents of which get automatically\r\n   synchronized across multiple devices.  This process can occur while an\r\n   application runs, and can cause existing save-data to be overwritten\r\n   at unexpected times, with data from other devices.  (Windows Phone apps\r\n   written with SDL 2.0.3 did not utilize a Roaming folder, due to API\r\n   restrictions in Windows Phone 8.0).\r\n\r\n\r\nSDL_GetPrefPath(), starting with SDL 2.0.4, addresses these by:\r\n\r\n1. making sure that SDL_GetPrefPath() returns a directory in which data\r\n   can be written to immediately, without first needing to create directories.\r\n\r\n2. basing SDL_GetPrefPath() off of a different, non-Roaming folder, the\r\n   contents of which do not automatically get synchronized across devices\r\n   (and which require less work to use safely, in terms of data integrity).\r\n\r\nApps that wish to get their Roaming folder's path can do so either by using\r\nSDL_WinRTGetFSPathUTF8(), SDL_WinRTGetFSPathUNICODE() (which returns a\r\nUCS-2/wide-char string), or directly through the WinRT class,\r\nWindows.Storage.ApplicationData.\r\n\r\n\r\n\r\nSetup, High-Level Steps\r\n-----------------------\r\n\r\nThe steps for setting up a project for an SDL/WinRT app looks like the\r\nfollowing, at a high-level:\r\n\r\n1. create a new Visual C++ project using Microsoft's template for a,\r\n   \"Direct3D App\".\r\n2. remove most of the files from the project.\r\n3. make your app's project directly reference SDL/WinRT's own Visual C++\r\n   project file, via use of Visual C++'s \"References\" dialog.  This will setup\r\n   the linker, and will copy SDL's .dll files to your app's final output.\r\n4. adjust your app's build settings, at minimum, telling it where to find SDL's\r\n   header files.\r\n5. add files that contains a WinRT-appropriate main function, along with some\r\n   data to make sure mouse-cursor-hiding (via SDL_ShowCursor(SDL_DISABLE) calls)\r\n   work properly.\r\n6. add SDL-specific app code.\r\n7. build and run your app.\r\n\r\n\r\nSetup, Detailed Steps\r\n---------------------\r\n\r\n### 1. Create a new project ###\r\n\r\nCreate a new project using one of Visual C++'s templates for a plain, non-XAML,\r\n\"Direct3D App\" (XAML support for SDL/WinRT is not yet ready for use).  If you\r\ndon't see one of these templates, in Visual C++'s 'New Project' dialog, try\r\nusing the textbox titled, 'Search Installed Templates' to look for one.\r\n\r\n\r\n### 2. Remove unneeded files from the project ###\r\n\r\nIn the new project, delete any file that has one of the following extensions:\r\n\r\n- .cpp\r\n- .h\r\n- .hlsl\r\n\r\nWhen you are done, you should be left with a few files, each of which will be a\r\nnecessary part of your app's project.  These files will consist of:\r\n\r\n- an .appxmanifest file, which contains metadata on your WinRT app.  This is\r\n  similar to an Info.plist file on iOS, or an AndroidManifest.xml on Android.\r\n- a few .png files, one of which is a splash screen (displayed when your app\r\n  launches), others are app icons.\r\n- a .pfx file, used for code signing purposes.\r\n\r\n\r\n### 3. Add references to SDL's project files ###\r\n\r\nSDL/WinRT can be built in multiple variations, spanning across three different\r\nCPU architectures (x86, x64, and ARM) and two different configurations\r\n(Debug and Release).  WinRT and Visual C++ do not currently provide a means\r\nfor combining multiple variations of one library into a single file.\r\nFurthermore, it does not provide an easy means for copying pre-built .dll files\r\ninto your app's final output (via Post-Build steps, for example).  It does,\r\nhowever, provide a system whereby an app can reference the MSVC projects of\r\nlibraries such that, when the app is built:\r\n\r\n1. each library gets built for the appropriate CPU architecture(s) and WinRT\r\n   platform(s).\r\n2. each library's output, such as .dll files, get copied to the app's build \r\n   output.\r\n\r\nTo set this up for SDL/WinRT, you'll need to run through the following steps:\r\n\r\n1. open up the Solution Explorer inside Visual C++ (under the \"View\" menu, then\r\n   \"Solution Explorer\")\r\n2. right click on your app's solution.\r\n3. navigate to \"Add\", then to \"Existing Project...\"\r\n4. find SDL/WinRT's Visual C++ project file and open it.  Different project\r\n   files exist for different WinRT platforms.  All of them are in SDL's\r\n   source distribution, in the following directories:\r\n    * `VisualC-WinRT/UWP_VS2015/`        - for Windows 10 / UWP apps\r\n    * `VisualC-WinRT/WinPhone81_VS2013/` - for Windows Phone 8.1 apps\r\n    * `VisualC-WinRT/WinRT80_VS2012/`    - for Windows 8.0 apps\r\n    * `VisualC-WinRT/WinRT81_VS2013/`    - for Windows 8.1 apps\r\n5. once the project has been added, right-click on your app's project and\r\n   select, \"References...\"\r\n6. click on the button titled, \"Add New Reference...\"\r\n7. check the box next to SDL\r\n8. click OK to close the dialog\r\n9. SDL will now show up in the list of references.  Click OK to close that\r\n   dialog.\r\n\r\nYour project is now linked to SDL's project, insofar that when the app is\r\nbuilt, SDL will be built as well, with its build output getting included with\r\nyour app.\r\n\r\n\r\n### 4. Adjust Your App's Build Settings ###\r\n\r\nSome build settings need to be changed in your app's project.  This guide will\r\noutline the following:\r\n\r\n- making sure that the compiler knows where to find SDL's header files\r\n- **Optional for C++, but NECESSARY for compiling C code:** telling the\r\n  compiler not to use Microsoft's C++ extensions for WinRT development.\r\n- **Optional:** telling the compiler not generate errors due to missing\r\n  precompiled header files.\r\n\r\nTo change these settings:\r\n\r\n1. right-click on the project\r\n2. choose \"Properties\"\r\n3. in the drop-down box next to \"Configuration\", choose, \"All Configurations\"\r\n4. in the drop-down box next to \"Platform\", choose, \"All Platforms\"\r\n5. in the left-hand list, expand the \"C/C++\" section\r\n6. select \"General\"\r\n7. edit the \"Additional Include Directories\" setting, and add a path to SDL's\r\n   \"include\" directory\r\n8. **Optional: to enable compilation of C code:** change the setting for\r\n   \"Consume Windows Runtime Extension\" from \"Yes (/ZW)\" to \"No\".  If you're \r\n   working with a completely C++ based project, this step can usually be \r\n   omitted.\r\n9. **Optional: to disable precompiled headers (which can produce \r\n   'stdafx.h'-related build errors, if setup incorrectly:** in the left-hand \r\n   list, select \"Precompiled Headers\", then change the setting for \"Precompiled \r\n   Header\" from \"Use (/Yu)\" to \"Not Using Precompiled Headers\".\r\n10. close the dialog, saving settings, by clicking the \"OK\" button\r\n\r\n\r\n### 5. Add a WinRT-appropriate main function, and a blank-cursor image, to the app. ###\r\n\r\nA few files should be included directly in your app's MSVC project, specifically:\r\n1. a WinRT-appropriate main function (which is different than main() functions on\r\n   other platforms)\r\n2. a Win32-style cursor resource, used by SDL_ShowCursor() to hide the mouse cursor\r\n   (if and when the app needs to do so).  *If this cursor resource is not\r\n   included, mouse-position reporting may fail if and when the cursor is\r\n   hidden, due to possible bugs/design-oddities in Windows itself.*\r\n\r\nTo include these files for C/C++ projects:\r\n\r\n1. right-click on your project (again, in Visual C++'s Solution Explorer), \r\n   navigate to \"Add\", then choose \"Existing Item...\".\r\n2. navigate to the directory containing SDL's source code, then into its\r\n   subdirectory, 'src/main/winrt/'.  Select, then add, the following files:\r\n   - `SDL_winrt_main_NonXAML.cpp`\r\n   - `SDL2-WinRTResources.rc`\r\n   - `SDL2-WinRTResource_BlankCursor.cur`\r\n3. right-click on the file `SDL_winrt_main_NonXAML.cpp` (as listed in your\r\n   project), then click on \"Properties...\".\r\n4. in the drop-down box next to \"Configuration\", choose, \"All Configurations\"\r\n5. in the drop-down box next to \"Platform\", choose, \"All Platforms\"\r\n6. in the left-hand list, click on \"C/C++\"\r\n7. change the setting for \"Consume Windows Runtime Extension\" to \"Yes (/ZW)\".\r\n8. click the OK button.  This will close the dialog.\r\n\r\n**NOTE: C++/CX compilation is currently required in at least one file of your \r\napp's project.  This is to make sure that Visual C++'s linker builds a 'Windows \r\nMetadata' file (.winmd) for your app.  Not doing so can lead to build errors.**\r\n\r\nFor non-C++ projects, you will need to call SDL_WinRTRunApp from your language's\r\nmain function, and generate SDL2-WinRTResources.res manually by using `rc` via\r\nthe Developer Command Prompt and including it as a <Win32Resource> within the\r\nfirst <PropertyGroup> block in your Visual Studio project file.\r\n\r\n### 6. Add app code and assets ###\r\n\r\nAt this point, you can add in SDL-specific source code.  Be sure to include a \r\nC-style main function (ie: `int main(int argc, char *argv[])`).  From there you \r\nshould be able to create a single `SDL_Window` (WinRT apps can only have one \r\nwindow, at present), as well as an `SDL_Renderer`.  Direct3D will be used to \r\ndraw content.  Events are received via SDL's usual event functions \r\n(`SDL_PollEvent`, etc.)  If you have a set of existing source files and assets, \r\nyou can start adding them to the project now.  If not, or if you would like to \r\nmake sure that you're setup correctly, some short and simple sample code is \r\nprovided below.\r\n\r\n\r\n#### 6.A. ... when creating a new app ####\r\n\r\nIf you are creating a new app (rather than porting an existing SDL-based app), \r\nor if you would just like a simple app to test SDL/WinRT with before trying to \r\nget existing code working, some working SDL/WinRT code is provided below.  To \r\nset this up:\r\n\r\n1. right click on your app's project\r\n2. select Add, then New Item.  An \"Add New Item\" dialog will show up.\r\n3. from the left-hand list, choose \"Visual C++\"\r\n4. from the middle/main list, choose \"C++ File (.cpp)\"\r\n5. near the bottom of the dialog, next to \"Name:\", type in a name for your \r\nsource file, such as, \"main.cpp\".\r\n6. click on the Add button.  This will close the dialog, add the new file to \r\nyour project, and open the file in Visual C++'s text editor.\r\n7. Copy and paste the following code into the new file, then save it.\r\n\r\n\r\n    #include <SDL.h>\r\n    \r\n    int main(int argc, char **argv)\r\n    {\r\n        SDL_DisplayMode mode;\r\n        SDL_Window * window = NULL;\r\n        SDL_Renderer * renderer = NULL;\r\n        SDL_Event evt;\r\n    \r\n        if (SDL_Init(SDL_INIT_VIDEO) != 0) {\r\n            return 1;\r\n        }\r\n    \r\n        if (SDL_GetCurrentDisplayMode(0, &mode) != 0) {\r\n            return 1;\r\n        }\r\n    \r\n        if (SDL_CreateWindowAndRenderer(mode.w, mode.h, SDL_WINDOW_FULLSCREEN, &window, &renderer) != 0) {\r\n            return 1;\r\n        }\r\n    \r\n        while (1) {\r\n            while (SDL_PollEvent(&evt)) {\r\n            }\r\n    \r\n            SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);\r\n            SDL_RenderClear(renderer);\r\n            SDL_RenderPresent(renderer);\r\n        }\r\n    }\r\n\r\n\r\n#### 6.B. Adding code and assets ####\r\n\r\nIf you have existing code and assets that you'd like to add, you should be able \r\nto add them now.  The process for adding a set of files is as such.\r\n\r\n1. right click on the app's project\r\n2. select Add, then click on \"New Item...\"\r\n3. open any source, header, or asset files as appropriate.  Support for C and \r\nC++ is available.\r\n\r\nDo note that WinRT only supports a subset of the APIs that are available to \r\nWin32-based apps.  Many portions of the Win32 API and the C runtime are not \r\navailable.\r\n\r\nA list of unsupported C APIs can be found at \r\n<http://msdn.microsoft.com/en-us/library/windows/apps/jj606124.aspx>\r\n\r\nGeneral information on using the C runtime in WinRT can be found at \r\n<https://msdn.microsoft.com/en-us/library/hh972425.aspx>\r\n\r\nA list of supported Win32 APIs for WinRT apps can be found at \r\n<http://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx>.  To note, \r\nthe list of supported Win32 APIs for Windows Phone 8.0 is different.  \r\nThat list can be found at \r\n<http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj662956(v=vs.105).aspx>\r\n\r\n\r\n### 7. Build and run your app ###\r\n\r\nYour app project should now be setup, and you should be ready to build your app.  \r\nTo run it on the local machine, open the Debug menu and choose \"Start \r\nDebugging\".  This will build your app, then run your app full-screen.  To switch \r\nout of your app, press the Windows key.  Alternatively, you can choose to run \r\nyour app in a window.  To do this, before building and running your app, find \r\nthe drop-down menu in Visual C++'s toolbar that says, \"Local Machine\".  Expand \r\nthis by clicking on the arrow on the right side of the list, then click on \r\nSimulator.  Once you do that, any time you build and run the app, the app will \r\nlaunch in window, rather than full-screen.\r\n\r\n\r\n#### 7.A. Running apps on older, ARM-based, \"Windows RT\" devices ####\r\n\r\n**These instructions do not include Windows Phone, despite Windows Phone\r\ntypically running on ARM processors.**  They are specifically for devices\r\nthat use the \"Windows RT\" operating system, which was a modified version of\r\nWindows 8.x that ran primarily on ARM-based tablet computers.\r\n\r\nTo build and run the app on ARM-based, \"Windows RT\" devices, you'll need to:\r\n\r\n- install Microsoft's \"Remote Debugger\" on the device.  Visual C++ installs and \r\n  debugs ARM-based apps via IP networks.\r\n- change a few options on the development machine, both to make sure it builds \r\n  for ARM (rather than x86 or x64), and to make sure it knows how to find the \r\n  Windows RT device (on the network).\r\n\r\nMicrosoft's Remote Debugger can be found at \r\n<https://msdn.microsoft.com/en-us/library/hh441469.aspx>.  Please note \r\nthat separate versions of this debugger exist for different versions of Visual \r\nC++, one each for MSVC 2015, 2013, and 2012.\r\n\r\nTo setup Visual C++ to launch your app on an ARM device:\r\n\r\n1. make sure the Remote Debugger is running on your ARM device, and that it's on \r\n   the same IP network as your development machine.\r\n2. from Visual C++'s toolbar, find a drop-down menu that says, \"Win32\".  Click \r\n   it, then change the value to \"ARM\".\r\n3. make sure Visual C++ knows the hostname or IP address of the ARM device.  To \r\n   do this:\r\n    1. open the app project's properties\r\n    2. select \"Debugging\"\r\n    3. next to \"Machine Name\", enter the hostname or IP address of the ARM \r\n       device\r\n    4. if, and only if, you've turned off authentication in the Remote Debugger,\r\n       then change the setting for \"Require Authentication\" to No\r\n    5. click \"OK\"\r\n4. build and run the app (from Visual C++).  The first time you do this, a \r\n   prompt will show up on the ARM device, asking for a Microsoft Account.  You \r\n   do, unfortunately, need to log in here, and will need to follow the \r\n   subsequent registration steps in order to launch the app.  After you do so, \r\n   if the app didn't already launch, try relaunching it again from within Visual \r\n   C++.\r\n\r\n\r\nTroubleshooting\r\n---------------\r\n\r\n#### Build fails with message, \"error LNK2038: mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker'\"\r\n\r\nTry adding the following to your linker flags.  In MSVC, this can be done by\r\nright-clicking on the app project, navigating to Configuration Properties ->\r\nLinker -> Command Line, then adding them to the Additional Options\r\nsection.\r\n\r\n* For Release builds / MSVC-Configurations, add:\r\n\r\n    /nodefaultlib:vccorlib /nodefaultlib:msvcrt vccorlib.lib msvcrt.lib\r\n\r\n* For Debug builds / MSVC-Configurations, add:\r\n\r\n    /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib\r\n\r\n\r\n#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values\r\n\r\nThis may be caused by a bug in Windows itself, whereby hiding the mouse\r\ncursor can cause mouse-position reporting to fail.\r\n\r\nSDL provides a workaround for this, but it requires that an app links to a\r\nset of Win32-style cursor image-resource files.  A copy of suitable resource\r\nfiles can be found in `src/main/winrt/`.  Adding them to an app's Visual C++\r\nproject file should be sufficient to get the app to use them.\r\n\r\n\r\n#### SDL's Visual Studio project file fails to open, with message, \"The system can't find the file specified.\"\r\n\r\nThis can be caused for any one of a few reasons, which Visual Studio can\r\nreport, but won't always do so in an up-front manner.\r\n\r\nTo help determine why this error comes up:\r\n\r\n1. open a copy of Visual Studio without opening a project file.  This can be\r\n   accomplished via Windows' Start Menu, among other means.\r\n2. show Visual Studio's Output window.  This can be done by going to VS'\r\n   menu bar, then to View, and then to Output.\r\n3. try opening the SDL project file directly by going to VS' menu bar, then\r\n   to File, then to Open, then to Project/Solution.  When a File-Open dialog\r\n   appears, open the SDL project (such as the one in SDL's source code, in its\r\n   directory, VisualC-WinRT/UWP_VS2015/).\r\n4. after attempting to open SDL's Visual Studio project file, additional error\r\n   information will be output to the Output window.\r\n\r\nIf Visual Studio reports (via its Output window) that the project:\r\n\r\n\"could not be loaded because it's missing install components. To fix this launch Visual Studio setup with the following selections:\r\nMicrosoft.VisualStudio.ComponentGroup.UWP.VC\"\r\n\r\n... then you will need to re-launch Visual Studio's installer, and make sure that\r\nthe workflow for \"Universal Windows Platform development\" is checked, and that its\r\noptional component, \"C++ Universal Windows Platform tools\" is also checked.  While\r\nyou are there, if you are planning on targeting UWP / Windows 10, also make sure\r\nthat you check the optional component, \"Windows 10 SDK (10.0.10240.0)\".  After\r\nmaking sure these items are checked as-appropriate, install them.\r\n\r\nOnce you install these components, try re-launching Visual Studio, and re-opening\r\nthe SDL project file.  If you still get the error dialog, try using the Output\r\nwindow, again, seeing what Visual Studio says about it.\r\n\r\n\r\n#### Game controllers / joysticks aren't working!\r\n\r\nWindows only permits certain game controllers and joysticks to work within\r\nWinRT / UWP apps.  Even if a game controller or joystick works in a Win32\r\napp, that device is not guaranteed to work inside a WinRT / UWP app.\r\n\r\nAccording to Microsoft, \"Xbox compatible controllers\" should work inside\r\nUWP apps, potentially with more working in the future.  This includes, but\r\nmay not be limited to, Microsoft-made Xbox controllers and USB adapters.\r\n(Source: https://social.msdn.microsoft.com/Forums/en-US/9064838b-e8c3-4c18-8a83-19bf0dfe150d/xinput-fails-to-detect-game-controllers?forum=wpdevelop)\r\n\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/README.md",
    "content": "Simple DirectMedia Layer {#mainpage}\r\n========================\r\n\r\n                                  (SDL)\r\n\r\n                                Version 2.0\r\n\r\n---\r\nhttp://www.libsdl.org/\r\n\r\nSimple DirectMedia Layer is a cross-platform development library designed\r\nto provide low level access to audio, keyboard, mouse, joystick, and graphics\r\nhardware via OpenGL and Direct3D. It is used by video playback software,\r\nemulators, and popular games including Valve's award winning catalog\r\nand many Humble Bundle games.\r\n\r\nSDL officially supports Windows, Mac OS X, Linux, iOS, and Android.\r\nSupport for other platforms may be found in the source code.\r\n\r\nSDL is written in C, works natively with C++, and there are bindings \r\navailable for several other languages, including C# and Python.\r\n\r\nThis library is distributed under the zlib license, which can be found\r\nin the file \"COPYING.txt\".\r\n\r\nThe best way to learn how to use SDL is to check out the header files in\r\nthe \"include\" subdirectory and the programs in the \"test\" subdirectory.\r\nThe header files and test programs are well commented and always up to date.\r\n\r\nMore documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)\r\n\r\n- [Android](README-android.md)\r\n- [CMake](README-cmake.md)\r\n- [DirectFB](README-directfb.md)\r\n- [DynAPI](README-dynapi.md)\r\n- [Emscripten](README-emscripten.md)\r\n- [Gesture](README-gesture.md)\r\n- [Mercurial](README-hg.md)\r\n- [iOS](README-ios.md)\r\n- [Linux](README-linux.md)\r\n- [OS X](README-macosx.md)\r\n- [Native Client](README-nacl.md)\r\n- [Pandora](README-pandora.md)\r\n- [Supported Platforms](README-platforms.md)\r\n- [Porting information](README-porting.md)\r\n- [PSP](README-psp.md)\r\n- [Raspberry Pi](README-raspberrypi.md)\r\n- [Touch](README-touch.md)\r\n- [WinCE](README-wince.md)\r\n- [Windows](README-windows.md)\r\n- [WinRT](README-winrt.md)\r\n\r\nIf you need help with the library, or just want to discuss SDL related\r\nissues, you can join the [developers mailing list](http://www.libsdl.org/mailing-list.php)\r\n\r\nIf you want to report bugs or contribute patches, please submit them to\r\n[bugzilla](https://bugzilla.libsdl.org/)\r\n\r\nEnjoy!\r\n\r\n\r\nSam Lantinga <mailto:slouken@libsdl.org>\r\n\r\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/docs/doxyfile",
    "content": "# Doxyfile 1.5.9\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org) for a project\n#\n# All text after a hash (#) is considered a comment and will be ignored\n# The format is:\n#       TAG = value [value, ...]\n# For lists items can also be appended using:\n#       TAG += value [value, ...]\n# Values that contain spaces should be placed between quotes (\" \")\n\n#---------------------------------------------------------------------------\n# Project related configuration options\n#---------------------------------------------------------------------------\n\n# This tag specifies the encoding used for all characters in the config file \n# that follow. The default is UTF-8 which is also the encoding used for all \n# text before the first occurrence of this tag. Doxygen uses libiconv (or the \n# iconv built into libc) for the transcoding. See \n# http://www.gnu.org/software/libiconv for the list of possible encodings.\n\nDOXYFILE_ENCODING      = UTF-8\n\n# The PROJECT_NAME tag is a single word (or a sequence of words surrounded \n# by quotes) that should identify the project.\n\nPROJECT_NAME           = SDL\n\n# The PROJECT_NUMBER tag can be used to enter a project or revision number. \n# This could be handy for archiving the generated documentation or \n# if some version control system is used.\n\nPROJECT_NUMBER         = 2.0\n\n# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \n# base path where the generated documentation will be put. \n# If a relative path is entered, it will be relative to the location \n# where doxygen was started. If left blank the current directory will be used.\n\nOUTPUT_DIRECTORY       = ./output\n\n# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create \n# 4096 sub-directories (in 2 levels) under the output directory of each output \n# format and will distribute the generated files over these directories. \n# Enabling this option can be useful when feeding doxygen a huge amount of \n# source files, where putting all generated files in the same directory would \n# otherwise cause performance problems for the file system.\n\nCREATE_SUBDIRS         = YES\n\n# The OUTPUT_LANGUAGE tag is used to specify the language in which all \n# documentation generated by doxygen is written. Doxygen will use this \n# information to generate all constant output in the proper language. \n# The default language is English, other supported languages are: \n# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, \n# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, \n# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English \n# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, \n# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, \n# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.\n\nOUTPUT_LANGUAGE        = English\n\n# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \n# include brief member descriptions after the members that are listed in \n# the file and class documentation (similar to JavaDoc). \n# Set to NO to disable this.\n\nBRIEF_MEMBER_DESC      = YES\n\n# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \n# the brief description of a member or function before the detailed description. \n# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \n# brief descriptions will be completely suppressed.\n\nREPEAT_BRIEF           = YES\n\n# This tag implements a quasi-intelligent brief description abbreviator \n# that is used to form the text in various listings. Each string \n# in this list, if found as the leading text of the brief description, will be \n# stripped from the text and the result after processing the whole list, is \n# used as the annotated text. Otherwise, the brief description is used as-is. \n# If left blank, the following values are used (\"$name\" is automatically \n# replaced with the name of the entity): \"The $name class\" \"The $name widget\" \n# \"The $name file\" \"is\" \"provides\" \"specifies\" \"contains\" \n# \"represents\" \"a\" \"an\" \"the\"\n\nABBREVIATE_BRIEF       = \"The $name class\" \\\n                         \"The $name widget\" \\\n                         \"The $name file\" \\\n                         is \\\n                         provides \\\n                         specifies \\\n                         contains \\\n                         represents \\\n                         a \\\n                         an \\\n                         the\n\n# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \n# Doxygen will generate a detailed section even if there is only a brief \n# description.\n\nALWAYS_DETAILED_SEC    = YES\n\n# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all \n# inherited members of a class in the documentation of that class as if those \n# members were ordinary class members. Constructors, destructors and assignment \n# operators of the base classes will not be shown.\n\nINLINE_INHERITED_MEMB  = NO\n\n# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n# path before files name in the file list and in the header files. If set \n# to NO the shortest path that makes the file name unique will be used.\n\nFULL_PATH_NAMES        = YES\n\n# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n# can be used to strip a user-defined part of the path. Stripping is \n# only done if one of the specified strings matches the left-hand part of \n# the path. The tag can be used to show relative paths in the file list. \n# If left blank the directory from which doxygen is run is used as the \n# path to strip.\n\nSTRIP_FROM_PATH        =\n\n# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of \n# the path mentioned in the documentation of a class, which tells \n# the reader which header file to include in order to use a class. \n# If left blank only the name of the header file containing the class \n# definition is used. Otherwise one should specify the include paths that \n# are normally passed to the compiler using the -I flag.\n\nSTRIP_FROM_INC_PATH    = \n\n# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \n# (but less readable) file names. This can be useful is your file systems \n# doesn't support long names like on DOS, Mac, or CD-ROM.\n\nSHORT_NAMES            = NO\n\n# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen \n# will interpret the first line (until the first dot) of a JavaDoc-style \n# comment as the brief description. If set to NO, the JavaDoc \n# comments will behave just like regular Qt-style comments \n# (thus requiring an explicit @brief command for a brief description.)\n\nJAVADOC_AUTOBRIEF      = NO\n\n# If the QT_AUTOBRIEF tag is set to YES then Doxygen will \n# interpret the first line (until the first dot) of a Qt-style \n# comment as the brief description. If set to NO, the comments \n# will behave just like regular Qt-style comments (thus requiring \n# an explicit \\brief command for a brief description.)\n\nQT_AUTOBRIEF           = NO\n\n# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen \n# treat a multi-line C++ special comment block (i.e. a block of //! or /// \n# comments) as a brief description. This used to be the default behaviour. \n# The new default is to treat a multi-line C++ comment block as a detailed \n# description. Set this tag to YES if you prefer the old behaviour instead.\n\nMULTILINE_CPP_IS_BRIEF = NO\n\n# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n# member inherits the documentation from any documented member that it \n# re-implements.\n\nINHERIT_DOCS           = YES\n\n# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce \n# a new page for each member. If set to NO, the documentation of a member will \n# be part of the file/class/namespace that contains it.\n\nSEPARATE_MEMBER_PAGES  = NO\n\n# The TAB_SIZE tag can be used to set the number of spaces in a tab. \n# Doxygen uses this value to replace tabs by spaces in code fragments.\n\nTAB_SIZE               = 8\n\n# This tag can be used to specify a number of aliases that acts \n# as commands in the documentation. An alias has the form \"name=value\". \n# For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to \n# put the command \\sideeffect (or @sideeffect) in the documentation, which \n# will result in a user-defined paragraph with heading \"Side Effects:\". \n# You can put \\n's in the value part of an alias to insert newlines.\n\nALIASES                = \"defined=\\\"\\def\\\"\" \\\n                         \"discussion=\\\"\\par Discussion:\\n\\\"\"\n\n# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C \n# sources only. Doxygen will then generate output that is more tailored for C. \n# For instance, some of the names that are used will be different. The list \n# of all members will be omitted, etc.\n\nOPTIMIZE_OUTPUT_FOR_C  = YES\n\n# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java \n# sources only. Doxygen will then generate output that is more tailored for \n# Java. For instance, namespaces will be presented as packages, qualified \n# scopes will look different, etc.\n\nOPTIMIZE_OUTPUT_JAVA   = NO\n\n# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran \n# sources only. Doxygen will then generate output that is more tailored for \n# Fortran.\n\nOPTIMIZE_FOR_FORTRAN   = NO\n\n# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL \n# sources. Doxygen will then generate output that is tailored for \n# VHDL.\n\nOPTIMIZE_OUTPUT_VHDL   = NO\n\n# Doxygen selects the parser to use depending on the extension of the files it parses. \n# With this tag you can assign which parser to use for a given extension. \n# Doxygen has a built-in mapping, but you can override or extend it using this tag. \n# The format is ext=language, where ext is a file extension, and language is one of \n# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, \n# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat \n# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), \n# use: inc=Fortran f=C. Note that for custom extensions you also need to set\n# FILE_PATTERNS otherwise the files are not read by doxygen.\n\nEXTENSION_MAPPING      = \n\n# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want \n# to include (a tag file for) the STL sources as input, then you should \n# set this tag to YES in order to let doxygen match functions declarations and \n# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. \n# func(std::string) {}). This also make the inheritance and collaboration \n# diagrams that involve STL classes more complete and accurate.\n\nBUILTIN_STL_SUPPORT    = YES\n\n# If you use Microsoft's C++/CLI language, you should set this option to YES to \n# enable parsing support.\n\nCPP_CLI_SUPPORT        = NO\n\n# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. \n# Doxygen will parse them like normal C++ but will assume all classes use public \n# instead of private inheritance when no explicit protection keyword is present.\n\nSIP_SUPPORT            = NO\n\n# For Microsoft's IDL there are propget and propput attributes to indicate getter \n# and setter methods for a property. Setting this option to YES (the default) \n# will make doxygen to replace the get and set methods by a property in the \n# documentation. This will only work if the methods are indeed getting or \n# setting a simple type. If this is not the case, or you want to show the \n# methods anyway, you should set this option to NO.\n\nIDL_PROPERTY_SUPPORT   = YES\n\n# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \n# tag is set to YES, then doxygen will reuse the documentation of the first \n# member in the group (if any) for the other members of the group. By default \n# all members of a group must be documented explicitly.\n\nDISTRIBUTE_GROUP_DOC   = NO\n\n# Set the SUBGROUPING tag to YES (the default) to allow class member groups of \n# the same type (for instance a group of public functions) to be put as a \n# subgroup of that type (e.g. under the Public Functions section). Set it to \n# NO to prevent subgrouping. Alternatively, this can be done per class using \n# the \\nosubgrouping command.\n\nSUBGROUPING            = YES\n\n# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum \n# is documented as struct, union, or enum with the name of the typedef. So \n# typedef struct TypeS {} TypeT, will appear in the documentation as a struct \n# with name TypeT. When disabled the typedef will appear as a member of a file, \n# namespace, or class. And the struct will be named TypeS. This can typically \n# be useful for C code in case the coding convention dictates that all compound \n# types are typedef'ed and only the typedef is referenced, never the tag name.\n\nTYPEDEF_HIDES_STRUCT   = YES\n\n# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to \n# determine which symbols to keep in memory and which to flush to disk. \n# When the cache is full, less often used symbols will be written to disk. \n# For small to medium size projects (<1000 input files) the default value is \n# probably good enough. For larger projects a too small cache size can cause \n# doxygen to be busy swapping symbols to and from disk most of the time \n# causing a significant performance penality. \n# If the system has enough physical memory increasing the cache will improve the \n# performance by keeping more symbols in memory. Note that the value works on \n# a logarithmic scale so increasing the size by one will rougly double the \n# memory usage. The cache size is given by this formula: \n# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, \n# corresponding to a cache size of 2^16 = 65536 symbols\n\nSYMBOL_CACHE_SIZE      = 0\n\n#---------------------------------------------------------------------------\n# Build related configuration options\n#---------------------------------------------------------------------------\n\n# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n# documentation are documented, even if no documentation was available. \n# Private class members and static file members will be hidden unless \n# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES\n\nEXTRACT_ALL            = YES\n\n# If the EXTRACT_PRIVATE tag is set to YES all private members of a class \n# will be included in the documentation.\n\nEXTRACT_PRIVATE        = YES\n\n# If the EXTRACT_STATIC tag is set to YES all static members of a file \n# will be included in the documentation.\n\nEXTRACT_STATIC         = YES\n\n# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) \n# defined locally in source files will be included in the documentation. \n# If set to NO only classes defined in header files are included.\n\nEXTRACT_LOCAL_CLASSES  = YES\n\n# This flag is only useful for Objective-C code. When set to YES local \n# methods, which are defined in the implementation section but not in \n# the interface are included in the documentation. \n# If set to NO (the default) only methods in the interface are included.\n\nEXTRACT_LOCAL_METHODS  = YES\n\n# If this flag is set to YES, the members of anonymous namespaces will be \n# extracted and appear in the documentation as a namespace called \n# 'anonymous_namespace{file}', where file will be replaced with the base \n# name of the file that contains the anonymous namespace. By default \n# anonymous namespace are hidden.\n\nEXTRACT_ANON_NSPACES   = YES\n\n# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n# undocumented members of documented classes, files or namespaces. \n# If set to NO (the default) these members will be included in the \n# various overviews, but no documentation section is generated. \n# This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_MEMBERS     = NO\n\n# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all \n# undocumented classes that are normally visible in the class hierarchy. \n# If set to NO (the default) these classes will be included in the various \n# overviews. This option has no effect if EXTRACT_ALL is enabled.\n\nHIDE_UNDOC_CLASSES     = NO\n\n# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all \n# friend (class|struct|union) declarations. \n# If set to NO (the default) these declarations will be included in the \n# documentation.\n\nHIDE_FRIEND_COMPOUNDS  = NO\n\n# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any \n# documentation blocks found inside the body of a function. \n# If set to NO (the default) these blocks will be appended to the \n# function's detailed documentation block.\n\nHIDE_IN_BODY_DOCS      = NO\n\n# The INTERNAL_DOCS tag determines if documentation \n# that is typed after a \\internal command is included. If the tag is set \n# to NO (the default) then the documentation will be excluded. \n# Set it to YES to include the internal documentation.\n\nINTERNAL_DOCS          = YES\n\n# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \n# file names in lower-case letters. If set to YES upper-case letters are also \n# allowed. This is useful if you have classes or files whose names only differ \n# in case and if your file system supports case sensitive file names. Windows \n# and Mac users are advised to set this option to NO.\n\nCASE_SENSE_NAMES       = NO\n\n# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \n# will show members with their full class and namespace scopes in the \n# documentation. If set to YES the scope will be hidden.\n\nHIDE_SCOPE_NAMES       = NO\n\n# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen \n# will put a list of the files that are included by a file in the documentation \n# of that file.\n\nSHOW_INCLUDE_FILES     = YES\n\n# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] \n# is inserted in the documentation for inline members.\n\nINLINE_INFO            = YES\n\n# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen \n# will sort the (detailed) documentation of file and class members \n# alphabetically by member name. If set to NO the members will appear in \n# declaration order.\n\nSORT_MEMBER_DOCS       = YES\n\n# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the \n# brief documentation of file, namespace and class members alphabetically \n# by member name. If set to NO (the default) the members will appear in \n# declaration order.\n\nSORT_BRIEF_DOCS        = NO\n\n# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the \n# hierarchy of group names into alphabetical order. If set to NO (the default) \n# the group names will appear in their defined order.\n\nSORT_GROUP_NAMES       = NO\n\n# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be \n# sorted by fully-qualified names, including namespaces. If set to \n# NO (the default), the class list will be sorted only by class name, \n# not including the namespace part. \n# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. \n# Note: This option applies only to the class list, not to the \n# alphabetical list.\n\nSORT_BY_SCOPE_NAME     = NO\n\n# The GENERATE_TODOLIST tag can be used to enable (YES) or \n# disable (NO) the todo list. This list is created by putting \\todo \n# commands in the documentation.\n\nGENERATE_TODOLIST      = YES\n\n# The GENERATE_TESTLIST tag can be used to enable (YES) or \n# disable (NO) the test list. This list is created by putting \\test \n# commands in the documentation.\n\nGENERATE_TESTLIST      = YES\n\n# The GENERATE_BUGLIST tag can be used to enable (YES) or \n# disable (NO) the bug list. This list is created by putting \\bug \n# commands in the documentation.\n\nGENERATE_BUGLIST       = YES\n\n# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \n# disable (NO) the deprecated list. This list is created by putting \n# \\deprecated commands in the documentation.\n\nGENERATE_DEPRECATEDLIST= YES\n\n# The ENABLED_SECTIONS tag can be used to enable conditional \n# documentation sections, marked by \\if sectionname ... \\endif.\n\nENABLED_SECTIONS       = \n\n# The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n# the initial value of a variable or define consists of for it to appear in \n# the documentation. If the initializer consists of more lines than specified \n# here it will be hidden. Use a value of 0 to hide initializers completely. \n# The appearance of the initializer of individual variables and defines in the \n# documentation can be controlled using \\showinitializer or \\hideinitializer \n# command in the documentation regardless of this setting.\n\nMAX_INITIALIZER_LINES  = 30\n\n# If the sources in your project are distributed over multiple directories \n# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy \n# in the documentation. The default is NO.\n\nSHOW_DIRECTORIES       = YES\n\n# Set the SHOW_FILES tag to NO to disable the generation of the Files page. \n# This will remove the Files entry from the Quick Index and from the \n# Folder Tree View (if specified). The default is YES.\n\nSHOW_FILES             = YES\n\n# Set the SHOW_NAMESPACES tag to NO to disable the generation of the \n# Namespaces page.  This will remove the Namespaces entry from the Quick Index \n# and from the Folder Tree View (if specified). The default is YES.\n\nSHOW_NAMESPACES        = YES\n\n# The FILE_VERSION_FILTER tag can be used to specify a program or script that \n# doxygen should invoke to get the current version for each file (typically from \n# the version control system). Doxygen will invoke the program by executing (via \n# popen()) the command <command> <input-file>, where <command> is the value of \n# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file \n# provided by doxygen. Whatever the program writes to standard output \n# is used as the file version. See the manual for examples.\n\nFILE_VERSION_FILTER    = \n\n# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by \n# doxygen. The layout file controls the global structure of the generated output files \n# in an output format independent way. The create the layout file that represents \n# doxygen's defaults, run doxygen with the -l option. You can optionally specify a \n# file name after the option, if omitted DoxygenLayout.xml will be used as the name \n# of the layout file.\n\nLAYOUT_FILE            = \n\n#---------------------------------------------------------------------------\n# configuration options related to warning and progress messages\n#---------------------------------------------------------------------------\n\n# The QUIET tag can be used to turn on/off the messages that are generated \n# by doxygen. Possible values are YES and NO. If left blank NO is used.\n\nQUIET                  = NO\n\n# The WARNINGS tag can be used to turn on/off the warning messages that are \n# generated by doxygen. Possible values are YES and NO. If left blank \n# NO is used.\n\nWARNINGS               = YES\n\n# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings \n# for undocumented members. If EXTRACT_ALL is set to YES then this flag will \n# automatically be disabled.\n\nWARN_IF_UNDOCUMENTED   = YES\n\n# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for \n# potential errors in the documentation, such as not documenting some \n# parameters in a documented function, or documenting parameters that \n# don't exist or using markup commands wrongly.\n\nWARN_IF_DOC_ERROR      = YES\n\n# This WARN_NO_PARAMDOC option can be abled to get warnings for \n# functions that are documented, but have no documentation for their parameters \n# or return value. If set to NO (the default) doxygen will only warn about \n# wrong or incomplete parameter documentation, but not about the absence of \n# documentation.\n\nWARN_NO_PARAMDOC       = YES\n\n# The WARN_FORMAT tag determines the format of the warning messages that \n# doxygen can produce. The string should contain the $file, $line, and $text \n# tags, which will be replaced by the file and line number from which the \n# warning originated and the warning text. Optionally the format may contain \n# $version, which will be replaced by the version of the file (if it could \n# be obtained via FILE_VERSION_FILTER)\n\nWARN_FORMAT            = \"$file:$line: $text\"\n\n# The WARN_LOGFILE tag can be used to specify a file to which warning \n# and error messages should be written. If left blank the output is written \n# to stderr.\n\nWARN_LOGFILE           = ./doxygen_warn.txt\n\n#---------------------------------------------------------------------------\n# configuration options related to the input files\n#---------------------------------------------------------------------------\n\n# The INPUT tag can be used to specify the files and/or directories that contain \n# documented source files. You may enter file names like \"myfile.cpp\" or \n# directories like \"/usr/src/myproject\". Separate the files or directories \n# with spaces.\n\nINPUT                  = . ../include\n\n# This tag can be used to specify the character encoding of the source files \n# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is \n# also the default input encoding. Doxygen uses libiconv (or the iconv built \n# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for \n# the list of possible encodings.\n\nINPUT_ENCODING         = UTF-8\n\n# If the value of the INPUT tag contains directories, you can use the \n# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n# and *.h) to filter out the source-files in the directories. If left \n# blank the following patterns are tested: \n# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \n# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90\n\nFILE_PATTERNS          = *.c \\\n                         *.cc \\\n                         *.cxx \\\n                         *.cpp \\\n                         *.c++ \\\n                         *.d \\\n                         *.java \\\n                         *.ii \\\n                         *.ixx \\\n                         *.ipp \\\n                         *.i++ \\\n                         *.inl \\\n                         *.h \\\n                         *.hh \\\n                         *.hxx \\\n                         *.hpp \\\n                         *.h++ \\\n                         *.idl \\\n                         *.odl \\\n                         *.cs \\\n                         *.php \\\n                         *.php3 \\\n                         *.inc \\\n                         *.m \\\n                         *.mm \\\n                         *.dox \\\n                         *.py \\\n                         *.f90 \\\n                         *.f \\\n                         *.vhd \\\n                         *.vhdl \\\n                         *.h.in \\\n                         *.h.default \\\n                         *.md\n\n# The RECURSIVE tag can be used to turn specify whether or not subdirectories \n# should be searched for input files as well. Possible values are YES and NO. \n# If left blank NO is used.\n\nRECURSIVE              = YES\n\n# The EXCLUDE tag can be used to specify files and/or directories that should \n# excluded from the INPUT source files. This way you can easily exclude a \n# subdirectory from a directory tree whose root is specified with the INPUT tag.\n\nEXCLUDE                = ../include/SDL_opengles2_gl2ext.h \\\n                         ../include/SDL_opengles2_gl2platform.h \\\n                         ../include/SDL_opengles2_khrplatform.h \\\n                         ../include/SDL_opengl_glext.h \\\n                         ../include/SDL_opengles2_gl2.h \\\n                         ../include/SDL_opengles2.h \\\n                         ../include/SDL_opengles.h \\\n                         ../include/SDL_opengl.h \\\n                         ../include/SDL_egl.h \\\n\n\n# The EXCLUDE_SYMLINKS tag can be used select whether or not files or \n# directories that are symbolic links (a Unix filesystem feature) are excluded \n# from the input.\n\nEXCLUDE_SYMLINKS       = NO\n\n# If the value of the INPUT tag contains directories, you can use the \n# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude \n# certain files from those directories. Note that the wildcards are matched \n# against the file with absolute path, so to exclude all test directories \n# for example use the pattern */test/*\n\nEXCLUDE_PATTERNS       =\n\n# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names \n# (namespaces, classes, functions, etc.) that should be excluded from the \n# output. The symbol name can be a fully qualified name, a word, or if the \n# wildcard * is used, a substring. Examples: ANamespace, AClass, \n# AClass::ANamespace, ANamespace::*Test\n\nEXCLUDE_SYMBOLS        = \n\n# The EXAMPLE_PATH tag can be used to specify one or more files or \n# directories that contain example code fragments that are included (see \n# the \\include command).\n\nEXAMPLE_PATH           =\n\n# If the value of the EXAMPLE_PATH tag contains directories, you can use the \n# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n# and *.h) to filter out the source-files in the directories. If left \n# blank all files are included.\n\nEXAMPLE_PATTERNS       = *\n\n# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be \n# searched for input files to be used with the \\include or \\dontinclude \n# commands irrespective of the value of the RECURSIVE tag. \n# Possible values are YES and NO. If left blank NO is used.\n\nEXAMPLE_RECURSIVE      = YES\n\n# The IMAGE_PATH tag can be used to specify one or more files or \n# directories that contain image that are included in the documentation (see \n# the \\image command).\n\nIMAGE_PATH             = \n\n# The INPUT_FILTER tag can be used to specify a program that doxygen should \n# invoke to filter for each input file. Doxygen will invoke the filter program \n# by executing (via popen()) the command <filter> <input-file>, where <filter> \n# is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n# input file. Doxygen will then use the output that the filter program writes \n# to standard output.  If FILTER_PATTERNS is specified, this tag will be \n# ignored.\n\nINPUT_FILTER           = \n\n# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern \n# basis.  Doxygen will compare the file name with each pattern and apply the \n# filter if there is a match.  The filters are a list of the form: \n# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further \n# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER \n# is applied to all files.\n\nFILTER_PATTERNS        = \n\n# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \n# INPUT_FILTER) will be used to filter the input files when producing source \n# files to browse (i.e. when SOURCE_BROWSER is set to YES).\n\nFILTER_SOURCE_FILES    = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to source browsing\n#---------------------------------------------------------------------------\n\n# If the SOURCE_BROWSER tag is set to YES then a list of source files will \n# be generated. Documented entities will be cross-referenced with these sources. \n# Note: To get rid of all source code in the generated output, make sure also \n# VERBATIM_HEADERS is set to NO.\n\nSOURCE_BROWSER         = YES\n\n# Setting the INLINE_SOURCES tag to YES will include the body \n# of functions and classes directly in the documentation.\n\nINLINE_SOURCES         = YES\n\n# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n# doxygen to hide any special comment blocks from generated source code \n# fragments. Normal C and C++ comments will always remain visible.\n\nSTRIP_CODE_COMMENTS    = NO\n\n# If the REFERENCED_BY_RELATION tag is set to YES \n# then for each documented function all documented \n# functions referencing it will be listed.\n\nREFERENCED_BY_RELATION = YES\n\n# If the REFERENCES_RELATION tag is set to YES \n# then for each documented function all documented entities \n# called/used by that function will be listed.\n\nREFERENCES_RELATION    = YES\n\n# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) \n# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from \n# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will \n# link to the source code.  Otherwise they will link to the documentation.\n\nREFERENCES_LINK_SOURCE = YES\n\n# If the USE_HTAGS tag is set to YES then the references to source code \n# will point to the HTML generated by the htags(1) tool instead of doxygen \n# built-in source browser. The htags tool is part of GNU's global source \n# tagging system (see http://www.gnu.org/software/global/global.html). You \n# will need version 4.8.6 or higher.\n\nUSE_HTAGS              = NO\n\n# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n# will generate a verbatim copy of the header file for each class for \n# which an include is specified. Set to NO to disable this.\n\nVERBATIM_HEADERS       = YES\n\n#---------------------------------------------------------------------------\n# configuration options related to the alphabetical class index\n#---------------------------------------------------------------------------\n\n# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n# of all compounds will be generated. Enable this if the project \n# contains a lot of classes, structs, unions or interfaces.\n\nALPHABETICAL_INDEX     = YES\n\n# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \n# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns \n# in which this list will be split (can be a number in the range [1..20])\n\nCOLS_IN_ALPHA_INDEX    = 5\n\n# In case all classes in a project start with a common prefix, all \n# classes will be put under the same header in the alphabetical index. \n# The IGNORE_PREFIX tag can be used to specify one or more prefixes that \n# should be ignored while generating the index headers.\n\nIGNORE_PREFIX          = SDL_ \\\n                         SDL\n\n#---------------------------------------------------------------------------\n# configuration options related to the HTML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_HTML tag is set to YES (the default) Doxygen will \n# generate HTML output.\n\nGENERATE_HTML          = YES\n\n# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. \n# If a relative path is entered the value of OUTPUT_DIRECTORY will be \n# put in front of it. If left blank `html' will be used as the default path.\n\nHTML_OUTPUT            = html\n\n# The HTML_FILE_EXTENSION tag can be used to specify the file extension for \n# each generated HTML page (for example: .htm,.php,.asp). If it is left blank \n# doxygen will generate files with .html extension.\n\nHTML_FILE_EXTENSION    = .html\n\n# The HTML_HEADER tag can be used to specify a personal HTML header for \n# each generated HTML page. If it is left blank doxygen will generate a \n# standard header.\n\nHTML_HEADER            = \n\n# The HTML_FOOTER tag can be used to specify a personal HTML footer for \n# each generated HTML page. If it is left blank doxygen will generate a \n# standard footer.\n\nHTML_FOOTER            = \n\n# The HTML_STYLESHEET tag can be used to specify a user-defined cascading \n# style sheet that is used by each HTML page. It can be used to \n# fine-tune the look of the HTML output. If the tag is left blank doxygen \n# will generate a default style sheet. Note that doxygen will try to copy \n# the style sheet file to the HTML output directory, so don't put your own \n# stylesheet in the HTML output directory as well, or it will be erased!\n\nHTML_STYLESHEET        = \n\n# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \n# files or namespaces will be aligned in HTML using tables. If set to \n# NO a bullet list will be used.\n\nHTML_ALIGN_MEMBERS     = YES\n\n# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML \n# documentation will contain sections that can be hidden and shown after the \n# page has loaded. For this to work a browser that supports \n# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox \n# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).\n\nHTML_DYNAMIC_SECTIONS  = YES\n\n# If the GENERATE_DOCSET tag is set to YES, additional index files \n# will be generated that can be used as input for Apple's Xcode 3 \n# integrated development environment, introduced with OSX 10.5 (Leopard). \n# To create a documentation set, doxygen will generate a Makefile in the \n# HTML output directory. Running make will produce the docset in that \n# directory and running \"make install\" will install the docset in \n# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find \n# it at startup. \n# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.\n\nGENERATE_DOCSET        = NO\n\n# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the \n# feed. A documentation feed provides an umbrella under which multiple \n# documentation sets from a single provider (such as a company or product suite) \n# can be grouped.\n\nDOCSET_FEEDNAME        = \"SDL 2.0 Doxygen\"\n\n# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that \n# should uniquely identify the documentation set bundle. This should be a \n# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen \n# will append .docset to the name.\n\nDOCSET_BUNDLE_ID       = org.libsdl.sdl20\n\n# If the GENERATE_HTMLHELP tag is set to YES, additional index files \n# will be generated that can be used as input for tools like the \n# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) \n# of the generated HTML documentation.\n\nGENERATE_HTMLHELP      = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can \n# be used to specify the file name of the resulting .chm file. You \n# can add a path in front of the file if the result should not be \n# written to the html output directory.\n\nCHM_FILE               = ./sdl20.chm\n\n# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can \n# be used to specify the location (absolute path including file name) of \n# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run \n# the HTML help compiler on the generated index.hhp.\n\nHHC_LOCATION           = \n\n# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag \n# controls if a separate .chi index file is generated (YES) or that \n# it should be included in the master .chm file (NO).\n\nGENERATE_CHI           = NO\n\n# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING \n# is used to encode HtmlHelp index (hhk), content (hhc) and project file \n# content.\n\nCHM_INDEX_ENCODING     = \n\n# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag \n# controls whether a binary table of contents is generated (YES) or a \n# normal table of contents (NO) in the .chm file.\n\nBINARY_TOC             = NO\n\n# The TOC_EXPAND flag can be set to YES to add extra items for group members \n# to the contents of the HTML help documentation and to the tree view.\n\nTOC_EXPAND             = YES\n\n# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER \n# are set, an additional index file will be generated that can be used as input for \n# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated \n# HTML documentation.\n\nGENERATE_QHP           = NO\n\n# If the QHG_LOCATION tag is specified, the QCH_FILE tag can \n# be used to specify the file name of the resulting .qch file. \n# The path specified is relative to the HTML output folder.\n\nQCH_FILE               = \n\n# The QHP_NAMESPACE tag specifies the namespace to use when generating \n# Qt Help Project output. For more information please see \n# http://doc.trolltech.com/qthelpproject.html#namespace\n\nQHP_NAMESPACE          = \n\n# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating \n# Qt Help Project output. For more information please see \n# http://doc.trolltech.com/qthelpproject.html#virtual-folders\n\nQHP_VIRTUAL_FOLDER     = doc\n\n# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. \n# For more information please see \n# http://doc.trolltech.com/qthelpproject.html#custom-filters\n\nQHP_CUST_FILTER_NAME   = \n\n# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see \n# <a href=\"http://doc.trolltech.com/qthelpproject.html#custom-filters\">Qt Help Project / Custom Filters</a>.\n\nQHP_CUST_FILTER_ATTRS  = \n\n# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's \n# filter section matches. \n# <a href=\"http://doc.trolltech.com/qthelpproject.html#filter-attributes\">Qt Help Project / Filter Attributes</a>.\n\nQHP_SECT_FILTER_ATTRS  = \n\n# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can \n# be used to specify the location of Qt's qhelpgenerator. \n# If non-empty doxygen will try to run qhelpgenerator on the generated \n# .qhp file.\n\nQHG_LOCATION           = \n\n# The DISABLE_INDEX tag can be used to turn on/off the condensed index at \n# top of each HTML page. The value NO (the default) enables the index and \n# the value YES disables it.\n\nDISABLE_INDEX          = NO\n\n# This tag can be used to set the number of enum values (range [1..20]) \n# that doxygen will group on one line in the generated HTML documentation.\n\nENUM_VALUES_PER_LINE   = 1\n\n# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index \n# structure should be generated to display hierarchical information. \n# If the tag value is set to FRAME, a side panel will be generated \n# containing a tree-like index structure (just like the one that \n# is generated for HTML Help). For this to work a browser that supports \n# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, \n# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are \n# probably better off using the HTML help feature. Other possible values \n# for this tag are: HIERARCHIES, which will generate the Groups, Directories, \n# and Class Hierarchy pages using a tree view instead of an ordered list; \n# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which \n# disables this behavior completely. For backwards compatibility with previous \n# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE \n# respectively.\n\nGENERATE_TREEVIEW      = ALL\n\n# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be \n# used to set the initial width (in pixels) of the frame in which the tree \n# is shown.\n\nTREEVIEW_WIDTH         = 250\n\n# Use this tag to change the font size of Latex formulas included \n# as images in the HTML documentation. The default is 10. Note that \n# when you change the font size after a successful doxygen run you need \n# to manually remove any form_*.png images from the HTML output directory \n# to force them to be regenerated.\n\nFORMULA_FONTSIZE       = 10\n\n#---------------------------------------------------------------------------\n# configuration options related to the LaTeX output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will \n# generate Latex output.\n\nGENERATE_LATEX         = NO\n\n# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. \n# If a relative path is entered the value of OUTPUT_DIRECTORY will be \n# put in front of it. If left blank `latex' will be used as the default path.\n\nLATEX_OUTPUT           = latex\n\n# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be \n# invoked. If left blank `latex' will be used as the default command name.\n\nLATEX_CMD_NAME         = latex\n\n# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to \n# generate index for LaTeX. If left blank `makeindex' will be used as the \n# default command name.\n\nMAKEINDEX_CMD_NAME     = makeindex\n\n# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact \n# LaTeX documents. This may be useful for small projects and may help to \n# save some trees in general.\n\nCOMPACT_LATEX          = NO\n\n# The PAPER_TYPE tag can be used to set the paper type that is used \n# by the printer. Possible values are: a4, a4wide, letter, legal and \n# executive. If left blank a4wide will be used.\n\nPAPER_TYPE             = a4wide\n\n# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX \n# packages that should be included in the LaTeX output.\n\nEXTRA_PACKAGES         = \n\n# The LATEX_HEADER tag can be used to specify a personal LaTeX header for \n# the generated latex document. The header should contain everything until \n# the first chapter. If it is left blank doxygen will generate a \n# standard header. Notice: only use this tag if you know what you are doing!\n\nLATEX_HEADER           = \n\n# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated \n# is prepared for conversion to pdf (using ps2pdf). The pdf file will \n# contain links (just like the HTML output) instead of page references \n# This makes the output suitable for online browsing using a pdf viewer.\n\nPDF_HYPERLINKS         = YES\n\n# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of \n# plain latex in the generated Makefile. Set this option to YES to get a \n# higher quality PDF documentation.\n\nUSE_PDFLATEX           = YES\n\n# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode. \n# command to the generated LaTeX files. This will instruct LaTeX to keep \n# running if errors occur, instead of asking the user for help. \n# This option is also used when generating formulas in HTML.\n\nLATEX_BATCHMODE        = NO\n\n# If LATEX_HIDE_INDICES is set to YES then doxygen will not \n# include the index chapters (such as File Index, Compound Index, etc.) \n# in the output.\n\nLATEX_HIDE_INDICES     = NO\n\n# If LATEX_SOURCE_CODE is set to YES then doxygen will include\n# source code with syntax highlighting in the LaTeX output.\n# Note that which sources are shown also depends on other settings\n# such as SOURCE_BROWSER.\n\nLATEX_SOURCE_CODE      = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the RTF output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \n# The RTF output is optimized for Word 97 and may not look very pretty with \n# other RTF readers or editors.\n\nGENERATE_RTF           = NO\n\n# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. \n# If a relative path is entered the value of OUTPUT_DIRECTORY will be \n# put in front of it. If left blank `rtf' will be used as the default path.\n\nRTF_OUTPUT             = rtf\n\n# If the COMPACT_RTF tag is set to YES Doxygen generates more compact \n# RTF documents. This may be useful for small projects and may help to \n# save some trees in general.\n\nCOMPACT_RTF            = NO\n\n# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated \n# will contain hyperlink fields. The RTF file will \n# contain links (just like the HTML output) instead of page references. \n# This makes the output suitable for online browsing using WORD or other \n# programs which support those fields. \n# Note: wordpad (write) and others do not support links.\n\nRTF_HYPERLINKS         = NO\n\n# Load stylesheet definitions from file. Syntax is similar to doxygen's \n# config file, i.e. a series of assignments. You only have to provide \n# replacements, missing definitions are set to their default value.\n\nRTF_STYLESHEET_FILE    = \n\n# Set optional variables used in the generation of an rtf document. \n# Syntax is similar to doxygen's config file.\n\nRTF_EXTENSIONS_FILE    = \n\n#---------------------------------------------------------------------------\n# configuration options related to the man page output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_MAN tag is set to YES (the default) Doxygen will \n# generate man pages\n\nGENERATE_MAN           = NO\n\n# The MAN_OUTPUT tag is used to specify where the man pages will be put. \n# If a relative path is entered the value of OUTPUT_DIRECTORY will be \n# put in front of it. If left blank `man' will be used as the default path.\n\nMAN_OUTPUT             = man\n\n# The MAN_EXTENSION tag determines the extension that is added to \n# the generated man pages (default is the subroutine's section .3)\n\nMAN_EXTENSION          = .3\n\n# If the MAN_LINKS tag is set to YES and Doxygen generates man output, \n# then it will generate one additional man file for each entity \n# documented in the real man page(s). These additional files \n# only source the real man page, but without them the man command \n# would be unable to find the correct page. The default is NO.\n\nMAN_LINKS              = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the XML output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_XML tag is set to YES Doxygen will \n# generate an XML file that captures the structure of \n# the code including all documentation.\n\nGENERATE_XML           = NO\n\n# The XML_OUTPUT tag is used to specify where the XML pages will be put. \n# If a relative path is entered the value of OUTPUT_DIRECTORY will be \n# put in front of it. If left blank `xml' will be used as the default path.\n\nXML_OUTPUT             = xml\n\n# The XML_SCHEMA tag can be used to specify an XML schema, \n# which can be used by a validating XML parser to check the \n# syntax of the XML files.\n\nXML_SCHEMA             = \n\n# The XML_DTD tag can be used to specify an XML DTD, \n# which can be used by a validating XML parser to check the \n# syntax of the XML files.\n\nXML_DTD                = \n\n# If the XML_PROGRAMLISTING tag is set to YES Doxygen will \n# dump the program listings (including syntax highlighting \n# and cross-referencing information) to the XML output. Note that \n# enabling this will significantly increase the size of the XML output.\n\nXML_PROGRAMLISTING     = YES\n\n#---------------------------------------------------------------------------\n# configuration options for the AutoGen Definitions output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will \n# generate an AutoGen Definitions (see autogen.sf.net) file \n# that captures the structure of the code including all \n# documentation. Note that this feature is still experimental \n# and incomplete at the moment.\n\nGENERATE_AUTOGEN_DEF   = NO\n\n#---------------------------------------------------------------------------\n# configuration options related to the Perl module output\n#---------------------------------------------------------------------------\n\n# If the GENERATE_PERLMOD tag is set to YES Doxygen will \n# generate a Perl module file that captures the structure of \n# the code including all documentation. Note that this \n# feature is still experimental and incomplete at the \n# moment.\n\nGENERATE_PERLMOD       = NO\n\n# If the PERLMOD_LATEX tag is set to YES Doxygen will generate \n# the necessary Makefile rules, Perl scripts and LaTeX code to be able \n# to generate PDF and DVI output from the Perl module output.\n\nPERLMOD_LATEX          = NO\n\n# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be \n# nicely formatted so it can be parsed by a human reader.  This is useful \n# if you want to understand what is going on.  On the other hand, if this \n# tag is set to NO the size of the Perl module output will be much smaller \n# and Perl will parse it just the same.\n\nPERLMOD_PRETTY         = YES\n\n# The names of the make variables in the generated doxyrules.make file \n# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. \n# This is useful so different doxyrules.make files included by the same \n# Makefile don't overwrite each other's variables.\n\nPERLMOD_MAKEVAR_PREFIX = \n\n#---------------------------------------------------------------------------\n# Configuration options related to the preprocessor   \n#---------------------------------------------------------------------------\n\n# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will \n# evaluate all C-preprocessor directives found in the sources and include \n# files.\n\nENABLE_PREPROCESSING   = YES\n\n# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n# names in the source code. If set to NO (the default) only conditional \n# compilation will be performed. Macro expansion can be done in a controlled \n# way by setting EXPAND_ONLY_PREDEF to YES.\n\nMACRO_EXPANSION        = YES\n\n# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n# then the macro expansion is limited to the macros specified with the \n# PREDEFINED and EXPAND_AS_DEFINED tags.\n\nEXPAND_ONLY_PREDEF     = YES\n\n# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n# in the INCLUDE_PATH (see below) will be search if a #include is found.\n\nSEARCH_INCLUDES        = YES\n\n# The INCLUDE_PATH tag can be used to specify one or more directories that \n# contain include files that are not input files but should be processed by \n# the preprocessor.\n\nINCLUDE_PATH           =\n\n# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \n# patterns (like *.h and *.hpp) to filter out the header-files in the \n# directories. If left blank, the patterns specified with FILE_PATTERNS will \n# be used.\n\nINCLUDE_FILE_PATTERNS  = \n\n# The PREDEFINED tag can be used to specify one or more macro names that \n# are defined before the preprocessor is started (similar to the -D option of \n# gcc). The argument of the tag is a list of macros of the form: name \n# or name=definition (no spaces). If the definition and the = are \n# omitted =1 is assumed. To prevent a macro definition from being \n# undefined via #undef or recursively expanded use the := operator \n# instead of the = operator.\n\nPREDEFINED             = DOXYGEN_SHOULD_IGNORE_THIS=1 \\\n                         DECLSPEC= \\\n                         SDLCALL= \\\n                         _WIN32=1\n\n# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then \n# this tag can be used to specify a list of macro names that should be expanded. \n# The macro definition that is found in the sources will be used. \n# Use the PREDEFINED tag if you want to use a different macro definition.\n\nEXPAND_AS_DEFINED      = \n\n# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \n# doxygen's preprocessor will remove all function-like macros that are alone \n# on a line, have an all uppercase name, and do not end with a semicolon. Such \n# function macros are typically used for boiler-plate code, and will confuse \n# the parser if not removed.\n\nSKIP_FUNCTION_MACROS   = YES\n\n#---------------------------------------------------------------------------\n# Configuration::additions related to external references   \n#---------------------------------------------------------------------------\n\n# The TAGFILES option can be used to specify one or more tagfiles. \n# Optionally an initial location of the external documentation \n# can be added for each tagfile. The format of a tag file without \n# this location is as follows: \n#   TAGFILES = file1 file2 ... \n# Adding location for the tag files is done as follows: \n#   TAGFILES = file1=loc1 \"file2 = loc2\" ... \n# where \"loc1\" and \"loc2\" can be relative or absolute paths or \n# URLs. If a location is present for each tag, the installdox tool \n# does not have to be run to correct the links. \n# Note that each tag file must have a unique name \n# (where the name does NOT include the path) \n# If a tag file is not located in the directory in which doxygen \n# is run, you must also specify the path to the tagfile here.\n\nTAGFILES               = \n\n# When a file name is specified after GENERATE_TAGFILE, doxygen will create \n# a tag file that is based on the input files it reads.\n\nGENERATE_TAGFILE       = ./SDL.tag\n\n# If the ALLEXTERNALS tag is set to YES all external classes will be listed \n# in the class index. If set to NO only the inherited external classes \n# will be listed.\n\nALLEXTERNALS           = NO\n\n# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed \n# in the modules index. If set to NO, only the current project's groups will \n# be listed.\n\nEXTERNAL_GROUPS        = YES\n\n# The PERL_PATH should be the absolute path and name of the perl script \n# interpreter (i.e. the result of `which perl').\n\nPERL_PATH              = c:\\Perl\\bin\\perl.exe\n\n#---------------------------------------------------------------------------\n# Configuration options related to the dot tool   \n#---------------------------------------------------------------------------\n\n# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \n# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base \n# or super classes. Setting the tag to NO turns the diagrams off. Note that \n# this option is superseded by the HAVE_DOT option below. This is only a \n# fallback. It is recommended to install and use dot, since it yields more \n# powerful graphs.\n\nCLASS_DIAGRAMS         = YES\n\n# You can define message sequence charts within doxygen comments using the \\msc \n# command. Doxygen will then run the mscgen tool (see \n# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the \n# documentation. The MSCGEN_PATH tag allows you to specify the directory where \n# the mscgen tool resides. If left empty the tool is assumed to be found in the \n# default search path.\n\nMSCGEN_PATH            = \n\n# If set to YES, the inheritance and collaboration graphs will hide \n# inheritance and usage relations if the target is undocumented \n# or is not a class.\n\nHIDE_UNDOC_RELATIONS   = YES\n\n# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n# available from the path. This tool is part of Graphviz, a graph visualization \n# toolkit from AT&T and Lucent Bell Labs. The other options in this section \n# have no effect if this option is set to NO (the default)\n\nHAVE_DOT               = YES\n\n# By default doxygen will write a font called FreeSans.ttf to the output \n# directory and reference it in all dot files that doxygen generates. This \n# font does not include all possible unicode characters however, so when you need \n# these (or just want a differently looking font) you can specify the font name \n# using DOT_FONTNAME. You need need to make sure dot is able to find the font, \n# which can be done by putting it in a standard location or by setting the \n# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory \n# containing the font.\n\nDOT_FONTNAME           = FreeSans\n\n# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. \n# The default size is 10pt.\n\nDOT_FONTSIZE           = 10\n\n# By default doxygen will tell dot to use the output directory to look for the \n# FreeSans.ttf font (which doxygen will put there itself). If you specify a \n# different font using DOT_FONTNAME you can set the path where dot \n# can find it using this tag.\n\nDOT_FONTPATH           = \n\n# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen \n# will generate a graph for each documented class showing the direct and \n# indirect inheritance relations. Setting this tag to YES will force the \n# the CLASS_DIAGRAMS tag to NO.\n\nCLASS_GRAPH            = YES\n\n# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen \n# will generate a graph for each documented class showing the direct and \n# indirect implementation dependencies (inheritance, containment, and \n# class references variables) of the class with other documented classes.\n\nCOLLABORATION_GRAPH    = YES\n\n# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen \n# will generate a graph for groups, showing the direct groups dependencies\n\nGROUP_GRAPHS           = YES\n\n# If the UML_LOOK tag is set to YES doxygen will generate inheritance and \n# collaboration diagrams in a style similar to the OMG's Unified Modeling \n# Language.\n\nUML_LOOK               = NO\n\n# If set to YES, the inheritance and collaboration graphs will show the \n# relations between templates and their instances.\n\nTEMPLATE_RELATIONS     = YES\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \n# tags are set to YES then doxygen will generate a graph for each documented \n# file showing the direct and indirect include dependencies of the file with \n# other documented files.\n\nINCLUDE_GRAPH          = YES\n\n# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and \n# HAVE_DOT tags are set to YES then doxygen will generate a graph for each \n# documented header file showing the documented files that directly or \n# indirectly include this file.\n\nINCLUDED_BY_GRAPH      = YES\n\n# If the CALL_GRAPH and HAVE_DOT options are set to YES then \n# doxygen will generate a call dependency graph for every global function \n# or class method. Note that enabling this option will significantly increase \n# the time of a run. So in most cases it will be better to enable call graphs \n# for selected functions only using the \\callgraph command.\n\nCALL_GRAPH             = NO\n\n# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then \n# doxygen will generate a caller dependency graph for every global function \n# or class method. Note that enabling this option will significantly increase \n# the time of a run. So in most cases it will be better to enable caller \n# graphs for selected functions only using the \\callergraph command.\n\nCALLER_GRAPH           = NO\n\n# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen \n# will graphical hierarchy of all classes instead of a textual one.\n\nGRAPHICAL_HIERARCHY    = YES\n\n# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES \n# then doxygen will show the dependencies a directory has on other directories \n# in a graphical way. The dependency relations are determined by the #include \n# relations between the files in the directories.\n\nDIRECTORY_GRAPH        = YES\n\n# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images \n# generated by dot. Possible values are png, jpg, or gif \n# If left blank png will be used.\n\nDOT_IMAGE_FORMAT       = png\n\n# The tag DOT_PATH can be used to specify the path where the dot tool can be \n# found. If left blank, it is assumed the dot tool can be found in the path.\n\nDOT_PATH               = \n\n# The DOTFILE_DIRS tag can be used to specify one or more directories that \n# contain dot files that are included in the documentation (see the \n# \\dotfile command).\n\nDOTFILE_DIRS           = \n\n# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of \n# nodes that will be shown in the graph. If the number of nodes in a graph \n# becomes larger than this value, doxygen will truncate the graph, which is \n# visualized by representing a node as a red box. Note that doxygen if the \n# number of direct children of the root node in a graph is already larger than \n# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note \n# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.\n\nDOT_GRAPH_MAX_NODES    = 60\n\n# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the \n# graphs generated by dot. A depth value of 3 means that only nodes reachable \n# from the root by following a path via at most 3 edges will be shown. Nodes \n# that lay further from the root node will be omitted. Note that setting this \n# option to 1 or 2 may greatly reduce the computation time needed for large \n# code bases. Also note that the size of a graph can be further restricted by \n# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.\n\nMAX_DOT_GRAPH_DEPTH    = 2\n\n# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent \n# background. This is disabled by default, because dot on Windows does not \n# seem to support this out of the box. Warning: Depending on the platform used, \n# enabling this option may lead to badly anti-aliased labels on the edges of \n# a graph (i.e. they become hard to read).\n\nDOT_TRANSPARENT        = NO\n\n# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output \n# files in one run (i.e. multiple -o and -T options on the command line). This \n# makes dot run faster, but since only newer versions of dot (>1.8.10) \n# support this, this feature is disabled by default.\n\nDOT_MULTI_TARGETS      = YES\n\n# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will \n# generate a legend page explaining the meaning of the various boxes and \n# arrows in the dot generated graphs.\n\nGENERATE_LEGEND        = YES\n\n# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will \n# remove the intermediate dot files that are used to generate \n# the various graphs.\n\nDOT_CLEANUP            = YES\n\n#---------------------------------------------------------------------------\n# Options related to the search engine\n#---------------------------------------------------------------------------\n\n# The SEARCHENGINE tag specifies whether or not a search engine should be \n# used. If set to NO the values of all tags below this one will be ignored.\n\nSEARCHENGINE           = NO\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/bin/sdl2-config",
    "content": "#!/bin/sh\n\nprefix=/opt/local/i686-w64-mingw32\nexec_prefix=${prefix}\nexec_prefix_set=no\nlibdir=${exec_prefix}/lib\n\n#usage=\"\\\n#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]\"\nusage=\"\\\nUsage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]\"\n\nif test $# -eq 0; then\n      echo \"${usage}\" 1>&2\n      exit 1\nfi\n\nwhile test $# -gt 0; do\n  case \"$1\" in\n  -*=*) optarg=`echo \"$1\" | sed 's/[-_a-zA-Z0-9]*=//'` ;;\n  *) optarg= ;;\n  esac\n\n  case $1 in\n    --prefix=*)\n      prefix=$optarg\n      if test $exec_prefix_set = no ; then\n        exec_prefix=$optarg\n      fi\n      ;;\n    --prefix)\n      echo $prefix\n      ;;\n    --exec-prefix=*)\n      exec_prefix=$optarg\n      exec_prefix_set=yes\n      ;;\n    --exec-prefix)\n      echo $exec_prefix\n      ;;\n    --version)\n      echo 2.0.10\n      ;;\n    --cflags)\n      echo -I${prefix}/include/SDL2  -Dmain=SDL_main\n      ;;\n    --libs)\n      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2 -mwindows\n      ;;\n    --static-libs)\n#    --libs|--static-libs)\n      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2 -mwindows  -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc\n      ;;\n    *)\n      echo \"${usage}\" 1>&2\n      exit 1\n      ;;\n  esac\n  shift\ndone\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL.h\n *\n *  Main include header for the SDL library\n */\n\n\n#ifndef SDL_h_\n#define SDL_h_\n\n#include \"SDL_main.h\"\n#include \"SDL_stdinc.h\"\n#include \"SDL_assert.h\"\n#include \"SDL_atomic.h\"\n#include \"SDL_audio.h\"\n#include \"SDL_clipboard.h\"\n#include \"SDL_cpuinfo.h\"\n#include \"SDL_endian.h\"\n#include \"SDL_error.h\"\n#include \"SDL_events.h\"\n#include \"SDL_filesystem.h\"\n#include \"SDL_gamecontroller.h\"\n#include \"SDL_haptic.h\"\n#include \"SDL_hints.h\"\n#include \"SDL_joystick.h\"\n#include \"SDL_loadso.h\"\n#include \"SDL_log.h\"\n#include \"SDL_messagebox.h\"\n#include \"SDL_mutex.h\"\n#include \"SDL_power.h\"\n#include \"SDL_render.h\"\n#include \"SDL_rwops.h\"\n#include \"SDL_sensor.h\"\n#include \"SDL_shape.h\"\n#include \"SDL_system.h\"\n#include \"SDL_thread.h\"\n#include \"SDL_timer.h\"\n#include \"SDL_version.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* As of version 0.5, SDL is loaded dynamically into the application */\n\n/**\n *  \\name SDL_INIT_*\n *\n *  These are the flags which may be passed to SDL_Init().  You should\n *  specify the subsystems which you will be using in your application.\n */\n/* @{ */\n#define SDL_INIT_TIMER          0x00000001u\n#define SDL_INIT_AUDIO          0x00000010u\n#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */\n#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */\n#define SDL_INIT_HAPTIC         0x00001000u\n#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */\n#define SDL_INIT_EVENTS         0x00004000u\n#define SDL_INIT_SENSOR         0x00008000u\n#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */\n#define SDL_INIT_EVERYTHING ( \\\n                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \\\n                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \\\n            )\n/* @} */\n\n/**\n *  This function initializes  the subsystems specified by \\c flags\n */\nextern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);\n\n/**\n *  This function initializes specific SDL subsystems\n *\n *  Subsystem initialization is ref-counted, you must call\n *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly\n *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).\n *  If a subsystem is already loaded then this call will\n *  increase the ref-count and return.\n */\nextern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);\n\n/**\n *  This function cleans up specific SDL subsystems\n */\nextern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);\n\n/**\n *  This function returns a mask of the specified subsystems which have\n *  previously been initialized.\n *\n *  If \\c flags is 0, it returns a mask of all initialized subsystems.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);\n\n/**\n *  This function cleans up all initialized subsystems. You should\n *  call it upon all exit conditions.\n */\nextern DECLSPEC void SDLCALL SDL_Quit(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_assert.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_assert_h_\n#define SDL_assert_h_\n\n#include \"SDL_config.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef SDL_ASSERT_LEVEL\n#ifdef SDL_DEFAULT_ASSERT_LEVEL\n#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL\n#elif defined(_DEBUG) || defined(DEBUG) || \\\n      (defined(__GNUC__) && !defined(__OPTIMIZE__))\n#define SDL_ASSERT_LEVEL 2\n#else\n#define SDL_ASSERT_LEVEL 1\n#endif\n#endif /* SDL_ASSERT_LEVEL */\n\n/*\nThese are macros and not first class functions so that the debugger breaks\non the assertion line and not in some random guts of SDL, and so each\nassert can have unique static variables associated with it.\n*/\n\n#if defined(_MSC_VER)\n/* Don't include intrin.h here because it contains C++ code */\n    extern void __cdecl __debugbreak(void);\n    #define SDL_TriggerBreakpoint() __debugbreak()\n#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )\n    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( \"int $3\\n\\t\" )\n#elif defined(__386__) && defined(__WATCOMC__)\n    #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }\n#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)\n    #include <signal.h>\n    #define SDL_TriggerBreakpoint() raise(SIGTRAP)\n#else\n    /* How do we trigger breakpoints on this platform? */\n    #define SDL_TriggerBreakpoint()\n#endif\n\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */\n#   define SDL_FUNCTION __func__\n#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))\n#   define SDL_FUNCTION __FUNCTION__\n#else\n#   define SDL_FUNCTION \"???\"\n#endif\n#define SDL_FILE    __FILE__\n#define SDL_LINE    __LINE__\n\n/*\nsizeof (x) makes the compiler still parse the expression even without\nassertions enabled, so the code is always checked at compile time, but\ndoesn't actually generate code for it, so there are no side effects or\nexpensive checks at run time, just the constant size of what x WOULD be,\nwhich presumably gets optimized out as unused.\nThis also solves the problem of...\n\n    int somevalue = blah();\n    SDL_assert(somevalue == 1);\n\n...which would cause compiles to complain that somevalue is unused if we\ndisable assertions.\n*/\n\n/* \"while (0,0)\" fools Microsoft's compiler's /W4 warning level into thinking\n    this condition isn't constant. And looks like an owl's face! */\n#ifdef _MSC_VER  /* stupid /W4 warnings. */\n#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)\n#else\n#define SDL_NULL_WHILE_LOOP_CONDITION (0)\n#endif\n\n#define SDL_disabled_assert(condition) \\\n    do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)\n\ntypedef enum\n{\n    SDL_ASSERTION_RETRY,  /**< Retry the assert immediately. */\n    SDL_ASSERTION_BREAK,  /**< Make the debugger trigger a breakpoint. */\n    SDL_ASSERTION_ABORT,  /**< Terminate the program. */\n    SDL_ASSERTION_IGNORE,  /**< Ignore the assert. */\n    SDL_ASSERTION_ALWAYS_IGNORE  /**< Ignore the assert from now on. */\n} SDL_AssertState;\n\ntypedef struct SDL_AssertData\n{\n    int always_ignore;\n    unsigned int trigger_count;\n    const char *condition;\n    const char *filename;\n    int linenum;\n    const char *function;\n    const struct SDL_AssertData *next;\n} SDL_AssertData;\n\n#if (SDL_ASSERT_LEVEL > 0)\n\n/* Never call this directly. Use the SDL_assert* macros. */\nextern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,\n                                                             const char *,\n                                                             const char *, int)\n#if defined(__clang__)\n#if __has_feature(attribute_analyzer_noreturn)\n/* this tells Clang's static analysis that we're a custom assert function,\n   and that the analyzer should assume the condition was always true past this\n   SDL_assert test. */\n   __attribute__((analyzer_noreturn))\n#endif\n#endif\n;\n\n/* the do {} while(0) avoids dangling else problems:\n    if (x) SDL_assert(y); else blah();\n       ... without the do/while, the \"else\" could attach to this macro's \"if\".\n   We try to handle just the minimum we need here in a macro...the loop,\n   the static vars, and break points. The heavy lifting is handled in\n   SDL_ReportAssertion(), in SDL_assert.c.\n*/\n#define SDL_enabled_assert(condition) \\\n    do { \\\n        while ( !(condition) ) { \\\n            static struct SDL_AssertData sdl_assert_data = { \\\n                0, 0, #condition, 0, 0, 0, 0 \\\n            }; \\\n            const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \\\n            if (sdl_assert_state == SDL_ASSERTION_RETRY) { \\\n                continue; /* go again. */ \\\n            } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \\\n                SDL_TriggerBreakpoint(); \\\n            } \\\n            break; /* not retrying. */ \\\n        } \\\n    } while (SDL_NULL_WHILE_LOOP_CONDITION)\n\n#endif  /* enabled assertions support code */\n\n/* Enable various levels of assertions. */\n#if SDL_ASSERT_LEVEL == 0   /* assertions disabled */\n#   define SDL_assert(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 1  /* release settings. */\n#   define SDL_assert(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 2  /* normal settings. */\n#   define SDL_assert(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 3  /* paranoid settings. */\n#   define SDL_assert(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)\n#else\n#   error Unknown assertion level.\n#endif\n\n/* this assertion is never disabled at any level. */\n#define SDL_assert_always(condition) SDL_enabled_assert(condition)\n\n\ntypedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(\n                                 const SDL_AssertData* data, void* userdata);\n\n/**\n *  \\brief Set an application-defined assertion handler.\n *\n *  This allows an app to show its own assertion UI and/or force the\n *  response to an assertion failure. If the app doesn't provide this, SDL\n *  will try to do the right thing, popping up a system-specific GUI dialog,\n *  and probably minimizing any fullscreen windows.\n *\n *  This callback may fire from any thread, but it runs wrapped in a mutex, so\n *  it will only fire from one thread at a time.\n *\n *  Setting the callback to NULL restores SDL's original internal handler.\n *\n *  This callback is NOT reset to SDL's internal handler upon SDL_Quit()!\n *\n *  Return SDL_AssertState value of how to handle the assertion failure.\n *\n *  \\param handler Callback function, called when an assertion fails.\n *  \\param userdata A pointer passed to the callback as-is.\n */\nextern DECLSPEC void SDLCALL SDL_SetAssertionHandler(\n                                            SDL_AssertionHandler handler,\n                                            void *userdata);\n\n/**\n *  \\brief Get the default assertion handler.\n *\n *  This returns the function pointer that is called by default when an\n *   assertion is triggered. This is an internal function provided by SDL,\n *   that is used for assertions when SDL_SetAssertionHandler() hasn't been\n *   used to provide a different function.\n *\n *  \\return The default SDL_AssertionHandler that is called when an assert triggers.\n */\nextern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);\n\n/**\n *  \\brief Get the current assertion handler.\n *\n *  This returns the function pointer that is called when an assertion is\n *   triggered. This is either the value last passed to\n *   SDL_SetAssertionHandler(), or if no application-specified function is\n *   set, is equivalent to calling SDL_GetDefaultAssertionHandler().\n *\n *   \\param puserdata Pointer to a void*, which will store the \"userdata\"\n *                    pointer that was passed to SDL_SetAssertionHandler().\n *                    This value will always be NULL for the default handler.\n *                    If you don't care about this data, it is safe to pass\n *                    a NULL pointer to this function to ignore it.\n *  \\return The SDL_AssertionHandler that is called when an assert triggers.\n */\nextern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);\n\n/**\n *  \\brief Get a list of all assertion failures.\n *\n *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),\n *  or the start of the program.\n *\n *  The proper way to examine this data looks something like this:\n *\n *  <code>\n *  const SDL_AssertData *item = SDL_GetAssertionReport();\n *  while (item) {\n *      printf(\"'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\\\n\",\n *             item->condition, item->function, item->filename,\n *             item->linenum, item->trigger_count,\n *             item->always_ignore ? \"yes\" : \"no\");\n *      item = item->next;\n *  }\n *  </code>\n *\n *  \\return List of all assertions.\n *  \\sa SDL_ResetAssertionReport\n */\nextern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);\n\n/**\n *  \\brief Reset the list of all assertion failures.\n *\n *  Reset list of all assertions triggered.\n *\n *  \\sa SDL_GetAssertionReport\n */\nextern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);\n\n\n/* these had wrong naming conventions until 2.0.4. Please update your app! */\n#define SDL_assert_state SDL_AssertState\n#define SDL_assert_data SDL_AssertData\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_assert_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_atomic.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n * \\file SDL_atomic.h\n *\n * Atomic operations.\n *\n * IMPORTANT:\n * If you are not an expert in concurrent lockless programming, you should\n * only be using the atomic lock and reference counting functions in this\n * file.  In all other cases you should be protecting your data structures\n * with full mutexes.\n *\n * The list of \"safe\" functions to use are:\n *  SDL_AtomicLock()\n *  SDL_AtomicUnlock()\n *  SDL_AtomicIncRef()\n *  SDL_AtomicDecRef()\n *\n * Seriously, here be dragons!\n * ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n *\n * You can find out a little more about lockless programming and the\n * subtle issues that can arise here:\n * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx\n *\n * There's also lots of good information here:\n * http://www.1024cores.net/home/lock-free-algorithms\n * http://preshing.com/\n *\n * These operations may or may not actually be implemented using\n * processor specific atomic operations. When possible they are\n * implemented as true processor specific atomic operations. When that\n * is not possible the are implemented using locks that *do* use the\n * available atomic operations.\n *\n * All of the atomic operations that modify memory are full memory barriers.\n */\n\n#ifndef SDL_atomic_h_\n#define SDL_atomic_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_platform.h\"\n\n#include \"begin_code.h\"\n\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\name SDL AtomicLock\n *\n * The atomic locks are efficient spinlocks using CPU instructions,\n * but are vulnerable to starvation and can spin forever if a thread\n * holding a lock has been terminated.  For this reason you should\n * minimize the code executed inside an atomic lock and never do\n * expensive things like API or system calls while holding them.\n *\n * The atomic locks are not safe to lock recursively.\n *\n * Porting Note:\n * The spin lock functions and type are required and can not be\n * emulated because they are used in the atomic emulation code.\n */\n/* @{ */\n\ntypedef int SDL_SpinLock;\n\n/**\n * \\brief Try to lock a spin lock by setting it to a non-zero value.\n *\n * \\param lock Points to the lock.\n *\n * \\return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);\n\n/**\n * \\brief Lock a spin lock by setting it to a non-zero value.\n *\n * \\param lock Points to the lock.\n */\nextern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);\n\n/**\n * \\brief Unlock a spin lock by setting it to 0. Always returns immediately\n *\n * \\param lock Points to the lock.\n */\nextern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);\n\n/* @} *//* SDL AtomicLock */\n\n\n/**\n * The compiler barrier prevents the compiler from reordering\n * reads and writes to globally visible variables across the call.\n */\n#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)\nvoid _ReadWriteBarrier(void);\n#pragma intrinsic(_ReadWriteBarrier)\n#define SDL_CompilerBarrier()   _ReadWriteBarrier()\n#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))\n/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */\n#define SDL_CompilerBarrier()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#elif defined(__WATCOMC__)\nextern _inline void SDL_CompilerBarrier (void);\n#pragma aux SDL_CompilerBarrier = \"\" parm [] modify exact [];\n#else\n#define SDL_CompilerBarrier()   \\\n{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }\n#endif\n\n/**\n * Memory barriers are designed to prevent reads and writes from being\n * reordered by the compiler and being seen out of order on multi-core CPUs.\n *\n * A typical pattern would be for thread A to write some data and a flag,\n * and for thread B to read the flag and get the data. In this case you\n * would insert a release barrier between writing the data and the flag,\n * guaranteeing that the data write completes no later than the flag is\n * written, and you would insert an acquire barrier between reading the\n * flag and reading the data, to ensure that all the reads associated\n * with the flag have completed.\n *\n * In this pattern you should always see a release barrier paired with\n * an acquire barrier and you should gate the data reads/writes with a\n * single flag variable.\n *\n * For more information on these semantics, take a look at the blog post:\n * http://preshing.com/20120913/acquire-and-release-semantics\n */\nextern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);\nextern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);\n\n#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"lwsync\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"lwsync\" : : : \"memory\")\n#elif defined(__GNUC__) && defined(__aarch64__)\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#elif defined(__GNUC__) && defined(__arm__)\n#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */\n/* Information from:\n   https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19\n\n   The Linux kernel provides a helper function which provides the right code for a memory barrier,\n   hard-coded at address 0xffff0fa0\n*/\ntypedef void (*SDL_KernelMemoryBarrierFunc)();\n#define SDL_MemoryBarrierRelease()\t((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()\n#define SDL_MemoryBarrierAcquire()\t((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()\n#elif 0 /* defined(__QNXNTO__) */\n#include <sys/cpuinline.h>\n\n#define SDL_MemoryBarrierRelease()   __cpu_membarrier()\n#define SDL_MemoryBarrierAcquire()   __cpu_membarrier()\n#else\n#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)\n#ifdef __thumb__\n/* The mcr instruction isn't available in thumb mode, use real functions */\n#define SDL_MEMORY_BARRIER_USES_FUNCTION\n#define SDL_MemoryBarrierRelease()   SDL_MemoryBarrierReleaseFunction()\n#define SDL_MemoryBarrierAcquire()   SDL_MemoryBarrierAcquireFunction()\n#else\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"mcr p15, 0, %0, c7, c10, 5\" : : \"r\"(0) : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"mcr p15, 0, %0, c7, c10, 5\" : : \"r\"(0) : \"memory\")\n#endif /* __thumb__ */\n#else\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#endif /* __LINUX__ || __ANDROID__ */\n#endif /* __GNUC__ && __arm__ */\n#else\n#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))\n/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */\n#include <mbarrier.h>\n#define SDL_MemoryBarrierRelease()  __machine_rel_barrier()\n#define SDL_MemoryBarrierAcquire()  __machine_acq_barrier()\n#else\n/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */\n#define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()\n#define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()\n#endif\n#endif\n\n/**\n * \\brief A type representing an atomic integer value.  It is a struct\n *        so people don't accidentally use numeric operations on it.\n */\ntypedef struct { int value; } SDL_atomic_t;\n\n/**\n * \\brief Set an atomic variable to a new value if it is currently an old value.\n *\n * \\return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.\n *\n * \\note If you don't know what this function is for, you shouldn't use it!\n*/\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);\n\n/**\n * \\brief Set an atomic variable to a value.\n *\n * \\return The previous value of the atomic variable.\n */\nextern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);\n\n/**\n * \\brief Get the value of an atomic variable\n */\nextern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);\n\n/**\n * \\brief Add to an atomic variable.\n *\n * \\return The previous value of the atomic variable.\n *\n * \\note This same style can be used for any number operation\n */\nextern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);\n\n/**\n * \\brief Increment an atomic variable used as a reference count.\n */\n#ifndef SDL_AtomicIncRef\n#define SDL_AtomicIncRef(a)    SDL_AtomicAdd(a, 1)\n#endif\n\n/**\n * \\brief Decrement an atomic variable used as a reference count.\n *\n * \\return SDL_TRUE if the variable reached zero after decrementing,\n *         SDL_FALSE otherwise\n */\n#ifndef SDL_AtomicDecRef\n#define SDL_AtomicDecRef(a)    (SDL_AtomicAdd(a, -1) == 1)\n#endif\n\n/**\n * \\brief Set a pointer to a new value if it is currently an old value.\n *\n * \\return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.\n *\n * \\note If you don't know what this function is for, you shouldn't use it!\n*/\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);\n\n/**\n * \\brief Set a pointer to a value atomically.\n *\n * \\return The previous value of the pointer.\n */\nextern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);\n\n/**\n * \\brief Get the value of a pointer atomically.\n */\nextern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n\n#include \"close_code.h\"\n\n#endif /* SDL_atomic_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_audio.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_audio.h\n *\n *  Access to the raw audio mixing buffer for the SDL library.\n */\n\n#ifndef SDL_audio_h_\n#define SDL_audio_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_endian.h\"\n#include \"SDL_mutex.h\"\n#include \"SDL_thread.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Audio format flags.\n *\n *  These are what the 16 bits in SDL_AudioFormat currently mean...\n *  (Unspecified bits are always zero).\n *\n *  \\verbatim\n    ++-----------------------sample is signed if set\n    ||\n    ||       ++-----------sample is bigendian if set\n    ||       ||\n    ||       ||          ++---sample is float if set\n    ||       ||          ||\n    ||       ||          || +---sample bit size---+\n    ||       ||          || |                     |\n    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00\n    \\endverbatim\n *\n *  There are macros in SDL 2.0 and later to query these bits.\n */\ntypedef Uint16 SDL_AudioFormat;\n\n/**\n *  \\name Audio flags\n */\n/* @{ */\n\n#define SDL_AUDIO_MASK_BITSIZE       (0xFF)\n#define SDL_AUDIO_MASK_DATATYPE      (1<<8)\n#define SDL_AUDIO_MASK_ENDIAN        (1<<12)\n#define SDL_AUDIO_MASK_SIGNED        (1<<15)\n#define SDL_AUDIO_BITSIZE(x)         (x & SDL_AUDIO_MASK_BITSIZE)\n#define SDL_AUDIO_ISFLOAT(x)         (x & SDL_AUDIO_MASK_DATATYPE)\n#define SDL_AUDIO_ISBIGENDIAN(x)     (x & SDL_AUDIO_MASK_ENDIAN)\n#define SDL_AUDIO_ISSIGNED(x)        (x & SDL_AUDIO_MASK_SIGNED)\n#define SDL_AUDIO_ISINT(x)           (!SDL_AUDIO_ISFLOAT(x))\n#define SDL_AUDIO_ISLITTLEENDIAN(x)  (!SDL_AUDIO_ISBIGENDIAN(x))\n#define SDL_AUDIO_ISUNSIGNED(x)      (!SDL_AUDIO_ISSIGNED(x))\n\n/**\n *  \\name Audio format flags\n *\n *  Defaults to LSB byte order.\n */\n/* @{ */\n#define AUDIO_U8        0x0008  /**< Unsigned 8-bit samples */\n#define AUDIO_S8        0x8008  /**< Signed 8-bit samples */\n#define AUDIO_U16LSB    0x0010  /**< Unsigned 16-bit samples */\n#define AUDIO_S16LSB    0x8010  /**< Signed 16-bit samples */\n#define AUDIO_U16MSB    0x1010  /**< As above, but big-endian byte order */\n#define AUDIO_S16MSB    0x9010  /**< As above, but big-endian byte order */\n#define AUDIO_U16       AUDIO_U16LSB\n#define AUDIO_S16       AUDIO_S16LSB\n/* @} */\n\n/**\n *  \\name int32 support\n */\n/* @{ */\n#define AUDIO_S32LSB    0x8020  /**< 32-bit integer samples */\n#define AUDIO_S32MSB    0x9020  /**< As above, but big-endian byte order */\n#define AUDIO_S32       AUDIO_S32LSB\n/* @} */\n\n/**\n *  \\name float32 support\n */\n/* @{ */\n#define AUDIO_F32LSB    0x8120  /**< 32-bit floating point samples */\n#define AUDIO_F32MSB    0x9120  /**< As above, but big-endian byte order */\n#define AUDIO_F32       AUDIO_F32LSB\n/* @} */\n\n/**\n *  \\name Native audio byte ordering\n */\n/* @{ */\n#if SDL_BYTEORDER == SDL_LIL_ENDIAN\n#define AUDIO_U16SYS    AUDIO_U16LSB\n#define AUDIO_S16SYS    AUDIO_S16LSB\n#define AUDIO_S32SYS    AUDIO_S32LSB\n#define AUDIO_F32SYS    AUDIO_F32LSB\n#else\n#define AUDIO_U16SYS    AUDIO_U16MSB\n#define AUDIO_S16SYS    AUDIO_S16MSB\n#define AUDIO_S32SYS    AUDIO_S32MSB\n#define AUDIO_F32SYS    AUDIO_F32MSB\n#endif\n/* @} */\n\n/**\n *  \\name Allow change flags\n *\n *  Which audio format changes are allowed when opening a device.\n */\n/* @{ */\n#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001\n#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002\n#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004\n#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE      0x00000008\n#define SDL_AUDIO_ALLOW_ANY_CHANGE          (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)\n/* @} */\n\n/* @} *//* Audio flags */\n\n/**\n *  This function is called when the audio device needs more data.\n *\n *  \\param userdata An application-specific parameter saved in\n *                  the SDL_AudioSpec structure\n *  \\param stream A pointer to the audio data buffer.\n *  \\param len    The length of that buffer in bytes.\n *\n *  Once the callback returns, the buffer will no longer be valid.\n *  Stereo samples are stored in a LRLRLR ordering.\n *\n *  You can choose to avoid callbacks and use SDL_QueueAudio() instead, if\n *  you like. Just open your audio device with a NULL callback.\n */\ntypedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,\n                                            int len);\n\n/**\n *  The calculated values in this structure are calculated by SDL_OpenAudio().\n *\n *  For multi-channel audio, the default SDL channel mapping is:\n *  2:  FL FR                       (stereo)\n *  3:  FL FR LFE                   (2.1 surround)\n *  4:  FL FR BL BR                 (quad)\n *  5:  FL FR FC BL BR              (quad + center)\n *  6:  FL FR FC LFE SL SR          (5.1 surround - last two can also be BL BR)\n *  7:  FL FR FC LFE BC SL SR       (6.1 surround)\n *  8:  FL FR FC LFE BL BR SL SR    (7.1 surround)\n */\ntypedef struct SDL_AudioSpec\n{\n    int freq;                   /**< DSP frequency -- samples per second */\n    SDL_AudioFormat format;     /**< Audio data format */\n    Uint8 channels;             /**< Number of channels: 1 mono, 2 stereo */\n    Uint8 silence;              /**< Audio buffer silence value (calculated) */\n    Uint16 samples;             /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */\n    Uint16 padding;             /**< Necessary for some compile environments */\n    Uint32 size;                /**< Audio buffer size in bytes (calculated) */\n    SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */\n    void *userdata;             /**< Userdata passed to callback (ignored for NULL callbacks). */\n} SDL_AudioSpec;\n\n\nstruct SDL_AudioCVT;\ntypedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,\n                                          SDL_AudioFormat format);\n\n/**\n *  \\brief Upper limit of filters in SDL_AudioCVT\n *\n *  The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is\n *  currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,\n *  one of which is the terminating NULL pointer.\n */\n#define SDL_AUDIOCVT_MAX_FILTERS 9\n\n/**\n *  \\struct SDL_AudioCVT\n *  \\brief A structure to hold a set of audio conversion filters and buffers.\n *\n *  Note that various parts of the conversion pipeline can take advantage\n *  of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require\n *  you to pass it aligned data, but can possibly run much faster if you\n *  set both its (buf) field to a pointer that is aligned to 16 bytes, and its\n *  (len) field to something that's a multiple of 16, if possible.\n */\n#ifdef __GNUC__\n/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't\n   pad it out to 88 bytes to guarantee ABI compatibility between compilers.\n   vvv\n   The next time we rev the ABI, make sure to size the ints and add padding.\n*/\n#define SDL_AUDIOCVT_PACKED __attribute__((packed))\n#else\n#define SDL_AUDIOCVT_PACKED\n#endif\n/* */\ntypedef struct SDL_AudioCVT\n{\n    int needed;                 /**< Set to 1 if conversion possible */\n    SDL_AudioFormat src_format; /**< Source audio format */\n    SDL_AudioFormat dst_format; /**< Target audio format */\n    double rate_incr;           /**< Rate conversion increment */\n    Uint8 *buf;                 /**< Buffer to hold entire audio data */\n    int len;                    /**< Length of original audio buffer */\n    int len_cvt;                /**< Length of converted audio buffer */\n    int len_mult;               /**< buffer must be len*len_mult big */\n    double len_ratio;           /**< Given len, final size is len*len_ratio */\n    SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */\n    int filter_index;           /**< Current audio conversion function */\n} SDL_AUDIOCVT_PACKED SDL_AudioCVT;\n\n\n/* Function prototypes */\n\n/**\n *  \\name Driver discovery functions\n *\n *  These functions return the list of built in audio drivers, in the\n *  order that they are normally initialized by default.\n */\n/* @{ */\nextern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);\nextern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);\n/* @} */\n\n/**\n *  \\name Initialization and cleanup\n *\n *  \\internal These functions are used internally, and should not be used unless\n *            you have a specific need to specify the audio driver you want to\n *            use.  You should normally use SDL_Init() or SDL_InitSubSystem().\n */\n/* @{ */\nextern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);\nextern DECLSPEC void SDLCALL SDL_AudioQuit(void);\n/* @} */\n\n/**\n *  This function returns the name of the current audio driver, or NULL\n *  if no driver has been initialized.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);\n\n/**\n *  This function opens the audio device with the desired parameters, and\n *  returns 0 if successful, placing the actual hardware parameters in the\n *  structure pointed to by \\c obtained.  If \\c obtained is NULL, the audio\n *  data passed to the callback function will be guaranteed to be in the\n *  requested format, and will be automatically converted to the hardware\n *  audio format if necessary.  This function returns -1 if it failed\n *  to open the audio device, or couldn't set up the audio thread.\n *\n *  When filling in the desired audio spec structure,\n *    - \\c desired->freq should be the desired audio frequency in samples-per-\n *      second.\n *    - \\c desired->format should be the desired audio format.\n *    - \\c desired->samples is the desired size of the audio buffer, in\n *      samples.  This number should be a power of two, and may be adjusted by\n *      the audio driver to a value more suitable for the hardware.  Good values\n *      seem to range between 512 and 8096 inclusive, depending on the\n *      application and CPU speed.  Smaller values yield faster response time,\n *      but can lead to underflow if the application is doing heavy processing\n *      and cannot fill the audio buffer in time.  A stereo sample consists of\n *      both right and left channels in LR ordering.\n *      Note that the number of samples is directly related to time by the\n *      following formula:  \\code ms = (samples*1000)/freq \\endcode\n *    - \\c desired->size is the size in bytes of the audio buffer, and is\n *      calculated by SDL_OpenAudio().\n *    - \\c desired->silence is the value used to set the buffer to silence,\n *      and is calculated by SDL_OpenAudio().\n *    - \\c desired->callback should be set to a function that will be called\n *      when the audio device is ready for more data.  It is passed a pointer\n *      to the audio buffer, and the length in bytes of the audio buffer.\n *      This function usually runs in a separate thread, and so you should\n *      protect data structures that it accesses by calling SDL_LockAudio()\n *      and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL\n *      pointer here, and call SDL_QueueAudio() with some frequency, to queue\n *      more audio samples to be played (or for capture devices, call\n *      SDL_DequeueAudio() with some frequency, to obtain audio samples).\n *    - \\c desired->userdata is passed as the first parameter to your callback\n *      function. If you passed a NULL callback, this value is ignored.\n *\n *  The audio device starts out playing silence when it's opened, and should\n *  be enabled for playing by calling \\c SDL_PauseAudio(0) when you are ready\n *  for your audio callback function to be called.  Since the audio driver\n *  may modify the requested size of the audio buffer, you should allocate\n *  any local mixing buffers after you open the audio device.\n */\nextern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,\n                                          SDL_AudioSpec * obtained);\n\n/**\n *  SDL Audio Device IDs.\n *\n *  A successful call to SDL_OpenAudio() is always device id 1, and legacy\n *  SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls\n *  always returns devices >= 2 on success. The legacy calls are good both\n *  for backwards compatibility and when you don't care about multiple,\n *  specific, or capture devices.\n */\ntypedef Uint32 SDL_AudioDeviceID;\n\n/**\n *  Get the number of available devices exposed by the current driver.\n *  Only valid after a successfully initializing the audio subsystem.\n *  Returns -1 if an explicit list of devices can't be determined; this is\n *  not an error. For example, if SDL is set up to talk to a remote audio\n *  server, it can't list every one available on the Internet, but it will\n *  still allow a specific host to be specified to SDL_OpenAudioDevice().\n *\n *  In many common cases, when this function returns a value <= 0, it can still\n *  successfully open the default device (NULL for first argument of\n *  SDL_OpenAudioDevice()).\n */\nextern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);\n\n/**\n *  Get the human-readable name of a specific audio device.\n *  Must be a value between 0 and (number of audio devices-1).\n *  Only valid after a successfully initializing the audio subsystem.\n *  The values returned by this function reflect the latest call to\n *  SDL_GetNumAudioDevices(); recall that function to redetect available\n *  hardware.\n *\n *  The string returned by this function is UTF-8 encoded, read-only, and\n *  managed internally. You are not to free it. If you need to keep the\n *  string for any length of time, you should make your own copy of it, as it\n *  will be invalid next time any of several other SDL functions is called.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,\n                                                           int iscapture);\n\n\n/**\n *  Open a specific audio device. Passing in a device name of NULL requests\n *  the most reasonable default (and is equivalent to calling SDL_OpenAudio()).\n *\n *  The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but\n *  some drivers allow arbitrary and driver-specific strings, such as a\n *  hostname/IP address for a remote audio server, or a filename in the\n *  diskaudio driver.\n *\n *  \\return 0 on error, a valid device ID that is >= 2 on success.\n *\n *  SDL_OpenAudio(), unlike this function, always acts on device ID 1.\n */\nextern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char\n                                                              *device,\n                                                              int iscapture,\n                                                              const\n                                                              SDL_AudioSpec *\n                                                              desired,\n                                                              SDL_AudioSpec *\n                                                              obtained,\n                                                              int\n                                                              allowed_changes);\n\n\n\n/**\n *  \\name Audio state\n *\n *  Get the current audio state.\n */\n/* @{ */\ntypedef enum\n{\n    SDL_AUDIO_STOPPED = 0,\n    SDL_AUDIO_PLAYING,\n    SDL_AUDIO_PAUSED\n} SDL_AudioStatus;\nextern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);\n\nextern DECLSPEC SDL_AudioStatus SDLCALL\nSDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);\n/* @} *//* Audio State */\n\n/**\n *  \\name Pause audio functions\n *\n *  These functions pause and unpause the audio callback processing.\n *  They should be called with a parameter of 0 after opening the audio\n *  device to start playing sound.  This is so you can safely initialize\n *  data for your callback function after opening the audio device.\n *  Silence will be written to the audio device during the pause.\n */\n/* @{ */\nextern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);\nextern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,\n                                                  int pause_on);\n/* @} *//* Pause audio functions */\n\n/**\n *  \\brief Load the audio data of a WAVE file into memory\n *\n *  Loading a WAVE file requires \\c src, \\c spec, \\c audio_buf and \\c audio_len\n *  to be valid pointers. The entire data portion of the file is then loaded\n *  into memory and decoded if necessary.\n *\n *  If \\c freesrc is non-zero, the data source gets automatically closed and\n *  freed before the function returns.\n *\n *  Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),\n *  IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and\n *  µ-law (8 bits). Other formats are currently unsupported and cause an error.\n *\n *  If this function succeeds, the pointer returned by it is equal to \\c spec\n *  and the pointer to the audio data allocated by the function is written to\n *  \\c audio_buf and its length in bytes to \\c audio_len. The \\ref SDL_AudioSpec\n *  members \\c freq, \\c channels, and \\c format are set to the values of the\n *  audio data in the buffer. The \\c samples member is set to a sane default and\n *  all others are set to zero.\n *\n *  It's necessary to use SDL_FreeWAV() to free the audio data returned in\n *  \\c audio_buf when it is no longer used.\n *\n *  Because of the underspecification of the Waveform format, there are many\n *  problematic files in the wild that cause issues with strict decoders. To\n *  provide compatibility with these files, this decoder is lenient in regards\n *  to the truncation of the file, the fact chunk, and the size of the RIFF\n *  chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,\n *  and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the\n *  loading process.\n *\n *  Any file that is invalid (due to truncation, corruption, or wrong values in\n *  the headers), too big, or unsupported causes an error. Additionally, any\n *  critical I/O error from the data source will terminate the loading process\n *  with an error. The function returns NULL on error and in all cases (with the\n *  exception of \\c src being NULL), an appropriate error message will be set.\n *\n *  It is required that the data source supports seeking.\n *\n *  Example:\n *  \\code\n *      SDL_LoadWAV_RW(SDL_RWFromFile(\"sample.wav\", \"rb\"), 1, ...);\n *  \\endcode\n *\n *  \\param src The data source with the WAVE data\n *  \\param freesrc A integer value that makes the function close the data source if non-zero\n *  \\param spec A pointer filled with the audio format of the audio data\n *  \\param audio_buf A pointer filled with the audio data allocated by the function\n *  \\param audio_len A pointer filled with the length of the audio data buffer in bytes\n *  \\return NULL on error, or non-NULL on success.\n */\nextern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,\n                                                      int freesrc,\n                                                      SDL_AudioSpec * spec,\n                                                      Uint8 ** audio_buf,\n                                                      Uint32 * audio_len);\n\n/**\n *  Loads a WAV from a file.\n *  Compatibility convenience function.\n */\n#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \\\n    SDL_LoadWAV_RW(SDL_RWFromFile(file, \"rb\"),1, spec,audio_buf,audio_len)\n\n/**\n *  This function frees data previously allocated with SDL_LoadWAV_RW()\n */\nextern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);\n\n/**\n *  This function takes a source format and rate and a destination format\n *  and rate, and initializes the \\c cvt structure with information needed\n *  by SDL_ConvertAudio() to convert a buffer of audio data from one format\n *  to the other. An unsupported format causes an error and -1 will be returned.\n *\n *  \\return 0 if no conversion is needed, 1 if the audio filter is set up,\n *  or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,\n                                              SDL_AudioFormat src_format,\n                                              Uint8 src_channels,\n                                              int src_rate,\n                                              SDL_AudioFormat dst_format,\n                                              Uint8 dst_channels,\n                                              int dst_rate);\n\n/**\n *  Once you have initialized the \\c cvt structure using SDL_BuildAudioCVT(),\n *  created an audio buffer \\c cvt->buf, and filled it with \\c cvt->len bytes of\n *  audio data in the source format, this function will convert it in-place\n *  to the desired format.\n *\n *  The data conversion may expand the size of the audio data, so the buffer\n *  \\c cvt->buf should be allocated after the \\c cvt structure is initialized by\n *  SDL_BuildAudioCVT(), and should be \\c cvt->len*cvt->len_mult bytes long.\n *\n *  \\return 0 on success or -1 if \\c cvt->buf is NULL.\n */\nextern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);\n\n/* SDL_AudioStream is a new audio conversion interface.\n   The benefits vs SDL_AudioCVT:\n    - it can handle resampling data in chunks without generating\n      artifacts, when it doesn't have the complete buffer available.\n    - it can handle incoming data in any variable size.\n    - You push data as you have it, and pull it when you need it\n */\n/* this is opaque to the outside world. */\nstruct _SDL_AudioStream;\ntypedef struct _SDL_AudioStream SDL_AudioStream;\n\n/**\n *  Create a new audio stream\n *\n *  \\param src_format The format of the source audio\n *  \\param src_channels The number of channels of the source audio\n *  \\param src_rate The sampling rate of the source audio\n *  \\param dst_format The format of the desired audio output\n *  \\param dst_channels The number of channels of the desired audio output\n *  \\param dst_rate The sampling rate of the desired audio output\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,\n                                           const Uint8 src_channels,\n                                           const int src_rate,\n                                           const SDL_AudioFormat dst_format,\n                                           const Uint8 dst_channels,\n                                           const int dst_rate);\n\n/**\n *  Add data to be converted/resampled to the stream\n *\n *  \\param stream The stream the audio data is being added to\n *  \\param buf A pointer to the audio data to add\n *  \\param len The number of bytes to write to the stream\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);\n\n/**\n *  Get converted/resampled data from the stream\n *\n *  \\param stream The stream the audio is being requested from\n *  \\param buf A buffer to fill with audio data\n *  \\param len The maximum number of bytes to fill\n *  \\return The number of bytes read from the stream, or -1 on error\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);\n\n/**\n * Get the number of converted/resampled bytes available. The stream may be\n *  buffering data behind the scenes until it has enough to resample\n *  correctly, so this number might be lower than what you expect, or even\n *  be zero. Add more data or flush the stream if you need the data now.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);\n\n/**\n * Tell the stream that you're done sending data, and anything being buffered\n *  should be converted/resampled and made available immediately.\n *\n * It is legal to add more data to a stream after flushing, but there will\n *  be audio gaps in the output. Generally this is intended to signal the\n *  end of input, so the complete output becomes available.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);\n\n/**\n *  Clear any pending data in the stream without converting it\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);\n\n/**\n * Free an audio stream\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n */\nextern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);\n\n#define SDL_MIX_MAXVOLUME 128\n/**\n *  This takes two audio buffers of the playing audio format and mixes\n *  them, performing addition, volume adjustment, and overflow clipping.\n *  The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME\n *  for full audio volume.  Note this does not change hardware volume.\n *  This is provided for convenience -- you can mix your own audio data.\n */\nextern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,\n                                          Uint32 len, int volume);\n\n/**\n *  This works like SDL_MixAudio(), but you specify the audio format instead of\n *  using the format of audio device 1. Thus it can be used when no audio\n *  device is open at all.\n */\nextern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,\n                                                const Uint8 * src,\n                                                SDL_AudioFormat format,\n                                                Uint32 len, int volume);\n\n/**\n *  Queue more audio on non-callback devices.\n *\n *  (If you are looking to retrieve queued audio from a non-callback capture\n *  device, you want SDL_DequeueAudio() instead. This will return -1 to\n *  signify an error if you use it with capture devices.)\n *\n *  SDL offers two ways to feed audio to the device: you can either supply a\n *  callback that SDL triggers with some frequency to obtain more audio\n *  (pull method), or you can supply no callback, and then SDL will expect\n *  you to supply data at regular intervals (push method) with this function.\n *\n *  There are no limits on the amount of data you can queue, short of\n *  exhaustion of address space. Queued data will drain to the device as\n *  necessary without further intervention from you. If the device needs\n *  audio but there is not enough queued, it will play silence to make up\n *  the difference. This means you will have skips in your audio playback\n *  if you aren't routinely queueing sufficient data.\n *\n *  This function copies the supplied data, so you are safe to free it when\n *  the function returns. This function is thread-safe, but queueing to the\n *  same device from two threads at once does not promise which buffer will\n *  be queued first.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; doing so returns an error. You have to use the audio callback\n *  or queue audio with this function, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before queueing; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID to which we will queue audio.\n *  \\param data The data to queue to the device for later playback.\n *  \\param len The number of bytes (not samples!) to which (data) points.\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetQueuedAudioSize\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);\n\n/**\n *  Dequeue more audio on non-callback devices.\n *\n *  (If you are looking to queue audio for output on a non-callback playback\n *  device, you want SDL_QueueAudio() instead. This will always return 0\n *  if you use it with playback devices.)\n *\n *  SDL offers two ways to retrieve audio from a capture device: you can\n *  either supply a callback that SDL triggers with some frequency as the\n *  device records more audio data, (push method), or you can supply no\n *  callback, and then SDL will expect you to retrieve data at regular\n *  intervals (pull method) with this function.\n *\n *  There are no limits on the amount of data you can queue, short of\n *  exhaustion of address space. Data from the device will keep queuing as\n *  necessary without further intervention from you. This means you will\n *  eventually run out of memory if you aren't routinely dequeueing data.\n *\n *  Capture devices will not queue data when paused; if you are expecting\n *  to not need captured audio for some length of time, use\n *  SDL_PauseAudioDevice() to stop the capture device from queueing more\n *  data. This can be useful during, say, level loading times. When\n *  unpaused, capture devices will start queueing data from that point,\n *  having flushed any capturable data available while paused.\n *\n *  This function is thread-safe, but dequeueing from the same device from\n *  two threads at once does not promise which thread will dequeued data\n *  first.\n *\n *  You may not dequeue audio from a device that is using an\n *  application-supplied callback; doing so returns an error. You have to use\n *  the audio callback, or dequeue audio with this function, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before queueing; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID from which we will dequeue audio.\n *  \\param data A pointer into where audio data should be copied.\n *  \\param len The number of bytes (not samples!) to which (data) points.\n *  \\return number of bytes dequeued, which could be less than requested.\n *\n *  \\sa SDL_GetQueuedAudioSize\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);\n\n/**\n *  Get the number of bytes of still-queued audio.\n *\n *  For playback device:\n *\n *    This is the number of bytes that have been queued for playback with\n *    SDL_QueueAudio(), but have not yet been sent to the hardware. This\n *    number may shrink at any time, so this only informs of pending data.\n *\n *    Once we've sent it to the hardware, this function can not decide the\n *    exact byte boundary of what has been played. It's possible that we just\n *    gave the hardware several kilobytes right before you called this\n *    function, but it hasn't played any of it yet, or maybe half of it, etc.\n *\n *  For capture devices:\n *\n *    This is the number of bytes that have been captured by the device and\n *    are waiting for you to dequeue. This number may grow at any time, so\n *    this only informs of the lower-bound of available data.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; calling this function on such a device always returns 0.\n *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use\n *  the audio callback, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before querying; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID of which we will query queued audio size.\n *  \\return Number of bytes (not samples!) of queued audio.\n *\n *  \\sa SDL_QueueAudio\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);\n\n/**\n *  Drop any queued audio data. For playback devices, this is any queued data\n *  still waiting to be submitted to the hardware. For capture devices, this\n *  is any data that was queued by the device that hasn't yet been dequeued by\n *  the application.\n *\n *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For\n *  playback devices, the hardware will start playing silence if more audio\n *  isn't queued. Unpaused capture devices will start filling the queue again\n *  as soon as they have more data available (which, depending on the state\n *  of the hardware and the thread, could be before this function call\n *  returns!).\n *\n *  This will not prevent playback of queued audio that's already been sent\n *  to the hardware, as we can not undo that, so expect there to be some\n *  fraction of a second of audio that might still be heard. This can be\n *  useful if you want to, say, drop any pending music during a level change\n *  in your game.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; calling this function on such a device is always a no-op.\n *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use\n *  the audio callback, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before clearing the\n *  queue; SDL handles locking internally for this function.\n *\n *  This function always succeeds and thus returns void.\n *\n *  \\param dev The device ID of which to clear the audio queue.\n *\n *  \\sa SDL_QueueAudio\n *  \\sa SDL_GetQueuedAudioSize\n */\nextern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);\n\n\n/**\n *  \\name Audio lock functions\n *\n *  The lock manipulated by these functions protects the callback function.\n *  During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that\n *  the callback function is not running.  Do not call these from the callback\n *  function or you will cause deadlock.\n */\n/* @{ */\nextern DECLSPEC void SDLCALL SDL_LockAudio(void);\nextern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);\nextern DECLSPEC void SDLCALL SDL_UnlockAudio(void);\nextern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);\n/* @} *//* Audio lock functions */\n\n/**\n *  This function shuts down audio processing and closes the audio device.\n */\nextern DECLSPEC void SDLCALL SDL_CloseAudio(void);\nextern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_audio_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_bits.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_bits.h\n *\n *  Functions for fiddling with bits and bitmasks.\n */\n\n#ifndef SDL_bits_h_\n#define SDL_bits_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_bits.h\n */\n\n/**\n *  Get the index of the most significant bit. Result is undefined when called\n *  with 0. This operation can also be stated as \"count leading zeroes\" and\n *  \"log base 2\".\n *\n *  \\return Index of the most significant bit, or -1 if the value is 0.\n */\n#if defined(__WATCOMC__) && defined(__386__)\nextern _inline int _SDL_clz_watcom (Uint32);\n#pragma aux _SDL_clz_watcom = \\\n    \"bsr eax, eax\" \\\n    \"xor eax, 31\" \\\n    parm [eax] nomemory \\\n    value [eax] \\\n    modify exact [eax] nomemory;\n#endif\n\nSDL_FORCE_INLINE int\nSDL_MostSignificantBitIndex32(Uint32 x)\n{\n#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))\n    /* Count Leading Zeroes builtin in GCC.\n     * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html\n     */\n    if (x == 0) {\n        return -1;\n    }\n    return 31 - __builtin_clz(x);\n#elif defined(__WATCOMC__) && defined(__386__)\n    if (x == 0) {\n        return -1;\n    }\n    return 31 - _SDL_clz_watcom(x);\n#else\n    /* Based off of Bit Twiddling Hacks by Sean Eron Anderson\n     * <seander@cs.stanford.edu>, released in the public domain.\n     * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog\n     */\n    const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};\n    const int    S[] = {1, 2, 4, 8, 16};\n\n    int msbIndex = 0;\n    int i;\n\n    if (x == 0) {\n        return -1;\n    }\n\n    for (i = 4; i >= 0; i--)\n    {\n        if (x & b[i])\n        {\n            x >>= S[i];\n            msbIndex |= S[i];\n        }\n    }\n\n    return msbIndex;\n#endif\n}\n\nSDL_FORCE_INLINE SDL_bool\nSDL_HasExactlyOneBitSet32(Uint32 x)\n{\n    if (x && !(x & (x - 1))) {\n        return SDL_TRUE;\n    }\n    return SDL_FALSE;\n}\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_bits_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_blendmode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_blendmode.h\n *\n *  Header file declaring the SDL_BlendMode enumeration\n */\n\n#ifndef SDL_blendmode_h_\n#define SDL_blendmode_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The blend mode used in SDL_RenderCopy() and drawing operations.\n */\ntypedef enum\n{\n    SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending\n                                              dstRGBA = srcRGBA */\n    SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending\n                                              dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))\n                                              dstA = srcA + (dstA * (1-srcA)) */\n    SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending\n                                              dstRGB = (srcRGB * srcA) + dstRGB\n                                              dstA = dstA */\n    SDL_BLENDMODE_MOD = 0x00000004,      /**< color modulate\n                                              dstRGB = srcRGB * dstRGB\n                                              dstA = dstA */\n    SDL_BLENDMODE_INVALID = 0x7FFFFFFF\n\n    /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */\n\n} SDL_BlendMode;\n\n/**\n *  \\brief The blend operation used when combining source and destination pixel components\n */\ntypedef enum\n{\n    SDL_BLENDOPERATION_ADD              = 0x1,  /**< dst + src: supported by all renderers */\n    SDL_BLENDOPERATION_SUBTRACT         = 0x2,  /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */\n    SDL_BLENDOPERATION_REV_SUBTRACT     = 0x3,  /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */\n    SDL_BLENDOPERATION_MINIMUM          = 0x4,  /**< min(dst, src) : supported by D3D11 */\n    SDL_BLENDOPERATION_MAXIMUM          = 0x5   /**< max(dst, src) : supported by D3D11 */\n\n} SDL_BlendOperation;\n\n/**\n *  \\brief The normalized factor used to multiply pixel components\n */\ntypedef enum\n{\n    SDL_BLENDFACTOR_ZERO                = 0x1,  /**< 0, 0, 0, 0 */\n    SDL_BLENDFACTOR_ONE                 = 0x2,  /**< 1, 1, 1, 1 */\n    SDL_BLENDFACTOR_SRC_COLOR           = 0x3,  /**< srcR, srcG, srcB, srcA */\n    SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4,  /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */\n    SDL_BLENDFACTOR_SRC_ALPHA           = 0x5,  /**< srcA, srcA, srcA, srcA */\n    SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6,  /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */\n    SDL_BLENDFACTOR_DST_COLOR           = 0x7,  /**< dstR, dstG, dstB, dstA */\n    SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8,  /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */\n    SDL_BLENDFACTOR_DST_ALPHA           = 0x9,  /**< dstA, dstA, dstA, dstA */\n    SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA   /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */\n\n} SDL_BlendFactor;\n\n/**\n *  \\brief Create a custom blend mode, which may or may not be supported by a given renderer\n *\n *  \\param srcColorFactor source color factor\n *  \\param dstColorFactor destination color factor\n *  \\param colorOperation color operation\n *  \\param srcAlphaFactor source alpha factor\n *  \\param dstAlphaFactor destination alpha factor\n *  \\param alphaOperation alpha operation\n *\n *  The result of the blend mode operation will be:\n *      dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor\n *  and\n *      dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor\n */\nextern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,\n                                                                 SDL_BlendFactor dstColorFactor,\n                                                                 SDL_BlendOperation colorOperation,\n                                                                 SDL_BlendFactor srcAlphaFactor,\n                                                                 SDL_BlendFactor dstAlphaFactor,\n                                                                 SDL_BlendOperation alphaOperation);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_blendmode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_clipboard.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n * \\file SDL_clipboard.h\n *\n * Include file for SDL clipboard handling\n */\n\n#ifndef SDL_clipboard_h_\n#define SDL_clipboard_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n/**\n * \\brief Put UTF-8 text into the clipboard\n *\n * \\sa SDL_GetClipboardText()\n */\nextern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);\n\n/**\n * \\brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()\n *\n * \\sa SDL_SetClipboardText()\n */\nextern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);\n\n/**\n * \\brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty\n *\n * \\sa SDL_GetClipboardText()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_clipboard_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_config.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_config_windows_h_\n#define SDL_config_windows_h_\n#define SDL_config_h_\n\n#include \"SDL_platform.h\"\n\n/* This is a set of defines to configure the SDL features */\n\n#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)\n#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)\n#define HAVE_STDINT_H   1\n#elif defined(_MSC_VER)\ntypedef signed __int8 int8_t;\ntypedef unsigned __int8 uint8_t;\ntypedef signed __int16 int16_t;\ntypedef unsigned __int16 uint16_t;\ntypedef signed __int32 int32_t;\ntypedef unsigned __int32 uint32_t;\ntypedef signed __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#ifndef _UINTPTR_T_DEFINED\n#ifdef  _WIN64\ntypedef unsigned __int64 uintptr_t;\n#else\ntypedef unsigned int uintptr_t;\n#endif\n#define _UINTPTR_T_DEFINED\n#endif\n/* Older Visual C++ headers don't have the Win64-compatible typedefs... */\n#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))\n#define DWORD_PTR DWORD\n#endif\n#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))\n#define LONG_PTR LONG\n#endif\n#else /* !__GNUC__ && !_MSC_VER */\ntypedef signed char int8_t;\ntypedef unsigned char uint8_t;\ntypedef signed short int16_t;\ntypedef unsigned short uint16_t;\ntypedef signed int int32_t;\ntypedef unsigned int uint32_t;\ntypedef signed long long int64_t;\ntypedef unsigned long long uint64_t;\n#ifndef _SIZE_T_DEFINED_\n#define _SIZE_T_DEFINED_\ntypedef unsigned int size_t;\n#endif\ntypedef unsigned int uintptr_t;\n#endif /* __GNUC__ || _MSC_VER */\n#endif /* !_STDINT_H_ && !HAVE_STDINT_H */\n\n#ifdef _WIN64\n# define SIZEOF_VOIDP 8\n#else\n# define SIZEOF_VOIDP 4\n#endif\n\n#define HAVE_DDRAW_H 1\n#define HAVE_DINPUT_H 1\n#define HAVE_DSOUND_H 1\n#define HAVE_DXGI_H 1\n#define HAVE_XINPUT_H 1\n#define HAVE_MMDEVICEAPI_H 1\n#define HAVE_AUDIOCLIENT_H 1\n#define HAVE_ENDPOINTVOLUME_H 1\n\n/* This is disabled by default to avoid C runtime dependencies and manifest requirements */\n#ifdef HAVE_LIBC\n/* Useful headers */\n#define STDC_HEADERS 1\n#define HAVE_CTYPE_H 1\n#define HAVE_FLOAT_H 1\n#define HAVE_LIMITS_H 1\n#define HAVE_MATH_H 1\n#define HAVE_SIGNAL_H 1\n#define HAVE_STDIO_H 1\n#define HAVE_STRING_H 1\n\n/* C library functions */\n#define HAVE_MALLOC 1\n#define HAVE_CALLOC 1\n#define HAVE_REALLOC 1\n#define HAVE_FREE 1\n#define HAVE_ALLOCA 1\n#define HAVE_QSORT 1\n#define HAVE_ABS 1\n#define HAVE_MEMSET 1\n#define HAVE_MEMCPY 1\n#define HAVE_MEMMOVE 1\n#define HAVE_MEMCMP 1\n#define HAVE_STRLEN 1\n#define HAVE__STRREV 1\n/* These functions have security warnings, so we won't use them */\n/* #undef HAVE__STRUPR */\n/* #undef HAVE__STRLWR */\n#define HAVE_STRCHR 1\n#define HAVE_STRRCHR 1\n#define HAVE_STRSTR 1\n/* These functions have security warnings, so we won't use them */\n/* #undef HAVE__LTOA */\n/* #undef HAVE__ULTOA */\n#define HAVE_STRTOL 1\n#define HAVE_STRTOUL 1\n#define HAVE_STRTOD 1\n#define HAVE_ATOI 1\n#define HAVE_ATOF 1\n#define HAVE_STRCMP 1\n#define HAVE_STRNCMP 1\n#define HAVE__STRICMP 1\n#define HAVE__STRNICMP 1\n#define HAVE_ACOS   1\n#define HAVE_ACOSF  1\n#define HAVE_ASIN   1\n#define HAVE_ASINF  1\n#define HAVE_ATAN   1\n#define HAVE_ATANF  1\n#define HAVE_ATAN2  1\n#define HAVE_ATAN2F 1\n#define HAVE_CEILF  1\n#define HAVE__COPYSIGN  1\n#define HAVE_COS    1\n#define HAVE_COSF   1\n#define HAVE_EXP    1\n#define HAVE_EXPF   1\n#define HAVE_FABS   1\n#define HAVE_FABSF  1\n#define HAVE_FLOOR  1\n#define HAVE_FLOORF 1\n#define HAVE_FMOD   1\n#define HAVE_FMODF  1\n#define HAVE_LOG    1\n#define HAVE_LOGF   1\n#define HAVE_LOG10  1\n#define HAVE_LOG10F 1\n#define HAVE_POW    1\n#define HAVE_POWF   1\n#define HAVE_SIN    1\n#define HAVE_SINF   1\n#define HAVE_SQRT   1\n#define HAVE_SQRTF  1\n#define HAVE_TAN    1\n#define HAVE_TANF   1\n#if defined(_MSC_VER)\n/* These functions were added with the VC++ 2013 C runtime library */\n#if _MSC_VER >= 1800\n#define HAVE_STRTOLL 1\n#define HAVE_VSSCANF 1\n#define HAVE_SCALBN 1\n#define HAVE_SCALBNF    1\n#endif\n/* This function is available with at least the VC++ 2008 C runtime library */\n#if _MSC_VER >= 1400\n#define HAVE__FSEEKI64 1\n#endif\n#endif\n#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)\n#define HAVE_M_PI 1\n#endif\n#else\n#define HAVE_STDARG_H   1\n#define HAVE_STDDEF_H   1\n#endif\n\n/* Enable various audio drivers */\n#define SDL_AUDIO_DRIVER_WASAPI 1\n#define SDL_AUDIO_DRIVER_DSOUND 1\n#define SDL_AUDIO_DRIVER_WINMM  1\n#define SDL_AUDIO_DRIVER_DISK   1\n#define SDL_AUDIO_DRIVER_DUMMY  1\n\n/* Enable various input drivers */\n#define SDL_JOYSTICK_DINPUT 1\n#define SDL_JOYSTICK_XINPUT 1\n#define SDL_JOYSTICK_HIDAPI 1\n#define SDL_HAPTIC_DINPUT   1\n#define SDL_HAPTIC_XINPUT   1\n\n/* Enable the dummy sensor driver */\n#define SDL_SENSOR_DUMMY  1\n\n/* Enable various shared object loading systems */\n#define SDL_LOADSO_WINDOWS  1\n\n/* Enable various threading systems */\n#define SDL_THREAD_WINDOWS  1\n\n/* Enable various timer systems */\n#define SDL_TIMER_WINDOWS   1\n\n/* Enable various video drivers */\n#define SDL_VIDEO_DRIVER_DUMMY  1\n#define SDL_VIDEO_DRIVER_WINDOWS    1\n\n#ifndef SDL_VIDEO_RENDER_D3D\n#define SDL_VIDEO_RENDER_D3D    1\n#endif\n#ifndef SDL_VIDEO_RENDER_D3D11\n#define SDL_VIDEO_RENDER_D3D11  0\n#endif\n\n/* Enable OpenGL support */\n#ifndef SDL_VIDEO_OPENGL\n#define SDL_VIDEO_OPENGL    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_WGL\n#define SDL_VIDEO_OPENGL_WGL    1\n#endif\n#ifndef SDL_VIDEO_RENDER_OGL\n#define SDL_VIDEO_RENDER_OGL    1\n#endif\n#ifndef SDL_VIDEO_RENDER_OGL_ES2\n#define SDL_VIDEO_RENDER_OGL_ES2    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_ES2\n#define SDL_VIDEO_OPENGL_ES2    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_EGL\n#define SDL_VIDEO_OPENGL_EGL    1\n#endif\n\n/* Enable Vulkan support */\n#define SDL_VIDEO_VULKAN 1\n\n/* Enable system power support */\n#define SDL_POWER_WINDOWS 1\n\n/* Enable filesystem support */\n#define SDL_FILESYSTEM_WINDOWS  1\n\n/* Enable assembly routines (Win64 doesn't have inline asm) */\n#ifndef _WIN64\n#define SDL_ASSEMBLY_ROUTINES   1\n#endif\n\n#endif /* SDL_config_windows_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_cpuinfo.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_cpuinfo.h\n *\n *  CPU feature detection for SDL.\n */\n\n#ifndef SDL_cpuinfo_h_\n#define SDL_cpuinfo_h_\n\n#include \"SDL_stdinc.h\"\n\n/* Need to do this here because intrin.h has C++ code in it */\n/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */\n#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))\n#ifdef __clang__\n/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */\n#undef __MMX__\n#undef __SSE__\n#undef __SSE2__\n#else\n#include <intrin.h>\n#ifndef _WIN64\n#ifndef __MMX__\n#define __MMX__\n#endif\n#ifndef __3dNOW__\n#define __3dNOW__\n#endif\n#endif\n#ifndef __SSE__\n#define __SSE__\n#endif\n#ifndef __SSE2__\n#define __SSE2__\n#endif\n#endif /* __clang__ */\n#elif defined(__MINGW64_VERSION_MAJOR)\n#include <intrin.h>\n#else\n/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */\n#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)\n#include <altivec.h>\n#endif\n#if !defined(SDL_DISABLE_ARM_NEON_H)\n#  if defined(__ARM_NEON)\n#    include <arm_neon.h>\n#  elif defined(__WINDOWS__) || defined(__WINRT__)\n/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */\n#    if defined(_M_ARM)\n#      include <armintr.h>\n#      include <arm_neon.h>\n#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */\n#    endif\n#    if defined (_M_ARM64)\n#      include <armintr.h>\n#      include <arm_neon.h>\n#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */\n#    endif\n#  endif\n#endif\n#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)\n#include <mm3dnow.h>\n#endif\n#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)\n#include <immintrin.h>\n#else\n#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)\n#include <mmintrin.h>\n#endif\n#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)\n#include <xmmintrin.h>\n#endif\n#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)\n#include <emmintrin.h>\n#endif\n#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)\n#include <pmmintrin.h>\n#endif\n#endif /* HAVE_IMMINTRIN_H */\n#endif /* compiler version */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* This is a guess for the cacheline size used for padding.\n * Most x86 processors have a 64 byte cache line.\n * The 64-bit PowerPC processors have a 128 byte cache line.\n * We'll use the larger value to be generally safe.\n */\n#define SDL_CACHELINE_SIZE  128\n\n/**\n *  This function returns the number of CPU cores available.\n */\nextern DECLSPEC int SDLCALL SDL_GetCPUCount(void);\n\n/**\n *  This function returns the L1 cache line size of the CPU\n *\n *  This is useful for determining multi-threaded structure padding\n *  or SIMD prefetch sizes.\n */\nextern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);\n\n/**\n *  This function returns true if the CPU has the RDTSC instruction.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);\n\n/**\n *  This function returns true if the CPU has AltiVec features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);\n\n/**\n *  This function returns true if the CPU has MMX features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);\n\n/**\n *  This function returns true if the CPU has 3DNow! features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);\n\n/**\n *  This function returns true if the CPU has SSE features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);\n\n/**\n *  This function returns true if the CPU has SSE2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);\n\n/**\n *  This function returns true if the CPU has SSE3 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);\n\n/**\n *  This function returns true if the CPU has SSE4.1 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);\n\n/**\n *  This function returns true if the CPU has SSE4.2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);\n\n/**\n *  This function returns true if the CPU has AVX features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);\n\n/**\n *  This function returns true if the CPU has AVX2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);\n\n/**\n *  This function returns true if the CPU has AVX-512F (foundation) features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);\n\n/**\n *  This function returns true if the CPU has NEON (ARM SIMD) features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);\n\n/**\n *  This function returns the amount of RAM configured in the system, in MB.\n */\nextern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);\n\n/**\n * \\brief Report the alignment this system needs for SIMD allocations.\n *\n * This will return the minimum number of bytes to which a pointer must be\n *  aligned to be compatible with SIMD instructions on the current machine.\n *  For example, if the machine supports SSE only, it will return 16, but if\n *  it supports AVX-512F, it'll return 64 (etc). This only reports values for\n *  instruction sets SDL knows about, so if your SDL build doesn't have\n *  SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and\n *  not 64 for the AVX-512 instructions that exist but SDL doesn't know about.\n *  Plan accordingly.\n */\nextern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);\n\n/**\n * \\brief Allocate memory in a SIMD-friendly way.\n *\n * This will allocate a block of memory that is suitable for use with SIMD\n *  instructions. Specifically, it will be properly aligned and padded for\n *  the system's supported vector instructions.\n *\n * The memory returned will be padded such that it is safe to read or write\n *  an incomplete vector at the end of the memory block. This can be useful\n *  so you don't have to drop back to a scalar fallback at the end of your\n *  SIMD processing loop to deal with the final elements without overflowing\n *  the allocated buffer.\n *\n * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()\n *  or delete[], etc.\n *\n * Note that SDL will only deal with SIMD instruction sets it is aware of;\n *  for example, SDL 2.0.8 knows that SSE wants 16-byte vectors\n *  (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't\n *  know that AVX-512 wants 64. To be clear: if you can't decide to use an\n *  instruction set with an SDL_Has*() function, don't use that instruction\n *  set with memory allocated through here.\n *\n * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't\n *  out of memory.\n *\n *  \\param len The length, in bytes, of the block to allocated. The actual\n *             allocated block might be larger due to padding, etc.\n * \\return Pointer to newly-allocated block, NULL if out of memory.\n *\n * \\sa SDL_SIMDAlignment\n * \\sa SDL_SIMDFree\n */\nextern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);\n\n/**\n * \\brief Deallocate memory obtained from SDL_SIMDAlloc\n *\n * It is not valid to use this function on a pointer from anything but\n *  SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,\n *  SDL_malloc, memalign, new[], etc.\n *\n * However, SDL_SIMDFree(NULL) is a legal no-op.\n *\n * \\sa SDL_SIMDAlloc\n */\nextern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);\n\n/* vi: set ts=4 sw=4 expandtab: */\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_cpuinfo_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_egl.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_egl.h\n *\n *  This is a simple file to encapsulate the EGL API headers.\n */\n#if !defined(_MSC_VER) && !defined(__ANDROID__)\n\n#include <EGL/egl.h>\n#include <EGL/eglext.h>\n\n#else /* _MSC_VER */\n\n/* EGL headers for Visual Studio */\n\n#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Khronos platform-specific types and definitions.\n*\n* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $\n*\n* Adopters may modify this file to suit their platform. Adopters are\n* encouraged to submit platform specific modifications to the Khronos\n* group so that they can be included in future versions of this file.\n* Please submit changes by sending them to the public Khronos Bugzilla\n* (http://khronos.org/bugzilla) by filing a bug against product\n* \"Khronos (general)\" component \"Registry\".\n*\n* A predefined template which fills in some of the bug fields can be\n* reached using http://tinyurl.com/khrplatform-h-bugreport, but you\n* must create a Bugzilla login first.\n*\n*\n* See the Implementer's Guidelines for information about where this file\n* should be located on your system and for more details of its use:\n*    http://www.khronos.org/registry/implementers_guide.pdf\n*\n* This file should be included as\n*        #include <KHR/khrplatform.h>\n* by Khronos client API header files that use its types and defines.\n*\n* The types in khrplatform.h should only be used to define API-specific types.\n*\n* Types defined in khrplatform.h:\n*    khronos_int8_t              signed   8  bit\n*    khronos_uint8_t             unsigned 8  bit\n*    khronos_int16_t             signed   16 bit\n*    khronos_uint16_t            unsigned 16 bit\n*    khronos_int32_t             signed   32 bit\n*    khronos_uint32_t            unsigned 32 bit\n*    khronos_int64_t             signed   64 bit\n*    khronos_uint64_t            unsigned 64 bit\n*    khronos_intptr_t            signed   same number of bits as a pointer\n*    khronos_uintptr_t           unsigned same number of bits as a pointer\n*    khronos_ssize_t             signed   size\n*    khronos_usize_t             unsigned size\n*    khronos_float_t             signed   32 bit floating point\n*    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\n*    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\n*                                         nanoseconds\n*    khronos_stime_nanoseconds_t signed time interval in nanoseconds\n*    khronos_boolean_enum_t      enumerated boolean type. This should\n*      only be used as a base type when a client API's boolean type is\n*      an enum. Client APIs which use an integer or other type for\n*      booleans cannot use this as the base type for their boolean.\n*\n* Tokens defined in khrplatform.h:\n*\n*    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\n*\n*    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\n*    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\n*\n* Calling convention macros defined in this file:\n*    KHRONOS_APICALL\n*    KHRONOS_APIENTRY\n*    KHRONOS_APIATTRIBUTES\n*\n* These may be used in function prototypes as:\n*\n*      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\n*                                  int arg1,\n*                                  int arg2) KHRONOS_APIATTRIBUTES;\n*/\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APICALL\n*-------------------------------------------------------------------------\n* This precedes the return type of the function in the function prototype.\n*/\n#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(SDL_VIDEO_STATIC_ANGLE)\n#   define KHRONOS_APICALL __declspec(dllimport)\n#elif defined (__SYMBIAN32__)\n#   define KHRONOS_APICALL IMPORT_C\n#else\n#   define KHRONOS_APICALL\n#endif\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APIENTRY\n*-------------------------------------------------------------------------\n* This follows the return type of the function  and precedes the function\n* name in the function prototype.\n*/\n#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\n/* Win32 but not WinCE */\n#   define KHRONOS_APIENTRY __stdcall\n#else\n#   define KHRONOS_APIENTRY\n#endif\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APIATTRIBUTES\n*-------------------------------------------------------------------------\n* This follows the closing parenthesis of the function prototype arguments.\n*/\n#if defined (__ARMCC_2__)\n#define KHRONOS_APIATTRIBUTES __softfp\n#else\n#define KHRONOS_APIATTRIBUTES\n#endif\n\n/*-------------------------------------------------------------------------\n* basic type definitions\n*-----------------------------------------------------------------------*/\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\n\n\n/*\n* Using <stdint.h>\n*/\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__VMS ) || defined(__sgi)\n\n/*\n* Using <inttypes.h>\n*/\n#include <inttypes.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\n\n/*\n* Win32\n*/\ntypedef __int32                 khronos_int32_t;\ntypedef unsigned __int32        khronos_uint32_t;\ntypedef __int64                 khronos_int64_t;\ntypedef unsigned __int64        khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__sun__) || defined(__digital__)\n\n/*\n* Sun or Digital\n*/\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int                khronos_int64_t;\ntypedef unsigned long int       khronos_uint64_t;\n#else\ntypedef long long int           khronos_int64_t;\ntypedef unsigned long long int  khronos_uint64_t;\n#endif /* __arch64__ */\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif 0\n\n/*\n* Hypothetical platform with no float or int64 support\n*/\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#define KHRONOS_SUPPORT_INT64   0\n#define KHRONOS_SUPPORT_FLOAT   0\n\n#else\n\n/*\n* Generic fallback\n*/\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#endif\n\n\n/*\n* Types that are (so far) the same on all platforms\n*/\ntypedef signed   char          khronos_int8_t;\ntypedef unsigned char          khronos_uint8_t;\ntypedef signed   short int     khronos_int16_t;\ntypedef unsigned short int     khronos_uint16_t;\n\n/*\n* Types that differ between LLP64 and LP64 architectures - in LLP64,\n* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears\n* to be the only LLP64 architecture in current use.\n*/\n#ifdef _WIN64\ntypedef signed   long long int khronos_intptr_t;\ntypedef unsigned long long int khronos_uintptr_t;\ntypedef signed   long long int khronos_ssize_t;\ntypedef unsigned long long int khronos_usize_t;\n#else\ntypedef signed   long  int     khronos_intptr_t;\ntypedef unsigned long  int     khronos_uintptr_t;\ntypedef signed   long  int     khronos_ssize_t;\ntypedef unsigned long  int     khronos_usize_t;\n#endif\n\n#if KHRONOS_SUPPORT_FLOAT\n/*\n* Float type\n*/\ntypedef          float         khronos_float_t;\n#endif\n\n#if KHRONOS_SUPPORT_INT64\n/* Time types\n*\n* These types can be used to represent a time interval in nanoseconds or\n* an absolute Unadjusted System Time.  Unadjusted System Time is the number\n* of nanoseconds since some arbitrary system event (e.g. since the last\n* time the system booted).  The Unadjusted System Time is an unsigned\n* 64 bit value that wraps back to 0 every 584 years.  Time intervals\n* may be either signed or unsigned.\n*/\ntypedef khronos_uint64_t       khronos_utime_nanoseconds_t;\ntypedef khronos_int64_t        khronos_stime_nanoseconds_t;\n#endif\n\n/*\n* Dummy value used to pad enum types to 32 bits.\n*/\n#ifndef KHRONOS_MAX_ENUM\n#define KHRONOS_MAX_ENUM 0x7FFFFFFF\n#endif\n\n/*\n* Enumerated boolean type\n*\n* Values other than zero should be considered to be true.  Therefore\n* comparisons should not be made against KHRONOS_TRUE.\n*/\ntypedef enum {\n    KHRONOS_FALSE = 0,\n    KHRONOS_TRUE = 1,\n    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\n} khronos_boolean_enum_t;\n\n#endif /* __khrplatform_h_ */\n\n\n#ifndef __eglplatform_h_\n#define __eglplatform_h_\n\n/*\n** Copyright (c) 2007-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Platform-specific types and definitions for egl.h\n* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $\n*\n* Adopters may modify khrplatform.h and this file to suit their platform.\n* You are encouraged to submit all modifications to the Khronos group so that\n* they can be included in future versions of this file.  Please submit changes\n* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)\n* by filing a bug against product \"EGL\" component \"Registry\".\n*/\n\n/*#include <KHR/khrplatform.h>*/\n\n/* Macros used in EGL function prototype declarations.\n*\n* EGL functions should be prototyped as:\n*\n* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);\n* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);\n*\n* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h\n*/\n\n#ifndef EGLAPI\n#define EGLAPI KHRONOS_APICALL\n#endif\n\n#ifndef EGLAPIENTRY\n#define EGLAPIENTRY  KHRONOS_APIENTRY\n#endif\n#define EGLAPIENTRYP EGLAPIENTRY*\n\n/* The types NativeDisplayType, NativeWindowType, and NativePixmapType\n* are aliases of window-system-dependent types, such as X Display * or\n* Windows Device Context. They must be defined in platform-specific\n* code below. The EGL-prefixed versions of Native*Type are the same\n* types, renamed in EGL 1.3 so all types in the API start with \"EGL\".\n*\n* Khronos STRONGLY RECOMMENDS that you use the default definitions\n* provided below, since these changes affect both binary and source\n* portability of applications using EGL running on different EGL\n* implementations.\n*/\n\n#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#include <windows.h>\n\n#if __WINRT__\n#include <Unknwn.h>\ntypedef IUnknown * EGLNativeWindowType;\ntypedef IUnknown * EGLNativePixmapType;\ntypedef IUnknown * EGLNativeDisplayType;\n#else\ntypedef HDC     EGLNativeDisplayType;\ntypedef HBITMAP EGLNativePixmapType;\ntypedef HWND    EGLNativeWindowType;\n#endif\n\n#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */\n\ntypedef int   EGLNativeDisplayType;\ntypedef void *EGLNativeWindowType;\ntypedef void *EGLNativePixmapType;\n\n#elif defined(WL_EGL_PLATFORM)\n\ntypedef struct wl_display     *EGLNativeDisplayType;\ntypedef struct wl_egl_pixmap  *EGLNativePixmapType;\ntypedef struct wl_egl_window  *EGLNativeWindowType;\n\n#elif defined(__GBM__)\n\ntypedef struct gbm_device  *EGLNativeDisplayType;\ntypedef struct gbm_bo      *EGLNativePixmapType;\ntypedef void               *EGLNativeWindowType;\n\n#elif defined(__ANDROID__) /* Android */\n\nstruct ANativeWindow;\nstruct egl_native_pixmap_t;\n\ntypedef struct ANativeWindow        *EGLNativeWindowType;\ntypedef struct egl_native_pixmap_t  *EGLNativePixmapType;\ntypedef void                        *EGLNativeDisplayType;\n\n#elif defined(MIR_EGL_PLATFORM)\n\n#include <mir_toolkit/mir_client_library.h>\ntypedef MirEGLNativeDisplayType EGLNativeDisplayType;\ntypedef void                   *EGLNativePixmapType;\ntypedef MirEGLNativeWindowType  EGLNativeWindowType;\n\n#elif defined(__unix__)\n\n#ifdef MESA_EGL_NO_X11_HEADERS\n\ntypedef void            *EGLNativeDisplayType;\ntypedef khronos_uintptr_t EGLNativePixmapType;\ntypedef khronos_uintptr_t EGLNativeWindowType;\n\n#else\n\n/* X11 (tentative)  */\n#include <X11/Xlib.h>\n#include <X11/Xutil.h>\n\ntypedef Display *EGLNativeDisplayType;\ntypedef Pixmap   EGLNativePixmapType;\ntypedef Window   EGLNativeWindowType;\n\n#endif /* MESA_EGL_NO_X11_HEADERS */\n\n#else\n#error \"Platform not recognized\"\n#endif\n\n/* EGL 1.2 types, renamed for consistency in EGL 1.3 */\ntypedef EGLNativeDisplayType NativeDisplayType;\ntypedef EGLNativePixmapType  NativePixmapType;\ntypedef EGLNativeWindowType  NativeWindowType;\n\n\n/* Define EGLint. This must be a signed integral type large enough to contain\n* all legal attribute names and values passed into and out of EGL, whether\n* their type is boolean, bitmask, enumerant (symbolic constant), integer,\n* handle, or other.  While in general a 32-bit integer will suffice, if\n* handles are 64 bit types, then EGLint should be defined as a signed 64-bit\n* integer type.\n*/\ntypedef khronos_int32_t EGLint;\n\n#endif /* __eglplatform_h */\n\n#ifndef __egl_h_\n#define __egl_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2015 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $\n*/\n\n/*#include <EGL/eglplatform.h>*/\n\n/* Generated on date 20150623 */\n\n/* Generated C header for:\n * API: egl\n * Versions considered: .*\n * Versions emitted: .*\n * Default extensions included: None\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef EGL_VERSION_1_0\n#define EGL_VERSION_1_0 1\ntypedef unsigned int EGLBoolean;\ntypedef void *EGLDisplay;\ntypedef void *EGLConfig;\ntypedef void *EGLSurface;\ntypedef void *EGLContext;\ntypedef void (*__eglMustCastToProperFunctionPointerType)(void);\n#define EGL_ALPHA_SIZE                    0x3021\n#define EGL_BAD_ACCESS                    0x3002\n#define EGL_BAD_ALLOC                     0x3003\n#define EGL_BAD_ATTRIBUTE                 0x3004\n#define EGL_BAD_CONFIG                    0x3005\n#define EGL_BAD_CONTEXT                   0x3006\n#define EGL_BAD_CURRENT_SURFACE           0x3007\n#define EGL_BAD_DISPLAY                   0x3008\n#define EGL_BAD_MATCH                     0x3009\n#define EGL_BAD_NATIVE_PIXMAP             0x300A\n#define EGL_BAD_NATIVE_WINDOW             0x300B\n#define EGL_BAD_PARAMETER                 0x300C\n#define EGL_BAD_SURFACE                   0x300D\n#define EGL_BLUE_SIZE                     0x3022\n#define EGL_BUFFER_SIZE                   0x3020\n#define EGL_CONFIG_CAVEAT                 0x3027\n#define EGL_CONFIG_ID                     0x3028\n#define EGL_CORE_NATIVE_ENGINE            0x305B\n#define EGL_DEPTH_SIZE                    0x3025\n#define EGL_DONT_CARE                     ((EGLint)-1)\n#define EGL_DRAW                          0x3059\n#define EGL_EXTENSIONS                    0x3055\n#define EGL_FALSE                         0\n#define EGL_GREEN_SIZE                    0x3023\n#define EGL_HEIGHT                        0x3056\n#define EGL_LARGEST_PBUFFER               0x3058\n#define EGL_LEVEL                         0x3029\n#define EGL_MAX_PBUFFER_HEIGHT            0x302A\n#define EGL_MAX_PBUFFER_PIXELS            0x302B\n#define EGL_MAX_PBUFFER_WIDTH             0x302C\n#define EGL_NATIVE_RENDERABLE             0x302D\n#define EGL_NATIVE_VISUAL_ID              0x302E\n#define EGL_NATIVE_VISUAL_TYPE            0x302F\n#define EGL_NONE                          0x3038\n#define EGL_NON_CONFORMANT_CONFIG         0x3051\n#define EGL_NOT_INITIALIZED               0x3001\n#define EGL_NO_CONTEXT                    ((EGLContext)0)\n#define EGL_NO_DISPLAY                    ((EGLDisplay)0)\n#define EGL_NO_SURFACE                    ((EGLSurface)0)\n#define EGL_PBUFFER_BIT                   0x0001\n#define EGL_PIXMAP_BIT                    0x0002\n#define EGL_READ                          0x305A\n#define EGL_RED_SIZE                      0x3024\n#define EGL_SAMPLES                       0x3031\n#define EGL_SAMPLE_BUFFERS                0x3032\n#define EGL_SLOW_CONFIG                   0x3050\n#define EGL_STENCIL_SIZE                  0x3026\n#define EGL_SUCCESS                       0x3000\n#define EGL_SURFACE_TYPE                  0x3033\n#define EGL_TRANSPARENT_BLUE_VALUE        0x3035\n#define EGL_TRANSPARENT_GREEN_VALUE       0x3036\n#define EGL_TRANSPARENT_RED_VALUE         0x3037\n#define EGL_TRANSPARENT_RGB               0x3052\n#define EGL_TRANSPARENT_TYPE              0x3034\n#define EGL_TRUE                          1\n#define EGL_VENDOR                        0x3053\n#define EGL_VERSION                       0x3054\n#define EGL_WIDTH                         0x3057\n#define EGL_WINDOW_BIT                    0x0004\nEGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);\nEGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);\nEGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);\nEGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);\nEGLAPI EGLint EGLAPIENTRY eglGetError (void);\nEGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);\nEGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);\nEGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);\nEGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);\nEGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);\n#endif /* EGL_VERSION_1_0 */\n\n#ifndef EGL_VERSION_1_1\n#define EGL_VERSION_1_1 1\n#define EGL_BACK_BUFFER                   0x3084\n#define EGL_BIND_TO_TEXTURE_RGB           0x3039\n#define EGL_BIND_TO_TEXTURE_RGBA          0x303A\n#define EGL_CONTEXT_LOST                  0x300E\n#define EGL_MIN_SWAP_INTERVAL             0x303B\n#define EGL_MAX_SWAP_INTERVAL             0x303C\n#define EGL_MIPMAP_TEXTURE                0x3082\n#define EGL_MIPMAP_LEVEL                  0x3083\n#define EGL_NO_TEXTURE                    0x305C\n#define EGL_TEXTURE_2D                    0x305F\n#define EGL_TEXTURE_FORMAT                0x3080\n#define EGL_TEXTURE_RGB                   0x305D\n#define EGL_TEXTURE_RGBA                  0x305E\n#define EGL_TEXTURE_TARGET                0x3081\nEGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);\nEGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);\nEGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);\n#endif /* EGL_VERSION_1_1 */\n\n#ifndef EGL_VERSION_1_2\n#define EGL_VERSION_1_2 1\ntypedef unsigned int EGLenum;\ntypedef void *EGLClientBuffer;\n#define EGL_ALPHA_FORMAT                  0x3088\n#define EGL_ALPHA_FORMAT_NONPRE           0x308B\n#define EGL_ALPHA_FORMAT_PRE              0x308C\n#define EGL_ALPHA_MASK_SIZE               0x303E\n#define EGL_BUFFER_PRESERVED              0x3094\n#define EGL_BUFFER_DESTROYED              0x3095\n#define EGL_CLIENT_APIS                   0x308D\n#define EGL_COLORSPACE                    0x3087\n#define EGL_COLORSPACE_sRGB               0x3089\n#define EGL_COLORSPACE_LINEAR             0x308A\n#define EGL_COLOR_BUFFER_TYPE             0x303F\n#define EGL_CONTEXT_CLIENT_TYPE           0x3097\n#define EGL_DISPLAY_SCALING               10000\n#define EGL_HORIZONTAL_RESOLUTION         0x3090\n#define EGL_LUMINANCE_BUFFER              0x308F\n#define EGL_LUMINANCE_SIZE                0x303D\n#define EGL_OPENGL_ES_BIT                 0x0001\n#define EGL_OPENVG_BIT                    0x0002\n#define EGL_OPENGL_ES_API                 0x30A0\n#define EGL_OPENVG_API                    0x30A1\n#define EGL_OPENVG_IMAGE                  0x3096\n#define EGL_PIXEL_ASPECT_RATIO            0x3092\n#define EGL_RENDERABLE_TYPE               0x3040\n#define EGL_RENDER_BUFFER                 0x3086\n#define EGL_RGB_BUFFER                    0x308E\n#define EGL_SINGLE_BUFFER                 0x3085\n#define EGL_SWAP_BEHAVIOR                 0x3093\n#define EGL_UNKNOWN                       ((EGLint)-1)\n#define EGL_VERTICAL_RESOLUTION           0x3091\nEGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);\nEGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);\n#endif /* EGL_VERSION_1_2 */\n\n#ifndef EGL_VERSION_1_3\n#define EGL_VERSION_1_3 1\n#define EGL_CONFORMANT                    0x3042\n#define EGL_CONTEXT_CLIENT_VERSION        0x3098\n#define EGL_MATCH_NATIVE_PIXMAP           0x3041\n#define EGL_OPENGL_ES2_BIT                0x0004\n#define EGL_VG_ALPHA_FORMAT               0x3088\n#define EGL_VG_ALPHA_FORMAT_NONPRE        0x308B\n#define EGL_VG_ALPHA_FORMAT_PRE           0x308C\n#define EGL_VG_ALPHA_FORMAT_PRE_BIT       0x0040\n#define EGL_VG_COLORSPACE                 0x3087\n#define EGL_VG_COLORSPACE_sRGB            0x3089\n#define EGL_VG_COLORSPACE_LINEAR          0x308A\n#define EGL_VG_COLORSPACE_LINEAR_BIT      0x0020\n#endif /* EGL_VERSION_1_3 */\n\n#ifndef EGL_VERSION_1_4\n#define EGL_VERSION_1_4 1\n#define EGL_DEFAULT_DISPLAY               ((EGLNativeDisplayType)0)\n#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT   0x0200\n#define EGL_MULTISAMPLE_RESOLVE           0x3099\n#define EGL_MULTISAMPLE_RESOLVE_DEFAULT   0x309A\n#define EGL_MULTISAMPLE_RESOLVE_BOX       0x309B\n#define EGL_OPENGL_API                    0x30A2\n#define EGL_OPENGL_BIT                    0x0008\n#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT   0x0400\nEGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);\n#endif /* EGL_VERSION_1_4 */\n\n#ifndef EGL_VERSION_1_5\n#define EGL_VERSION_1_5 1\ntypedef void *EGLSync;\ntypedef intptr_t EGLAttrib;\ntypedef khronos_utime_nanoseconds_t EGLTime;\ntypedef void *EGLImage;\n#define EGL_CONTEXT_MAJOR_VERSION         0x3098\n#define EGL_CONTEXT_MINOR_VERSION         0x30FB\n#define EGL_CONTEXT_OPENGL_PROFILE_MASK   0x30FD\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD\n#define EGL_NO_RESET_NOTIFICATION         0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET         0x31BF\n#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001\n#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define EGL_CONTEXT_OPENGL_DEBUG          0x31B0\n#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS  0x31B2\n#define EGL_OPENGL_ES3_BIT                0x00000040\n#define EGL_CL_EVENT_HANDLE               0x309C\n#define EGL_SYNC_CL_EVENT                 0x30FE\n#define EGL_SYNC_CL_EVENT_COMPLETE        0x30FF\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE  0x30F0\n#define EGL_SYNC_TYPE                     0x30F7\n#define EGL_SYNC_STATUS                   0x30F1\n#define EGL_SYNC_CONDITION                0x30F8\n#define EGL_SIGNALED                      0x30F2\n#define EGL_UNSIGNALED                    0x30F3\n#define EGL_SYNC_FLUSH_COMMANDS_BIT       0x0001\n#define EGL_FOREVER                       0xFFFFFFFFFFFFFFFFull\n#define EGL_TIMEOUT_EXPIRED               0x30F5\n#define EGL_CONDITION_SATISFIED           0x30F6\n#define EGL_NO_SYNC                       ((EGLSync)0)\n#define EGL_SYNC_FENCE                    0x30F9\n#define EGL_GL_COLORSPACE                 0x309D\n#define EGL_GL_COLORSPACE_SRGB            0x3089\n#define EGL_GL_COLORSPACE_LINEAR          0x308A\n#define EGL_GL_RENDERBUFFER               0x30B9\n#define EGL_GL_TEXTURE_2D                 0x30B1\n#define EGL_GL_TEXTURE_LEVEL              0x30BC\n#define EGL_GL_TEXTURE_3D                 0x30B2\n#define EGL_GL_TEXTURE_ZOFFSET            0x30BD\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8\n#define EGL_IMAGE_PRESERVED               0x30D2\n#define EGL_NO_IMAGE                      ((EGLImage)0)\nEGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);\nEGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);\n#endif /* EGL_VERSION_1_5 */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __egl_h_ */\n\n\n\n#ifndef __eglext_h_\n#define __eglext_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2015 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $\n*/\n\n/*#include <EGL/eglplatform.h>*/\n\n#define EGL_EGLEXT_VERSION 20150623\n\n/* Generated C header for:\n * API: egl\n * Versions considered: .*\n * Versions emitted: _nomatch_^\n * Default extensions included: egl\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef EGL_KHR_cl_event\n#define EGL_KHR_cl_event 1\n#define EGL_CL_EVENT_HANDLE_KHR           0x309C\n#define EGL_SYNC_CL_EVENT_KHR             0x30FE\n#define EGL_SYNC_CL_EVENT_COMPLETE_KHR    0x30FF\n#endif /* EGL_KHR_cl_event */\n\n#ifndef EGL_KHR_cl_event2\n#define EGL_KHR_cl_event2 1\ntypedef void *EGLSyncKHR;\ntypedef intptr_t EGLAttribKHR;\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);\n#endif\n#endif /* EGL_KHR_cl_event2 */\n\n#ifndef EGL_KHR_client_get_all_proc_addresses\n#define EGL_KHR_client_get_all_proc_addresses 1\n#endif /* EGL_KHR_client_get_all_proc_addresses */\n\n#ifndef EGL_KHR_config_attribs\n#define EGL_KHR_config_attribs 1\n#define EGL_CONFORMANT_KHR                0x3042\n#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR  0x0020\n#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR   0x0040\n#endif /* EGL_KHR_config_attribs */\n\n#ifndef EGL_KHR_create_context\n#define EGL_KHR_create_context 1\n#define EGL_CONTEXT_MAJOR_VERSION_KHR     0x3098\n#define EGL_CONTEXT_MINOR_VERSION_KHR     0x30FB\n#define EGL_CONTEXT_FLAGS_KHR             0x30FC\n#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD\n#define EGL_NO_RESET_NOTIFICATION_KHR     0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET_KHR     0x31BF\n#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR  0x00000001\n#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004\n#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001\n#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002\n#define EGL_OPENGL_ES3_BIT_KHR            0x00000040\n#endif /* EGL_KHR_create_context */\n\n#ifndef EGL_KHR_create_context_no_error\n#define EGL_KHR_create_context_no_error 1\n#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR   0x31B3\n#endif /* EGL_KHR_create_context_no_error */\n\n#ifndef EGL_KHR_fence_sync\n#define EGL_KHR_fence_sync 1\ntypedef khronos_utime_nanoseconds_t EGLTimeKHR;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0\n#define EGL_SYNC_CONDITION_KHR            0x30F8\n#define EGL_SYNC_FENCE_KHR                0x30F9\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);\ntypedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_fence_sync */\n\n#ifndef EGL_KHR_get_all_proc_addresses\n#define EGL_KHR_get_all_proc_addresses 1\n#endif /* EGL_KHR_get_all_proc_addresses */\n\n#ifndef EGL_KHR_gl_colorspace\n#define EGL_KHR_gl_colorspace 1\n#define EGL_GL_COLORSPACE_KHR             0x309D\n#define EGL_GL_COLORSPACE_SRGB_KHR        0x3089\n#define EGL_GL_COLORSPACE_LINEAR_KHR      0x308A\n#endif /* EGL_KHR_gl_colorspace */\n\n#ifndef EGL_KHR_gl_renderbuffer_image\n#define EGL_KHR_gl_renderbuffer_image 1\n#define EGL_GL_RENDERBUFFER_KHR           0x30B9\n#endif /* EGL_KHR_gl_renderbuffer_image */\n\n#ifndef EGL_KHR_gl_texture_2D_image\n#define EGL_KHR_gl_texture_2D_image 1\n#define EGL_GL_TEXTURE_2D_KHR             0x30B1\n#define EGL_GL_TEXTURE_LEVEL_KHR          0x30BC\n#endif /* EGL_KHR_gl_texture_2D_image */\n\n#ifndef EGL_KHR_gl_texture_3D_image\n#define EGL_KHR_gl_texture_3D_image 1\n#define EGL_GL_TEXTURE_3D_KHR             0x30B2\n#define EGL_GL_TEXTURE_ZOFFSET_KHR        0x30BD\n#endif /* EGL_KHR_gl_texture_3D_image */\n\n#ifndef EGL_KHR_gl_texture_cubemap_image\n#define EGL_KHR_gl_texture_cubemap_image 1\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8\n#endif /* EGL_KHR_gl_texture_cubemap_image */\n\n#ifndef EGL_KHR_image\n#define EGL_KHR_image 1\ntypedef void *EGLImageKHR;\n#define EGL_NATIVE_PIXMAP_KHR             0x30B0\n#define EGL_NO_IMAGE_KHR                  ((EGLImageKHR)0)\ntypedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);\n#endif\n#endif /* EGL_KHR_image */\n\n#ifndef EGL_KHR_image_base\n#define EGL_KHR_image_base 1\n#define EGL_IMAGE_PRESERVED_KHR           0x30D2\n#endif /* EGL_KHR_image_base */\n\n#ifndef EGL_KHR_image_pixmap\n#define EGL_KHR_image_pixmap 1\n#endif /* EGL_KHR_image_pixmap */\n\n#ifndef EGL_KHR_lock_surface\n#define EGL_KHR_lock_surface 1\n#define EGL_READ_SURFACE_BIT_KHR          0x0001\n#define EGL_WRITE_SURFACE_BIT_KHR         0x0002\n#define EGL_LOCK_SURFACE_BIT_KHR          0x0080\n#define EGL_OPTIMAL_FORMAT_BIT_KHR        0x0100\n#define EGL_MATCH_FORMAT_KHR              0x3043\n#define EGL_FORMAT_RGB_565_EXACT_KHR      0x30C0\n#define EGL_FORMAT_RGB_565_KHR            0x30C1\n#define EGL_FORMAT_RGBA_8888_EXACT_KHR    0x30C2\n#define EGL_FORMAT_RGBA_8888_KHR          0x30C3\n#define EGL_MAP_PRESERVE_PIXELS_KHR       0x30C4\n#define EGL_LOCK_USAGE_HINT_KHR           0x30C5\n#define EGL_BITMAP_POINTER_KHR            0x30C6\n#define EGL_BITMAP_PITCH_KHR              0x30C7\n#define EGL_BITMAP_ORIGIN_KHR             0x30C8\n#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR   0x30C9\n#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA\n#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR  0x30CB\n#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC\n#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD\n#define EGL_LOWER_LEFT_KHR                0x30CE\n#define EGL_UPPER_LEFT_KHR                0x30CF\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);\n#endif\n#endif /* EGL_KHR_lock_surface */\n\n#ifndef EGL_KHR_lock_surface2\n#define EGL_KHR_lock_surface2 1\n#define EGL_BITMAP_PIXEL_SIZE_KHR         0x3110\n#endif /* EGL_KHR_lock_surface2 */\n\n#ifndef EGL_KHR_lock_surface3\n#define EGL_KHR_lock_surface3 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);\n#endif\n#endif /* EGL_KHR_lock_surface3 */\n\n#ifndef EGL_KHR_partial_update\n#define EGL_KHR_partial_update 1\n#define EGL_BUFFER_AGE_KHR                0x313D\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_KHR_partial_update */\n\n#ifndef EGL_KHR_platform_android\n#define EGL_KHR_platform_android 1\n#define EGL_PLATFORM_ANDROID_KHR          0x3141\n#endif /* EGL_KHR_platform_android */\n\n#ifndef EGL_KHR_platform_gbm\n#define EGL_KHR_platform_gbm 1\n#define EGL_PLATFORM_GBM_KHR              0x31D7\n#endif /* EGL_KHR_platform_gbm */\n\n#ifndef EGL_KHR_platform_wayland\n#define EGL_KHR_platform_wayland 1\n#define EGL_PLATFORM_WAYLAND_KHR          0x31D8\n#endif /* EGL_KHR_platform_wayland */\n\n#ifndef EGL_KHR_platform_x11\n#define EGL_KHR_platform_x11 1\n#define EGL_PLATFORM_X11_KHR              0x31D5\n#define EGL_PLATFORM_X11_SCREEN_KHR       0x31D6\n#endif /* EGL_KHR_platform_x11 */\n\n#ifndef EGL_KHR_reusable_sync\n#define EGL_KHR_reusable_sync 1\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_STATUS_KHR               0x30F1\n#define EGL_SIGNALED_KHR                  0x30F2\n#define EGL_UNSIGNALED_KHR                0x30F3\n#define EGL_TIMEOUT_EXPIRED_KHR           0x30F5\n#define EGL_CONDITION_SATISFIED_KHR       0x30F6\n#define EGL_SYNC_TYPE_KHR                 0x30F7\n#define EGL_SYNC_REUSABLE_KHR             0x30FA\n#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR   0x0001\n#define EGL_FOREVER_KHR                   0xFFFFFFFFFFFFFFFFull\n#define EGL_NO_SYNC_KHR                   ((EGLSyncKHR)0)\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_reusable_sync */\n\n#ifndef EGL_KHR_stream\n#define EGL_KHR_stream 1\ntypedef void *EGLStreamKHR;\ntypedef khronos_uint64_t EGLuint64KHR;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_NO_STREAM_KHR                 ((EGLStreamKHR)0)\n#define EGL_CONSUMER_LATENCY_USEC_KHR     0x3210\n#define EGL_PRODUCER_FRAME_KHR            0x3212\n#define EGL_CONSUMER_FRAME_KHR            0x3213\n#define EGL_STREAM_STATE_KHR              0x3214\n#define EGL_STREAM_STATE_CREATED_KHR      0x3215\n#define EGL_STREAM_STATE_CONNECTING_KHR   0x3216\n#define EGL_STREAM_STATE_EMPTY_KHR        0x3217\n#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218\n#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219\n#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A\n#define EGL_BAD_STREAM_KHR                0x321B\n#define EGL_BAD_STATE_KHR                 0x321C\ntypedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_stream */\n\n#ifndef EGL_KHR_stream_consumer_gltexture\n#define EGL_KHR_stream_consumer_gltexture 1\n#ifdef EGL_KHR_stream\n#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_consumer_gltexture */\n\n#ifndef EGL_KHR_stream_cross_process_fd\n#define EGL_KHR_stream_cross_process_fd 1\ntypedef int EGLNativeFileDescriptorKHR;\n#ifdef EGL_KHR_stream\n#define EGL_NO_FILE_DESCRIPTOR_KHR        ((EGLNativeFileDescriptorKHR)(-1))\ntypedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_cross_process_fd */\n\n#ifndef EGL_KHR_stream_fifo\n#define EGL_KHR_stream_fifo 1\n#ifdef EGL_KHR_stream\n#define EGL_STREAM_FIFO_LENGTH_KHR        0x31FC\n#define EGL_STREAM_TIME_NOW_KHR           0x31FD\n#define EGL_STREAM_TIME_CONSUMER_KHR      0x31FE\n#define EGL_STREAM_TIME_PRODUCER_KHR      0x31FF\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_fifo */\n\n#ifndef EGL_KHR_stream_producer_aldatalocator\n#define EGL_KHR_stream_producer_aldatalocator 1\n#ifdef EGL_KHR_stream\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_producer_aldatalocator */\n\n#ifndef EGL_KHR_stream_producer_eglsurface\n#define EGL_KHR_stream_producer_eglsurface 1\n#ifdef EGL_KHR_stream\n#define EGL_STREAM_BIT_KHR                0x0800\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_producer_eglsurface */\n\n#ifndef EGL_KHR_surfaceless_context\n#define EGL_KHR_surfaceless_context 1\n#endif /* EGL_KHR_surfaceless_context */\n\n#ifndef EGL_KHR_swap_buffers_with_damage\n#define EGL_KHR_swap_buffers_with_damage 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_KHR_swap_buffers_with_damage */\n\n#ifndef EGL_KHR_vg_parent_image\n#define EGL_KHR_vg_parent_image 1\n#define EGL_VG_PARENT_IMAGE_KHR           0x30BA\n#endif /* EGL_KHR_vg_parent_image */\n\n#ifndef EGL_KHR_wait_sync\n#define EGL_KHR_wait_sync 1\ntypedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);\n#endif\n#endif /* EGL_KHR_wait_sync */\n\n#ifndef EGL_ANDROID_blob_cache\n#define EGL_ANDROID_blob_cache 1\ntypedef khronos_ssize_t EGLsizeiANDROID;\ntypedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);\ntypedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);\ntypedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);\n#endif\n#endif /* EGL_ANDROID_blob_cache */\n\n#ifndef EGL_ANDROID_framebuffer_target\n#define EGL_ANDROID_framebuffer_target 1\n#define EGL_FRAMEBUFFER_TARGET_ANDROID    0x3147\n#endif /* EGL_ANDROID_framebuffer_target */\n\n#ifndef EGL_ANDROID_image_native_buffer\n#define EGL_ANDROID_image_native_buffer 1\n#define EGL_NATIVE_BUFFER_ANDROID         0x3140\n#endif /* EGL_ANDROID_image_native_buffer */\n\n#ifndef EGL_ANDROID_native_fence_sync\n#define EGL_ANDROID_native_fence_sync 1\n#define EGL_SYNC_NATIVE_FENCE_ANDROID     0x3144\n#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID  0x3145\n#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146\n#define EGL_NO_NATIVE_FENCE_FD_ANDROID    -1\ntypedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);\n#endif\n#endif /* EGL_ANDROID_native_fence_sync */\n\n#ifndef EGL_ANDROID_recordable\n#define EGL_ANDROID_recordable 1\n#define EGL_RECORDABLE_ANDROID            0x3142\n#endif /* EGL_ANDROID_recordable */\n\n#ifndef EGL_ANGLE_d3d_share_handle_client_buffer\n#define EGL_ANGLE_d3d_share_handle_client_buffer 1\n#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200\n#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */\n\n#ifndef EGL_ANGLE_device_d3d\n#define EGL_ANGLE_device_d3d 1\n#define EGL_D3D9_DEVICE_ANGLE             0x33A0\n#define EGL_D3D11_DEVICE_ANGLE            0x33A1\n#endif /* EGL_ANGLE_device_d3d */\n\n#ifndef EGL_ANGLE_query_surface_pointer\n#define EGL_ANGLE_query_surface_pointer 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);\n#endif\n#endif /* EGL_ANGLE_query_surface_pointer */\n\n#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle\n#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1\n#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */\n\n#ifndef EGL_ANGLE_window_fixed_size\n#define EGL_ANGLE_window_fixed_size 1\n#define EGL_FIXED_SIZE_ANGLE              0x3201\n#endif /* EGL_ANGLE_window_fixed_size */\n\n#ifndef EGL_ARM_pixmap_multisample_discard\n#define EGL_ARM_pixmap_multisample_discard 1\n#define EGL_DISCARD_SAMPLES_ARM           0x3286\n#endif /* EGL_ARM_pixmap_multisample_discard */\n\n#ifndef EGL_EXT_buffer_age\n#define EGL_EXT_buffer_age 1\n#define EGL_BUFFER_AGE_EXT                0x313D\n#endif /* EGL_EXT_buffer_age */\n\n#ifndef EGL_EXT_client_extensions\n#define EGL_EXT_client_extensions 1\n#endif /* EGL_EXT_client_extensions */\n\n#ifndef EGL_EXT_create_context_robustness\n#define EGL_EXT_create_context_robustness 1\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138\n#define EGL_NO_RESET_NOTIFICATION_EXT     0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET_EXT     0x31BF\n#endif /* EGL_EXT_create_context_robustness */\n\n#ifndef EGL_EXT_device_base\n#define EGL_EXT_device_base 1\ntypedef void *EGLDeviceEXT;\n#define EGL_NO_DEVICE_EXT                 ((EGLDeviceEXT)(0))\n#define EGL_BAD_DEVICE_EXT                0x322B\n#define EGL_DEVICE_EXT                    0x322C\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);\n#endif\n#endif /* EGL_EXT_device_base */\n\n#ifndef EGL_EXT_device_drm\n#define EGL_EXT_device_drm 1\n#define EGL_DRM_DEVICE_FILE_EXT           0x3233\n#endif /* EGL_EXT_device_drm */\n\n#ifndef EGL_EXT_device_enumeration\n#define EGL_EXT_device_enumeration 1\n#endif /* EGL_EXT_device_enumeration */\n\n#ifndef EGL_EXT_device_openwf\n#define EGL_EXT_device_openwf 1\n#define EGL_OPENWF_DEVICE_ID_EXT          0x3237\n#endif /* EGL_EXT_device_openwf */\n\n#ifndef EGL_EXT_device_query\n#define EGL_EXT_device_query 1\n#endif /* EGL_EXT_device_query */\n\n#ifndef EGL_EXT_image_dma_buf_import\n#define EGL_EXT_image_dma_buf_import 1\n#define EGL_LINUX_DMA_BUF_EXT             0x3270\n#define EGL_LINUX_DRM_FOURCC_EXT          0x3271\n#define EGL_DMA_BUF_PLANE0_FD_EXT         0x3272\n#define EGL_DMA_BUF_PLANE0_OFFSET_EXT     0x3273\n#define EGL_DMA_BUF_PLANE0_PITCH_EXT      0x3274\n#define EGL_DMA_BUF_PLANE1_FD_EXT         0x3275\n#define EGL_DMA_BUF_PLANE1_OFFSET_EXT     0x3276\n#define EGL_DMA_BUF_PLANE1_PITCH_EXT      0x3277\n#define EGL_DMA_BUF_PLANE2_FD_EXT         0x3278\n#define EGL_DMA_BUF_PLANE2_OFFSET_EXT     0x3279\n#define EGL_DMA_BUF_PLANE2_PITCH_EXT      0x327A\n#define EGL_YUV_COLOR_SPACE_HINT_EXT      0x327B\n#define EGL_SAMPLE_RANGE_HINT_EXT         0x327C\n#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D\n#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E\n#define EGL_ITU_REC601_EXT                0x327F\n#define EGL_ITU_REC709_EXT                0x3280\n#define EGL_ITU_REC2020_EXT               0x3281\n#define EGL_YUV_FULL_RANGE_EXT            0x3282\n#define EGL_YUV_NARROW_RANGE_EXT          0x3283\n#define EGL_YUV_CHROMA_SITING_0_EXT       0x3284\n#define EGL_YUV_CHROMA_SITING_0_5_EXT     0x3285\n#endif /* EGL_EXT_image_dma_buf_import */\n\n#ifndef EGL_EXT_multiview_window\n#define EGL_EXT_multiview_window 1\n#define EGL_MULTIVIEW_VIEW_COUNT_EXT      0x3134\n#endif /* EGL_EXT_multiview_window */\n\n#ifndef EGL_EXT_output_base\n#define EGL_EXT_output_base 1\ntypedef void *EGLOutputLayerEXT;\ntypedef void *EGLOutputPortEXT;\n#define EGL_NO_OUTPUT_LAYER_EXT           ((EGLOutputLayerEXT)0)\n#define EGL_NO_OUTPUT_PORT_EXT            ((EGLOutputPortEXT)0)\n#define EGL_BAD_OUTPUT_LAYER_EXT          0x322D\n#define EGL_BAD_OUTPUT_PORT_EXT           0x322E\n#define EGL_SWAP_INTERVAL_EXT             0x322F\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);\nEGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);\n#endif\n#endif /* EGL_EXT_output_base */\n\n#ifndef EGL_EXT_output_drm\n#define EGL_EXT_output_drm 1\n#define EGL_DRM_CRTC_EXT                  0x3234\n#define EGL_DRM_PLANE_EXT                 0x3235\n#define EGL_DRM_CONNECTOR_EXT             0x3236\n#endif /* EGL_EXT_output_drm */\n\n#ifndef EGL_EXT_output_openwf\n#define EGL_EXT_output_openwf 1\n#define EGL_OPENWF_PIPELINE_ID_EXT        0x3238\n#define EGL_OPENWF_PORT_ID_EXT            0x3239\n#endif /* EGL_EXT_output_openwf */\n\n#ifndef EGL_EXT_platform_base\n#define EGL_EXT_platform_base 1\ntypedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);\n#endif\n#endif /* EGL_EXT_platform_base */\n\n#ifndef EGL_EXT_platform_device\n#define EGL_EXT_platform_device 1\n#define EGL_PLATFORM_DEVICE_EXT           0x313F\n#endif /* EGL_EXT_platform_device */\n\n#ifndef EGL_EXT_platform_wayland\n#define EGL_EXT_platform_wayland 1\n#define EGL_PLATFORM_WAYLAND_EXT          0x31D8\n#endif /* EGL_EXT_platform_wayland */\n\n#ifndef EGL_EXT_platform_x11\n#define EGL_EXT_platform_x11 1\n#define EGL_PLATFORM_X11_EXT              0x31D5\n#define EGL_PLATFORM_X11_SCREEN_EXT       0x31D6\n#endif /* EGL_EXT_platform_x11 */\n\n#ifndef EGL_EXT_protected_surface\n#define EGL_EXT_protected_surface 1\n#define EGL_PROTECTED_CONTENT_EXT         0x32C0\n#endif /* EGL_EXT_protected_surface */\n\n#ifndef EGL_EXT_stream_consumer_egloutput\n#define EGL_EXT_stream_consumer_egloutput 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);\n#endif\n#endif /* EGL_EXT_stream_consumer_egloutput */\n\n#ifndef EGL_EXT_swap_buffers_with_damage\n#define EGL_EXT_swap_buffers_with_damage 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_EXT_swap_buffers_with_damage */\n\n#ifndef EGL_EXT_yuv_surface\n#define EGL_EXT_yuv_surface 1\n#define EGL_YUV_ORDER_EXT                 0x3301\n#define EGL_YUV_NUMBER_OF_PLANES_EXT      0x3311\n#define EGL_YUV_SUBSAMPLE_EXT             0x3312\n#define EGL_YUV_DEPTH_RANGE_EXT           0x3317\n#define EGL_YUV_CSC_STANDARD_EXT          0x330A\n#define EGL_YUV_PLANE_BPP_EXT             0x331A\n#define EGL_YUV_BUFFER_EXT                0x3300\n#define EGL_YUV_ORDER_YUV_EXT             0x3302\n#define EGL_YUV_ORDER_YVU_EXT             0x3303\n#define EGL_YUV_ORDER_YUYV_EXT            0x3304\n#define EGL_YUV_ORDER_UYVY_EXT            0x3305\n#define EGL_YUV_ORDER_YVYU_EXT            0x3306\n#define EGL_YUV_ORDER_VYUY_EXT            0x3307\n#define EGL_YUV_ORDER_AYUV_EXT            0x3308\n#define EGL_YUV_SUBSAMPLE_4_2_0_EXT       0x3313\n#define EGL_YUV_SUBSAMPLE_4_2_2_EXT       0x3314\n#define EGL_YUV_SUBSAMPLE_4_4_4_EXT       0x3315\n#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT   0x3318\n#define EGL_YUV_DEPTH_RANGE_FULL_EXT      0x3319\n#define EGL_YUV_CSC_STANDARD_601_EXT      0x330B\n#define EGL_YUV_CSC_STANDARD_709_EXT      0x330C\n#define EGL_YUV_CSC_STANDARD_2020_EXT     0x330D\n#define EGL_YUV_PLANE_BPP_0_EXT           0x331B\n#define EGL_YUV_PLANE_BPP_8_EXT           0x331C\n#define EGL_YUV_PLANE_BPP_10_EXT          0x331D\n#endif /* EGL_EXT_yuv_surface */\n\n#ifndef EGL_HI_clientpixmap\n#define EGL_HI_clientpixmap 1\nstruct EGLClientPixmapHI {\n    void  *pData;\n    EGLint iWidth;\n    EGLint iHeight;\n    EGLint iStride;\n};\n#define EGL_CLIENT_PIXMAP_POINTER_HI      0x8F74\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);\n#endif\n#endif /* EGL_HI_clientpixmap */\n\n#ifndef EGL_HI_colorformats\n#define EGL_HI_colorformats 1\n#define EGL_COLOR_FORMAT_HI               0x8F70\n#define EGL_COLOR_RGB_HI                  0x8F71\n#define EGL_COLOR_RGBA_HI                 0x8F72\n#define EGL_COLOR_ARGB_HI                 0x8F73\n#endif /* EGL_HI_colorformats */\n\n#ifndef EGL_IMG_context_priority\n#define EGL_IMG_context_priority 1\n#define EGL_CONTEXT_PRIORITY_LEVEL_IMG    0x3100\n#define EGL_CONTEXT_PRIORITY_HIGH_IMG     0x3101\n#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG   0x3102\n#define EGL_CONTEXT_PRIORITY_LOW_IMG      0x3103\n#endif /* EGL_IMG_context_priority */\n\n#ifndef EGL_MESA_drm_image\n#define EGL_MESA_drm_image 1\n#define EGL_DRM_BUFFER_FORMAT_MESA        0x31D0\n#define EGL_DRM_BUFFER_USE_MESA           0x31D1\n#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2\n#define EGL_DRM_BUFFER_MESA               0x31D3\n#define EGL_DRM_BUFFER_STRIDE_MESA        0x31D4\n#define EGL_DRM_BUFFER_USE_SCANOUT_MESA   0x00000001\n#define EGL_DRM_BUFFER_USE_SHARE_MESA     0x00000002\ntypedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);\n#endif\n#endif /* EGL_MESA_drm_image */\n\n#ifndef EGL_MESA_image_dma_buf_export\n#define EGL_MESA_image_dma_buf_export 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);\n#endif\n#endif /* EGL_MESA_image_dma_buf_export */\n\n#ifndef EGL_MESA_platform_gbm\n#define EGL_MESA_platform_gbm 1\n#define EGL_PLATFORM_GBM_MESA             0x31D7\n#endif /* EGL_MESA_platform_gbm */\n\n#ifndef EGL_NOK_swap_region\n#define EGL_NOK_swap_region 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#endif\n#endif /* EGL_NOK_swap_region */\n\n#ifndef EGL_NOK_swap_region2\n#define EGL_NOK_swap_region2 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#endif\n#endif /* EGL_NOK_swap_region2 */\n\n#ifndef EGL_NOK_texture_from_pixmap\n#define EGL_NOK_texture_from_pixmap 1\n#define EGL_Y_INVERTED_NOK                0x307F\n#endif /* EGL_NOK_texture_from_pixmap */\n\n#ifndef EGL_NV_3dvision_surface\n#define EGL_NV_3dvision_surface 1\n#define EGL_AUTO_STEREO_NV                0x3136\n#endif /* EGL_NV_3dvision_surface */\n\n#ifndef EGL_NV_coverage_sample\n#define EGL_NV_coverage_sample 1\n#define EGL_COVERAGE_BUFFERS_NV           0x30E0\n#define EGL_COVERAGE_SAMPLES_NV           0x30E1\n#endif /* EGL_NV_coverage_sample */\n\n#ifndef EGL_NV_coverage_sample_resolve\n#define EGL_NV_coverage_sample_resolve 1\n#define EGL_COVERAGE_SAMPLE_RESOLVE_NV    0x3131\n#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132\n#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133\n#endif /* EGL_NV_coverage_sample_resolve */\n\n#ifndef EGL_NV_cuda_event\n#define EGL_NV_cuda_event 1\n#define EGL_CUDA_EVENT_HANDLE_NV          0x323B\n#define EGL_SYNC_CUDA_EVENT_NV            0x323C\n#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV   0x323D\n#endif /* EGL_NV_cuda_event */\n\n#ifndef EGL_NV_depth_nonlinear\n#define EGL_NV_depth_nonlinear 1\n#define EGL_DEPTH_ENCODING_NV             0x30E2\n#define EGL_DEPTH_ENCODING_NONE_NV        0\n#define EGL_DEPTH_ENCODING_NONLINEAR_NV   0x30E3\n#endif /* EGL_NV_depth_nonlinear */\n\n#ifndef EGL_NV_device_cuda\n#define EGL_NV_device_cuda 1\n#define EGL_CUDA_DEVICE_NV                0x323A\n#endif /* EGL_NV_device_cuda */\n\n#ifndef EGL_NV_native_query\n#define EGL_NV_native_query 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);\n#endif\n#endif /* EGL_NV_native_query */\n\n#ifndef EGL_NV_post_convert_rounding\n#define EGL_NV_post_convert_rounding 1\n#endif /* EGL_NV_post_convert_rounding */\n\n#ifndef EGL_NV_post_sub_buffer\n#define EGL_NV_post_sub_buffer 1\n#define EGL_POST_SUB_BUFFER_SUPPORTED_NV  0x30BE\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);\n#endif\n#endif /* EGL_NV_post_sub_buffer */\n\n#ifndef EGL_NV_stream_sync\n#define EGL_NV_stream_sync 1\n#define EGL_SYNC_NEW_FRAME_NV             0x321F\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);\n#endif\n#endif /* EGL_NV_stream_sync */\n\n#ifndef EGL_NV_sync\n#define EGL_NV_sync 1\ntypedef void *EGLSyncNV;\ntypedef khronos_utime_nanoseconds_t EGLTimeNV;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6\n#define EGL_SYNC_STATUS_NV                0x30E7\n#define EGL_SIGNALED_NV                   0x30E8\n#define EGL_UNSIGNALED_NV                 0x30E9\n#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV    0x0001\n#define EGL_FOREVER_NV                    0xFFFFFFFFFFFFFFFFull\n#define EGL_ALREADY_SIGNALED_NV           0x30EA\n#define EGL_TIMEOUT_EXPIRED_NV            0x30EB\n#define EGL_CONDITION_SATISFIED_NV        0x30EC\n#define EGL_SYNC_TYPE_NV                  0x30ED\n#define EGL_SYNC_CONDITION_NV             0x30EE\n#define EGL_SYNC_FENCE_NV                 0x30EF\n#define EGL_NO_SYNC_NV                    ((EGLSyncNV)0)\ntypedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);\ntypedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);\nEGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_NV_sync */\n\n#ifndef EGL_NV_system_time\n#define EGL_NV_system_time 1\ntypedef khronos_utime_nanoseconds_t EGLuint64NV;\n#ifdef KHRONOS_SUPPORT_INT64\ntypedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);\ntypedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);\nEGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_NV_system_time */\n\n#ifndef EGL_TIZEN_image_native_buffer\n#define EGL_TIZEN_image_native_buffer 1\n#define EGL_NATIVE_BUFFER_TIZEN           0x32A0\n#endif /* EGL_TIZEN_image_native_buffer */\n\n#ifndef EGL_TIZEN_image_native_surface\n#define EGL_TIZEN_image_native_surface 1\n#define EGL_NATIVE_SURFACE_TIZEN          0x32A1\n#endif /* EGL_TIZEN_image_native_surface */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __eglext_h_ */\n\n\n#endif /* _MSC_VER */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_endian.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_endian.h\n *\n *  Functions for reading and writing endian-specific values\n */\n\n#ifndef SDL_endian_h_\n#define SDL_endian_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\name The two types of endianness\n */\n/* @{ */\n#define SDL_LIL_ENDIAN  1234\n#define SDL_BIG_ENDIAN  4321\n/* @} */\n\n#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */\n#ifdef __linux__\n#include <endian.h>\n#define SDL_BYTEORDER  __BYTE_ORDER\n#else /* __linux__ */\n#if defined(__hppa__) || \\\n    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \\\n    (defined(__MIPS__) && defined(__MISPEB__)) || \\\n    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \\\n    defined(__sparc__)\n#define SDL_BYTEORDER   SDL_BIG_ENDIAN\n#else\n#define SDL_BYTEORDER   SDL_LIL_ENDIAN\n#endif\n#endif /* __linux__ */\n#endif /* !SDL_BYTEORDER */\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_endian.h\n */\n#if defined(__GNUC__) && defined(__i386__) && \\\n   !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"xchgb %b0,%h0\": \"=q\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"xchgb %b0,%h0\": \"=Q\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n    int result;\n\n  __asm__(\"rlwimi %0,%2,8,16,23\": \"=&r\"(result):\"0\"(x >> 8), \"r\"(x));\n    return (Uint16)result;\n}\n#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"rorw #8,%0\": \"=d\"(x): \"0\"(x):\"cc\");\n    return x;\n}\n#elif defined(__WATCOMC__) && defined(__386__)\nextern _inline Uint16 SDL_Swap16(Uint16);\n#pragma aux SDL_Swap16 = \\\n  \"xchg al, ah\" \\\n  parm   [ax]   \\\n  modify [ax];\n#else\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n    return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));\n}\n#endif\n\n#if defined(__GNUC__) && defined(__i386__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"bswap %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"bswapl %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n    Uint32 result;\n\n  __asm__(\"rlwimi %0,%2,24,16,23\": \"=&r\"(result):\"0\"(x >> 24), \"r\"(x));\n  __asm__(\"rlwimi %0,%2,8,8,15\": \"=&r\"(result):\"0\"(result), \"r\"(x));\n  __asm__(\"rlwimi %0,%2,24,0,7\": \"=&r\"(result):\"0\"(result), \"r\"(x));\n    return result;\n}\n#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"rorw #8,%0\\n\\tswap %0\\n\\trorw #8,%0\": \"=d\"(x): \"0\"(x):\"cc\");\n    return x;\n}\n#elif defined(__WATCOMC__) && defined(__386__)\nextern _inline Uint32 SDL_Swap32(Uint32);\n#ifndef __SW_3 /* 486+ */\n#pragma aux SDL_Swap32 = \\\n  \"bswap eax\"  \\\n  parm   [eax] \\\n  modify [eax];\n#else  /* 386-only */\n#pragma aux SDL_Swap32 = \\\n  \"xchg al, ah\"  \\\n  \"ror  eax, 16\" \\\n  \"xchg al, ah\"  \\\n  parm   [eax]   \\\n  modify [eax];\n#endif\n#else\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n    return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |\n                                    ((x >> 8) & 0x0000FF00) | (x >> 24)));\n}\n#endif\n\n#if defined(__GNUC__) && defined(__i386__)\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n    union\n    {\n        struct\n        {\n            Uint32 a, b;\n        } s;\n        Uint64 u;\n    } v;\n    v.u = x;\n  __asm__(\"bswapl %0 ; bswapl %1 ; xchgl %0,%1\": \"=r\"(v.s.a), \"=r\"(v.s.b):\"0\"(v.s.a),\n            \"1\"(v.s.\n                b));\n    return v.u;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n  __asm__(\"bswapq %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#else\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n    Uint32 hi, lo;\n\n    /* Separate into high and low 32-bit values and swap them */\n    lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);\n    x >>= 32;\n    hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);\n    x = SDL_Swap32(lo);\n    x <<= 32;\n    x |= SDL_Swap32(hi);\n    return (x);\n}\n#endif\n\n\nSDL_FORCE_INLINE float\nSDL_SwapFloat(float x)\n{\n    union\n    {\n        float f;\n        Uint32 ui32;\n    } swapper;\n    swapper.f = x;\n    swapper.ui32 = SDL_Swap32(swapper.ui32);\n    return swapper.f;\n}\n\n\n/**\n *  \\name Swap to native\n *  Byteswap item from the specified endianness to the native endianness.\n */\n/* @{ */\n#if SDL_BYTEORDER == SDL_LIL_ENDIAN\n#define SDL_SwapLE16(X) (X)\n#define SDL_SwapLE32(X) (X)\n#define SDL_SwapLE64(X) (X)\n#define SDL_SwapFloatLE(X)  (X)\n#define SDL_SwapBE16(X) SDL_Swap16(X)\n#define SDL_SwapBE32(X) SDL_Swap32(X)\n#define SDL_SwapBE64(X) SDL_Swap64(X)\n#define SDL_SwapFloatBE(X)  SDL_SwapFloat(X)\n#else\n#define SDL_SwapLE16(X) SDL_Swap16(X)\n#define SDL_SwapLE32(X) SDL_Swap32(X)\n#define SDL_SwapLE64(X) SDL_Swap64(X)\n#define SDL_SwapFloatLE(X)  SDL_SwapFloat(X)\n#define SDL_SwapBE16(X) (X)\n#define SDL_SwapBE32(X) (X)\n#define SDL_SwapBE64(X) (X)\n#define SDL_SwapFloatBE(X)  (X)\n#endif\n/* @} *//* Swap to native */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_endian_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_error.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_error.h\n *\n *  Simple error message routines for SDL.\n */\n\n#ifndef SDL_error_h_\n#define SDL_error_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Public functions */\n/* SDL_SetError() unconditionally returns -1. */\nextern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\nextern DECLSPEC const char *SDLCALL SDL_GetError(void);\nextern DECLSPEC void SDLCALL SDL_ClearError(void);\n\n/**\n *  \\name Internal error functions\n *\n *  \\internal\n *  Private error reporting function - used internally.\n */\n/* @{ */\n#define SDL_OutOfMemory()   SDL_Error(SDL_ENOMEM)\n#define SDL_Unsupported()   SDL_Error(SDL_UNSUPPORTED)\n#define SDL_InvalidParamError(param)    SDL_SetError(\"Parameter '%s' is invalid\", (param))\ntypedef enum\n{\n    SDL_ENOMEM,\n    SDL_EFREAD,\n    SDL_EFWRITE,\n    SDL_EFSEEK,\n    SDL_UNSUPPORTED,\n    SDL_LASTERROR\n} SDL_errorcode;\n/* SDL_Error() unconditionally returns -1. */\nextern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);\n/* @} *//* Internal error functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_error_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_events.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_events.h\n *\n *  Include file for SDL event handling.\n */\n\n#ifndef SDL_events_h_\n#define SDL_events_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n#include \"SDL_keyboard.h\"\n#include \"SDL_mouse.h\"\n#include \"SDL_joystick.h\"\n#include \"SDL_gamecontroller.h\"\n#include \"SDL_quit.h\"\n#include \"SDL_gesture.h\"\n#include \"SDL_touch.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* General keyboard/mouse state definitions */\n#define SDL_RELEASED    0\n#define SDL_PRESSED 1\n\n/**\n * \\brief The types of events that can be delivered.\n */\ntypedef enum\n{\n    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */\n\n    /* Application events */\n    SDL_QUIT           = 0x100, /**< User-requested quit */\n\n    /* These application events have special meaning on iOS, see README-ios.md for details */\n    SDL_APP_TERMINATING,        /**< The application is being terminated by the OS\n                                     Called on iOS in applicationWillTerminate()\n                                     Called on Android in onDestroy()\n                                */\n    SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.\n                                     Called on iOS in applicationDidReceiveMemoryWarning()\n                                     Called on Android in onLowMemory()\n                                */\n    SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background\n                                     Called on iOS in applicationWillResignActive()\n                                     Called on Android in onPause()\n                                */\n    SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time\n                                     Called on iOS in applicationDidEnterBackground()\n                                     Called on Android in onPause()\n                                */\n    SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground\n                                     Called on iOS in applicationWillEnterForeground()\n                                     Called on Android in onResume()\n                                */\n    SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive\n                                     Called on iOS in applicationDidBecomeActive()\n                                     Called on Android in onResume()\n                                */\n\n    /* Display events */\n    SDL_DISPLAYEVENT   = 0x150,  /**< Display state change */\n\n    /* Window events */\n    SDL_WINDOWEVENT    = 0x200, /**< Window state change */\n    SDL_SYSWMEVENT,             /**< System specific event */\n\n    /* Keyboard events */\n    SDL_KEYDOWN        = 0x300, /**< Key pressed */\n    SDL_KEYUP,                  /**< Key released */\n    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */\n    SDL_TEXTINPUT,              /**< Keyboard text input */\n    SDL_KEYMAPCHANGED,          /**< Keymap changed due to a system event such as an\n                                     input language or keyboard layout change.\n                                */\n\n    /* Mouse events */\n    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */\n    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */\n    SDL_MOUSEBUTTONUP,          /**< Mouse button released */\n    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */\n\n    /* Joystick events */\n    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */\n    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */\n    SDL_JOYHATMOTION,           /**< Joystick hat position change */\n    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */\n    SDL_JOYBUTTONUP,            /**< Joystick button released */\n    SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */\n    SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */\n\n    /* Game controller events */\n    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */\n    SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */\n    SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */\n    SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */\n    SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */\n    SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */\n\n    /* Touch events */\n    SDL_FINGERDOWN      = 0x700,\n    SDL_FINGERUP,\n    SDL_FINGERMOTION,\n\n    /* Gesture events */\n    SDL_DOLLARGESTURE   = 0x800,\n    SDL_DOLLARRECORD,\n    SDL_MULTIGESTURE,\n\n    /* Clipboard events */\n    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */\n\n    /* Drag and drop events */\n    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */\n    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */\n    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */\n    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */\n\n    /* Audio hotplug events */\n    SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */\n    SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */\n\n    /* Sensor events */\n    SDL_SENSORUPDATE = 0x1200,     /**< A sensor was updated */\n\n    /* Render events */\n    SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */\n    SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */\n\n    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,\n     *  and should be allocated with SDL_RegisterEvents()\n     */\n    SDL_USEREVENT    = 0x8000,\n\n    /**\n     *  This last event is only for bounding internal arrays\n     */\n    SDL_LASTEVENT    = 0xFFFF\n} SDL_EventType;\n\n/**\n *  \\brief Fields shared by every event\n */\ntypedef struct SDL_CommonEvent\n{\n    Uint32 type;\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_CommonEvent;\n\n/**\n *  \\brief Display state change event data (event.display.*)\n */\ntypedef struct SDL_DisplayEvent\n{\n    Uint32 type;        /**< ::SDL_DISPLAYEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 display;     /**< The associated display index */\n    Uint8 event;        /**< ::SDL_DisplayEventID */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint32 data1;       /**< event dependent data */\n} SDL_DisplayEvent;\n\n/**\n *  \\brief Window state change event data (event.window.*)\n */\ntypedef struct SDL_WindowEvent\n{\n    Uint32 type;        /**< ::SDL_WINDOWEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The associated window */\n    Uint8 event;        /**< ::SDL_WindowEventID */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint32 data1;       /**< event dependent data */\n    Sint32 data2;       /**< event dependent data */\n} SDL_WindowEvent;\n\n/**\n *  \\brief Keyboard button event structure (event.key.*)\n */\ntypedef struct SDL_KeyboardEvent\n{\n    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with keyboard focus, if any */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 repeat;       /**< Non-zero if this is a key repeat */\n    Uint8 padding2;\n    Uint8 padding3;\n    SDL_Keysym keysym;  /**< The key that was pressed or released */\n} SDL_KeyboardEvent;\n\n#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)\n/**\n *  \\brief Keyboard text editing event structure (event.edit.*)\n */\ntypedef struct SDL_TextEditingEvent\n{\n    Uint32 type;                                /**< ::SDL_TEXTEDITING */\n    Uint32 timestamp;                           /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;                            /**< The window with keyboard focus, if any */\n    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */\n    Sint32 start;                               /**< The start cursor of selected editing text */\n    Sint32 length;                              /**< The length of selected editing text */\n} SDL_TextEditingEvent;\n\n\n#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)\n/**\n *  \\brief Keyboard text input event structure (event.text.*)\n */\ntypedef struct SDL_TextInputEvent\n{\n    Uint32 type;                              /**< ::SDL_TEXTINPUT */\n    Uint32 timestamp;                         /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;                          /**< The window with keyboard focus, if any */\n    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */\n} SDL_TextInputEvent;\n\n/**\n *  \\brief Mouse motion event structure (event.motion.*)\n */\ntypedef struct SDL_MouseMotionEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Uint32 state;       /**< The current button state */\n    Sint32 x;           /**< X coordinate, relative to window */\n    Sint32 y;           /**< Y coordinate, relative to window */\n    Sint32 xrel;        /**< The relative motion in the X direction */\n    Sint32 yrel;        /**< The relative motion in the Y direction */\n} SDL_MouseMotionEvent;\n\n/**\n *  \\brief Mouse button event structure (event.button.*)\n */\ntypedef struct SDL_MouseButtonEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Uint8 button;       /**< The mouse button index */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 clicks;       /**< 1 for single-click, 2 for double-click, etc. */\n    Uint8 padding1;\n    Sint32 x;           /**< X coordinate, relative to window */\n    Sint32 y;           /**< Y coordinate, relative to window */\n} SDL_MouseButtonEvent;\n\n/**\n *  \\brief Mouse wheel event structure (event.wheel.*)\n */\ntypedef struct SDL_MouseWheelEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEWHEEL */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Sint32 x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */\n    Sint32 y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */\n    Uint32 direction;   /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */\n} SDL_MouseWheelEvent;\n\n/**\n *  \\brief Joystick axis motion event structure (event.jaxis.*)\n */\ntypedef struct SDL_JoyAxisEvent\n{\n    Uint32 type;        /**< ::SDL_JOYAXISMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 axis;         /**< The joystick axis index */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 value;       /**< The axis value (range: -32768 to 32767) */\n    Uint16 padding4;\n} SDL_JoyAxisEvent;\n\n/**\n *  \\brief Joystick trackball motion event structure (event.jball.*)\n */\ntypedef struct SDL_JoyBallEvent\n{\n    Uint32 type;        /**< ::SDL_JOYBALLMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 ball;         /**< The joystick trackball index */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 xrel;        /**< The relative motion in the X direction */\n    Sint16 yrel;        /**< The relative motion in the Y direction */\n} SDL_JoyBallEvent;\n\n/**\n *  \\brief Joystick hat position change event structure (event.jhat.*)\n */\ntypedef struct SDL_JoyHatEvent\n{\n    Uint32 type;        /**< ::SDL_JOYHATMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 hat;          /**< The joystick hat index */\n    Uint8 value;        /**< The hat position value.\n                         *   \\sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP\n                         *   \\sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT\n                         *   \\sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN\n                         *\n                         *   Note that zero means the POV is centered.\n                         */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_JoyHatEvent;\n\n/**\n *  \\brief Joystick button event structure (event.jbutton.*)\n */\ntypedef struct SDL_JoyButtonEvent\n{\n    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 button;       /**< The joystick button index */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_JoyButtonEvent;\n\n/**\n *  \\brief Joystick device event structure (event.jdevice.*)\n */\ntypedef struct SDL_JoyDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED event */\n} SDL_JoyDeviceEvent;\n\n\n/**\n *  \\brief Game controller axis motion event structure (event.caxis.*)\n */\ntypedef struct SDL_ControllerAxisEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERAXISMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 axis;         /**< The controller axis (SDL_GameControllerAxis) */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 value;       /**< The axis value (range: -32768 to 32767) */\n    Uint16 padding4;\n} SDL_ControllerAxisEvent;\n\n\n/**\n *  \\brief Game controller button event structure (event.cbutton.*)\n */\ntypedef struct SDL_ControllerButtonEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 button;       /**< The controller button (SDL_GameControllerButton) */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_ControllerButtonEvent;\n\n\n/**\n *  \\brief Controller device event structure (event.cdevice.*)\n */\ntypedef struct SDL_ControllerDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */\n} SDL_ControllerDeviceEvent;\n\n/**\n *  \\brief Audio device event structure (event.adevice.*)\n */\ntypedef struct SDL_AudioDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 which;       /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */\n    Uint8 iscapture;    /**< zero if an output device, non-zero if a capture device. */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n} SDL_AudioDeviceEvent;\n\n\n/**\n *  \\brief Touch finger event structure (event.tfinger.*)\n */\ntypedef struct SDL_TouchFingerEvent\n{\n    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    SDL_FingerID fingerId;\n    float x;            /**< Normalized in the range 0...1 */\n    float y;            /**< Normalized in the range 0...1 */\n    float dx;           /**< Normalized in the range -1...1 */\n    float dy;           /**< Normalized in the range -1...1 */\n    float pressure;     /**< Normalized in the range 0...1 */\n} SDL_TouchFingerEvent;\n\n\n/**\n *  \\brief Multiple Finger Gesture Event (event.mgesture.*)\n */\ntypedef struct SDL_MultiGestureEvent\n{\n    Uint32 type;        /**< ::SDL_MULTIGESTURE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    float dTheta;\n    float dDist;\n    float x;\n    float y;\n    Uint16 numFingers;\n    Uint16 padding;\n} SDL_MultiGestureEvent;\n\n\n/**\n * \\brief Dollar Gesture Event (event.dgesture.*)\n */\ntypedef struct SDL_DollarGestureEvent\n{\n    Uint32 type;        /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    SDL_GestureID gestureId;\n    Uint32 numFingers;\n    float error;\n    float x;            /**< Normalized center of gesture */\n    float y;            /**< Normalized center of gesture */\n} SDL_DollarGestureEvent;\n\n\n/**\n *  \\brief An event used to request a file open by the system (event.drop.*)\n *         This event is enabled by default, you can disable it with SDL_EventState().\n *  \\note If this event is enabled, you must free the filename in the event.\n */\ntypedef struct SDL_DropEvent\n{\n    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */\n    Uint32 windowID;    /**< The window that was dropped on, if any */\n} SDL_DropEvent;\n\n\n/**\n *  \\brief Sensor event structure (event.sensor.*)\n */\ntypedef struct SDL_SensorEvent\n{\n    Uint32 type;        /**< ::SDL_SENSORUPDATE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The instance ID of the sensor */\n    float data[6];      /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */\n} SDL_SensorEvent;\n\n/**\n *  \\brief The \"quit requested\" event\n */\ntypedef struct SDL_QuitEvent\n{\n    Uint32 type;        /**< ::SDL_QUIT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_QuitEvent;\n\n/**\n *  \\brief OS Specific event\n */\ntypedef struct SDL_OSEvent\n{\n    Uint32 type;        /**< ::SDL_QUIT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_OSEvent;\n\n/**\n *  \\brief A user-defined event type (event.user.*)\n */\ntypedef struct SDL_UserEvent\n{\n    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The associated window if any */\n    Sint32 code;        /**< User defined event code */\n    void *data1;        /**< User defined data pointer */\n    void *data2;        /**< User defined data pointer */\n} SDL_UserEvent;\n\n\nstruct SDL_SysWMmsg;\ntypedef struct SDL_SysWMmsg SDL_SysWMmsg;\n\n/**\n *  \\brief A video driver dependent system event (event.syswm.*)\n *         This event is disabled by default, you can enable it with SDL_EventState()\n *\n *  \\note If you want to use this event, you should include SDL_syswm.h.\n */\ntypedef struct SDL_SysWMEvent\n{\n    Uint32 type;        /**< ::SDL_SYSWMEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */\n} SDL_SysWMEvent;\n\n/**\n *  \\brief General event structure\n */\ntypedef union SDL_Event\n{\n    Uint32 type;                    /**< Event type, shared with all events */\n    SDL_CommonEvent common;         /**< Common event data */\n    SDL_DisplayEvent display;       /**< Window event data */\n    SDL_WindowEvent window;         /**< Window event data */\n    SDL_KeyboardEvent key;          /**< Keyboard event data */\n    SDL_TextEditingEvent edit;      /**< Text editing event data */\n    SDL_TextInputEvent text;        /**< Text input event data */\n    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */\n    SDL_MouseButtonEvent button;    /**< Mouse button event data */\n    SDL_MouseWheelEvent wheel;      /**< Mouse wheel event data */\n    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */\n    SDL_JoyBallEvent jball;         /**< Joystick ball event data */\n    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */\n    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */\n    SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */\n    SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */\n    SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */\n    SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */\n    SDL_AudioDeviceEvent adevice;   /**< Audio device event data */\n    SDL_SensorEvent sensor;         /**< Sensor event data */\n    SDL_QuitEvent quit;             /**< Quit request event data */\n    SDL_UserEvent user;             /**< Custom event data */\n    SDL_SysWMEvent syswm;           /**< System dependent window event data */\n    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */\n    SDL_MultiGestureEvent mgesture; /**< Gesture event data */\n    SDL_DollarGestureEvent dgesture; /**< Gesture event data */\n    SDL_DropEvent drop;             /**< Drag and drop event data */\n\n    /* This is necessary for ABI compatibility between Visual C++ and GCC\n       Visual C++ will respect the push pack pragma and use 52 bytes for\n       this structure, and GCC will use the alignment of the largest datatype\n       within the union, which is 8 bytes.\n\n       So... we'll add padding to force the size to be 56 bytes for both.\n    */\n    Uint8 padding[56];\n} SDL_Event;\n\n/* Make sure we haven't broken binary compatibility */\nSDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);\n\n\n/* Function prototypes */\n\n/**\n *  Pumps the event loop, gathering events from the input devices.\n *\n *  This function updates the event queue and internal input device state.\n *\n *  This should only be run in the thread that sets the video mode.\n */\nextern DECLSPEC void SDLCALL SDL_PumpEvents(void);\n\n/* @{ */\ntypedef enum\n{\n    SDL_ADDEVENT,\n    SDL_PEEKEVENT,\n    SDL_GETEVENT\n} SDL_eventaction;\n\n/**\n *  Checks the event queue for messages and optionally returns them.\n *\n *  If \\c action is ::SDL_ADDEVENT, up to \\c numevents events will be added to\n *  the back of the event queue.\n *\n *  If \\c action is ::SDL_PEEKEVENT, up to \\c numevents events at the front\n *  of the event queue, within the specified minimum and maximum type,\n *  will be returned and will not be removed from the queue.\n *\n *  If \\c action is ::SDL_GETEVENT, up to \\c numevents events at the front\n *  of the event queue, within the specified minimum and maximum type,\n *  will be returned and will be removed from the queue.\n *\n *  \\return The number of events actually stored, or -1 if there was an error.\n *\n *  This function is thread-safe.\n */\nextern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,\n                                           SDL_eventaction action,\n                                           Uint32 minType, Uint32 maxType);\n/* @} */\n\n/**\n *  Checks to see if certain event types are in the event queue.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);\nextern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);\n\n/**\n *  This function clears events from the event queue\n *  This function only affects currently queued events. If you want to make\n *  sure that all pending OS events are flushed, you can call SDL_PumpEvents()\n *  on the main thread immediately before the flush call.\n */\nextern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);\nextern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);\n\n/**\n *  \\brief Polls for currently pending events.\n *\n *  \\return 1 if there are any pending events, or 0 if there are none available.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n */\nextern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);\n\n/**\n *  \\brief Waits indefinitely for the next available event.\n *\n *  \\return 1, or 0 if there was an error while waiting for events.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n */\nextern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);\n\n/**\n *  \\brief Waits until the specified timeout (in milliseconds) for the next\n *         available event.\n *\n *  \\return 1, or 0 if there was an error while waiting for events.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n *  \\param timeout The timeout (in milliseconds) to wait for next event.\n */\nextern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,\n                                                 int timeout);\n\n/**\n *  \\brief Add an event to the event queue.\n *\n *  \\return 1 on success, 0 if the event was filtered, or -1 if the event queue\n *          was full or there was some other error.\n */\nextern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);\n\ntypedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);\n\n/**\n *  Sets up a filter to process all events before they change internal state and\n *  are posted to the internal event queue.\n *\n *  The filter is prototyped as:\n *  \\code\n *      int SDL_EventFilter(void *userdata, SDL_Event * event);\n *  \\endcode\n *\n *  If the filter returns 1, then the event will be added to the internal queue.\n *  If it returns 0, then the event will be dropped from the queue, but the\n *  internal state will still be updated.  This allows selective filtering of\n *  dynamically arriving events.\n *\n *  \\warning  Be very careful of what you do in the event filter function, as\n *            it may run in a different thread!\n *\n *  There is one caveat when dealing with the ::SDL_QuitEvent event type.  The\n *  event filter is only called when the window manager desires to close the\n *  application window.  If the event filter returns 1, then the window will\n *  be closed, otherwise the window will remain open if possible.\n *\n *  If the quit event is generated by an interrupt signal, it will bypass the\n *  internal queue and be delivered to the application at the next event poll.\n */\nextern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,\n                                                void *userdata);\n\n/**\n *  Return the current event filter - can be used to \"chain\" filters.\n *  If there is no event filter set, this function returns SDL_FALSE.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,\n                                                    void **userdata);\n\n/**\n *  Add a function which is called when an event is added to the queue.\n */\nextern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,\n                                               void *userdata);\n\n/**\n *  Remove an event watch function added with SDL_AddEventWatch()\n */\nextern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,\n                                               void *userdata);\n\n/**\n *  Run the filter function on the current event queue, removing any\n *  events for which the filter returns 0.\n */\nextern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,\n                                              void *userdata);\n\n/* @{ */\n#define SDL_QUERY   -1\n#define SDL_IGNORE   0\n#define SDL_DISABLE  0\n#define SDL_ENABLE   1\n\n/**\n *  This function allows you to set the state of processing certain events.\n *   - If \\c state is set to ::SDL_IGNORE, that event will be automatically\n *     dropped from the event queue and will not be filtered.\n *   - If \\c state is set to ::SDL_ENABLE, that event will be processed\n *     normally.\n *   - If \\c state is set to ::SDL_QUERY, SDL_EventState() will return the\n *     current processing state of the specified event.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);\n/* @} */\n#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)\n\n/**\n *  This function allocates a set of user-defined events, and returns\n *  the beginning event number for that set of events.\n *\n *  If there aren't enough user-defined events left, this function\n *  returns (Uint32)-1\n */\nextern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_events_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_filesystem.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_filesystem.h\n *\n *  \\brief Include file for filesystem SDL API functions\n */\n\n#ifndef SDL_filesystem_h_\n#define SDL_filesystem_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Get the path where the application resides.\n *\n * Get the \"base path\". This is the directory where the application was run\n *  from, which is probably the installation directory, and may or may not\n *  be the process's current working directory.\n *\n * This returns an absolute path in UTF-8 encoding, and is guaranteed to\n *  end with a path separator ('\\\\' on Windows, '/' most other places).\n *\n * The pointer returned by this function is owned by you. Please call\n *  SDL_free() on the pointer when you are done with it, or it will be a\n *  memory leak. This is not necessarily a fast call, though, so you should\n *  call this once near startup and save the string if you need it.\n *\n * Some platforms can't determine the application's path, and on other\n *  platforms, this might be meaningless. In such cases, this function will\n *  return NULL.\n *\n *  \\return String of base dir in UTF-8 encoding, or NULL on error.\n *\n * \\sa SDL_GetPrefPath\n */\nextern DECLSPEC char *SDLCALL SDL_GetBasePath(void);\n\n/**\n * \\brief Get the user-and-app-specific path where files can be written.\n *\n * Get the \"pref dir\". This is meant to be where users can write personal\n *  files (preferences and save games, etc) that are specific to your\n *  application. This directory is unique per user, per application.\n *\n * This function will decide the appropriate location in the native filesystem,\n *  create the directory if necessary, and return a string of the absolute\n *  path to the directory in UTF-8 encoding.\n *\n * On Windows, the string might look like:\n *  \"C:\\\\Users\\\\bob\\\\AppData\\\\Roaming\\\\My Company\\\\My Program Name\\\\\"\n *\n * On Linux, the string might look like:\n *  \"/home/bob/.local/share/My Program Name/\"\n *\n * On Mac OS X, the string might look like:\n *  \"/Users/bob/Library/Application Support/My Program Name/\"\n *\n * (etc.)\n *\n * You specify the name of your organization (if it's not a real organization,\n *  your name or an Internet domain you own might do) and the name of your\n *  application. These should be untranslated proper names.\n *\n * Both the org and app strings may become part of a directory name, so\n *  please follow these rules:\n *\n *    - Try to use the same org string (including case-sensitivity) for\n *      all your applications that use this function.\n *    - Always use a unique app string for each one, and make sure it never\n *      changes for an app once you've decided on it.\n *    - Unicode characters are legal, as long as it's UTF-8 encoded, but...\n *    - ...only use letters, numbers, and spaces. Avoid punctuation like\n *      \"Game Name 2: Bad Guy's Revenge!\" ... \"Game Name 2\" is sufficient.\n *\n * This returns an absolute path in UTF-8 encoding, and is guaranteed to\n *  end with a path separator ('\\\\' on Windows, '/' most other places).\n *\n * The pointer returned by this function is owned by you. Please call\n *  SDL_free() on the pointer when you are done with it, or it will be a\n *  memory leak. This is not necessarily a fast call, though, so you should\n *  call this once near startup and save the string if you need it.\n *\n * You should assume the path returned by this function is the only safe\n *  place to write files (and that SDL_GetBasePath(), while it might be\n *  writable, or even the parent of the returned path, aren't where you\n *  should be writing things).\n *\n * Some platforms can't determine the pref path, and on other\n *  platforms, this might be meaningless. In such cases, this function will\n *  return NULL.\n *\n *   \\param org The name of your organization.\n *   \\param app The name of your application.\n *  \\return UTF-8 string of user dir in platform-dependent notation. NULL\n *          if there's a problem (creating directory failed, etc).\n *\n * \\sa SDL_GetBasePath\n */\nextern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_filesystem_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_gamecontroller.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_gamecontroller.h\n *\n *  Include file for SDL game controller event handling\n */\n\n#ifndef SDL_gamecontroller_h_\n#define SDL_gamecontroller_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_rwops.h\"\n#include \"SDL_joystick.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_gamecontroller.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_GAMECONTROLLER flag.  This causes SDL to scan the system\n *  for game controllers, and load appropriate drivers.\n *\n *  If you would like to receive controller updates while the application\n *  is in the background, you should set the following hint before calling\n *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS\n */\n\n/**\n * The gamecontroller structure used to identify an SDL game controller\n */\nstruct _SDL_GameController;\ntypedef struct _SDL_GameController SDL_GameController;\n\n\ntypedef enum\n{\n    SDL_CONTROLLER_BINDTYPE_NONE = 0,\n    SDL_CONTROLLER_BINDTYPE_BUTTON,\n    SDL_CONTROLLER_BINDTYPE_AXIS,\n    SDL_CONTROLLER_BINDTYPE_HAT\n} SDL_GameControllerBindType;\n\n/**\n *  Get the SDL joystick layer binding for this controller button/axis mapping\n */\ntypedef struct SDL_GameControllerButtonBind\n{\n    SDL_GameControllerBindType bindType;\n    union\n    {\n        int button;\n        int axis;\n        struct {\n            int hat;\n            int hat_mask;\n        } hat;\n    } value;\n\n} SDL_GameControllerButtonBind;\n\n\n/**\n *  To count the number of game controllers in the system for the following:\n *  int nJoysticks = SDL_NumJoysticks();\n *  int nGameControllers = 0;\n *  for (int i = 0; i < nJoysticks; i++) {\n *      if (SDL_IsGameController(i)) {\n *          nGameControllers++;\n *      }\n *  }\n *\n *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:\n *  guid,name,mappings\n *\n *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.\n *  Under Windows there is a reserved GUID of \"xinput\" that covers any XInput devices.\n *  The mapping format for joystick is:\n *      bX - a joystick button, index X\n *      hX.Y - hat X with value Y\n *      aX - axis X of the joystick\n *  Buttons can be used as a controller axis and vice versa.\n *\n *  This string shows an example of a valid mapping for a controller\n *  \"03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7\",\n *\n */\n\n/**\n *  Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()\n *  A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt\n *\n *  If \\c freerw is non-zero, the stream will be closed after being read.\n * \n * \\return number of mappings added, -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);\n\n/**\n *  Load a set of mappings from a file, filtered by the current SDL_GetPlatform()\n *\n *  Convenience macro.\n */\n#define SDL_GameControllerAddMappingsFromFile(file)   SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, \"rb\"), 1)\n\n/**\n *  Add or update an existing mapping configuration\n *\n * \\return 1 if mapping is added, 0 if updated, -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);\n\n/**\n *  Get the number of mappings installed\n *\n *  \\return the number of mappings\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);\n\n/**\n *  Get the mapping at a particular index.\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if the index is out of range.\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);\n\n/**\n *  Get a mapping string for a GUID\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);\n\n/**\n *  Get a mapping string for an open GameController\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);\n\n/**\n *  Is the joystick on this index supported by the game controller interface?\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);\n\n/**\n *  Get the implementation dependent name of a game controller.\n *  This can be called before any controllers are opened.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);\n\n/**\n *  Get the mapping of a game controller.\n *  This can be called before any controllers are opened.\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);\n\n/**\n *  Open a game controller for use.\n *  The index passed as an argument refers to the N'th game controller on the system.\n *  This index is not the value which will identify this controller in future\n *  controller events.  The joystick's instance id (::SDL_JoystickID) will be\n *  used there instead.\n *\n *  \\return A controller identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);\n\n/**\n * Return the SDL_GameController associated with an instance id.\n */\nextern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);\n\n/**\n *  Return the name for this currently opened controller\n */\nextern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);\n\n/**\n *  Get the player index of an opened game controller, or -1 if it's not available\n *\n *  For XInput controllers this returns the XInput user index.\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);\n\n/**\n *  Get the USB vendor ID of an opened controller, if available.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);\n\n/**\n *  Get the USB product ID of an opened controller, if available.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);\n\n/**\n *  Get the product version of an opened controller, if available.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);\n\n/**\n *  Returns SDL_TRUE if the controller has been opened and currently connected,\n *  or SDL_FALSE if it has not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);\n\n/**\n *  Get the underlying joystick object used by a controller\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);\n\n/**\n *  Enable/disable controller event polling.\n *\n *  If controller events are disabled, you must call SDL_GameControllerUpdate()\n *  yourself and check the state of the controller when you want controller\n *  information.\n *\n *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);\n\n/**\n *  Update the current state of the open game controllers.\n *\n *  This is called automatically by the event loop if any game controller\n *  events are enabled.\n */\nextern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);\n\n\n/**\n *  The list of axes available from a controller\n *\n *  Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,\n *  and are centered within ~8000 of zero, though advanced UI will allow users to set\n *  or autodetect the dead zone, which varies between controllers.\n *\n *  Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.\n */\ntypedef enum\n{\n    SDL_CONTROLLER_AXIS_INVALID = -1,\n    SDL_CONTROLLER_AXIS_LEFTX,\n    SDL_CONTROLLER_AXIS_LEFTY,\n    SDL_CONTROLLER_AXIS_RIGHTX,\n    SDL_CONTROLLER_AXIS_RIGHTY,\n    SDL_CONTROLLER_AXIS_TRIGGERLEFT,\n    SDL_CONTROLLER_AXIS_TRIGGERRIGHT,\n    SDL_CONTROLLER_AXIS_MAX\n} SDL_GameControllerAxis;\n\n/**\n *  turn this string into a axis mapping\n */\nextern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);\n\n/**\n *  turn this axis enum into a string mapping\n */\nextern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);\n\n/**\n *  Get the SDL joystick layer binding for this controller button mapping\n */\nextern DECLSPEC SDL_GameControllerButtonBind SDLCALL\nSDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,\n                                 SDL_GameControllerAxis axis);\n\n/**\n *  Get the current state of an axis control on a game controller.\n *\n *  The state is a value ranging from -32768 to 32767 (except for the triggers,\n *  which range from 0 to 32767).\n *\n *  The axis indices start at index 0.\n */\nextern DECLSPEC Sint16 SDLCALL\nSDL_GameControllerGetAxis(SDL_GameController *gamecontroller,\n                          SDL_GameControllerAxis axis);\n\n/**\n *  The list of buttons available from a controller\n */\ntypedef enum\n{\n    SDL_CONTROLLER_BUTTON_INVALID = -1,\n    SDL_CONTROLLER_BUTTON_A,\n    SDL_CONTROLLER_BUTTON_B,\n    SDL_CONTROLLER_BUTTON_X,\n    SDL_CONTROLLER_BUTTON_Y,\n    SDL_CONTROLLER_BUTTON_BACK,\n    SDL_CONTROLLER_BUTTON_GUIDE,\n    SDL_CONTROLLER_BUTTON_START,\n    SDL_CONTROLLER_BUTTON_LEFTSTICK,\n    SDL_CONTROLLER_BUTTON_RIGHTSTICK,\n    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,\n    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,\n    SDL_CONTROLLER_BUTTON_DPAD_UP,\n    SDL_CONTROLLER_BUTTON_DPAD_DOWN,\n    SDL_CONTROLLER_BUTTON_DPAD_LEFT,\n    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,\n    SDL_CONTROLLER_BUTTON_MAX\n} SDL_GameControllerButton;\n\n/**\n *  turn this string into a button mapping\n */\nextern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);\n\n/**\n *  turn this button enum into a string mapping\n */\nextern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);\n\n/**\n *  Get the SDL joystick layer binding for this controller button mapping\n */\nextern DECLSPEC SDL_GameControllerButtonBind SDLCALL\nSDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,\n                                   SDL_GameControllerButton button);\n\n\n/**\n *  Get the current state of a button on a game controller.\n *\n *  The button indices start at index 0.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,\n                                                          SDL_GameControllerButton button);\n\n/**\n *  Trigger a rumble effect\n *  Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.\n *\n *  \\param gamecontroller The controller to vibrate\n *  \\param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF\n *  \\param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF\n *  \\param duration_ms The duration of the rumble effect, in milliseconds\n *\n *  \\return 0, or -1 if rumble isn't supported on this joystick\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);\n\n/**\n *  Close a controller previously opened with SDL_GameControllerOpen().\n */\nextern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_gamecontroller_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_gesture.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_gesture.h\n *\n *  Include file for SDL gesture event handling.\n */\n\n#ifndef SDL_gesture_h_\n#define SDL_gesture_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"SDL_touch.h\"\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef Sint64 SDL_GestureID;\n\n/* Function prototypes */\n\n/**\n *  \\brief Begin Recording a gesture on the specified touch, or all touches (-1)\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);\n\n\n/**\n *  \\brief Save all currently loaded Dollar Gesture templates\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);\n\n/**\n *  \\brief Save a currently loaded Dollar Gesture template\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);\n\n\n/**\n *  \\brief Load Dollar Gesture templates from a file\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_gesture_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_haptic.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_haptic.h\n *\n *  \\brief The SDL haptic subsystem allows you to control haptic (force feedback)\n *         devices.\n *\n *  The basic usage is as follows:\n *   - Initialize the subsystem (::SDL_INIT_HAPTIC).\n *   - Open a haptic device.\n *    - SDL_HapticOpen() to open from index.\n *    - SDL_HapticOpenFromJoystick() to open from an existing joystick.\n *   - Create an effect (::SDL_HapticEffect).\n *   - Upload the effect with SDL_HapticNewEffect().\n *   - Run the effect with SDL_HapticRunEffect().\n *   - (optional) Free the effect with SDL_HapticDestroyEffect().\n *   - Close the haptic device with SDL_HapticClose().\n *\n * \\par Simple rumble example:\n * \\code\n *    SDL_Haptic *haptic;\n *\n *    // Open the device\n *    haptic = SDL_HapticOpen( 0 );\n *    if (haptic == NULL)\n *       return -1;\n *\n *    // Initialize simple rumble\n *    if (SDL_HapticRumbleInit( haptic ) != 0)\n *       return -1;\n *\n *    // Play effect at 50% strength for 2 seconds\n *    if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)\n *       return -1;\n *    SDL_Delay( 2000 );\n *\n *    // Clean up\n *    SDL_HapticClose( haptic );\n * \\endcode\n *\n * \\par Complete example:\n * \\code\n * int test_haptic( SDL_Joystick * joystick ) {\n *    SDL_Haptic *haptic;\n *    SDL_HapticEffect effect;\n *    int effect_id;\n *\n *    // Open the device\n *    haptic = SDL_HapticOpenFromJoystick( joystick );\n *    if (haptic == NULL) return -1; // Most likely joystick isn't haptic\n *\n *    // See if it can do sine waves\n *    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {\n *       SDL_HapticClose(haptic); // No sine effect\n *       return -1;\n *    }\n *\n *    // Create the effect\n *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default\n *    effect.type = SDL_HAPTIC_SINE;\n *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates\n *    effect.periodic.direction.dir[0] = 18000; // Force comes from south\n *    effect.periodic.period = 1000; // 1000 ms\n *    effect.periodic.magnitude = 20000; // 20000/32767 strength\n *    effect.periodic.length = 5000; // 5 seconds long\n *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength\n *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away\n *\n *    // Upload the effect\n *    effect_id = SDL_HapticNewEffect( haptic, &effect );\n *\n *    // Test the effect\n *    SDL_HapticRunEffect( haptic, effect_id, 1 );\n *    SDL_Delay( 5000); // Wait for the effect to finish\n *\n *    // We destroy the effect, although closing the device also does this\n *    SDL_HapticDestroyEffect( haptic, effect_id );\n *\n *    // Close the device\n *    SDL_HapticClose(haptic);\n *\n *    return 0; // Success\n * }\n * \\endcode\n */\n\n#ifndef SDL_haptic_h_\n#define SDL_haptic_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_joystick.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).\n *\n * At the moment the magnitude variables are mixed between signed/unsigned, and\n * it is also not made clear that ALL of those variables expect a max of 0x7FFF.\n *\n * Some platforms may have higher precision than that (Linux FF, Windows XInput)\n * so we should fix the inconsistency in favor of higher possible precision,\n * adjusting for platforms that use different scales.\n * -flibit\n */\n\n/**\n *  \\typedef SDL_Haptic\n *\n *  \\brief The haptic structure used to identify an SDL haptic.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticOpenFromJoystick\n *  \\sa SDL_HapticClose\n */\nstruct _SDL_Haptic;\ntypedef struct _SDL_Haptic SDL_Haptic;\n\n\n/**\n *  \\name Haptic features\n *\n *  Different haptic features a device can have.\n */\n/* @{ */\n\n/**\n *  \\name Haptic effects\n */\n/* @{ */\n\n/**\n *  \\brief Constant effect supported.\n *\n *  Constant haptic effect.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_CONSTANT   (1u<<0)\n\n/**\n *  \\brief Sine wave effect supported.\n *\n *  Periodic haptic effect that simulates sine waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SINE       (1u<<1)\n\n/**\n *  \\brief Left/Right effect supported.\n *\n *  Haptic effect for direct control over high/low frequency motors.\n *\n *  \\sa SDL_HapticLeftRight\n * \\warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,\n *          we ran out of bits, and this is important for XInput devices.\n */\n#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)\n\n/* !!! FIXME: put this back when we have more bits in 2.1 */\n/* #define SDL_HAPTIC_SQUARE     (1<<2) */\n\n/**\n *  \\brief Triangle wave effect supported.\n *\n *  Periodic haptic effect that simulates triangular waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_TRIANGLE   (1u<<3)\n\n/**\n *  \\brief Sawtoothup wave effect supported.\n *\n *  Periodic haptic effect that simulates saw tooth up waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)\n\n/**\n *  \\brief Sawtoothdown wave effect supported.\n *\n *  Periodic haptic effect that simulates saw tooth down waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)\n\n/**\n *  \\brief Ramp effect supported.\n *\n *  Ramp haptic effect.\n *\n *  \\sa SDL_HapticRamp\n */\n#define SDL_HAPTIC_RAMP       (1u<<6)\n\n/**\n *  \\brief Spring effect supported - uses axes position.\n *\n *  Condition haptic effect that simulates a spring.  Effect is based on the\n *  axes position.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_SPRING     (1u<<7)\n\n/**\n *  \\brief Damper effect supported - uses axes velocity.\n *\n *  Condition haptic effect that simulates dampening.  Effect is based on the\n *  axes velocity.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_DAMPER     (1u<<8)\n\n/**\n *  \\brief Inertia effect supported - uses axes acceleration.\n *\n *  Condition haptic effect that simulates inertia.  Effect is based on the axes\n *  acceleration.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_INERTIA    (1u<<9)\n\n/**\n *  \\brief Friction effect supported - uses axes movement.\n *\n *  Condition haptic effect that simulates friction.  Effect is based on the\n *  axes movement.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_FRICTION   (1u<<10)\n\n/**\n *  \\brief Custom effect is supported.\n *\n *  User defined custom haptic effect.\n */\n#define SDL_HAPTIC_CUSTOM     (1u<<11)\n\n/* @} *//* Haptic effects */\n\n/* These last few are features the device has, not effects */\n\n/**\n *  \\brief Device can set global gain.\n *\n *  Device supports setting the global gain.\n *\n *  \\sa SDL_HapticSetGain\n */\n#define SDL_HAPTIC_GAIN       (1u<<12)\n\n/**\n *  \\brief Device can set autocenter.\n *\n *  Device supports setting autocenter.\n *\n *  \\sa SDL_HapticSetAutocenter\n */\n#define SDL_HAPTIC_AUTOCENTER (1u<<13)\n\n/**\n *  \\brief Device can be queried for effect status.\n *\n *  Device supports querying effect status.\n *\n *  \\sa SDL_HapticGetEffectStatus\n */\n#define SDL_HAPTIC_STATUS     (1u<<14)\n\n/**\n *  \\brief Device can be paused.\n *\n *  Devices supports being paused.\n *\n *  \\sa SDL_HapticPause\n *  \\sa SDL_HapticUnpause\n */\n#define SDL_HAPTIC_PAUSE      (1u<<15)\n\n\n/**\n * \\name Direction encodings\n */\n/* @{ */\n\n/**\n *  \\brief Uses polar coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_POLAR      0\n\n/**\n *  \\brief Uses cartesian coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_CARTESIAN  1\n\n/**\n *  \\brief Uses spherical coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_SPHERICAL  2\n\n/* @} *//* Direction encodings */\n\n/* @} *//* Haptic features */\n\n/*\n * Misc defines.\n */\n\n/**\n * \\brief Used to play a device an infinite number of times.\n *\n * \\sa SDL_HapticRunEffect\n */\n#define SDL_HAPTIC_INFINITY   4294967295U\n\n\n/**\n *  \\brief Structure that represents a haptic direction.\n *\n *  This is the direction where the force comes from,\n *  instead of the direction in which the force is exerted.\n *\n *  Directions can be specified by:\n *   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.\n *   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.\n *   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.\n *\n *  Cardinal directions of the haptic device are relative to the positioning\n *  of the device.  North is considered to be away from the user.\n *\n *  The following diagram represents the cardinal directions:\n *  \\verbatim\n                 .--.\n                 |__| .-------.\n                 |=.| |.-----.|\n                 |--| ||     ||\n                 |  | |'-----'|\n                 |__|~')_____('\n                   [ COMPUTER ]\n\n\n                     North (0,-1)\n                         ^\n                         |\n                         |\n   (-1,0)  West <----[ HAPTIC ]----> East (1,0)\n                         |\n                         |\n                         v\n                      South (0,1)\n\n\n                      [ USER ]\n                        \\|||/\n                        (o o)\n                  ---ooO-(_)-Ooo---\n    \\endverbatim\n *\n *  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a\n *  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses\n *  the first \\c dir parameter.  The cardinal directions would be:\n *   - North: 0 (0 degrees)\n *   - East: 9000 (90 degrees)\n *   - South: 18000 (180 degrees)\n *   - West: 27000 (270 degrees)\n *\n *  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions\n *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses\n *  the first three \\c dir parameters.  The cardinal directions would be:\n *   - North:  0,-1, 0\n *   - East:   1, 0, 0\n *   - South:  0, 1, 0\n *   - West:  -1, 0, 0\n *\n *  The Z axis represents the height of the effect if supported, otherwise\n *  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you\n *  can use any multiple you want, only the direction matters.\n *\n *  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.\n *  The first two \\c dir parameters are used.  The \\c dir parameters are as\n *  follows (all values are in hundredths of degrees):\n *   - Degrees from (1, 0) rotated towards (0, 1).\n *   - Degrees towards (0, 0, 1) (device needs at least 3 axes).\n *\n *\n *  Example of force coming from the south with all encodings (force coming\n *  from the south means the user will have to pull the stick to counteract):\n *  \\code\n *  SDL_HapticDirection direction;\n *\n *  // Cartesian directions\n *  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.\n *  direction.dir[0] = 0; // X position\n *  direction.dir[1] = 1; // Y position\n *  // Assuming the device has 2 axes, we don't need to specify third parameter.\n *\n *  // Polar directions\n *  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.\n *  direction.dir[0] = 18000; // Polar only uses first parameter\n *\n *  // Spherical coordinates\n *  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding\n *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.\n *  \\endcode\n *\n *  \\sa SDL_HAPTIC_POLAR\n *  \\sa SDL_HAPTIC_CARTESIAN\n *  \\sa SDL_HAPTIC_SPHERICAL\n *  \\sa SDL_HapticEffect\n *  \\sa SDL_HapticNumAxes\n */\ntypedef struct SDL_HapticDirection\n{\n    Uint8 type;         /**< The type of encoding. */\n    Sint32 dir[3];      /**< The encoded direction. */\n} SDL_HapticDirection;\n\n\n/**\n *  \\brief A structure containing a template for a Constant effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.\n *\n *  A constant effect applies a constant force in the specified direction\n *  to the joystick.\n *\n *  \\sa SDL_HAPTIC_CONSTANT\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticConstant\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_CONSTANT */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Constant */\n    Sint16 level;           /**< Strength of the constant effect. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticConstant;\n\n/**\n *  \\brief A structure containing a template for a Periodic effect.\n *\n *  The struct handles the following effects:\n *   - ::SDL_HAPTIC_SINE\n *   - ::SDL_HAPTIC_LEFTRIGHT\n *   - ::SDL_HAPTIC_TRIANGLE\n *   - ::SDL_HAPTIC_SAWTOOTHUP\n *   - ::SDL_HAPTIC_SAWTOOTHDOWN\n *\n *  A periodic effect consists in a wave-shaped effect that repeats itself\n *  over time.  The type determines the shape of the wave and the parameters\n *  determine the dimensions of the wave.\n *\n *  Phase is given by hundredth of a degree meaning that giving the phase a value\n *  of 9000 will displace it 25% of its period.  Here are sample values:\n *   -     0: No phase displacement.\n *   -  9000: Displaced 25% of its period.\n *   - 18000: Displaced 50% of its period.\n *   - 27000: Displaced 75% of its period.\n *   - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.\n *\n *  Examples:\n *  \\verbatim\n    SDL_HAPTIC_SINE\n      __      __      __      __\n     /  \\    /  \\    /  \\    /\n    /    \\__/    \\__/    \\__/\n\n    SDL_HAPTIC_SQUARE\n     __    __    __    __    __\n    |  |  |  |  |  |  |  |  |  |\n    |  |__|  |__|  |__|  |__|  |\n\n    SDL_HAPTIC_TRIANGLE\n      /\\    /\\    /\\    /\\    /\\\n     /  \\  /  \\  /  \\  /  \\  /\n    /    \\/    \\/    \\/    \\/\n\n    SDL_HAPTIC_SAWTOOTHUP\n      /|  /|  /|  /|  /|  /|  /|\n     / | / | / | / | / | / | / |\n    /  |/  |/  |/  |/  |/  |/  |\n\n    SDL_HAPTIC_SAWTOOTHDOWN\n    \\  |\\  |\\  |\\  |\\  |\\  |\\  |\n     \\ | \\ | \\ | \\ | \\ | \\ | \\ |\n      \\|  \\|  \\|  \\|  \\|  \\|  \\|\n    \\endverbatim\n *\n *  \\sa SDL_HAPTIC_SINE\n *  \\sa SDL_HAPTIC_LEFTRIGHT\n *  \\sa SDL_HAPTIC_TRIANGLE\n *  \\sa SDL_HAPTIC_SAWTOOTHUP\n *  \\sa SDL_HAPTIC_SAWTOOTHDOWN\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticPeriodic\n{\n    /* Header */\n    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,\n                             ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or\n                             ::SDL_HAPTIC_SAWTOOTHDOWN */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;      /**< Duration of the effect. */\n    Uint16 delay;       /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;      /**< Button that triggers the effect. */\n    Uint16 interval;    /**< How soon it can be triggered again after button. */\n\n    /* Periodic */\n    Uint16 period;      /**< Period of the wave. */\n    Sint16 magnitude;   /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */\n    Sint16 offset;      /**< Mean value of the wave. */\n    Uint16 phase;       /**< Positive phase shift given by hundredth of a degree. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length; /**< Duration of the fade. */\n    Uint16 fade_level;  /**< Level at the end of the fade. */\n} SDL_HapticPeriodic;\n\n/**\n *  \\brief A structure containing a template for a Condition effect.\n *\n *  The struct handles the following effects:\n *   - ::SDL_HAPTIC_SPRING: Effect based on axes position.\n *   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.\n *   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.\n *   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.\n *\n *  Direction is handled by condition internals instead of a direction member.\n *  The condition effect specific members have three parameters.  The first\n *  refers to the X axis, the second refers to the Y axis and the third\n *  refers to the Z axis.  The right terms refer to the positive side of the\n *  axis and the left terms refer to the negative side of the axis.  Please\n *  refer to the ::SDL_HapticDirection diagram for which side is positive and\n *  which is negative.\n *\n *  \\sa SDL_HapticDirection\n *  \\sa SDL_HAPTIC_SPRING\n *  \\sa SDL_HAPTIC_DAMPER\n *  \\sa SDL_HAPTIC_INERTIA\n *  \\sa SDL_HAPTIC_FRICTION\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticCondition\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,\n                                 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */\n    SDL_HapticDirection direction;  /**< Direction of the effect - Not used ATM. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Condition */\n    Uint16 right_sat[3];    /**< Level when joystick is to the positive side; max 0xFFFF. */\n    Uint16 left_sat[3];     /**< Level when joystick is to the negative side; max 0xFFFF. */\n    Sint16 right_coeff[3];  /**< How fast to increase the force towards the positive side. */\n    Sint16 left_coeff[3];   /**< How fast to increase the force towards the negative side. */\n    Uint16 deadband[3];     /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */\n    Sint16 center[3];       /**< Position of the dead zone. */\n} SDL_HapticCondition;\n\n/**\n *  \\brief A structure containing a template for a Ramp effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.\n *\n *  The ramp effect starts at start strength and ends at end strength.\n *  It augments in linear fashion.  If you use attack and fade with a ramp\n *  the effects get added to the ramp effect making the effect become\n *  quadratic instead of linear.\n *\n *  \\sa SDL_HAPTIC_RAMP\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticRamp\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_RAMP */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Ramp */\n    Sint16 start;           /**< Beginning strength level. */\n    Sint16 end;             /**< Ending strength level. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticRamp;\n\n/**\n * \\brief A structure containing a template for a Left/Right effect.\n *\n * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.\n *\n * The Left/Right effect is used to explicitly control the large and small\n * motors, commonly found in modern game controllers. The small (right) motor\n * is high frequency, and the large (left) motor is low frequency.\n *\n * \\sa SDL_HAPTIC_LEFTRIGHT\n * \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticLeftRight\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_LEFTRIGHT */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect in milliseconds. */\n\n    /* Rumble */\n    Uint16 large_magnitude; /**< Control of the large controller motor. */\n    Uint16 small_magnitude; /**< Control of the small controller motor. */\n} SDL_HapticLeftRight;\n\n/**\n *  \\brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.\n *\n *  A custom force feedback effect is much like a periodic effect, where the\n *  application can define its exact shape.  You will have to allocate the\n *  data yourself.  Data should consist of channels * samples Uint16 samples.\n *\n *  If channels is one, the effect is rotated using the defined direction.\n *  Otherwise it uses the samples in data for the different axes.\n *\n *  \\sa SDL_HAPTIC_CUSTOM\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticCustom\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_CUSTOM */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Custom */\n    Uint8 channels;         /**< Axes to use, minimum of one. */\n    Uint16 period;          /**< Sample periods. */\n    Uint16 samples;         /**< Amount of samples. */\n    Uint16 *data;           /**< Should contain channels*samples items. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticCustom;\n\n/**\n *  \\brief The generic template for any haptic effect.\n *\n *  All values max at 32767 (0x7FFF).  Signed values also can be negative.\n *  Time values unless specified otherwise are in milliseconds.\n *\n *  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767\n *  value.  Neither delay, interval, attack_length nor fade_length support\n *  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.\n *\n *  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of\n *  ::SDL_HAPTIC_INFINITY.\n *\n *  Button triggers may not be supported on all devices, it is advised to not\n *  use them if possible.  Buttons start at index 1 instead of index 0 like\n *  the joystick.\n *\n *  If both attack_length and fade_level are 0, the envelope is not used,\n *  otherwise both values are used.\n *\n *  Common parts:\n *  \\code\n *  // Replay - All effects have this\n *  Uint32 length;        // Duration of effect (ms).\n *  Uint16 delay;         // Delay before starting effect.\n *\n *  // Trigger - All effects have this\n *  Uint16 button;        // Button that triggers effect.\n *  Uint16 interval;      // How soon before effect can be triggered again.\n *\n *  // Envelope - All effects except condition effects have this\n *  Uint16 attack_length; // Duration of the attack (ms).\n *  Uint16 attack_level;  // Level at the start of the attack.\n *  Uint16 fade_length;   // Duration of the fade out (ms).\n *  Uint16 fade_level;    // Level at the end of the fade.\n *  \\endcode\n *\n *\n *  Here we have an example of a constant effect evolution in time:\n *  \\verbatim\n    Strength\n    ^\n    |\n    |    effect level -->  _________________\n    |                     /                 \\\n    |                    /                   \\\n    |                   /                     \\\n    |                  /                       \\\n    | attack_level --> |                        \\\n    |                  |                        |  <---  fade_level\n    |\n    +--------------------------------------------------> Time\n                       [--]                 [---]\n                       attack_length        fade_length\n\n    [------------------][-----------------------]\n    delay               length\n    \\endverbatim\n *\n *  Note either the attack_level or the fade_level may be above the actual\n *  effect level.\n *\n *  \\sa SDL_HapticConstant\n *  \\sa SDL_HapticPeriodic\n *  \\sa SDL_HapticCondition\n *  \\sa SDL_HapticRamp\n *  \\sa SDL_HapticLeftRight\n *  \\sa SDL_HapticCustom\n */\ntypedef union SDL_HapticEffect\n{\n    /* Common for all force feedback effects */\n    Uint16 type;                    /**< Effect type. */\n    SDL_HapticConstant constant;    /**< Constant effect. */\n    SDL_HapticPeriodic periodic;    /**< Periodic effect. */\n    SDL_HapticCondition condition;  /**< Condition effect. */\n    SDL_HapticRamp ramp;            /**< Ramp effect. */\n    SDL_HapticLeftRight leftright;  /**< Left/Right effect. */\n    SDL_HapticCustom custom;        /**< Custom effect. */\n} SDL_HapticEffect;\n\n\n/* Function prototypes */\n/**\n *  \\brief Count the number of haptic devices attached to the system.\n *\n *  \\return Number of haptic devices detected on the system.\n */\nextern DECLSPEC int SDLCALL SDL_NumHaptics(void);\n\n/**\n *  \\brief Get the implementation dependent name of a haptic device.\n *\n *  This can be called before any joysticks are opened.\n *  If no name can be found, this function returns NULL.\n *\n *  \\param device_index Index of the device to get its name.\n *  \\return Name of the device or NULL on error.\n *\n *  \\sa SDL_NumHaptics\n */\nextern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);\n\n/**\n *  \\brief Opens a haptic device for use.\n *\n *  The index passed as an argument refers to the N'th haptic device on this\n *  system.\n *\n *  When opening a haptic device, its gain will be set to maximum and\n *  autocenter will be disabled.  To modify these values use\n *  SDL_HapticSetGain() and SDL_HapticSetAutocenter().\n *\n *  \\param device_index Index of the device to open.\n *  \\return Device identifier or NULL on error.\n *\n *  \\sa SDL_HapticIndex\n *  \\sa SDL_HapticOpenFromMouse\n *  \\sa SDL_HapticOpenFromJoystick\n *  \\sa SDL_HapticClose\n *  \\sa SDL_HapticSetGain\n *  \\sa SDL_HapticSetAutocenter\n *  \\sa SDL_HapticPause\n *  \\sa SDL_HapticStopAll\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);\n\n/**\n *  \\brief Checks if the haptic device at index has been opened.\n *\n *  \\param device_index Index to check to see if it has been opened.\n *  \\return 1 if it has been opened or 0 if it hasn't.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticIndex\n */\nextern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);\n\n/**\n *  \\brief Gets the index of a haptic device.\n *\n *  \\param haptic Haptic device to get the index of.\n *  \\return The index of the haptic device or -1 on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticOpened\n */\nextern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);\n\n/**\n *  \\brief Gets whether or not the current mouse has haptic capabilities.\n *\n *  \\return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.\n *\n *  \\sa SDL_HapticOpenFromMouse\n */\nextern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);\n\n/**\n *  \\brief Tries to open a haptic device from the current mouse.\n *\n *  \\return The haptic device identifier or NULL on error.\n *\n *  \\sa SDL_MouseIsHaptic\n *  \\sa SDL_HapticOpen\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);\n\n/**\n *  \\brief Checks to see if a joystick has haptic features.\n *\n *  \\param joystick Joystick to test for haptic capabilities.\n *  \\return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't\n *          or -1 if an error occurred.\n *\n *  \\sa SDL_HapticOpenFromJoystick\n */\nextern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);\n\n/**\n *  \\brief Opens a haptic device for use from a joystick device.\n *\n *  You must still close the haptic device separately.  It will not be closed\n *  with the joystick.\n *\n *  When opening from a joystick you should first close the haptic device before\n *  closing the joystick device.  If not, on some implementations the haptic\n *  device will also get unallocated and you'll be unable to use force feedback\n *  on that device.\n *\n *  \\param joystick Joystick to create a haptic device from.\n *  \\return A valid haptic device identifier on success or NULL on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticClose\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *\n                                                               joystick);\n\n/**\n *  \\brief Closes a haptic device previously opened with SDL_HapticOpen().\n *\n *  \\param haptic Haptic device to close.\n */\nextern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);\n\n/**\n *  \\brief Returns the number of effects a haptic device can store.\n *\n *  On some platforms this isn't fully supported, and therefore is an\n *  approximation.  Always check to see if your created effect was actually\n *  created and do not rely solely on SDL_HapticNumEffects().\n *\n *  \\param haptic The haptic device to query effect max.\n *  \\return The number of effects the haptic device can store or\n *          -1 on error.\n *\n *  \\sa SDL_HapticNumEffectsPlaying\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);\n\n/**\n *  \\brief Returns the number of effects a haptic device can play at the same\n *         time.\n *\n *  This is not supported on all platforms, but will always return a value.\n *  Added here for the sake of completeness.\n *\n *  \\param haptic The haptic device to query maximum playing effects.\n *  \\return The number of effects the haptic device can play at the same time\n *          or -1 on error.\n *\n *  \\sa SDL_HapticNumEffects\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);\n\n/**\n *  \\brief Gets the haptic device's supported features in bitwise manner.\n *\n *  Example:\n *  \\code\n *  if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {\n *      printf(\"We have constant haptic effect!\\n\");\n *  }\n *  \\endcode\n *\n *  \\param haptic The haptic device to query.\n *  \\return Haptic features in bitwise manner (OR'd).\n *\n *  \\sa SDL_HapticNumEffects\n *  \\sa SDL_HapticEffectSupported\n */\nextern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);\n\n\n/**\n *  \\brief Gets the number of haptic axes the device has.\n *\n *  \\sa SDL_HapticDirection\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);\n\n/**\n *  \\brief Checks to see if effect is supported by haptic.\n *\n *  \\param haptic Haptic device to check on.\n *  \\param effect Effect to check to see if it is supported.\n *  \\return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n *  \\sa SDL_HapticNewEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,\n                                                      SDL_HapticEffect *\n                                                      effect);\n\n/**\n *  \\brief Creates a new haptic effect on the device.\n *\n *  \\param haptic Haptic device to create the effect on.\n *  \\param effect Properties of the effect to create.\n *  \\return The identifier of the effect on success or -1 on error.\n *\n *  \\sa SDL_HapticUpdateEffect\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,\n                                                SDL_HapticEffect * effect);\n\n/**\n *  \\brief Updates the properties of an effect.\n *\n *  Can be used dynamically, although behavior when dynamically changing\n *  direction may be strange.  Specifically the effect may reupload itself\n *  and start playing from the start.  You cannot change the type either when\n *  running SDL_HapticUpdateEffect().\n *\n *  \\param haptic Haptic device that has the effect.\n *  \\param effect Identifier of the effect to update.\n *  \\param data New effect properties to use.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticNewEffect\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,\n                                                   int effect,\n                                                   SDL_HapticEffect * data);\n\n/**\n *  \\brief Runs the haptic effect on its associated haptic device.\n *\n *  If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over\n *  repeating the envelope (attack and fade) every time.  If you only want the\n *  effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length\n *  parameter.\n *\n *  \\param haptic Haptic device to run the effect on.\n *  \\param effect Identifier of the haptic effect to run.\n *  \\param iterations Number of iterations to run the effect. Use\n *         ::SDL_HAPTIC_INFINITY for infinity.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticStopEffect\n *  \\sa SDL_HapticDestroyEffect\n *  \\sa SDL_HapticGetEffectStatus\n */\nextern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,\n                                                int effect,\n                                                Uint32 iterations);\n\n/**\n *  \\brief Stops the haptic effect on its associated haptic device.\n *\n *  \\param haptic Haptic device to stop the effect on.\n *  \\param effect Identifier of the effect to stop.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,\n                                                 int effect);\n\n/**\n *  \\brief Destroys a haptic effect on the device.\n *\n *  This will stop the effect if it's running.  Effects are automatically\n *  destroyed when the device is closed.\n *\n *  \\param haptic Device to destroy the effect on.\n *  \\param effect Identifier of the effect to destroy.\n *\n *  \\sa SDL_HapticNewEffect\n */\nextern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,\n                                                     int effect);\n\n/**\n *  \\brief Gets the status of the current effect on the haptic device.\n *\n *  Device must support the ::SDL_HAPTIC_STATUS feature.\n *\n *  \\param haptic Haptic device to query the effect status on.\n *  \\param effect Identifier of the effect to query its status.\n *  \\return 0 if it isn't playing, 1 if it is playing or -1 on error.\n *\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticStopEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,\n                                                      int effect);\n\n/**\n *  \\brief Sets the global gain of the device.\n *\n *  Device must support the ::SDL_HAPTIC_GAIN feature.\n *\n *  The user may specify the maximum gain by setting the environment variable\n *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to\n *  SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the\n *  maximum.\n *\n *  \\param haptic Haptic device to set the gain on.\n *  \\param gain Value to set the gain to, should be between 0 and 100.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);\n\n/**\n *  \\brief Sets the global autocenter of the device.\n *\n *  Autocenter should be between 0 and 100.  Setting it to 0 will disable\n *  autocentering.\n *\n *  Device must support the ::SDL_HAPTIC_AUTOCENTER feature.\n *\n *  \\param haptic Haptic device to set autocentering on.\n *  \\param autocenter Value to set autocenter to, 0 disables autocentering.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,\n                                                    int autocenter);\n\n/**\n *  \\brief Pauses a haptic device.\n *\n *  Device must support the ::SDL_HAPTIC_PAUSE feature.  Call\n *  SDL_HapticUnpause() to resume playback.\n *\n *  Do not modify the effects nor add new ones while the device is paused.\n *  That can cause all sorts of weird errors.\n *\n *  \\param haptic Haptic device to pause.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticUnpause\n */\nextern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);\n\n/**\n *  \\brief Unpauses a haptic device.\n *\n *  Call to unpause after SDL_HapticPause().\n *\n *  \\param haptic Haptic device to unpause.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticPause\n */\nextern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);\n\n/**\n *  \\brief Stops all the currently playing effects on a haptic device.\n *\n *  \\param haptic Haptic device to stop.\n *  \\return 0 on success or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);\n\n/**\n *  \\brief Checks to see if rumble is supported on a haptic device.\n *\n *  \\param haptic Haptic device to check to see if it supports rumble.\n *  \\return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.\n *\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumblePlay\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);\n\n/**\n *  \\brief Initializes the haptic device for simple rumble playback.\n *\n *  \\param haptic Haptic device to initialize for simple rumble playback.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumblePlay\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);\n\n/**\n *  \\brief Runs simple rumble on a haptic device\n *\n *  \\param haptic Haptic device to play rumble effect on.\n *  \\param strength Strength of the rumble to play as a 0-1 float value.\n *  \\param length Length of the rumble to play in milliseconds.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );\n\n/**\n *  \\brief Stops the simple rumble on a haptic device.\n *\n *  \\param haptic Haptic to stop the rumble on.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumblePlay\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_haptic_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_hints.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_hints.h\n *\n *  Official documentation for SDL configuration variables\n *\n *  This file contains functions to set and get configuration hints,\n *  as well as listing each of them alphabetically.\n *\n *  The convention for naming hints is SDL_HINT_X, where \"SDL_X\" is\n *  the environment variable that can be used to override the default.\n *\n *  In general these hints are just that - they may or may not be\n *  supported or applicable on any given platform, but they provide\n *  a way for an application or user to give the library a hint as\n *  to how they would like the library to work.\n */\n\n#ifndef SDL_hints_h_\n#define SDL_hints_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.\n *\n *  SDL can try to accelerate the SDL screen surface by using streaming\n *  textures with a 3D rendering engine.  This variable controls whether and\n *  how this is done.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable 3D acceleration\n *    \"1\"       - Enable 3D acceleration, using the default renderer.\n *    \"X\"       - Enable 3D acceleration, using X where X is one of the valid rendering drivers.  (e.g. \"direct3d\", \"opengl\", etc.)\n *\n *  By default SDL tries to make a best guess for each platform whether\n *  to use acceleration or not.\n */\n#define SDL_HINT_FRAMEBUFFER_ACCELERATION   \"SDL_FRAMEBUFFER_ACCELERATION\"\n\n/**\n *  \\brief  A variable specifying which render driver to use.\n *\n *  If the application doesn't pick a specific renderer to use, this variable\n *  specifies the name of the preferred renderer.  If the preferred renderer\n *  can't be initialized, the normal default renderer is used.\n *\n *  This variable is case insensitive and can be set to the following values:\n *    \"direct3d\"\n *    \"opengl\"\n *    \"opengles2\"\n *    \"opengles\"\n *    \"metal\"\n *    \"software\"\n *\n *  The default varies by platform, but it's the first one in the list that\n *  is available on the current platform.\n */\n#define SDL_HINT_RENDER_DRIVER              \"SDL_RENDER_DRIVER\"\n\n/**\n *  \\brief  A variable controlling whether the OpenGL render driver uses shaders if they are available.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable shaders\n *    \"1\"       - Enable shaders\n *\n *  By default shaders are used if OpenGL supports them.\n */\n#define SDL_HINT_RENDER_OPENGL_SHADERS      \"SDL_RENDER_OPENGL_SHADERS\"\n\n/**\n *  \\brief  A variable controlling whether the Direct3D device is initialized for thread-safe operations.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Thread-safety is not enabled (faster)\n *    \"1\"       - Thread-safety is enabled\n *\n *  By default the Direct3D device is created with thread-safety disabled.\n */\n#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE \"SDL_RENDER_DIRECT3D_THREADSAFE\"\n\n/**\n *  \\brief  A variable controlling whether to enable Direct3D 11+'s Debug Layer.\n *\n *  This variable does not have any effect on the Direct3D 9 based renderer.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable Debug Layer use\n *    \"1\"       - Enable Debug Layer use\n *\n *  By default, SDL does not use Direct3D Debug Layer.\n */\n#define SDL_HINT_RENDER_DIRECT3D11_DEBUG    \"SDL_RENDER_DIRECT3D11_DEBUG\"\n\n/**\n *  \\brief  A variable controlling the scaling policy for SDL_RenderSetLogicalSize.\n *\n *  This variable can be set to the following values:\n *    \"0\" or \"letterbox\" - Uses letterbox/sidebars to fit the entire rendering on screen\n *    \"1\" or \"overscan\"  - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen\n *\n *  By default letterbox is used\n */\n#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE       \"SDL_RENDER_LOGICAL_SIZE_MODE\"\n\n/**\n *  \\brief  A variable controlling the scaling quality\n *\n *  This variable can be set to the following values:\n *    \"0\" or \"nearest\" - Nearest pixel sampling\n *    \"1\" or \"linear\"  - Linear filtering (supported by OpenGL and Direct3D)\n *    \"2\" or \"best\"    - Currently this is the same as \"linear\"\n *\n *  By default nearest pixel sampling is used\n */\n#define SDL_HINT_RENDER_SCALE_QUALITY       \"SDL_RENDER_SCALE_QUALITY\"\n\n/**\n *  \\brief  A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable vsync\n *    \"1\"       - Enable vsync\n *\n *  By default SDL does not sync screen surface updates with vertical refresh.\n */\n#define SDL_HINT_RENDER_VSYNC               \"SDL_RENDER_VSYNC\"\n\n/**\n *  \\brief  A variable controlling whether the screensaver is enabled. \n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable screensaver\n *    \"1\"       - Enable screensaver\n *\n *  By default SDL will disable the screensaver.\n */\n#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER    \"SDL_VIDEO_ALLOW_SCREENSAVER\"\n\n/**\n *  \\brief  A variable controlling whether the X11 VidMode extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable XVidMode\n *    \"1\"       - Enable XVidMode\n *\n *  By default SDL will use XVidMode if it is available.\n */\n#define SDL_HINT_VIDEO_X11_XVIDMODE         \"SDL_VIDEO_X11_XVIDMODE\"\n\n/**\n *  \\brief  A variable controlling whether the X11 Xinerama extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable Xinerama\n *    \"1\"       - Enable Xinerama\n *\n *  By default SDL will use Xinerama if it is available.\n */\n#define SDL_HINT_VIDEO_X11_XINERAMA         \"SDL_VIDEO_X11_XINERAMA\"\n\n/**\n *  \\brief  A variable controlling whether the X11 XRandR extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable XRandR\n *    \"1\"       - Enable XRandR\n *\n *  By default SDL will not use XRandR because of window manager issues.\n */\n#define SDL_HINT_VIDEO_X11_XRANDR           \"SDL_VIDEO_X11_XRANDR\"\n\n/**\n *  \\brief  A variable controlling whether the X11 _NET_WM_PING protocol should be supported.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable _NET_WM_PING\n *    \"1\"       - Enable _NET_WM_PING\n *\n *  By default SDL will use _NET_WM_PING, but for applications that know they\n *  will not always be able to respond to ping requests in a timely manner they can\n *  turn it off to avoid the window manager thinking the app is hung.\n *  The hint is checked in CreateWindow.\n */\n#define SDL_HINT_VIDEO_X11_NET_WM_PING      \"SDL_VIDEO_X11_NET_WM_PING\"\n\n/**\n * \\brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.\n * \n * This variable can be set to the following values:\n * \"0\" - Disable _NET_WM_BYPASS_COMPOSITOR\n * \"1\" - Enable _NET_WM_BYPASS_COMPOSITOR\n * \n * By default SDL will use _NET_WM_BYPASS_COMPOSITOR\n * \n */\n#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR \"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\"\n\n/**\n *  \\brief  A variable controlling whether the window frame and title bar are interactive when the cursor is hidden \n *\n *  This variable can be set to the following values:\n *    \"0\"       - The window frame is not interactive when the cursor is hidden (no move, resize, etc)\n *    \"1\"       - The window frame is interactive when the cursor is hidden\n *\n *  By default SDL will allow interaction with the window frame when the cursor is hidden\n */\n#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN    \"SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN\"\n\n/**\n * \\brief A variable to specify custom icon resource id from RC file on Windows platform \n */\n#define SDL_HINT_WINDOWS_INTRESOURCE_ICON       \"SDL_WINDOWS_INTRESOURCE_ICON\"\n#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL \"SDL_WINDOWS_INTRESOURCE_ICON_SMALL\"\n\n/**\n *  \\brief  A variable controlling whether the windows message loop is processed by SDL \n *\n *  This variable can be set to the following values:\n *    \"0\"       - The window message loop is not run\n *    \"1\"       - The window message loop is processed in SDL_PumpEvents()\n *\n *  By default SDL will process the windows message loop\n */\n#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP \"SDL_WINDOWS_ENABLE_MESSAGELOOP\"\n\n/**\n *  \\brief  A variable controlling whether grabbing input grabs the keyboard\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Grab will affect only the mouse\n *    \"1\"       - Grab will affect mouse and keyboard\n *\n *  By default SDL will not grab the keyboard so system shortcuts still work.\n */\n#define SDL_HINT_GRAB_KEYBOARD              \"SDL_GRAB_KEYBOARD\"\n\n/**\n *  \\brief  A variable setting the double click time, in milliseconds.\n */\n#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME    \"SDL_MOUSE_DOUBLE_CLICK_TIME\"\n\n/**\n *  \\brief  A variable setting the double click radius, in pixels.\n */\n#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS    \"SDL_MOUSE_DOUBLE_CLICK_RADIUS\"\n\n/**\n *  \\brief  A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode\n */\n#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE    \"SDL_MOUSE_NORMAL_SPEED_SCALE\"\n\n/**\n *  \\brief  A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode\n */\n#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE    \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"\n\n/**\n *  \\brief  A variable controlling whether relative mouse mode is implemented using mouse warping\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Relative mouse mode uses raw input\n *    \"1\"       - Relative mouse mode uses mouse warping\n *\n *  By default SDL will use raw input for relative mouse mode\n */\n#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    \"SDL_MOUSE_RELATIVE_MODE_WARP\"\n\n/**\n *  \\brief Allow mouse click events when clicking to focus an SDL window\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Ignore mouse clicks that activate a window\n *    \"1\"       - Generate events for mouse clicks that activate a window\n *\n *  By default SDL will ignore mouse clicks that activate a window\n */\n#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH \"SDL_MOUSE_FOCUS_CLICKTHROUGH\"\n\n/**\n *  \\brief  A variable controlling whether touch events should generate synthetic mouse events\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Touch events will not generate mouse events\n *    \"1\"       - Touch events will generate mouse events\n *\n *  By default SDL will generate mouse events for touch events\n */\n#define SDL_HINT_TOUCH_MOUSE_EVENTS    \"SDL_TOUCH_MOUSE_EVENTS\"\n\n/**\n *  \\brief  A variable controlling whether mouse events should generate synthetic touch events\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Mouse events will not generate touch events (default for desktop platforms)\n *    \"1\"       - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)\n */\n\n#define SDL_HINT_MOUSE_TOUCH_EVENTS    \"SDL_MOUSE_TOUCH_EVENTS\"\n\n/**\n *  \\brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.\n *\n */\n#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS   \"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\"\n\n/**\n *  \\brief  A variable controlling whether the idle timer is disabled on iOS.\n *\n *  When an iOS app does not receive touches for some time, the screen is\n *  dimmed automatically. For games where the accelerometer is the only input\n *  this is problematic. This functionality can be disabled by setting this\n *  hint.\n *\n *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()\n *  accomplish the same thing on iOS. They should be preferred over this hint.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Enable idle timer\n *    \"1\"       - Disable idle timer\n */\n#define SDL_HINT_IDLE_TIMER_DISABLED \"SDL_IOS_IDLE_TIMER_DISABLED\"\n\n/**\n *  \\brief  A variable controlling which orientations are allowed on iOS/Android.\n *\n *  In some circumstances it is necessary to be able to explicitly control\n *  which UI orientations are allowed.\n *\n *  This variable is a space delimited list of the following values:\n *    \"LandscapeLeft\", \"LandscapeRight\", \"Portrait\" \"PortraitUpsideDown\"\n */\n#define SDL_HINT_ORIENTATIONS \"SDL_IOS_ORIENTATIONS\"\n\n/**\n *  \\brief  A variable controlling whether controllers used with the Apple TV\n *  generate UI events.\n *\n * When UI events are generated by controller input, the app will be\n * backgrounded when the Apple TV remote's menu button is pressed, and when the\n * pause or B buttons on gamepads are pressed.\n *\n * More information about properly making use of controllers for the Apple TV\n * can be found here:\n * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Controller input does not generate UI events (the default).\n *    \"1\"       - Controller input generates UI events.\n */\n#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS \"SDL_APPLE_TV_CONTROLLER_UI_EVENTS\"\n\n/**\n * \\brief  A variable controlling whether the Apple TV remote's joystick axes\n *         will automatically match the rotation of the remote.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Remote orientation does not affect joystick axes (the default).\n *    \"1\"       - Joystick axes are based on the orientation of the remote.\n */\n#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION \"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\"\n\n/**\n * \\brief  A variable controlling whether the home indicator bar on iPhone X\n *         should be hidden.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - The indicator bar is not hidden (default for windowed applications)\n *    \"1\"       - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)\n *    \"2\"       - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the \"home\" action (default for fullscreen applications)\n */\n#define SDL_HINT_IOS_HIDE_HOME_INDICATOR \"SDL_IOS_HIDE_HOME_INDICATOR\"\n\n/**\n *  \\brief  A variable controlling whether the Android / iOS built-in\n *  accelerometer should be listed as a joystick device.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - The accelerometer is not listed as a joystick\n *    \"1\"       - The accelerometer is available as a 3 axis joystick (the default).\n */\n#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK \"SDL_ACCELEROMETER_AS_JOYSTICK\"\n\n/**\n *  \\brief  A variable controlling whether the Android / tvOS remotes\n *  should be listed as joystick devices, instead of sending keyboard events.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Remotes send enter/escape/arrow key events\n *    \"1\"       - Remotes are available as 2 axis, 2 button joysticks (the default).\n */\n#define SDL_HINT_TV_REMOTE_AS_JOYSTICK \"SDL_TV_REMOTE_AS_JOYSTICK\"\n\n/**\n *  \\brief  A variable that lets you disable the detection and use of Xinput gamepad devices\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable XInput detection (only uses direct input)\n *    \"1\"       - Enable XInput detection (the default)\n */\n#define SDL_HINT_XINPUT_ENABLED \"SDL_XINPUT_ENABLED\"\n\n/**\n *  \\brief  A variable that causes SDL to use the old axis and button mapping for XInput devices.\n *\n *  This hint is for backwards compatibility only and will be removed in SDL 2.1\n *\n *  The default value is \"0\".  This hint must be set before SDL_Init()\n */\n#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING \"SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING\"\n\n/**\n *  \\brief  A variable that lets you manually hint extra gamecontroller db entries.\n *\n *  The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h\n *\n *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)\n *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()\n */\n#define SDL_HINT_GAMECONTROLLERCONFIG \"SDL_GAMECONTROLLERCONFIG\"\n\n/**\n *  \\brief  A variable that lets you provide a file with extra gamecontroller db entries.\n *\n *  The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h\n *\n *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)\n *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()\n */\n#define SDL_HINT_GAMECONTROLLERCONFIG_FILE \"SDL_GAMECONTROLLERCONFIG_FILE\"\n\n/**\n *  \\brief  A variable containing a list of devices to skip when scanning for game controllers.\n *\n *  The format of the string is a comma separated list of USB VID/PID pairs\n *  in hexadecimal form, e.g.\n *\n *      0xAAAA/0xBBBB,0xCCCC/0xDDDD\n *\n *  The variable can also take the form of @file, in which case the named\n *  file will be loaded and interpreted as the value of the variable.\n */\n#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES \"SDL_GAMECONTROLLER_IGNORE_DEVICES\"\n\n/**\n *  \\brief  If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.\n *\n *  The format of the string is a comma separated list of USB VID/PID pairs\n *  in hexadecimal form, e.g.\n *\n *      0xAAAA/0xBBBB,0xCCCC/0xDDDD\n *\n *  The variable can also take the form of @file, in which case the named\n *  file will be loaded and interpreted as the value of the variable.\n */\n#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT \"SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT\"\n\n/**\n *  \\brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable joystick & gamecontroller input events when the\n *                application is in the background.\n *    \"1\"       - Enable joystick & gamecontroller input events when the\n *                application is in the background.\n *\n *  The default value is \"0\".  This hint may be set at any time.\n */\n#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS \"SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI joystick drivers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI drivers are not used\n *    \"1\"       - HIDAPI drivers are used (the default)\n *\n *  This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.\n */\n#define SDL_HINT_JOYSTICK_HIDAPI \"SDL_JOYSTICK_HIDAPI\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for PS4 controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_PS4 \"SDL_JOYSTICK_HIDAPI_PS4\"\n\n/**\n *  \\brief  A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - extended reports are not enabled (the default)\n *    \"1\"       - extended reports\n *\n *  Extended input reports allow rumble on Bluetooth PS4 controllers, but\n *  break DirectInput handling for applications that don't use SDL.\n *\n *  Once extended reports are enabled, they can not be disabled without\n *  power cycling the controller.\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE \"SDL_JOYSTICK_HIDAPI_PS4_RUMBLE\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for Steam Controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_STEAM \"SDL_JOYSTICK_HIDAPI_STEAM\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH \"SDL_JOYSTICK_HIDAPI_SWITCH\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for XBox controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_XBOX   \"SDL_JOYSTICK_HIDAPI_XBOX\"\n\n/**\n *  \\brief  A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Do not scan for Steam Controllers\n *    \"1\"       - Scan for Steam Controllers (the default)\n *\n *  The default value is \"1\".  This hint must be set before initializing the joystick subsystem.\n */\n#define SDL_HINT_ENABLE_STEAM_CONTROLLERS \"SDL_ENABLE_STEAM_CONTROLLERS\"\n\n\n/**\n *  \\brief If set to \"0\" then never set the top most bit on a SDL Window, even if the video mode expects it.\n *      This is a debugging aid for developers and not expected to be used by end users. The default is \"1\"\n *\n *  This variable can be set to the following values:\n *    \"0\"       - don't allow topmost\n *    \"1\"       - allow topmost\n */\n#define SDL_HINT_ALLOW_TOPMOST \"SDL_ALLOW_TOPMOST\"\n\n/**\n *  \\brief A variable that controls the timer resolution, in milliseconds.\n *\n *  The higher resolution the timer, the more frequently the CPU services\n *  timer interrupts, and the more precise delays are, but this takes up\n *  power and CPU time.  This hint is only used on Windows 7 and earlier.\n *\n *  See this blog post for more information:\n *  http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/\n *\n *  If this variable is set to \"0\", the system timer resolution is not set.\n *\n *  The default value is \"1\". This hint may be set at any time.\n */\n#define SDL_HINT_TIMER_RESOLUTION \"SDL_TIMER_RESOLUTION\"\n\n\n/**\n *  \\brief  A variable describing the content orientation on QtWayland-based platforms.\n *\n *  On QtWayland platforms, windows are rotated client-side to allow for custom\n *  transitions. In order to correctly position overlays (e.g. volume bar) and\n *  gestures (e.g. events view, close/minimize gestures), the system needs to\n *  know in which orientation the application is currently drawing its contents.\n *\n *  This does not cause the window to be rotated or resized, the application\n *  needs to take care of drawing the content in the right orientation (the\n *  framebuffer is always in portrait mode).\n *\n *  This variable can be one of the following values:\n *    \"primary\" (default), \"portrait\", \"landscape\", \"inverted-portrait\", \"inverted-landscape\"\n */\n#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION \"SDL_QTWAYLAND_CONTENT_ORIENTATION\"\n\n/**\n *  \\brief  Flags to set on QtWayland windows to integrate with the native window manager.\n *\n *  On QtWayland platforms, this hint controls the flags to set on the windows.\n *  For example, on Sailfish OS \"OverridesSystemGestures\" disables swipe gestures.\n *\n *  This variable is a space-separated list of the following values (empty = no flags):\n *    \"OverridesSystemGestures\", \"StaysOnTop\", \"BypassWindowManager\"\n */\n#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS \"SDL_QTWAYLAND_WINDOW_FLAGS\"\n\n/**\n*  \\brief  A string specifying SDL's threads stack size in bytes or \"0\" for the backend's default size\n*\n*  Use this hint in case you need to set SDL's threads stack size to other than the default.\n*  This is specially useful if you build SDL against a non glibc libc library (such as musl) which\n*  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).\n*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.\n*\n*  Instead of this hint, in 2.0.9 and later, you can use\n*  SDL_CreateThreadWithStackSize(). This hint only works with the classic\n*  SDL_CreateThread().\n*/\n#define SDL_HINT_THREAD_STACK_SIZE              \"SDL_THREAD_STACK_SIZE\"\n\n/**\n *  \\brief If set to 1, then do not allow high-DPI windows. (\"Retina\" on Mac and iOS)\n */\n#define SDL_HINT_VIDEO_HIGHDPI_DISABLED \"SDL_VIDEO_HIGHDPI_DISABLED\"\n\n/**\n *  \\brief A variable that determines whether ctrl+click should generate a right-click event on Mac\n *\n *  If present, holding ctrl while left clicking will generate a right click\n *  event when on Mac.\n */\n#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK \"SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK\"\n\n/**\n*  \\brief  A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries\n*\n*  SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It\n*  can use two different sets of binaries, those compiled by the user from source\n*  or those provided by the Chrome browser. In the later case, these binaries require\n*  that SDL loads a DLL providing the shader compiler.\n*\n*  This variable can be set to the following values:\n*    \"d3dcompiler_46.dll\" - default, best for Vista or later.\n*    \"d3dcompiler_43.dll\" - for XP support.\n*    \"none\" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.\n*\n*/\n#define SDL_HINT_VIDEO_WIN_D3DCOMPILER              \"SDL_VIDEO_WIN_D3DCOMPILER\"\n\n/**\n*  \\brief  A variable that is the address of another SDL_Window* (as a hex string formatted with \"%p\").\n*  \n*  If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has\n*  SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly \n*  created SDL_Window:\n*\n*  1. Its pixel format will be set to the same pixel format as this SDL_Window.  This is\n*  needed for example when sharing an OpenGL context across multiple windows.\n*\n*  2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for\n*  OpenGL rendering.\n*\n*  This variable can be set to the following values:\n*    The address (as a string \"%p\") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should\n*    share a pixel format with.\n*/\n#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT    \"SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT\"\n\n/**\n *  \\brief A URL to a WinRT app's privacy policy\n *\n *  All network-enabled WinRT apps must make a privacy policy available to its\n *  users.  On Windows 8, 8.1, and RT, Microsoft mandates that this policy be\n *  be available in the Windows Settings charm, as accessed from within the app.\n *  SDL provides code to add a URL-based link there, which can point to the app's\n *  privacy policy.\n *\n *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL\n *  before calling any SDL_Init() functions.  The contents of the hint should\n *  be a valid URL.  For example, \"http://www.example.com\".\n *\n *  The default value is \"\", which will prevent SDL from adding a privacy policy\n *  link to the Settings charm.  This hint should only be set during app init.\n *\n *  The label text of an app's \"Privacy Policy\" link may be customized via another\n *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.\n *\n *  Please note that on Windows Phone, Microsoft does not provide standard UI\n *  for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL\n *  will not get used on that platform.  Network-enabled phone apps should display\n *  their privacy policy through some other, in-app means.\n */\n#define SDL_HINT_WINRT_PRIVACY_POLICY_URL \"SDL_WINRT_PRIVACY_POLICY_URL\"\n\n/** \\brief Label text for a WinRT app's privacy policy link\n *\n *  Network-enabled WinRT apps must include a privacy policy.  On Windows 8, 8.1, and RT,\n *  Microsoft mandates that this policy be available via the Windows Settings charm.\n *  SDL provides code to add a link there, with its label text being set via the\n *  optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.\n *\n *  Please note that a privacy policy's contents are not set via this hint.  A separate\n *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the\n *  policy.\n *\n *  The contents of this hint should be encoded as a UTF8 string.\n *\n *  The default value is \"Privacy Policy\".  This hint should only be set during app\n *  initialization, preferably before any calls to SDL_Init().\n *\n *  For additional information on linking to a privacy policy, see the documentation for\n *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.\n */\n#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL \"SDL_WINRT_PRIVACY_POLICY_LABEL\"\n\n/** \\brief Allows back-button-press events on Windows Phone to be marked as handled\n *\n *  Windows Phone devices typically feature a Back button.  When pressed,\n *  the OS will emit back-button-press events, which apps are expected to\n *  handle in an appropriate manner.  If apps do not explicitly mark these\n *  events as 'Handled', then the OS will invoke its default behavior for\n *  unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to\n *  terminate the app (and attempt to switch to the previous app, or to the\n *  device's home screen).\n *\n *  Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to \"1\" will cause SDL\n *  to mark back-button-press events as Handled, if and when one is sent to\n *  the app.\n *\n *  Internally, Windows Phone sends back button events as parameters to\n *  special back-button-press callback functions.  Apps that need to respond\n *  to back-button-press events are expected to register one or more\n *  callback functions for such, shortly after being launched (during the\n *  app's initialization phase).  After the back button is pressed, the OS\n *  will invoke these callbacks.  If the app's callback(s) do not explicitly\n *  mark the event as handled by the time they return, or if the app never\n *  registers one of these callback, the OS will consider the event\n *  un-handled, and it will apply its default back button behavior (terminate\n *  the app).\n *\n *  SDL registers its own back-button-press callback with the Windows Phone\n *  OS.  This callback will emit a pair of SDL key-press events (SDL_KEYDOWN\n *  and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which\n *  it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.\n *  If the hint's value is set to \"1\", the back button event's Handled\n *  property will get set to 'true'.  If the hint's value is set to something\n *  else, or if it is unset, SDL will leave the event's Handled property\n *  alone.  (By default, the OS sets this property to 'false', to note.)\n *\n *  SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a\n *  back button is pressed, or can set it in direct-response to a back button\n *  being pressed.\n *\n *  In order to get notified when a back button is pressed, SDL apps should\n *  register a callback function with SDL_AddEventWatch(), and have it listen\n *  for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.\n *  (Alternatively, SDL_KEYUP events can be listened-for.  Listening for\n *  either event type is suitable.)  Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON\n *  set by such a callback, will be applied to the OS' current\n *  back-button-press event.\n *\n *  More details on back button behavior in Windows Phone apps can be found\n *  at the following page, on Microsoft's developer site:\n *  http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx\n */\n#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON \"SDL_WINRT_HANDLE_BACK_BUTTON\"\n\n/**\n *  \\brief  A variable that dictates policy for fullscreen Spaces on Mac OS X.\n *\n *  This hint only applies to Mac OS X.\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and\n *                SDL_WINDOW_RESIZABLE windows won't offer the \"fullscreen\"\n *                button on their titlebars).\n *    \"1\"       - Enable Spaces support (FULLSCREEN_DESKTOP will use them and\n *                SDL_WINDOW_RESIZABLE windows will offer the \"fullscreen\"\n *                button on their titlebars).\n *\n *  The default value is \"1\". Spaces are disabled regardless of this hint if\n *   the OS isn't at least Mac OS X Lion (10.7). This hint must be set before\n *   any windows are created.\n */\n#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES    \"SDL_VIDEO_MAC_FULLSCREEN_SPACES\"\n\n/**\n*  \\brief  When set don't force the SDL app to become a foreground process\n*\n*  This hint only applies to Mac OS X.\n*\n*/\n#define SDL_HINT_MAC_BACKGROUND_APP    \"SDL_MAC_BACKGROUND_APP\"\n\n/**\n * \\brief Android APK expansion main file version. Should be a string number like \"1\", \"2\" etc.\n *\n * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.\n *\n * If both hints were set then SDL_RWFromFile() will look into expansion files\n * after a given relative path was not found in the internal storage and assets.\n *\n * By default this hint is not set and the APK expansion files are not searched.\n */\n#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION \"SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION\"\n \n/**\n * \\brief Android APK expansion patch file version. Should be a string number like \"1\", \"2\" etc.\n *\n * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.\n *\n * If both hints were set then SDL_RWFromFile() will look into expansion files\n * after a given relative path was not found in the internal storage and assets.\n *\n * By default this hint is not set and the APK expansion files are not searched.\n */\n#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION \"SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION\"\n\n/**\n * \\brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL_TEXTEDITING events are sent, and it is the application's\n *               responsibility to render the text from these events and \n *               differentiate it somehow from committed text. (default)\n *   \"1\"       - If supported by the IME then SDL_TEXTEDITING events are not sent, \n *               and text that is being composed will be rendered in its own UI.\n */\n#define SDL_HINT_IME_INTERNAL_EDITING \"SDL_IME_INTERNAL_EDITING\"\n\n/**\n * \\brief A variable to control whether we trap the Android back button to handle it manually.\n *        This is necessary for the right mouse button to work on some Android devices, or\n *        to be able to trap the back button for use in your code reliably.  If set to true,\n *        the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of \n *        SDL_SCANCODE_AC_BACK.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Back button will be handled as usual for system. (default)\n *   \"1\"       - Back button will be trapped, allowing you to handle the key press\n *               manually.  (This will also let right mouse click work on systems \n *               where the right mouse button functions as back.)\n *\n * The value of this hint is used at runtime, so it can be changed at any time.\n */\n#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON \"SDL_ANDROID_TRAP_BACK_BUTTON\"\n\n/**\n * \\brief A variable to control whether the event loop will block itself when the app is paused.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Non blocking.\n *   \"1\"       - Blocking. (default)\n *\n * The value should be set before SDL is initialized.\n */\n#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE \"SDL_ANDROID_BLOCK_ON_PAUSE\"\n\n /**\n * \\brief A variable to control whether the return key on the soft keyboard\n *        should hide the soft keyboard on Android and iOS.\n *\n * The variable can be set to the following values:\n *   \"0\"       - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)\n *   \"1\"       - The return key will hide the keyboard.\n *\n * The value of this hint is used at runtime, so it can be changed at any time.\n */\n#define SDL_HINT_RETURN_KEY_HIDES_IME \"SDL_RETURN_KEY_HIDES_IME\"\n\n/**\n *  \\brief override the binding element for keyboard inputs for Emscripten builds\n *\n * This hint only applies to the emscripten platform\n *\n * The variable can be one of\n *    \"#window\"      - The javascript window object (this is the default)\n *    \"#document\"    - The javascript document object\n *    \"#screen\"      - the javascript window.screen object\n *    \"#canvas\"      - the WebGL canvas element\n *    any other string without a leading # sign applies to the element on the page with that ID.\n */\n#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT   \"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\"\n\n/**\n *  \\brief Tell SDL not to catch the SIGINT or SIGTERM signals.\n *\n * This hint only applies to Unix-like platforms.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will install a SIGINT and SIGTERM handler, and when it\n *               catches a signal, convert it into an SDL_QUIT event.\n *   \"1\"       - SDL will not install a signal handler at all.\n */\n#define SDL_HINT_NO_SIGNAL_HANDLERS   \"SDL_NO_SIGNAL_HANDLERS\"\n\n/**\n *  \\brief Tell SDL not to generate window-close events for Alt+F4 on Windows.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will generate a window-close event when it sees Alt+F4.\n *   \"1\"       - SDL will only do normal key handling for Alt+F4.\n */\n#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 \"SDL_WINDOWS_NO_CLOSE_ON_ALT_F4\"\n\n/**\n *  \\brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.\n *\n * The bitmap header version 4 is required for proper alpha channel support and\n * SDL will use it when required. Should this not be desired, this hint can\n * force the use of the 40 byte header version which is supported everywhere.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Surfaces with a colorkey or an alpha channel are saved to a\n *               32-bit BMP file with an alpha mask. SDL will use the bitmap\n *               header version 4 and set the alpha mask accordingly.\n *   \"1\"       - Surfaces with a colorkey or an alpha channel are saved to a\n *               32-bit BMP file without an alpha mask. The alpha channel data\n *               will be in the file, but applications are going to ignore it.\n *\n * The default value is \"0\".\n */\n#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT \"SDL_BMP_SAVE_LEGACY_FORMAT\"\n\n/**\n * \\brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.\n *        The 0x406D1388 Exception is a trick used to inform Visual Studio of a\n *        thread's name, but it tends to cause problems with other debuggers,\n *        and the .NET runtime. Note that SDL 2.0.6 and later will still use\n *        the (safer) SetThreadDescription API, introduced in the Windows 10\n *        Creators Update, if available.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will raise the 0x406D1388 Exception to name threads.\n *               This is the default behavior of SDL <= 2.0.4.\n *   \"1\"       - SDL will not raise this exception, and threads will be unnamed. (default)\n *               This is necessary with .NET languages or debuggers that aren't Visual Studio.\n */\n#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING \"SDL_WINDOWS_DISABLE_THREAD_NAMING\"\n\n/**\n * \\brief Tell SDL which Dispmanx layer to use on a Raspberry PI\n *\n * Also known as Z-order. The variable can take a negative or positive value.\n * The default is 10000.\n */\n#define SDL_HINT_RPI_VIDEO_LAYER           \"SDL_RPI_VIDEO_LAYER\"\n\n/**\n * \\brief Tell the video driver that we only want a double buffer.\n *\n * By default, most lowlevel 2D APIs will use a triple buffer scheme that \n * wastes no CPU time on waiting for vsync after issuing a flip, but\n * introduces a frame of latency. On the other hand, using a double buffer\n * scheme instead is recommended for cases where low latency is an important\n * factor because we save a whole frame of latency.\n * We do so by waiting for vsync immediately after issuing a flip, usually just\n * after eglSwapBuffers call in the backend's *_SwapWindow function.\n *\n * Since it's driver-specific, it's only supported where possible and\n * implemented. Currently supported the following drivers:\n * - KMSDRM (kmsdrm)\n * - Raspberry Pi (raspberrypi)\n */\n#define SDL_HINT_VIDEO_DOUBLE_BUFFER      \"SDL_VIDEO_DOUBLE_BUFFER\"\n\n/**\n *  \\brief  A variable controlling what driver to use for OpenGL ES contexts.\n *\n *  On some platforms, currently Windows and X11, OpenGL drivers may support\n *  creating contexts with an OpenGL ES profile. By default SDL uses these\n *  profiles, when available, otherwise it attempts to load an OpenGL ES\n *  library, e.g. that provided by the ANGLE project. This variable controls\n *  whether SDL follows this default behaviour or will always load an\n *  OpenGL ES library.\n *\n *  Circumstances where this is useful include\n *  - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,\n *    or emulator, e.g. those from ARM, Imagination or Qualcomm.\n *  - Resolving OpenGL ES function addresses at link time by linking with\n *    the OpenGL ES library instead of querying them at run time with\n *    SDL_GL_GetProcAddress().\n *\n *  Caution: for an application to work with the default behaviour across\n *  different OpenGL drivers it must query the OpenGL ES function\n *  addresses at run time using SDL_GL_GetProcAddress().\n *\n *  This variable is ignored on most platforms because OpenGL ES is native\n *  or not supported.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Use ES profile of OpenGL, if available. (Default when not set.)\n *    \"1\"       - Load OpenGL ES library using the default library names.\n *\n */\n#define SDL_HINT_OPENGL_ES_DRIVER   \"SDL_OPENGL_ES_DRIVER\"\n\n/**\n *  \\brief  A variable controlling speed/quality tradeoff of audio resampling.\n *\n *  If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )\n *  to handle audio resampling. There are different resampling modes available\n *  that produce different levels of quality, using more CPU.\n *\n *  If this hint isn't specified to a valid setting, or libsamplerate isn't\n *  available, SDL will use the default, internal resampling algorithm.\n *\n *  Note that this is currently only applicable to resampling audio that is\n *  being written to a device for playback or audio being read from a device\n *  for capture. SDL_AudioCVT always uses the default resampler (although this\n *  might change for SDL 2.1).\n *\n *  This hint is currently only checked at audio subsystem initialization.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\" or \"default\" - Use SDL's internal resampling (Default when not set - low quality, fast)\n *    \"1\" or \"fast\"    - Use fast, slightly higher quality resampling, if available\n *    \"2\" or \"medium\"  - Use medium quality resampling, if available\n *    \"3\" or \"best\"    - Use high quality resampling, if available\n */\n#define SDL_HINT_AUDIO_RESAMPLING_MODE   \"SDL_AUDIO_RESAMPLING_MODE\"\n\n/**\n *  \\brief  A variable controlling the audio category on iOS and Mac OS X\n *\n *  This variable can be set to the following values:\n *\n *    \"ambient\"     - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)\n *    \"playback\"    - Use the AVAudioSessionCategoryPlayback category\n *\n *  For more information, see Apple's documentation:\n *  https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html\n */\n#define SDL_HINT_AUDIO_CATEGORY   \"SDL_AUDIO_CATEGORY\"\n\n/**\n *  \\brief  A variable controlling whether the 2D render API is compatible or efficient.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\"     - Don't use batching to make rendering more efficient.\n *    \"1\"     - Use batching, but might cause problems if app makes its own direct OpenGL calls.\n *\n *  Up to SDL 2.0.9, the render API would draw immediately when requested. Now\n *  it batches up draw requests and sends them all to the GPU only when forced\n *  to (during SDL_RenderPresent, when changing render targets, by updating a\n *  texture that the batch needs, etc). This is significantly more efficient,\n *  but it can cause problems for apps that expect to render on top of the\n *  render API's output. As such, SDL will disable batching if a specific\n *  render backend is requested (since this might indicate that the app is\n *  planning to use the underlying graphics API directly). This hint can\n *  be used to explicitly request batching in this instance. It is a contract\n *  that you will either never use the underlying graphics API directly, or\n *  if you do, you will call SDL_RenderFlush() before you do so any current\n *  batch goes to the GPU before your work begins. Not following this contract\n *  will result in undefined behavior.\n */\n#define SDL_HINT_RENDER_BATCHING  \"SDL_RENDER_BATCHING\"\n\n\n/**\n *  \\brief  A variable controlling whether SDL logs all events pushed onto its internal queue.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\"     - Don't log any events (default)\n *    \"1\"     - Log all events except mouse and finger motion, which are pretty spammy.\n *    \"2\"     - Log all events.\n *\n *  This is generally meant to be used to debug SDL itself, but can be useful\n *  for application developers that need better visibility into what is going\n *  on in the event queue. Logged events are sent through SDL_Log(), which\n *  means by default they appear on stdout on most platforms or maybe\n *  OutputDebugString() on Windows, and can be funneled by the app with\n *  SDL_LogSetOutputFunction(), etc.\n *\n *  This hint can be toggled on and off at runtime, if you only need to log\n *  events for a small subset of program execution.\n */\n#define SDL_HINT_EVENT_LOGGING   \"SDL_EVENT_LOGGING\"\n\n\n\n/**\n *  \\brief  Controls how the size of the RIFF chunk affects the loading of a WAVE file.\n *\n *  The size of the RIFF chunk (which includes all the sub-chunks of the WAVE\n *  file) is not always reliable. In case the size is wrong, it's possible to\n *  just ignore it and step through the chunks until a fixed limit is reached.\n *\n *  Note that files that have trailing data unrelated to the WAVE file or\n *  corrupt files may slow down the loading process without a reliable boundary.\n *  By default, SDL stops after 10000 chunks to prevent wasting time. Use the\n *  environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.\n *\n *  This variable can be set to the following values:\n *\n *    \"force\"        - Always use the RIFF chunk size as a boundary for the chunk search\n *    \"ignorezero\"   - Like \"force\", but a zero size searches up to 4 GiB (default)\n *    \"ignore\"       - Ignore the RIFF chunk size and always search up to 4 GiB\n *    \"maximum\"      - Search for chunks until the end of file (not recommended)\n */\n#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE   \"SDL_WAVE_RIFF_CHUNK_SIZE\"\n\n/**\n *  \\brief  Controls how a truncated WAVE file is handled.\n *\n *  A WAVE file is considered truncated if any of the chunks are incomplete or\n *  the data chunk size is not a multiple of the block size. By default, SDL\n *  decodes until the first incomplete block, as most applications seem to do.\n *\n *  This variable can be set to the following values:\n *\n *    \"verystrict\" - Raise an error if the file is truncated\n *    \"strict\"     - Like \"verystrict\", but the size of the RIFF chunk is ignored\n *    \"dropframe\"  - Decode until the first incomplete sample frame\n *    \"dropblock\"  - Decode until the first incomplete block (default)\n */\n#define SDL_HINT_WAVE_TRUNCATION   \"SDL_WAVE_TRUNCATION\"\n\n/**\n *  \\brief  Controls how the fact chunk affects the loading of a WAVE file.\n *\n *  The fact chunk stores information about the number of samples of a WAVE\n *  file. The Standards Update from Microsoft notes that this value can be used\n *  to 'determine the length of the data in seconds'. This is especially useful\n *  for compressed formats (for which this is a mandatory chunk) if they produce\n *  multiple sample frames per block and truncating the block is not allowed.\n *  The fact chunk can exactly specify how many sample frames there should be\n *  in this case.\n *\n *  Unfortunately, most application seem to ignore the fact chunk and so SDL\n *  ignores it by default as well.\n *\n *  This variable can be set to the following values:\n *\n *    \"truncate\"    - Use the number of samples to truncate the wave data if\n *                    the fact chunk is present and valid\n *    \"strict\"      - Like \"truncate\", but raise an error if the fact chunk\n *                    is invalid, not present for non-PCM formats, or if the\n *                    data chunk doesn't have that many samples\n *    \"ignorezero\"  - Like \"truncate\", but ignore fact chunk if the number of\n *                    samples is zero\n *    \"ignore\"      - Ignore fact chunk entirely (default)\n */\n#define SDL_HINT_WAVE_FACT_CHUNK   \"SDL_WAVE_FACT_CHUNK\"\n\n/**\n *  \\brief  An enumeration of hint priorities\n */\ntypedef enum\n{\n    SDL_HINT_DEFAULT,\n    SDL_HINT_NORMAL,\n    SDL_HINT_OVERRIDE\n} SDL_HintPriority;\n\n\n/**\n *  \\brief Set a hint with a specific priority\n *\n *  The priority controls the behavior when setting a hint that already\n *  has a value.  Hints will replace existing hints of their priority and\n *  lower.  Environment variables are considered to have override priority.\n *\n *  \\return SDL_TRUE if the hint was set, SDL_FALSE otherwise\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,\n                                                         const char *value,\n                                                         SDL_HintPriority priority);\n\n/**\n *  \\brief Set a hint with normal priority\n *\n *  \\return SDL_TRUE if the hint was set, SDL_FALSE otherwise\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,\n                                             const char *value);\n\n/**\n *  \\brief Get a hint\n *\n *  \\return The string value of a hint variable.\n */\nextern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);\n\n/**\n *  \\brief Get a hint\n *\n *  \\return The boolean value of a hint variable.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);\n\n/**\n * \\brief type definition of the hint callback function.\n */\ntypedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);\n\n/**\n *  \\brief Add a function to watch a particular hint\n *\n *  \\param name The hint to watch\n *  \\param callback The function to call when the hint value changes\n *  \\param userdata A pointer to pass to the callback function\n */\nextern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,\n                                                 SDL_HintCallback callback,\n                                                 void *userdata);\n\n/**\n *  \\brief Remove a function watching a particular hint\n *\n *  \\param name The hint being watched\n *  \\param callback The function being called when the hint value changes\n *  \\param userdata A pointer being passed to the callback function\n */\nextern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,\n                                                 SDL_HintCallback callback,\n                                                 void *userdata);\n\n/**\n *  \\brief  Clear all hints\n *\n *  This function is called during SDL_Quit() to free stored hints.\n */\nextern DECLSPEC void SDLCALL SDL_ClearHints(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_hints_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_joystick.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_joystick.h\n *\n *  Include file for SDL joystick event handling\n *\n * The term \"device_index\" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick\n *   behind a device_index changing as joysticks are plugged and unplugged.\n *\n * The term \"instance_id\" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted\n *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.\n *\n * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of\n *   the device (a X360 wired controller for example). This identifier is platform dependent.\n *\n *\n */\n\n#ifndef SDL_joystick_h_\n#define SDL_joystick_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_joystick.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system\n *  for joysticks, and load appropriate drivers.\n *\n *  If you would like to receive joystick updates while the application\n *  is in the background, you should set the following hint before calling\n *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS\n */\n\n/**\n * The joystick structure used to identify an SDL joystick\n */\nstruct _SDL_Joystick;\ntypedef struct _SDL_Joystick SDL_Joystick;\n\n/* A structure that encodes the stable unique id for a joystick device */\ntypedef struct {\n    Uint8 data[16];\n} SDL_JoystickGUID;\n\n/**\n * This is a unique ID for a joystick for the time it is connected to the system,\n * and is never reused for the lifetime of the application. If the joystick is\n * disconnected and reconnected, it will get a new ID.\n *\n * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.\n */\ntypedef Sint32 SDL_JoystickID;\n\ntypedef enum\n{\n    SDL_JOYSTICK_TYPE_UNKNOWN,\n    SDL_JOYSTICK_TYPE_GAMECONTROLLER,\n    SDL_JOYSTICK_TYPE_WHEEL,\n    SDL_JOYSTICK_TYPE_ARCADE_STICK,\n    SDL_JOYSTICK_TYPE_FLIGHT_STICK,\n    SDL_JOYSTICK_TYPE_DANCE_PAD,\n    SDL_JOYSTICK_TYPE_GUITAR,\n    SDL_JOYSTICK_TYPE_DRUM_KIT,\n    SDL_JOYSTICK_TYPE_ARCADE_PAD,\n    SDL_JOYSTICK_TYPE_THROTTLE\n} SDL_JoystickType;\n\ntypedef enum\n{\n    SDL_JOYSTICK_POWER_UNKNOWN = -1,\n    SDL_JOYSTICK_POWER_EMPTY,   /* <= 5% */\n    SDL_JOYSTICK_POWER_LOW,     /* <= 20% */\n    SDL_JOYSTICK_POWER_MEDIUM,  /* <= 70% */\n    SDL_JOYSTICK_POWER_FULL,    /* <= 100% */\n    SDL_JOYSTICK_POWER_WIRED,\n    SDL_JOYSTICK_POWER_MAX\n} SDL_JoystickPowerLevel;\n\n/* Function prototypes */\n\n/**\n * Locking for multi-threaded access to the joystick API\n *\n * If you are using the joystick API or handling events from multiple threads\n * you should use these locking functions to protect access to the joysticks.\n *\n * In particular, you are guaranteed that the joystick list won't change, so\n * the API functions that take a joystick index will be valid, and joystick\n * and game controller events will not be delivered.\n */\nextern DECLSPEC void SDLCALL SDL_LockJoysticks(void);\nextern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);\n\n/**\n *  Count the number of joysticks attached to the system right now\n */\nextern DECLSPEC int SDLCALL SDL_NumJoysticks(void);\n\n/**\n *  Get the implementation dependent name of a joystick.\n *  This can be called before any joysticks are opened.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);\n\n/**\n *  Get the player index of a joystick, or -1 if it's not available\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);\n\n/**\n *  Return the GUID for the joystick at this index\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);\n\n/**\n *  Get the USB vendor ID of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);\n\n/**\n *  Get the USB product ID of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);\n\n/**\n *  Get the product version of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);\n\n/**\n *  Get the type of a joystick, if available.\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);\n\n/**\n *  Get the instance ID of a joystick.\n *  This can be called before any joysticks are opened.\n *  If the index is out of range, this function will return -1.\n */\nextern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);\n\n/**\n *  Open a joystick for use.\n *  The index passed as an argument refers to the N'th joystick on the system.\n *  This index is not the value which will identify this joystick in future\n *  joystick events.  The joystick's instance id (::SDL_JoystickID) will be used\n *  there instead.\n *\n *  \\return A joystick identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);\n\n/**\n * Return the SDL_Joystick associated with an instance id.\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);\n\n/**\n *  Return the name for this currently opened joystick.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);\n\n/**\n *  Get the player index of an opened joystick, or -1 if it's not available\n *\n *  For XInput controllers this returns the XInput user index.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);\n\n/**\n *  Return the GUID for this opened joystick\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);\n\n/**\n *  Get the USB vendor ID of an opened joystick, if available.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);\n\n/**\n *  Get the USB product ID of an opened joystick, if available.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);\n\n/**\n *  Get the product version of an opened joystick, if available.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);\n\n/**\n *  Get the type of an opened joystick.\n */\nextern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);\n\n/**\n *  Return a string representation for this guid. pszGUID must point to at least 33 bytes\n *  (32 for the string plus a NULL terminator).\n */\nextern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);\n\n/**\n *  Convert a string into a joystick guid\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);\n\n/**\n *  Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);\n\n/**\n *  Get the instance ID of an opened joystick or -1 if the joystick is invalid.\n */\nextern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);\n\n/**\n *  Get the number of general axis controls on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);\n\n/**\n *  Get the number of trackballs on a joystick.\n *\n *  Joystick trackballs have only relative motion events associated\n *  with them and their state cannot be polled.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);\n\n/**\n *  Get the number of POV hats on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);\n\n/**\n *  Get the number of buttons on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);\n\n/**\n *  Update the current state of the open joysticks.\n *\n *  This is called automatically by the event loop if any joystick\n *  events are enabled.\n */\nextern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);\n\n/**\n *  Enable/disable joystick event polling.\n *\n *  If joystick events are disabled, you must call SDL_JoystickUpdate()\n *  yourself and check the state of the joystick when you want joystick\n *  information.\n *\n *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);\n\n#define SDL_JOYSTICK_AXIS_MAX   32767\n#define SDL_JOYSTICK_AXIS_MIN   -32768\n/**\n *  Get the current state of an axis control on a joystick.\n *\n *  The state is a value ranging from -32768 to 32767.\n *\n *  The axis indices start at index 0.\n */\nextern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,\n                                                   int axis);\n\n/**\n *  Get the initial state of an axis control on a joystick.\n *\n *  The state is a value ranging from -32768 to 32767.\n *\n *  The axis indices start at index 0.\n *\n *  \\return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,\n                                                   int axis, Sint16 *state);\n\n/**\n *  \\name Hat positions\n */\n/* @{ */\n#define SDL_HAT_CENTERED    0x00\n#define SDL_HAT_UP          0x01\n#define SDL_HAT_RIGHT       0x02\n#define SDL_HAT_DOWN        0x04\n#define SDL_HAT_LEFT        0x08\n#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)\n#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)\n#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)\n#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)\n/* @} */\n\n/**\n *  Get the current state of a POV hat on a joystick.\n *\n *  The hat indices start at index 0.\n *\n *  \\return The return value is one of the following positions:\n *           - ::SDL_HAT_CENTERED\n *           - ::SDL_HAT_UP\n *           - ::SDL_HAT_RIGHT\n *           - ::SDL_HAT_DOWN\n *           - ::SDL_HAT_LEFT\n *           - ::SDL_HAT_RIGHTUP\n *           - ::SDL_HAT_RIGHTDOWN\n *           - ::SDL_HAT_LEFTUP\n *           - ::SDL_HAT_LEFTDOWN\n */\nextern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,\n                                                 int hat);\n\n/**\n *  Get the ball axis change since the last poll.\n *\n *  \\return 0, or -1 if you passed it invalid parameters.\n *\n *  The ball indices start at index 0.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,\n                                                int ball, int *dx, int *dy);\n\n/**\n *  Get the current state of a button on a joystick.\n *\n *  The button indices start at index 0.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,\n                                                    int button);\n\n/**\n *  Trigger a rumble effect\n *  Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.\n *\n *  \\param joystick The joystick to vibrate\n *  \\param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF\n *  \\param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF\n *  \\param duration_ms The duration of the rumble effect, in milliseconds\n *\n *  \\return 0, or -1 if rumble isn't supported on this joystick\n */\nextern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);\n\n/**\n *  Close a joystick previously opened with SDL_JoystickOpen().\n */\nextern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);\n\n/**\n *  Return the battery level of this joystick\n */\nextern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_joystick_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_keyboard.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_keyboard.h\n *\n *  Include file for SDL keyboard event handling\n */\n\n#ifndef SDL_keyboard_h_\n#define SDL_keyboard_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_keycode.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The SDL keysym structure, used in key events.\n *\n *  \\note  If you are looking for translated character input, see the ::SDL_TEXTINPUT event.\n */\ntypedef struct SDL_Keysym\n{\n    SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */\n    SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */\n    Uint16 mod;                 /**< current key modifiers */\n    Uint32 unused;\n} SDL_Keysym;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the window which currently has keyboard focus.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);\n\n/**\n *  \\brief Get a snapshot of the current state of the keyboard.\n *\n *  \\param numkeys if non-NULL, receives the length of the returned array.\n *\n *  \\return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.\n *\n *  \\b Example:\n *  \\code\n *  const Uint8 *state = SDL_GetKeyboardState(NULL);\n *  if ( state[SDL_SCANCODE_RETURN] )   {\n *      printf(\"<RETURN> is pressed.\\n\");\n *  }\n *  \\endcode\n */\nextern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);\n\n/**\n *  \\brief Get the current key modifier state for the keyboard.\n */\nextern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);\n\n/**\n *  \\brief Set the current key modifier state for the keyboard.\n *\n *  \\note This does not change the keyboard state, only the key modifier flags.\n */\nextern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);\n\n/**\n *  \\brief Get the key code corresponding to the given scancode according\n *         to the current keyboard layout.\n *\n *  See ::SDL_Keycode for details.\n *\n *  \\sa SDL_GetKeyName()\n */\nextern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);\n\n/**\n *  \\brief Get the scancode corresponding to the given key code according to the\n *         current keyboard layout.\n *\n *  See ::SDL_Scancode for details.\n *\n *  \\sa SDL_GetScancodeName()\n */\nextern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);\n\n/**\n *  \\brief Get a human-readable name for a scancode.\n *\n *  \\return A pointer to the name for the scancode.\n *          If the scancode doesn't have a name, this function returns\n *          an empty string (\"\").\n *\n *  \\sa SDL_Scancode\n */\nextern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);\n\n/**\n *  \\brief Get a scancode from a human-readable name\n *\n *  \\return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized\n *\n *  \\sa SDL_Scancode\n */\nextern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);\n\n/**\n *  \\brief Get a human-readable name for a key.\n *\n *  \\return A pointer to a UTF-8 string that stays valid at least until the next\n *          call to this function. If you need it around any longer, you must\n *          copy it.  If the key doesn't have a name, this function returns an\n *          empty string (\"\").\n *\n *  \\sa SDL_Keycode\n */\nextern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);\n\n/**\n *  \\brief Get a key code from a human-readable name\n *\n *  \\return key code, or SDLK_UNKNOWN if the name wasn't recognized\n *\n *  \\sa SDL_Keycode\n */\nextern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);\n\n/**\n *  \\brief Start accepting Unicode text input events.\n *         This function will show the on-screen keyboard if supported.\n *\n *  \\sa SDL_StopTextInput()\n *  \\sa SDL_SetTextInputRect()\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC void SDLCALL SDL_StartTextInput(void);\n\n/**\n *  \\brief Return whether or not Unicode text input events are enabled.\n *\n *  \\sa SDL_StartTextInput()\n *  \\sa SDL_StopTextInput()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);\n\n/**\n *  \\brief Stop receiving any text input events.\n *         This function will hide the on-screen keyboard if supported.\n *\n *  \\sa SDL_StartTextInput()\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC void SDLCALL SDL_StopTextInput(void);\n\n/**\n *  \\brief Set the rectangle used to type Unicode text inputs.\n *         This is used as a hint for IME and on-screen keyboard placement.\n *\n *  \\sa SDL_StartTextInput()\n */\nextern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);\n\n/**\n *  \\brief Returns whether the platform has some screen keyboard support.\n *\n *  \\return SDL_TRUE if some keyboard support is available else SDL_FALSE.\n *\n *  \\note Not all screen keyboard functions are supported on all platforms.\n *\n *  \\sa SDL_IsScreenKeyboardShown()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);\n\n/**\n *  \\brief Returns whether the screen keyboard is shown for given window.\n *\n *  \\param window The window for which screen keyboard should be queried.\n *\n *  \\return SDL_TRUE if screen keyboard is shown else SDL_FALSE.\n *\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_keyboard_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_keycode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_keycode.h\n *\n *  Defines constants which identify keyboard keys and modifiers.\n */\n\n#ifndef SDL_keycode_h_\n#define SDL_keycode_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_scancode.h\"\n\n/**\n *  \\brief The SDL virtual key representation.\n *\n *  Values of this type are used to represent keyboard keys using the current\n *  layout of the keyboard.  These values include Unicode values representing\n *  the unmodified character that would be generated by pressing the key, or\n *  an SDLK_* constant for those keys that do not generate characters.\n *\n *  A special exception is the number keys at the top of the keyboard which\n *  always map to SDLK_0...SDLK_9, regardless of layout.\n */\ntypedef Sint32 SDL_Keycode;\n\n#define SDLK_SCANCODE_MASK (1<<30)\n#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)\n\nenum\n{\n    SDLK_UNKNOWN = 0,\n\n    SDLK_RETURN = '\\r',\n    SDLK_ESCAPE = '\\033',\n    SDLK_BACKSPACE = '\\b',\n    SDLK_TAB = '\\t',\n    SDLK_SPACE = ' ',\n    SDLK_EXCLAIM = '!',\n    SDLK_QUOTEDBL = '\"',\n    SDLK_HASH = '#',\n    SDLK_PERCENT = '%',\n    SDLK_DOLLAR = '$',\n    SDLK_AMPERSAND = '&',\n    SDLK_QUOTE = '\\'',\n    SDLK_LEFTPAREN = '(',\n    SDLK_RIGHTPAREN = ')',\n    SDLK_ASTERISK = '*',\n    SDLK_PLUS = '+',\n    SDLK_COMMA = ',',\n    SDLK_MINUS = '-',\n    SDLK_PERIOD = '.',\n    SDLK_SLASH = '/',\n    SDLK_0 = '0',\n    SDLK_1 = '1',\n    SDLK_2 = '2',\n    SDLK_3 = '3',\n    SDLK_4 = '4',\n    SDLK_5 = '5',\n    SDLK_6 = '6',\n    SDLK_7 = '7',\n    SDLK_8 = '8',\n    SDLK_9 = '9',\n    SDLK_COLON = ':',\n    SDLK_SEMICOLON = ';',\n    SDLK_LESS = '<',\n    SDLK_EQUALS = '=',\n    SDLK_GREATER = '>',\n    SDLK_QUESTION = '?',\n    SDLK_AT = '@',\n    /*\n       Skip uppercase letters\n     */\n    SDLK_LEFTBRACKET = '[',\n    SDLK_BACKSLASH = '\\\\',\n    SDLK_RIGHTBRACKET = ']',\n    SDLK_CARET = '^',\n    SDLK_UNDERSCORE = '_',\n    SDLK_BACKQUOTE = '`',\n    SDLK_a = 'a',\n    SDLK_b = 'b',\n    SDLK_c = 'c',\n    SDLK_d = 'd',\n    SDLK_e = 'e',\n    SDLK_f = 'f',\n    SDLK_g = 'g',\n    SDLK_h = 'h',\n    SDLK_i = 'i',\n    SDLK_j = 'j',\n    SDLK_k = 'k',\n    SDLK_l = 'l',\n    SDLK_m = 'm',\n    SDLK_n = 'n',\n    SDLK_o = 'o',\n    SDLK_p = 'p',\n    SDLK_q = 'q',\n    SDLK_r = 'r',\n    SDLK_s = 's',\n    SDLK_t = 't',\n    SDLK_u = 'u',\n    SDLK_v = 'v',\n    SDLK_w = 'w',\n    SDLK_x = 'x',\n    SDLK_y = 'y',\n    SDLK_z = 'z',\n\n    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),\n\n    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),\n    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),\n    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),\n    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),\n    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),\n    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),\n    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),\n    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),\n    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),\n    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),\n    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),\n    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),\n\n    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),\n    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),\n    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),\n    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),\n    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),\n    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),\n    SDLK_DELETE = '\\177',\n    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),\n    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),\n    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),\n    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),\n    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),\n    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),\n\n    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),\n    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),\n    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),\n    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),\n    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),\n    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),\n    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),\n    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),\n    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),\n    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),\n    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),\n    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),\n    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),\n    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),\n    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),\n    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),\n    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),\n\n    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),\n    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),\n    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),\n    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),\n    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),\n    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),\n    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),\n    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),\n    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),\n    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),\n    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),\n    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),\n    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),\n    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),\n    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),\n    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),\n    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),\n    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),\n    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),\n    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),\n    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),\n    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),\n    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),\n    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),\n    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),\n    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),\n    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),\n    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),\n    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),\n    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),\n    SDLK_KP_EQUALSAS400 =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),\n\n    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),\n    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),\n    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),\n    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),\n    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),\n    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),\n    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),\n    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),\n    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),\n    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),\n    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),\n    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),\n\n    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),\n    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),\n    SDLK_THOUSANDSSEPARATOR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),\n    SDLK_DECIMALSEPARATOR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),\n    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),\n    SDLK_CURRENCYSUBUNIT =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),\n    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),\n    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),\n    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),\n    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),\n    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),\n    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),\n    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),\n    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),\n    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),\n    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),\n    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),\n    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),\n    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),\n    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),\n    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),\n    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),\n    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),\n    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),\n    SDLK_KP_DBLAMPERSAND =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),\n    SDLK_KP_VERTICALBAR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),\n    SDLK_KP_DBLVERTICALBAR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),\n    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),\n    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),\n    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),\n    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),\n    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),\n    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),\n    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),\n    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),\n    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),\n    SDLK_KP_MEMSUBTRACT =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),\n    SDLK_KP_MEMMULTIPLY =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),\n    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),\n    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),\n    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),\n    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),\n    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),\n    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),\n    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),\n    SDLK_KP_HEXADECIMAL =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),\n\n    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),\n    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),\n    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),\n    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),\n    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),\n    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),\n    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),\n    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),\n\n    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),\n\n    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),\n    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),\n    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),\n    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),\n    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),\n    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),\n    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),\n    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),\n    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),\n    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),\n    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),\n    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),\n    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),\n    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),\n    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),\n    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),\n    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),\n\n    SDLK_BRIGHTNESSDOWN =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),\n    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),\n    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),\n    SDLK_KBDILLUMTOGGLE =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),\n    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),\n    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),\n    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),\n    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),\n    SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),\n    SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),\n\n    SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),\n    SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)\n};\n\n/**\n * \\brief Enumeration of valid key mods (possibly OR'd together).\n */\ntypedef enum\n{\n    KMOD_NONE = 0x0000,\n    KMOD_LSHIFT = 0x0001,\n    KMOD_RSHIFT = 0x0002,\n    KMOD_LCTRL = 0x0040,\n    KMOD_RCTRL = 0x0080,\n    KMOD_LALT = 0x0100,\n    KMOD_RALT = 0x0200,\n    KMOD_LGUI = 0x0400,\n    KMOD_RGUI = 0x0800,\n    KMOD_NUM = 0x1000,\n    KMOD_CAPS = 0x2000,\n    KMOD_MODE = 0x4000,\n    KMOD_RESERVED = 0x8000\n} SDL_Keymod;\n\n#define KMOD_CTRL   (KMOD_LCTRL|KMOD_RCTRL)\n#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)\n#define KMOD_ALT    (KMOD_LALT|KMOD_RALT)\n#define KMOD_GUI    (KMOD_LGUI|KMOD_RGUI)\n\n#endif /* SDL_keycode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_loadso.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_loadso.h\n *\n *  System dependent library loading routines\n *\n *  Some things to keep in mind:\n *  \\li These functions only work on C function names.  Other languages may\n *      have name mangling and intrinsic language support that varies from\n *      compiler to compiler.\n *  \\li Make sure you declare your function pointers with the same calling\n *      convention as the actual library function.  Your code will crash\n *      mysteriously if you do not do this.\n *  \\li Avoid namespace collisions.  If you load a symbol from the library,\n *      it is not defined whether or not it goes into the global symbol\n *      namespace for the application.  If it does and it conflicts with\n *      symbols in your code or other shared libraries, you will not get\n *      the results you expect. :)\n */\n\n#ifndef SDL_loadso_h_\n#define SDL_loadso_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  This function dynamically loads a shared object and returns a pointer\n *  to the object handle (or NULL if there was an error).\n *  The 'sofile' parameter is a system dependent name of the object file.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);\n\n/**\n *  Given an object handle, this function looks up the address of the\n *  named function in the shared object and returns it.  This address\n *  is no longer valid after calling SDL_UnloadObject().\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,\n                                               const char *name);\n\n/**\n *  Unload a shared object from memory.\n */\nextern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_loadso_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_log.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_log.h\n *\n *  Simple log messages with categories and priorities.\n *\n *  By default logs are quiet, but if you're debugging SDL you might want:\n *\n *      SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);\n *\n *  Here's where the messages go on different platforms:\n *      Windows: debug output stream\n *      Android: log output\n *      Others: standard error output (stderr)\n */\n\n#ifndef SDL_log_h_\n#define SDL_log_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/**\n *  \\brief The maximum size of a log message\n *\n *  Messages longer than the maximum size will be truncated\n */\n#define SDL_MAX_LOG_MESSAGE 4096\n\n/**\n *  \\brief The predefined log categories\n *\n *  By default the application category is enabled at the INFO level,\n *  the assert category is enabled at the WARN level, test is enabled\n *  at the VERBOSE level and all other categories are enabled at the\n *  CRITICAL level.\n */\nenum\n{\n    SDL_LOG_CATEGORY_APPLICATION,\n    SDL_LOG_CATEGORY_ERROR,\n    SDL_LOG_CATEGORY_ASSERT,\n    SDL_LOG_CATEGORY_SYSTEM,\n    SDL_LOG_CATEGORY_AUDIO,\n    SDL_LOG_CATEGORY_VIDEO,\n    SDL_LOG_CATEGORY_RENDER,\n    SDL_LOG_CATEGORY_INPUT,\n    SDL_LOG_CATEGORY_TEST,\n\n    /* Reserved for future SDL library use */\n    SDL_LOG_CATEGORY_RESERVED1,\n    SDL_LOG_CATEGORY_RESERVED2,\n    SDL_LOG_CATEGORY_RESERVED3,\n    SDL_LOG_CATEGORY_RESERVED4,\n    SDL_LOG_CATEGORY_RESERVED5,\n    SDL_LOG_CATEGORY_RESERVED6,\n    SDL_LOG_CATEGORY_RESERVED7,\n    SDL_LOG_CATEGORY_RESERVED8,\n    SDL_LOG_CATEGORY_RESERVED9,\n    SDL_LOG_CATEGORY_RESERVED10,\n\n    /* Beyond this point is reserved for application use, e.g.\n       enum {\n           MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,\n           MYAPP_CATEGORY_AWESOME2,\n           MYAPP_CATEGORY_AWESOME3,\n           ...\n       };\n     */\n    SDL_LOG_CATEGORY_CUSTOM\n};\n\n/**\n *  \\brief The predefined log priorities\n */\ntypedef enum\n{\n    SDL_LOG_PRIORITY_VERBOSE = 1,\n    SDL_LOG_PRIORITY_DEBUG,\n    SDL_LOG_PRIORITY_INFO,\n    SDL_LOG_PRIORITY_WARN,\n    SDL_LOG_PRIORITY_ERROR,\n    SDL_LOG_PRIORITY_CRITICAL,\n    SDL_NUM_LOG_PRIORITIES\n} SDL_LogPriority;\n\n\n/**\n *  \\brief Set the priority of all log categories\n */\nextern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);\n\n/**\n *  \\brief Set the priority of a particular log category\n */\nextern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,\n                                                SDL_LogPriority priority);\n\n/**\n *  \\brief Get the priority of a particular log category\n */\nextern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);\n\n/**\n *  \\brief Reset all priorities to default.\n *\n *  \\note This is called in SDL_Quit().\n */\nextern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);\n\n/**\n *  \\brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO\n */\nextern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_VERBOSE\n */\nextern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_DEBUG\n */\nextern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_INFO\n */\nextern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_WARN\n */\nextern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_ERROR\n */\nextern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_CRITICAL\n */\nextern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with the specified category and priority.\n */\nextern DECLSPEC void SDLCALL SDL_LogMessage(int category,\n                                            SDL_LogPriority priority,\n                                            SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);\n\n/**\n *  \\brief Log a message with the specified category and priority.\n */\nextern DECLSPEC void SDLCALL SDL_LogMessageV(int category,\n                                             SDL_LogPriority priority,\n                                             const char *fmt, va_list ap);\n\n/**\n *  \\brief The prototype for the log output function\n */\ntypedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);\n\n/**\n *  \\brief Get the current log output function.\n */\nextern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);\n\n/**\n *  \\brief This function allows you to replace the default log output\n *         function with one of your own.\n */\nextern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_log_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_main.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_main_h_\n#define SDL_main_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\file SDL_main.h\n *\n *  Redefine main() on some platforms so that it is called by SDL.\n */\n\n#ifndef SDL_MAIN_HANDLED\n#if defined(__WIN32__)\n/* On Windows SDL provides WinMain(), which parses the command line and passes\n   the arguments to your main function.\n\n   If you provide your own WinMain(), you may define SDL_MAIN_HANDLED\n */\n#define SDL_MAIN_AVAILABLE\n\n#elif defined(__WINRT__)\n/* On WinRT, SDL provides a main function that initializes CoreApplication,\n   creating an instance of IFrameworkView in the process.\n\n   Please note that #include'ing SDL_main.h is not enough to get a main()\n   function working.  In non-XAML apps, the file,\n   src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled\n   into the app itself.  In XAML apps, the function, SDL_WinRTRunApp must be\n   called, with a pointer to the Direct3D-hosted XAML control passed in.\n*/\n#define SDL_MAIN_NEEDED\n\n#elif defined(__IPHONEOS__)\n/* On iOS SDL provides a main function that creates an application delegate\n   and starts the iOS application run loop.\n\n   If you link with SDL dynamically on iOS, the main function can't be in a\n   shared library, so you need to link with libSDLmain.a, which includes a\n   stub main function that calls into the shared library to start execution.\n\n   See src/video/uikit/SDL_uikitappdelegate.m for more details.\n */\n#define SDL_MAIN_NEEDED\n\n#elif defined(__ANDROID__)\n/* On Android SDL provides a Java class in SDLActivity.java that is the\n   main activity entry point.\n\n   See docs/README-android.md for more details on extending that class.\n */\n#define SDL_MAIN_NEEDED\n\n/* We need to export SDL_main so it can be launched from Java */\n#define SDLMAIN_DECLSPEC    DECLSPEC\n\n#elif defined(__NACL__)\n/* On NACL we use ppapi_simple to set up the application helper code,\n   then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before \n   starting the user main function.\n   All user code is run in a separate thread by ppapi_simple, thus \n   allowing for blocking io to take place via nacl_io\n*/\n#define SDL_MAIN_NEEDED\n\n#endif\n#endif /* SDL_MAIN_HANDLED */\n\n#ifndef SDLMAIN_DECLSPEC\n#define SDLMAIN_DECLSPEC\n#endif\n\n/**\n *  \\file SDL_main.h\n *\n *  The application's main() function must be called with C linkage,\n *  and should be declared like this:\n *  \\code\n *  #ifdef __cplusplus\n *  extern \"C\"\n *  #endif\n *  int main(int argc, char *argv[])\n *  {\n *  }\n *  \\endcode\n */\n\n#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)\n#define main    SDL_main\n#endif\n\n#include \"begin_code.h\"\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  The prototype for the application's main() function\n */\ntypedef int (*SDL_main_func)(int argc, char *argv[]);\nextern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);\n\n\n/**\n *  This is called by the real SDL main function to let the rest of the\n *  library know that initialization was done properly.\n *\n *  Calling this yourself without knowing what you're doing can cause\n *  crashes and hard to diagnose problems with your application.\n */\nextern DECLSPEC void SDLCALL SDL_SetMainReady(void);\n\n#ifdef __WIN32__\n\n/**\n *  This can be called to set the application class at startup\n */\nextern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);\nextern DECLSPEC void SDLCALL SDL_UnregisterApp(void);\n\n#endif /* __WIN32__ */\n\n\n#ifdef __WINRT__\n\n/**\n *  \\brief Initializes and launches an SDL/WinRT application.\n *\n *  \\param mainFunction The SDL app's C-style main().\n *  \\param reserved Reserved for future use; should be NULL\n *  \\return 0 on success, -1 on failure.  On failure, use SDL_GetError to retrieve more\n *      information on the failure.\n */\nextern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);\n\n#endif /* __WINRT__ */\n\n#if defined(__IPHONEOS__)\n\n/**\n *  \\brief Initializes and launches an SDL application.\n *\n *  \\param argc The argc parameter from the application's main() function\n *  \\param argv The argv parameter from the application's main() function\n *  \\param mainFunction The SDL app's C-style main().\n *  \\return the return value from mainFunction\n */\nextern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);\n\n#endif /* __IPHONEOS__ */\n\n\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_main_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_messagebox.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_messagebox_h_\n#define SDL_messagebox_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_video.h\"      /* For SDL_Window */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief SDL_MessageBox flags. If supported will display warning icon, etc.\n */\ntypedef enum\n{\n    SDL_MESSAGEBOX_ERROR        = 0x00000010,   /**< error dialog */\n    SDL_MESSAGEBOX_WARNING      = 0x00000020,   /**< warning dialog */\n    SDL_MESSAGEBOX_INFORMATION  = 0x00000040    /**< informational dialog */\n} SDL_MessageBoxFlags;\n\n/**\n * \\brief Flags for SDL_MessageBoxButtonData.\n */\ntypedef enum\n{\n    SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,  /**< Marks the default button when return is hit */\n    SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002   /**< Marks the default button when escape is hit */\n} SDL_MessageBoxButtonFlags;\n\n/**\n *  \\brief Individual button data.\n */\ntypedef struct\n{\n    Uint32 flags;       /**< ::SDL_MessageBoxButtonFlags */\n    int buttonid;       /**< User defined button id (value returned via SDL_ShowMessageBox) */\n    const char * text;  /**< The UTF-8 button text */\n} SDL_MessageBoxButtonData;\n\n/**\n * \\brief RGB value used in a message box color scheme\n */\ntypedef struct\n{\n    Uint8 r, g, b;\n} SDL_MessageBoxColor;\n\ntypedef enum\n{\n    SDL_MESSAGEBOX_COLOR_BACKGROUND,\n    SDL_MESSAGEBOX_COLOR_TEXT,\n    SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,\n    SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,\n    SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,\n    SDL_MESSAGEBOX_COLOR_MAX\n} SDL_MessageBoxColorType;\n\n/**\n * \\brief A set of colors to use for message box dialogs\n */\ntypedef struct\n{\n    SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];\n} SDL_MessageBoxColorScheme;\n\n/**\n *  \\brief MessageBox structure containing title, text, window, etc.\n */\ntypedef struct\n{\n    Uint32 flags;                       /**< ::SDL_MessageBoxFlags */\n    SDL_Window *window;                 /**< Parent window, can be NULL */\n    const char *title;                  /**< UTF-8 title */\n    const char *message;                /**< UTF-8 message text */\n\n    int numbuttons;\n    const SDL_MessageBoxButtonData *buttons;\n\n    const SDL_MessageBoxColorScheme *colorScheme;   /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */\n} SDL_MessageBoxData;\n\n/**\n *  \\brief Create a modal message box.\n *\n *  \\param messageboxdata The SDL_MessageBoxData structure with title, text, etc.\n *  \\param buttonid The pointer to which user id of hit button should be copied.\n *\n *  \\return -1 on error, otherwise 0 and buttonid contains user id of button\n *          hit or -1 if dialog was closed.\n *\n *  \\note This function should be called on the thread that created the parent\n *        window, or on the main thread if the messagebox has no parent.  It will\n *        block execution of that thread until the user clicks a button or\n *        closes the messagebox.\n */\nextern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);\n\n/**\n *  \\brief Create a simple modal message box\n *\n *  \\param flags    ::SDL_MessageBoxFlags\n *  \\param title    UTF-8 title text\n *  \\param message  UTF-8 message text\n *  \\param window   The parent window, or NULL for no parent\n *\n *  \\return 0 on success, -1 on error\n *\n *  \\sa SDL_ShowMessageBox\n */\nextern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_messagebox_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_mouse.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_mouse.h\n *\n *  Include file for SDL mouse event handling.\n */\n\n#ifndef SDL_mouse_h_\n#define SDL_mouse_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct SDL_Cursor SDL_Cursor;   /**< Implementation dependent */\n\n/**\n * \\brief Cursor types for SDL_CreateSystemCursor().\n */\ntypedef enum\n{\n    SDL_SYSTEM_CURSOR_ARROW,     /**< Arrow */\n    SDL_SYSTEM_CURSOR_IBEAM,     /**< I-beam */\n    SDL_SYSTEM_CURSOR_WAIT,      /**< Wait */\n    SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */\n    SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */\n    SDL_SYSTEM_CURSOR_SIZENWSE,  /**< Double arrow pointing northwest and southeast */\n    SDL_SYSTEM_CURSOR_SIZENESW,  /**< Double arrow pointing northeast and southwest */\n    SDL_SYSTEM_CURSOR_SIZEWE,    /**< Double arrow pointing west and east */\n    SDL_SYSTEM_CURSOR_SIZENS,    /**< Double arrow pointing north and south */\n    SDL_SYSTEM_CURSOR_SIZEALL,   /**< Four pointed arrow pointing north, south, east, and west */\n    SDL_SYSTEM_CURSOR_NO,        /**< Slashed circle or crossbones */\n    SDL_SYSTEM_CURSOR_HAND,      /**< Hand */\n    SDL_NUM_SYSTEM_CURSORS\n} SDL_SystemCursor;\n\n/**\n * \\brief Scroll direction types for the Scroll event\n */\ntypedef enum\n{\n    SDL_MOUSEWHEEL_NORMAL,    /**< The scroll direction is normal */\n    SDL_MOUSEWHEEL_FLIPPED    /**< The scroll direction is flipped / natural */\n} SDL_MouseWheelDirection;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the window which currently has mouse focus.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);\n\n/**\n *  \\brief Retrieve the current state of the mouse.\n *\n *  The current button state is returned as a button bitmask, which can\n *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the\n *  mouse cursor position relative to the focus window for the currently\n *  selected mouse.  You can pass NULL for either x or y.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);\n\n/**\n *  \\brief Get the current state of the mouse, in relation to the desktop\n *\n *  This works just like SDL_GetMouseState(), but the coordinates will be\n *  reported relative to the top-left of the desktop. This can be useful if\n *  you need to track the mouse outside of a specific window and\n *  SDL_CaptureMouse() doesn't fit your needs. For example, it could be\n *  useful if you need to track the mouse while dragging a window, where\n *  coordinates relative to a window might not be in sync at all times.\n *\n *  \\note SDL_GetMouseState() returns the mouse position as SDL understands\n *        it from the last pump of the event queue. This function, however,\n *        queries the OS for the current mouse position, and as such, might\n *        be a slightly less efficient function. Unless you know what you're\n *        doing and have a good reason to use this function, you probably want\n *        SDL_GetMouseState() instead.\n *\n *  \\param x Returns the current X coord, relative to the desktop. Can be NULL.\n *  \\param y Returns the current Y coord, relative to the desktop. Can be NULL.\n *  \\return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros.\n *\n *  \\sa SDL_GetMouseState\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);\n\n/**\n *  \\brief Retrieve the relative state of the mouse.\n *\n *  The current button state is returned as a button bitmask, which can\n *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the\n *  mouse deltas since the last call to SDL_GetRelativeMouseState().\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);\n\n/**\n *  \\brief Moves the mouse to the given position within the window.\n *\n *  \\param window The window to move the mouse into, or NULL for the current mouse focus\n *  \\param x The x coordinate within the window\n *  \\param y The y coordinate within the window\n *\n *  \\note This function generates a mouse motion event\n */\nextern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,\n                                                   int x, int y);\n\n/**\n *  \\brief Moves the mouse to the given position in global screen space.\n *\n *  \\param x The x coordinate\n *  \\param y The y coordinate\n *  \\return 0 on success, -1 on error (usually: unsupported by a platform).\n *\n *  \\note This function generates a mouse motion event\n */\nextern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);\n\n/**\n *  \\brief Set relative mouse mode.\n *\n *  \\param enabled Whether or not to enable relative mode\n *\n *  \\return 0 on success, or -1 if relative mode is not supported.\n *\n *  While the mouse is in relative mode, the cursor is hidden, and the\n *  driver will try to report continuous motion in the current window.\n *  Only relative motion events will be delivered, the mouse position\n *  will not change.\n *\n *  \\note This function will flush any pending mouse motion.\n *\n *  \\sa SDL_GetRelativeMouseMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);\n\n/**\n *  \\brief Capture the mouse, to track input outside an SDL window.\n *\n *  \\param enabled Whether or not to enable capturing\n *\n *  Capturing enables your app to obtain mouse events globally, instead of\n *  just within your window. Not all video targets support this function.\n *  When capturing is enabled, the current window will get all mouse events,\n *  but unlike relative mode, no change is made to the cursor and it is\n *  not restrained to your window.\n *\n *  This function may also deny mouse input to other windows--both those in\n *  your application and others on the system--so you should use this\n *  function sparingly, and in small bursts. For example, you might want to\n *  track the mouse while the user is dragging something, until the user\n *  releases a mouse button. It is not recommended that you capture the mouse\n *  for long periods of time, such as the entire time your app is running.\n *\n *  While captured, mouse events still report coordinates relative to the\n *  current (foreground) window, but those coordinates may be outside the\n *  bounds of the window (including negative values). Capturing is only\n *  allowed for the foreground window. If the window loses focus while\n *  capturing, the capture will be disabled automatically.\n *\n *  While capturing is enabled, the current window will have the\n *  SDL_WINDOW_MOUSE_CAPTURE flag set.\n *\n *  \\return 0 on success, or -1 if not supported.\n */\nextern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);\n\n/**\n *  \\brief Query whether relative mouse mode is enabled.\n *\n *  \\sa SDL_SetRelativeMouseMode()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);\n\n/**\n *  \\brief Create a cursor, using the specified bitmap data and\n *         mask (in MSB format).\n *\n *  The cursor width must be a multiple of 8 bits.\n *\n *  The cursor is created in black and white according to the following:\n *  <table>\n *  <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>\n *  <tr><td>  0   </td><td>  1   </td><td> White </td></tr>\n *  <tr><td>  1   </td><td>  1   </td><td> Black </td></tr>\n *  <tr><td>  0   </td><td>  0   </td><td> Transparent </td></tr>\n *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black\n *                                         if not. </td></tr>\n *  </table>\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,\n                                                     const Uint8 * mask,\n                                                     int w, int h, int hot_x,\n                                                     int hot_y);\n\n/**\n *  \\brief Create a color cursor.\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,\n                                                          int hot_x,\n                                                          int hot_y);\n\n/**\n *  \\brief Create a system cursor.\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);\n\n/**\n *  \\brief Set the active cursor.\n */\nextern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);\n\n/**\n *  \\brief Return the active cursor.\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);\n\n/**\n *  \\brief Return the default cursor.\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);\n\n/**\n *  \\brief Frees a cursor created with SDL_CreateCursor() or similar functions.\n *\n *  \\sa SDL_CreateCursor()\n *  \\sa SDL_CreateColorCursor()\n *  \\sa SDL_CreateSystemCursor()\n */\nextern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);\n\n/**\n *  \\brief Toggle whether or not the cursor is shown.\n *\n *  \\param toggle 1 to show the cursor, 0 to hide it, -1 to query the current\n *                state.\n *\n *  \\return 1 if the cursor is shown, or 0 if the cursor is hidden.\n */\nextern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);\n\n/**\n *  Used as a mask when testing buttons in buttonstate.\n *   - Button 1:  Left mouse button\n *   - Button 2:  Middle mouse button\n *   - Button 3:  Right mouse button\n */\n#define SDL_BUTTON(X)       (1 << ((X)-1))\n#define SDL_BUTTON_LEFT     1\n#define SDL_BUTTON_MIDDLE   2\n#define SDL_BUTTON_RIGHT    3\n#define SDL_BUTTON_X1       4\n#define SDL_BUTTON_X2       5\n#define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)\n#define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)\n#define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)\n#define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)\n#define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_mouse_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_mutex.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_mutex_h_\n#define SDL_mutex_h_\n\n/**\n *  \\file SDL_mutex.h\n *\n *  Functions to provide thread synchronization primitives.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  Synchronization functions which can time out return this value\n *  if they time out.\n */\n#define SDL_MUTEX_TIMEDOUT  1\n\n/**\n *  This is the timeout value which corresponds to never time out.\n */\n#define SDL_MUTEX_MAXWAIT   (~(Uint32)0)\n\n\n/**\n *  \\name Mutex functions\n */\n/* @{ */\n\n/* The SDL mutex structure, defined in SDL_sysmutex.c */\nstruct SDL_mutex;\ntypedef struct SDL_mutex SDL_mutex;\n\n/**\n *  Create a mutex, initialized unlocked.\n */\nextern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);\n\n/**\n *  Lock the mutex.\n *\n *  \\return 0, or -1 on error.\n */\n#define SDL_mutexP(m)   SDL_LockMutex(m)\nextern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);\n\n/**\n *  Try to lock the mutex\n *\n *  \\return 0, SDL_MUTEX_TIMEDOUT, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);\n\n/**\n *  Unlock the mutex.\n *\n *  \\return 0, or -1 on error.\n *\n *  \\warning It is an error to unlock a mutex that has not been locked by\n *           the current thread, and doing so results in undefined behavior.\n */\n#define SDL_mutexV(m)   SDL_UnlockMutex(m)\nextern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);\n\n/**\n *  Destroy a mutex.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);\n\n/* @} *//* Mutex functions */\n\n\n/**\n *  \\name Semaphore functions\n */\n/* @{ */\n\n/* The SDL semaphore structure, defined in SDL_syssem.c */\nstruct SDL_semaphore;\ntypedef struct SDL_semaphore SDL_sem;\n\n/**\n *  Create a semaphore, initialized with value, returns NULL on failure.\n */\nextern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);\n\n/**\n *  Destroy a semaphore.\n */\nextern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);\n\n/**\n *  This function suspends the calling thread until the semaphore pointed\n *  to by \\c sem has a positive count. It then atomically decreases the\n *  semaphore count.\n */\nextern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);\n\n/**\n *  Non-blocking variant of SDL_SemWait().\n *\n *  \\return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would\n *          block, and -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);\n\n/**\n *  Variant of SDL_SemWait() with a timeout in milliseconds.\n *\n *  \\return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not\n *          succeed in the allotted time, and -1 on error.\n *\n *  \\warning On some platforms this function is implemented by looping with a\n *           delay of 1 ms, and so should be avoided if possible.\n */\nextern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);\n\n/**\n *  Atomically increases the semaphore's count (not blocking).\n *\n *  \\return 0, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);\n\n/**\n *  Returns the current count of the semaphore.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);\n\n/* @} *//* Semaphore functions */\n\n\n/**\n *  \\name Condition variable functions\n */\n/* @{ */\n\n/* The SDL condition variable structure, defined in SDL_syscond.c */\nstruct SDL_cond;\ntypedef struct SDL_cond SDL_cond;\n\n/**\n *  Create a condition variable.\n *\n *  Typical use of condition variables:\n *\n *  Thread A:\n *    SDL_LockMutex(lock);\n *    while ( ! condition ) {\n *        SDL_CondWait(cond, lock);\n *    }\n *    SDL_UnlockMutex(lock);\n *\n *  Thread B:\n *    SDL_LockMutex(lock);\n *    ...\n *    condition = true;\n *    ...\n *    SDL_CondSignal(cond);\n *    SDL_UnlockMutex(lock);\n *\n *  There is some discussion whether to signal the condition variable\n *  with the mutex locked or not.  There is some potential performance\n *  benefit to unlocking first on some platforms, but there are some\n *  potential race conditions depending on how your code is structured.\n *\n *  In general it's safer to signal the condition variable while the\n *  mutex is locked.\n */\nextern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);\n\n/**\n *  Destroy a condition variable.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);\n\n/**\n *  Restart one of the threads that are waiting on the condition variable.\n *\n *  \\return 0 or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);\n\n/**\n *  Restart all threads that are waiting on the condition variable.\n *\n *  \\return 0 or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);\n\n/**\n *  Wait on the condition variable, unlocking the provided mutex.\n *\n *  \\warning The mutex must be locked before entering this function!\n *\n *  The mutex is re-locked once the condition variable is signaled.\n *\n *  \\return 0 when it is signaled, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);\n\n/**\n *  Waits for at most \\c ms milliseconds, and returns 0 if the condition\n *  variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not\n *  signaled in the allotted time, and -1 on error.\n *\n *  \\warning On some platforms this function is implemented by looping with a\n *           delay of 1 ms, and so should be avoided if possible.\n */\nextern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,\n                                                SDL_mutex * mutex, Uint32 ms);\n\n/* @} *//* Condition variable functions */\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_mutex_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_name.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDLname_h_\n#define SDLname_h_\n\n#if defined(__STDC__) || defined(__cplusplus)\n#define NeedFunctionPrototypes 1\n#endif\n\n#define SDL_NAME(X) SDL_##X\n\n#endif /* SDLname_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengl.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengl.h\n *\n *  This is a simple file to encapsulate the OpenGL API headers.\n */\n\n/**\n *  \\def NO_SDL_GLEXT\n *\n *  Define this if you have your own version of glext.h and want to disable the\n *  version included in SDL_opengl.h.\n */\n\n#ifndef SDL_opengl_h_\n#define SDL_opengl_h_\n\n#include \"SDL_config.h\"\n\n#ifndef __IPHONEOS__  /* No OpenGL on iOS. */\n\n/*\n * Mesa 3-D graphics library\n *\n * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.\n * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n#ifndef __gl_h_\n#define __gl_h_\n\n#if defined(USE_MGL_NAMESPACE)\n#include \"gl_mangle.h\"\n#endif\n\n\n/**********************************************************************\n * Begin system-specific stuff.\n */\n\n#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)\n#define __WIN32__\n#endif\n\n#if defined(__WIN32__) && !defined(__CYGWIN__)\n#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */\n#    define GLAPI __declspec(dllexport)\n#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */\n#    define GLAPI __declspec(dllimport)\n#  else /* for use with static link lib build of Win32 edition only */\n#    define GLAPI extern\n#  endif /* _STATIC_MESA support */\n#  if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE)  /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */\n#    define GLAPIENTRY \n#  else\n#    define GLAPIENTRY __stdcall\n#  endif\n#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */\n#  define GLAPI extern\n#  define GLAPIENTRY __stdcall\n#elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */\n#  define GLAPI extern\n#  define GLAPIENTRY _System\n#  define APIENTRY _System\n#  if defined(__GNUC__) && !defined(_System)\n#    define _System\n#  endif\n#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))\n#  define GLAPI __attribute__((visibility(\"default\")))\n#  define GLAPIENTRY\n#endif /* WIN32 && !CYGWIN */\n\n/*\n * WINDOWS: Include windows.h here to define APIENTRY.\n * It is also useful when applications include this file by\n * including only glut.h, since glut.h depends on windows.h.\n * Applications needing to include windows.h with parms other\n * than \"WIN32_LEAN_AND_MEAN\" may include windows.h before\n * glut.h or gl.h.\n */\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#ifndef NOMINMAX   /* don't define min() and max(). */\n#define NOMINMAX\n#endif\n#include <windows.h>\n#endif\n\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n#ifndef GLAPIENTRY\n#define GLAPIENTRY\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY GLAPIENTRY\n#endif\n\n/* \"P\" suffix to be used for a pointer to a function */\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n\n#ifndef GLAPIENTRYP\n#define GLAPIENTRYP GLAPIENTRY *\n#endif\n\n#if defined(PRAGMA_EXPORT_SUPPORTED)\n#pragma export on\n#endif\n\n/*\n * End system-specific stuff.\n **********************************************************************/\n\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n\n#define GL_VERSION_1_1   1\n#define GL_VERSION_1_2   1\n#define GL_VERSION_1_3   1\n#define GL_ARB_imaging   1\n\n\n/*\n * Datatypes\n */\ntypedef unsigned int\tGLenum;\ntypedef unsigned char\tGLboolean;\ntypedef unsigned int\tGLbitfield;\ntypedef void\t\tGLvoid;\ntypedef signed char\tGLbyte;\t\t/* 1-byte signed */\ntypedef short\t\tGLshort;\t/* 2-byte signed */\ntypedef int\t\tGLint;\t\t/* 4-byte signed */\ntypedef unsigned char\tGLubyte;\t/* 1-byte unsigned */\ntypedef unsigned short\tGLushort;\t/* 2-byte unsigned */\ntypedef unsigned int\tGLuint;\t\t/* 4-byte unsigned */\ntypedef int\t\tGLsizei;\t/* 4-byte signed */\ntypedef float\t\tGLfloat;\t/* single precision float */\ntypedef float\t\tGLclampf;\t/* single precision float in [0,1] */\ntypedef double\t\tGLdouble;\t/* double precision float */\ntypedef double\t\tGLclampd;\t/* double precision float in [0,1] */\n\n\n\n/*\n * Constants\n */\n\n/* Boolean values */\n#define GL_FALSE\t\t\t\t0\n#define GL_TRUE\t\t\t\t\t1\n\n/* Data types */\n#define GL_BYTE\t\t\t\t\t0x1400\n#define GL_UNSIGNED_BYTE\t\t\t0x1401\n#define GL_SHORT\t\t\t\t0x1402\n#define GL_UNSIGNED_SHORT\t\t\t0x1403\n#define GL_INT\t\t\t\t\t0x1404\n#define GL_UNSIGNED_INT\t\t\t\t0x1405\n#define GL_FLOAT\t\t\t\t0x1406\n#define GL_2_BYTES\t\t\t\t0x1407\n#define GL_3_BYTES\t\t\t\t0x1408\n#define GL_4_BYTES\t\t\t\t0x1409\n#define GL_DOUBLE\t\t\t\t0x140A\n\n/* Primitives */\n#define GL_POINTS\t\t\t\t0x0000\n#define GL_LINES\t\t\t\t0x0001\n#define GL_LINE_LOOP\t\t\t\t0x0002\n#define GL_LINE_STRIP\t\t\t\t0x0003\n#define GL_TRIANGLES\t\t\t\t0x0004\n#define GL_TRIANGLE_STRIP\t\t\t0x0005\n#define GL_TRIANGLE_FAN\t\t\t\t0x0006\n#define GL_QUADS\t\t\t\t0x0007\n#define GL_QUAD_STRIP\t\t\t\t0x0008\n#define GL_POLYGON\t\t\t\t0x0009\n\n/* Vertex Arrays */\n#define GL_VERTEX_ARRAY\t\t\t\t0x8074\n#define GL_NORMAL_ARRAY\t\t\t\t0x8075\n#define GL_COLOR_ARRAY\t\t\t\t0x8076\n#define GL_INDEX_ARRAY\t\t\t\t0x8077\n#define GL_TEXTURE_COORD_ARRAY\t\t\t0x8078\n#define GL_EDGE_FLAG_ARRAY\t\t\t0x8079\n#define GL_VERTEX_ARRAY_SIZE\t\t\t0x807A\n#define GL_VERTEX_ARRAY_TYPE\t\t\t0x807B\n#define GL_VERTEX_ARRAY_STRIDE\t\t\t0x807C\n#define GL_NORMAL_ARRAY_TYPE\t\t\t0x807E\n#define GL_NORMAL_ARRAY_STRIDE\t\t\t0x807F\n#define GL_COLOR_ARRAY_SIZE\t\t\t0x8081\n#define GL_COLOR_ARRAY_TYPE\t\t\t0x8082\n#define GL_COLOR_ARRAY_STRIDE\t\t\t0x8083\n#define GL_INDEX_ARRAY_TYPE\t\t\t0x8085\n#define GL_INDEX_ARRAY_STRIDE\t\t\t0x8086\n#define GL_TEXTURE_COORD_ARRAY_SIZE\t\t0x8088\n#define GL_TEXTURE_COORD_ARRAY_TYPE\t\t0x8089\n#define GL_TEXTURE_COORD_ARRAY_STRIDE\t\t0x808A\n#define GL_EDGE_FLAG_ARRAY_STRIDE\t\t0x808C\n#define GL_VERTEX_ARRAY_POINTER\t\t\t0x808E\n#define GL_NORMAL_ARRAY_POINTER\t\t\t0x808F\n#define GL_COLOR_ARRAY_POINTER\t\t\t0x8090\n#define GL_INDEX_ARRAY_POINTER\t\t\t0x8091\n#define GL_TEXTURE_COORD_ARRAY_POINTER\t\t0x8092\n#define GL_EDGE_FLAG_ARRAY_POINTER\t\t0x8093\n#define GL_V2F\t\t\t\t\t0x2A20\n#define GL_V3F\t\t\t\t\t0x2A21\n#define GL_C4UB_V2F\t\t\t\t0x2A22\n#define GL_C4UB_V3F\t\t\t\t0x2A23\n#define GL_C3F_V3F\t\t\t\t0x2A24\n#define GL_N3F_V3F\t\t\t\t0x2A25\n#define GL_C4F_N3F_V3F\t\t\t\t0x2A26\n#define GL_T2F_V3F\t\t\t\t0x2A27\n#define GL_T4F_V4F\t\t\t\t0x2A28\n#define GL_T2F_C4UB_V3F\t\t\t\t0x2A29\n#define GL_T2F_C3F_V3F\t\t\t\t0x2A2A\n#define GL_T2F_N3F_V3F\t\t\t\t0x2A2B\n#define GL_T2F_C4F_N3F_V3F\t\t\t0x2A2C\n#define GL_T4F_C4F_N3F_V4F\t\t\t0x2A2D\n\n/* Matrix Mode */\n#define GL_MATRIX_MODE\t\t\t\t0x0BA0\n#define GL_MODELVIEW\t\t\t\t0x1700\n#define GL_PROJECTION\t\t\t\t0x1701\n#define GL_TEXTURE\t\t\t\t0x1702\n\n/* Points */\n#define GL_POINT_SMOOTH\t\t\t\t0x0B10\n#define GL_POINT_SIZE\t\t\t\t0x0B11\n#define GL_POINT_SIZE_GRANULARITY \t\t0x0B13\n#define GL_POINT_SIZE_RANGE\t\t\t0x0B12\n\n/* Lines */\n#define GL_LINE_SMOOTH\t\t\t\t0x0B20\n#define GL_LINE_STIPPLE\t\t\t\t0x0B24\n#define GL_LINE_STIPPLE_PATTERN\t\t\t0x0B25\n#define GL_LINE_STIPPLE_REPEAT\t\t\t0x0B26\n#define GL_LINE_WIDTH\t\t\t\t0x0B21\n#define GL_LINE_WIDTH_GRANULARITY\t\t0x0B23\n#define GL_LINE_WIDTH_RANGE\t\t\t0x0B22\n\n/* Polygons */\n#define GL_POINT\t\t\t\t0x1B00\n#define GL_LINE\t\t\t\t\t0x1B01\n#define GL_FILL\t\t\t\t\t0x1B02\n#define GL_CW\t\t\t\t\t0x0900\n#define GL_CCW\t\t\t\t\t0x0901\n#define GL_FRONT\t\t\t\t0x0404\n#define GL_BACK\t\t\t\t\t0x0405\n#define GL_POLYGON_MODE\t\t\t\t0x0B40\n#define GL_POLYGON_SMOOTH\t\t\t0x0B41\n#define GL_POLYGON_STIPPLE\t\t\t0x0B42\n#define GL_EDGE_FLAG\t\t\t\t0x0B43\n#define GL_CULL_FACE\t\t\t\t0x0B44\n#define GL_CULL_FACE_MODE\t\t\t0x0B45\n#define GL_FRONT_FACE\t\t\t\t0x0B46\n#define GL_POLYGON_OFFSET_FACTOR\t\t0x8038\n#define GL_POLYGON_OFFSET_UNITS\t\t\t0x2A00\n#define GL_POLYGON_OFFSET_POINT\t\t\t0x2A01\n#define GL_POLYGON_OFFSET_LINE\t\t\t0x2A02\n#define GL_POLYGON_OFFSET_FILL\t\t\t0x8037\n\n/* Display Lists */\n#define GL_COMPILE\t\t\t\t0x1300\n#define GL_COMPILE_AND_EXECUTE\t\t\t0x1301\n#define GL_LIST_BASE\t\t\t\t0x0B32\n#define GL_LIST_INDEX\t\t\t\t0x0B33\n#define GL_LIST_MODE\t\t\t\t0x0B30\n\n/* Depth buffer */\n#define GL_NEVER\t\t\t\t0x0200\n#define GL_LESS\t\t\t\t\t0x0201\n#define GL_EQUAL\t\t\t\t0x0202\n#define GL_LEQUAL\t\t\t\t0x0203\n#define GL_GREATER\t\t\t\t0x0204\n#define GL_NOTEQUAL\t\t\t\t0x0205\n#define GL_GEQUAL\t\t\t\t0x0206\n#define GL_ALWAYS\t\t\t\t0x0207\n#define GL_DEPTH_TEST\t\t\t\t0x0B71\n#define GL_DEPTH_BITS\t\t\t\t0x0D56\n#define GL_DEPTH_CLEAR_VALUE\t\t\t0x0B73\n#define GL_DEPTH_FUNC\t\t\t\t0x0B74\n#define GL_DEPTH_RANGE\t\t\t\t0x0B70\n#define GL_DEPTH_WRITEMASK\t\t\t0x0B72\n#define GL_DEPTH_COMPONENT\t\t\t0x1902\n\n/* Lighting */\n#define GL_LIGHTING\t\t\t\t0x0B50\n#define GL_LIGHT0\t\t\t\t0x4000\n#define GL_LIGHT1\t\t\t\t0x4001\n#define GL_LIGHT2\t\t\t\t0x4002\n#define GL_LIGHT3\t\t\t\t0x4003\n#define GL_LIGHT4\t\t\t\t0x4004\n#define GL_LIGHT5\t\t\t\t0x4005\n#define GL_LIGHT6\t\t\t\t0x4006\n#define GL_LIGHT7\t\t\t\t0x4007\n#define GL_SPOT_EXPONENT\t\t\t0x1205\n#define GL_SPOT_CUTOFF\t\t\t\t0x1206\n#define GL_CONSTANT_ATTENUATION\t\t\t0x1207\n#define GL_LINEAR_ATTENUATION\t\t\t0x1208\n#define GL_QUADRATIC_ATTENUATION\t\t0x1209\n#define GL_AMBIENT\t\t\t\t0x1200\n#define GL_DIFFUSE\t\t\t\t0x1201\n#define GL_SPECULAR\t\t\t\t0x1202\n#define GL_SHININESS\t\t\t\t0x1601\n#define GL_EMISSION\t\t\t\t0x1600\n#define GL_POSITION\t\t\t\t0x1203\n#define GL_SPOT_DIRECTION\t\t\t0x1204\n#define GL_AMBIENT_AND_DIFFUSE\t\t\t0x1602\n#define GL_COLOR_INDEXES\t\t\t0x1603\n#define GL_LIGHT_MODEL_TWO_SIDE\t\t\t0x0B52\n#define GL_LIGHT_MODEL_LOCAL_VIEWER\t\t0x0B51\n#define GL_LIGHT_MODEL_AMBIENT\t\t\t0x0B53\n#define GL_FRONT_AND_BACK\t\t\t0x0408\n#define GL_SHADE_MODEL\t\t\t\t0x0B54\n#define GL_FLAT\t\t\t\t\t0x1D00\n#define GL_SMOOTH\t\t\t\t0x1D01\n#define GL_COLOR_MATERIAL\t\t\t0x0B57\n#define GL_COLOR_MATERIAL_FACE\t\t\t0x0B55\n#define GL_COLOR_MATERIAL_PARAMETER\t\t0x0B56\n#define GL_NORMALIZE\t\t\t\t0x0BA1\n\n/* User clipping planes */\n#define GL_CLIP_PLANE0\t\t\t\t0x3000\n#define GL_CLIP_PLANE1\t\t\t\t0x3001\n#define GL_CLIP_PLANE2\t\t\t\t0x3002\n#define GL_CLIP_PLANE3\t\t\t\t0x3003\n#define GL_CLIP_PLANE4\t\t\t\t0x3004\n#define GL_CLIP_PLANE5\t\t\t\t0x3005\n\n/* Accumulation buffer */\n#define GL_ACCUM_RED_BITS\t\t\t0x0D58\n#define GL_ACCUM_GREEN_BITS\t\t\t0x0D59\n#define GL_ACCUM_BLUE_BITS\t\t\t0x0D5A\n#define GL_ACCUM_ALPHA_BITS\t\t\t0x0D5B\n#define GL_ACCUM_CLEAR_VALUE\t\t\t0x0B80\n#define GL_ACCUM\t\t\t\t0x0100\n#define GL_ADD\t\t\t\t\t0x0104\n#define GL_LOAD\t\t\t\t\t0x0101\n#define GL_MULT\t\t\t\t\t0x0103\n#define GL_RETURN\t\t\t\t0x0102\n\n/* Alpha testing */\n#define GL_ALPHA_TEST\t\t\t\t0x0BC0\n#define GL_ALPHA_TEST_REF\t\t\t0x0BC2\n#define GL_ALPHA_TEST_FUNC\t\t\t0x0BC1\n\n/* Blending */\n#define GL_BLEND\t\t\t\t0x0BE2\n#define GL_BLEND_SRC\t\t\t\t0x0BE1\n#define GL_BLEND_DST\t\t\t\t0x0BE0\n#define GL_ZERO\t\t\t\t\t0\n#define GL_ONE\t\t\t\t\t1\n#define GL_SRC_COLOR\t\t\t\t0x0300\n#define GL_ONE_MINUS_SRC_COLOR\t\t\t0x0301\n#define GL_SRC_ALPHA\t\t\t\t0x0302\n#define GL_ONE_MINUS_SRC_ALPHA\t\t\t0x0303\n#define GL_DST_ALPHA\t\t\t\t0x0304\n#define GL_ONE_MINUS_DST_ALPHA\t\t\t0x0305\n#define GL_DST_COLOR\t\t\t\t0x0306\n#define GL_ONE_MINUS_DST_COLOR\t\t\t0x0307\n#define GL_SRC_ALPHA_SATURATE\t\t\t0x0308\n\n/* Render Mode */\n#define GL_FEEDBACK\t\t\t\t0x1C01\n#define GL_RENDER\t\t\t\t0x1C00\n#define GL_SELECT\t\t\t\t0x1C02\n\n/* Feedback */\n#define GL_2D\t\t\t\t\t0x0600\n#define GL_3D\t\t\t\t\t0x0601\n#define GL_3D_COLOR\t\t\t\t0x0602\n#define GL_3D_COLOR_TEXTURE\t\t\t0x0603\n#define GL_4D_COLOR_TEXTURE\t\t\t0x0604\n#define GL_POINT_TOKEN\t\t\t\t0x0701\n#define GL_LINE_TOKEN\t\t\t\t0x0702\n#define GL_LINE_RESET_TOKEN\t\t\t0x0707\n#define GL_POLYGON_TOKEN\t\t\t0x0703\n#define GL_BITMAP_TOKEN\t\t\t\t0x0704\n#define GL_DRAW_PIXEL_TOKEN\t\t\t0x0705\n#define GL_COPY_PIXEL_TOKEN\t\t\t0x0706\n#define GL_PASS_THROUGH_TOKEN\t\t\t0x0700\n#define GL_FEEDBACK_BUFFER_POINTER\t\t0x0DF0\n#define GL_FEEDBACK_BUFFER_SIZE\t\t\t0x0DF1\n#define GL_FEEDBACK_BUFFER_TYPE\t\t\t0x0DF2\n\n/* Selection */\n#define GL_SELECTION_BUFFER_POINTER\t\t0x0DF3\n#define GL_SELECTION_BUFFER_SIZE\t\t0x0DF4\n\n/* Fog */\n#define GL_FOG\t\t\t\t\t0x0B60\n#define GL_FOG_MODE\t\t\t\t0x0B65\n#define GL_FOG_DENSITY\t\t\t\t0x0B62\n#define GL_FOG_COLOR\t\t\t\t0x0B66\n#define GL_FOG_INDEX\t\t\t\t0x0B61\n#define GL_FOG_START\t\t\t\t0x0B63\n#define GL_FOG_END\t\t\t\t0x0B64\n#define GL_LINEAR\t\t\t\t0x2601\n#define GL_EXP\t\t\t\t\t0x0800\n#define GL_EXP2\t\t\t\t\t0x0801\n\n/* Logic Ops */\n#define GL_LOGIC_OP\t\t\t\t0x0BF1\n#define GL_INDEX_LOGIC_OP\t\t\t0x0BF1\n#define GL_COLOR_LOGIC_OP\t\t\t0x0BF2\n#define GL_LOGIC_OP_MODE\t\t\t0x0BF0\n#define GL_CLEAR\t\t\t\t0x1500\n#define GL_SET\t\t\t\t\t0x150F\n#define GL_COPY\t\t\t\t\t0x1503\n#define GL_COPY_INVERTED\t\t\t0x150C\n#define GL_NOOP\t\t\t\t\t0x1505\n#define GL_INVERT\t\t\t\t0x150A\n#define GL_AND\t\t\t\t\t0x1501\n#define GL_NAND\t\t\t\t\t0x150E\n#define GL_OR\t\t\t\t\t0x1507\n#define GL_NOR\t\t\t\t\t0x1508\n#define GL_XOR\t\t\t\t\t0x1506\n#define GL_EQUIV\t\t\t\t0x1509\n#define GL_AND_REVERSE\t\t\t\t0x1502\n#define GL_AND_INVERTED\t\t\t\t0x1504\n#define GL_OR_REVERSE\t\t\t\t0x150B\n#define GL_OR_INVERTED\t\t\t\t0x150D\n\n/* Stencil */\n#define GL_STENCIL_BITS\t\t\t\t0x0D57\n#define GL_STENCIL_TEST\t\t\t\t0x0B90\n#define GL_STENCIL_CLEAR_VALUE\t\t\t0x0B91\n#define GL_STENCIL_FUNC\t\t\t\t0x0B92\n#define GL_STENCIL_VALUE_MASK\t\t\t0x0B93\n#define GL_STENCIL_FAIL\t\t\t\t0x0B94\n#define GL_STENCIL_PASS_DEPTH_FAIL\t\t0x0B95\n#define GL_STENCIL_PASS_DEPTH_PASS\t\t0x0B96\n#define GL_STENCIL_REF\t\t\t\t0x0B97\n#define GL_STENCIL_WRITEMASK\t\t\t0x0B98\n#define GL_STENCIL_INDEX\t\t\t0x1901\n#define GL_KEEP\t\t\t\t\t0x1E00\n#define GL_REPLACE\t\t\t\t0x1E01\n#define GL_INCR\t\t\t\t\t0x1E02\n#define GL_DECR\t\t\t\t\t0x1E03\n\n/* Buffers, Pixel Drawing/Reading */\n#define GL_NONE\t\t\t\t\t0\n#define GL_LEFT\t\t\t\t\t0x0406\n#define GL_RIGHT\t\t\t\t0x0407\n/*GL_FRONT\t\t\t\t\t0x0404 */\n/*GL_BACK\t\t\t\t\t0x0405 */\n/*GL_FRONT_AND_BACK\t\t\t\t0x0408 */\n#define GL_FRONT_LEFT\t\t\t\t0x0400\n#define GL_FRONT_RIGHT\t\t\t\t0x0401\n#define GL_BACK_LEFT\t\t\t\t0x0402\n#define GL_BACK_RIGHT\t\t\t\t0x0403\n#define GL_AUX0\t\t\t\t\t0x0409\n#define GL_AUX1\t\t\t\t\t0x040A\n#define GL_AUX2\t\t\t\t\t0x040B\n#define GL_AUX3\t\t\t\t\t0x040C\n#define GL_COLOR_INDEX\t\t\t\t0x1900\n#define GL_RED\t\t\t\t\t0x1903\n#define GL_GREEN\t\t\t\t0x1904\n#define GL_BLUE\t\t\t\t\t0x1905\n#define GL_ALPHA\t\t\t\t0x1906\n#define GL_LUMINANCE\t\t\t\t0x1909\n#define GL_LUMINANCE_ALPHA\t\t\t0x190A\n#define GL_ALPHA_BITS\t\t\t\t0x0D55\n#define GL_RED_BITS\t\t\t\t0x0D52\n#define GL_GREEN_BITS\t\t\t\t0x0D53\n#define GL_BLUE_BITS\t\t\t\t0x0D54\n#define GL_INDEX_BITS\t\t\t\t0x0D51\n#define GL_SUBPIXEL_BITS\t\t\t0x0D50\n#define GL_AUX_BUFFERS\t\t\t\t0x0C00\n#define GL_READ_BUFFER\t\t\t\t0x0C02\n#define GL_DRAW_BUFFER\t\t\t\t0x0C01\n#define GL_DOUBLEBUFFER\t\t\t\t0x0C32\n#define GL_STEREO\t\t\t\t0x0C33\n#define GL_BITMAP\t\t\t\t0x1A00\n#define GL_COLOR\t\t\t\t0x1800\n#define GL_DEPTH\t\t\t\t0x1801\n#define GL_STENCIL\t\t\t\t0x1802\n#define GL_DITHER\t\t\t\t0x0BD0\n#define GL_RGB\t\t\t\t\t0x1907\n#define GL_RGBA\t\t\t\t\t0x1908\n\n/* Implementation limits */\n#define GL_MAX_LIST_NESTING\t\t\t0x0B31\n#define GL_MAX_EVAL_ORDER\t\t\t0x0D30\n#define GL_MAX_LIGHTS\t\t\t\t0x0D31\n#define GL_MAX_CLIP_PLANES\t\t\t0x0D32\n#define GL_MAX_TEXTURE_SIZE\t\t\t0x0D33\n#define GL_MAX_PIXEL_MAP_TABLE\t\t\t0x0D34\n#define GL_MAX_ATTRIB_STACK_DEPTH\t\t0x0D35\n#define GL_MAX_MODELVIEW_STACK_DEPTH\t\t0x0D36\n#define GL_MAX_NAME_STACK_DEPTH\t\t\t0x0D37\n#define GL_MAX_PROJECTION_STACK_DEPTH\t\t0x0D38\n#define GL_MAX_TEXTURE_STACK_DEPTH\t\t0x0D39\n#define GL_MAX_VIEWPORT_DIMS\t\t\t0x0D3A\n#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\t0x0D3B\n\n/* Gets */\n#define GL_ATTRIB_STACK_DEPTH\t\t\t0x0BB0\n#define GL_CLIENT_ATTRIB_STACK_DEPTH\t\t0x0BB1\n#define GL_COLOR_CLEAR_VALUE\t\t\t0x0C22\n#define GL_COLOR_WRITEMASK\t\t\t0x0C23\n#define GL_CURRENT_INDEX\t\t\t0x0B01\n#define GL_CURRENT_COLOR\t\t\t0x0B00\n#define GL_CURRENT_NORMAL\t\t\t0x0B02\n#define GL_CURRENT_RASTER_COLOR\t\t\t0x0B04\n#define GL_CURRENT_RASTER_DISTANCE\t\t0x0B09\n#define GL_CURRENT_RASTER_INDEX\t\t\t0x0B05\n#define GL_CURRENT_RASTER_POSITION\t\t0x0B07\n#define GL_CURRENT_RASTER_TEXTURE_COORDS\t0x0B06\n#define GL_CURRENT_RASTER_POSITION_VALID\t0x0B08\n#define GL_CURRENT_TEXTURE_COORDS\t\t0x0B03\n#define GL_INDEX_CLEAR_VALUE\t\t\t0x0C20\n#define GL_INDEX_MODE\t\t\t\t0x0C30\n#define GL_INDEX_WRITEMASK\t\t\t0x0C21\n#define GL_MODELVIEW_MATRIX\t\t\t0x0BA6\n#define GL_MODELVIEW_STACK_DEPTH\t\t0x0BA3\n#define GL_NAME_STACK_DEPTH\t\t\t0x0D70\n#define GL_PROJECTION_MATRIX\t\t\t0x0BA7\n#define GL_PROJECTION_STACK_DEPTH\t\t0x0BA4\n#define GL_RENDER_MODE\t\t\t\t0x0C40\n#define GL_RGBA_MODE\t\t\t\t0x0C31\n#define GL_TEXTURE_MATRIX\t\t\t0x0BA8\n#define GL_TEXTURE_STACK_DEPTH\t\t\t0x0BA5\n#define GL_VIEWPORT\t\t\t\t0x0BA2\n\n/* Evaluators */\n#define GL_AUTO_NORMAL\t\t\t\t0x0D80\n#define GL_MAP1_COLOR_4\t\t\t\t0x0D90\n#define GL_MAP1_INDEX\t\t\t\t0x0D91\n#define GL_MAP1_NORMAL\t\t\t\t0x0D92\n#define GL_MAP1_TEXTURE_COORD_1\t\t\t0x0D93\n#define GL_MAP1_TEXTURE_COORD_2\t\t\t0x0D94\n#define GL_MAP1_TEXTURE_COORD_3\t\t\t0x0D95\n#define GL_MAP1_TEXTURE_COORD_4\t\t\t0x0D96\n#define GL_MAP1_VERTEX_3\t\t\t0x0D97\n#define GL_MAP1_VERTEX_4\t\t\t0x0D98\n#define GL_MAP2_COLOR_4\t\t\t\t0x0DB0\n#define GL_MAP2_INDEX\t\t\t\t0x0DB1\n#define GL_MAP2_NORMAL\t\t\t\t0x0DB2\n#define GL_MAP2_TEXTURE_COORD_1\t\t\t0x0DB3\n#define GL_MAP2_TEXTURE_COORD_2\t\t\t0x0DB4\n#define GL_MAP2_TEXTURE_COORD_3\t\t\t0x0DB5\n#define GL_MAP2_TEXTURE_COORD_4\t\t\t0x0DB6\n#define GL_MAP2_VERTEX_3\t\t\t0x0DB7\n#define GL_MAP2_VERTEX_4\t\t\t0x0DB8\n#define GL_MAP1_GRID_DOMAIN\t\t\t0x0DD0\n#define GL_MAP1_GRID_SEGMENTS\t\t\t0x0DD1\n#define GL_MAP2_GRID_DOMAIN\t\t\t0x0DD2\n#define GL_MAP2_GRID_SEGMENTS\t\t\t0x0DD3\n#define GL_COEFF\t\t\t\t0x0A00\n#define GL_ORDER\t\t\t\t0x0A01\n#define GL_DOMAIN\t\t\t\t0x0A02\n\n/* Hints */\n#define GL_PERSPECTIVE_CORRECTION_HINT\t\t0x0C50\n#define GL_POINT_SMOOTH_HINT\t\t\t0x0C51\n#define GL_LINE_SMOOTH_HINT\t\t\t0x0C52\n#define GL_POLYGON_SMOOTH_HINT\t\t\t0x0C53\n#define GL_FOG_HINT\t\t\t\t0x0C54\n#define GL_DONT_CARE\t\t\t\t0x1100\n#define GL_FASTEST\t\t\t\t0x1101\n#define GL_NICEST\t\t\t\t0x1102\n\n/* Scissor box */\n#define GL_SCISSOR_BOX\t\t\t\t0x0C10\n#define GL_SCISSOR_TEST\t\t\t\t0x0C11\n\n/* Pixel Mode / Transfer */\n#define GL_MAP_COLOR\t\t\t\t0x0D10\n#define GL_MAP_STENCIL\t\t\t\t0x0D11\n#define GL_INDEX_SHIFT\t\t\t\t0x0D12\n#define GL_INDEX_OFFSET\t\t\t\t0x0D13\n#define GL_RED_SCALE\t\t\t\t0x0D14\n#define GL_RED_BIAS\t\t\t\t0x0D15\n#define GL_GREEN_SCALE\t\t\t\t0x0D18\n#define GL_GREEN_BIAS\t\t\t\t0x0D19\n#define GL_BLUE_SCALE\t\t\t\t0x0D1A\n#define GL_BLUE_BIAS\t\t\t\t0x0D1B\n#define GL_ALPHA_SCALE\t\t\t\t0x0D1C\n#define GL_ALPHA_BIAS\t\t\t\t0x0D1D\n#define GL_DEPTH_SCALE\t\t\t\t0x0D1E\n#define GL_DEPTH_BIAS\t\t\t\t0x0D1F\n#define GL_PIXEL_MAP_S_TO_S_SIZE\t\t0x0CB1\n#define GL_PIXEL_MAP_I_TO_I_SIZE\t\t0x0CB0\n#define GL_PIXEL_MAP_I_TO_R_SIZE\t\t0x0CB2\n#define GL_PIXEL_MAP_I_TO_G_SIZE\t\t0x0CB3\n#define GL_PIXEL_MAP_I_TO_B_SIZE\t\t0x0CB4\n#define GL_PIXEL_MAP_I_TO_A_SIZE\t\t0x0CB5\n#define GL_PIXEL_MAP_R_TO_R_SIZE\t\t0x0CB6\n#define GL_PIXEL_MAP_G_TO_G_SIZE\t\t0x0CB7\n#define GL_PIXEL_MAP_B_TO_B_SIZE\t\t0x0CB8\n#define GL_PIXEL_MAP_A_TO_A_SIZE\t\t0x0CB9\n#define GL_PIXEL_MAP_S_TO_S\t\t\t0x0C71\n#define GL_PIXEL_MAP_I_TO_I\t\t\t0x0C70\n#define GL_PIXEL_MAP_I_TO_R\t\t\t0x0C72\n#define GL_PIXEL_MAP_I_TO_G\t\t\t0x0C73\n#define GL_PIXEL_MAP_I_TO_B\t\t\t0x0C74\n#define GL_PIXEL_MAP_I_TO_A\t\t\t0x0C75\n#define GL_PIXEL_MAP_R_TO_R\t\t\t0x0C76\n#define GL_PIXEL_MAP_G_TO_G\t\t\t0x0C77\n#define GL_PIXEL_MAP_B_TO_B\t\t\t0x0C78\n#define GL_PIXEL_MAP_A_TO_A\t\t\t0x0C79\n#define GL_PACK_ALIGNMENT\t\t\t0x0D05\n#define GL_PACK_LSB_FIRST\t\t\t0x0D01\n#define GL_PACK_ROW_LENGTH\t\t\t0x0D02\n#define GL_PACK_SKIP_PIXELS\t\t\t0x0D04\n#define GL_PACK_SKIP_ROWS\t\t\t0x0D03\n#define GL_PACK_SWAP_BYTES\t\t\t0x0D00\n#define GL_UNPACK_ALIGNMENT\t\t\t0x0CF5\n#define GL_UNPACK_LSB_FIRST\t\t\t0x0CF1\n#define GL_UNPACK_ROW_LENGTH\t\t\t0x0CF2\n#define GL_UNPACK_SKIP_PIXELS\t\t\t0x0CF4\n#define GL_UNPACK_SKIP_ROWS\t\t\t0x0CF3\n#define GL_UNPACK_SWAP_BYTES\t\t\t0x0CF0\n#define GL_ZOOM_X\t\t\t\t0x0D16\n#define GL_ZOOM_Y\t\t\t\t0x0D17\n\n/* Texture mapping */\n#define GL_TEXTURE_ENV\t\t\t\t0x2300\n#define GL_TEXTURE_ENV_MODE\t\t\t0x2200\n#define GL_TEXTURE_1D\t\t\t\t0x0DE0\n#define GL_TEXTURE_2D\t\t\t\t0x0DE1\n#define GL_TEXTURE_WRAP_S\t\t\t0x2802\n#define GL_TEXTURE_WRAP_T\t\t\t0x2803\n#define GL_TEXTURE_MAG_FILTER\t\t\t0x2800\n#define GL_TEXTURE_MIN_FILTER\t\t\t0x2801\n#define GL_TEXTURE_ENV_COLOR\t\t\t0x2201\n#define GL_TEXTURE_GEN_S\t\t\t0x0C60\n#define GL_TEXTURE_GEN_T\t\t\t0x0C61\n#define GL_TEXTURE_GEN_R\t\t\t0x0C62\n#define GL_TEXTURE_GEN_Q\t\t\t0x0C63\n#define GL_TEXTURE_GEN_MODE\t\t\t0x2500\n#define GL_TEXTURE_BORDER_COLOR\t\t\t0x1004\n#define GL_TEXTURE_WIDTH\t\t\t0x1000\n#define GL_TEXTURE_HEIGHT\t\t\t0x1001\n#define GL_TEXTURE_BORDER\t\t\t0x1005\n#define GL_TEXTURE_COMPONENTS\t\t\t0x1003\n#define GL_TEXTURE_RED_SIZE\t\t\t0x805C\n#define GL_TEXTURE_GREEN_SIZE\t\t\t0x805D\n#define GL_TEXTURE_BLUE_SIZE\t\t\t0x805E\n#define GL_TEXTURE_ALPHA_SIZE\t\t\t0x805F\n#define GL_TEXTURE_LUMINANCE_SIZE\t\t0x8060\n#define GL_TEXTURE_INTENSITY_SIZE\t\t0x8061\n#define GL_NEAREST_MIPMAP_NEAREST\t\t0x2700\n#define GL_NEAREST_MIPMAP_LINEAR\t\t0x2702\n#define GL_LINEAR_MIPMAP_NEAREST\t\t0x2701\n#define GL_LINEAR_MIPMAP_LINEAR\t\t\t0x2703\n#define GL_OBJECT_LINEAR\t\t\t0x2401\n#define GL_OBJECT_PLANE\t\t\t\t0x2501\n#define GL_EYE_LINEAR\t\t\t\t0x2400\n#define GL_EYE_PLANE\t\t\t\t0x2502\n#define GL_SPHERE_MAP\t\t\t\t0x2402\n#define GL_DECAL\t\t\t\t0x2101\n#define GL_MODULATE\t\t\t\t0x2100\n#define GL_NEAREST\t\t\t\t0x2600\n#define GL_REPEAT\t\t\t\t0x2901\n#define GL_CLAMP\t\t\t\t0x2900\n#define GL_S\t\t\t\t\t0x2000\n#define GL_T\t\t\t\t\t0x2001\n#define GL_R\t\t\t\t\t0x2002\n#define GL_Q\t\t\t\t\t0x2003\n\n/* Utility */\n#define GL_VENDOR\t\t\t\t0x1F00\n#define GL_RENDERER\t\t\t\t0x1F01\n#define GL_VERSION\t\t\t\t0x1F02\n#define GL_EXTENSIONS\t\t\t\t0x1F03\n\n/* Errors */\n#define GL_NO_ERROR \t\t\t\t0\n#define GL_INVALID_ENUM\t\t\t\t0x0500\n#define GL_INVALID_VALUE\t\t\t0x0501\n#define GL_INVALID_OPERATION\t\t\t0x0502\n#define GL_STACK_OVERFLOW\t\t\t0x0503\n#define GL_STACK_UNDERFLOW\t\t\t0x0504\n#define GL_OUT_OF_MEMORY\t\t\t0x0505\n\n/* glPush/PopAttrib bits */\n#define GL_CURRENT_BIT\t\t\t\t0x00000001\n#define GL_POINT_BIT\t\t\t\t0x00000002\n#define GL_LINE_BIT\t\t\t\t0x00000004\n#define GL_POLYGON_BIT\t\t\t\t0x00000008\n#define GL_POLYGON_STIPPLE_BIT\t\t\t0x00000010\n#define GL_PIXEL_MODE_BIT\t\t\t0x00000020\n#define GL_LIGHTING_BIT\t\t\t\t0x00000040\n#define GL_FOG_BIT\t\t\t\t0x00000080\n#define GL_DEPTH_BUFFER_BIT\t\t\t0x00000100\n#define GL_ACCUM_BUFFER_BIT\t\t\t0x00000200\n#define GL_STENCIL_BUFFER_BIT\t\t\t0x00000400\n#define GL_VIEWPORT_BIT\t\t\t\t0x00000800\n#define GL_TRANSFORM_BIT\t\t\t0x00001000\n#define GL_ENABLE_BIT\t\t\t\t0x00002000\n#define GL_COLOR_BUFFER_BIT\t\t\t0x00004000\n#define GL_HINT_BIT\t\t\t\t0x00008000\n#define GL_EVAL_BIT\t\t\t\t0x00010000\n#define GL_LIST_BIT\t\t\t\t0x00020000\n#define GL_TEXTURE_BIT\t\t\t\t0x00040000\n#define GL_SCISSOR_BIT\t\t\t\t0x00080000\n#define GL_ALL_ATTRIB_BITS\t\t\t0x000FFFFF\n\n\n/* OpenGL 1.1 */\n#define GL_PROXY_TEXTURE_1D\t\t\t0x8063\n#define GL_PROXY_TEXTURE_2D\t\t\t0x8064\n#define GL_TEXTURE_PRIORITY\t\t\t0x8066\n#define GL_TEXTURE_RESIDENT\t\t\t0x8067\n#define GL_TEXTURE_BINDING_1D\t\t\t0x8068\n#define GL_TEXTURE_BINDING_2D\t\t\t0x8069\n#define GL_TEXTURE_INTERNAL_FORMAT\t\t0x1003\n#define GL_ALPHA4\t\t\t\t0x803B\n#define GL_ALPHA8\t\t\t\t0x803C\n#define GL_ALPHA12\t\t\t\t0x803D\n#define GL_ALPHA16\t\t\t\t0x803E\n#define GL_LUMINANCE4\t\t\t\t0x803F\n#define GL_LUMINANCE8\t\t\t\t0x8040\n#define GL_LUMINANCE12\t\t\t\t0x8041\n#define GL_LUMINANCE16\t\t\t\t0x8042\n#define GL_LUMINANCE4_ALPHA4\t\t\t0x8043\n#define GL_LUMINANCE6_ALPHA2\t\t\t0x8044\n#define GL_LUMINANCE8_ALPHA8\t\t\t0x8045\n#define GL_LUMINANCE12_ALPHA4\t\t\t0x8046\n#define GL_LUMINANCE12_ALPHA12\t\t\t0x8047\n#define GL_LUMINANCE16_ALPHA16\t\t\t0x8048\n#define GL_INTENSITY\t\t\t\t0x8049\n#define GL_INTENSITY4\t\t\t\t0x804A\n#define GL_INTENSITY8\t\t\t\t0x804B\n#define GL_INTENSITY12\t\t\t\t0x804C\n#define GL_INTENSITY16\t\t\t\t0x804D\n#define GL_R3_G3_B2\t\t\t\t0x2A10\n#define GL_RGB4\t\t\t\t\t0x804F\n#define GL_RGB5\t\t\t\t\t0x8050\n#define GL_RGB8\t\t\t\t\t0x8051\n#define GL_RGB10\t\t\t\t0x8052\n#define GL_RGB12\t\t\t\t0x8053\n#define GL_RGB16\t\t\t\t0x8054\n#define GL_RGBA2\t\t\t\t0x8055\n#define GL_RGBA4\t\t\t\t0x8056\n#define GL_RGB5_A1\t\t\t\t0x8057\n#define GL_RGBA8\t\t\t\t0x8058\n#define GL_RGB10_A2\t\t\t\t0x8059\n#define GL_RGBA12\t\t\t\t0x805A\n#define GL_RGBA16\t\t\t\t0x805B\n#define GL_CLIENT_PIXEL_STORE_BIT\t\t0x00000001\n#define GL_CLIENT_VERTEX_ARRAY_BIT\t\t0x00000002\n#define GL_ALL_CLIENT_ATTRIB_BITS \t\t0xFFFFFFFF\n#define GL_CLIENT_ALL_ATTRIB_BITS \t\t0xFFFFFFFF\n\n\n\n/*\n * Miscellaneous\n */\n\nGLAPI void GLAPIENTRY glClearIndex( GLfloat c );\n\nGLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );\n\nGLAPI void GLAPIENTRY glClear( GLbitfield mask );\n\nGLAPI void GLAPIENTRY glIndexMask( GLuint mask );\n\nGLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );\n\nGLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );\n\nGLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );\n\nGLAPI void GLAPIENTRY glLogicOp( GLenum opcode );\n\nGLAPI void GLAPIENTRY glCullFace( GLenum mode );\n\nGLAPI void GLAPIENTRY glFrontFace( GLenum mode );\n\nGLAPI void GLAPIENTRY glPointSize( GLfloat size );\n\nGLAPI void GLAPIENTRY glLineWidth( GLfloat width );\n\nGLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );\n\nGLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );\n\nGLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );\n\nGLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );\n\nGLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );\n\nGLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );\n\nGLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );\n\nGLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);\n\nGLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );\n\nGLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );\n\nGLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );\n\nGLAPI void GLAPIENTRY glReadBuffer( GLenum mode );\n\nGLAPI void GLAPIENTRY glEnable( GLenum cap );\n\nGLAPI void GLAPIENTRY glDisable( GLenum cap );\n\nGLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );\n\n\nGLAPI void GLAPIENTRY glEnableClientState( GLenum cap );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glDisableClientState( GLenum cap );  /* 1.1 */\n\n\nGLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );\n\nGLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );\n\nGLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );\n\nGLAPI void GLAPIENTRY glPopAttrib( void );\n\n\nGLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glPopClientAttrib( void );  /* 1.1 */\n\n\nGLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );\n\nGLAPI GLenum GLAPIENTRY glGetError( void );\n\nGLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );\n\nGLAPI void GLAPIENTRY glFinish( void );\n\nGLAPI void GLAPIENTRY glFlush( void );\n\nGLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );\n\n\n/*\n * Depth Buffer\n */\n\nGLAPI void GLAPIENTRY glClearDepth( GLclampd depth );\n\nGLAPI void GLAPIENTRY glDepthFunc( GLenum func );\n\nGLAPI void GLAPIENTRY glDepthMask( GLboolean flag );\n\nGLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );\n\n\n/*\n * Accumulation Buffer\n */\n\nGLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );\n\nGLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );\n\n\n/*\n * Transformation\n */\n\nGLAPI void GLAPIENTRY glMatrixMode( GLenum mode );\n\nGLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,\n                                 GLdouble bottom, GLdouble top,\n                                 GLdouble near_val, GLdouble far_val );\n\nGLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,\n                                   GLdouble bottom, GLdouble top,\n                                   GLdouble near_val, GLdouble far_val );\n\nGLAPI void GLAPIENTRY glViewport( GLint x, GLint y,\n                                    GLsizei width, GLsizei height );\n\nGLAPI void GLAPIENTRY glPushMatrix( void );\n\nGLAPI void GLAPIENTRY glPopMatrix( void );\n\nGLAPI void GLAPIENTRY glLoadIdentity( void );\n\nGLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );\nGLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );\n\nGLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );\nGLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );\n\nGLAPI void GLAPIENTRY glRotated( GLdouble angle,\n                                   GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glRotatef( GLfloat angle,\n                                   GLfloat x, GLfloat y, GLfloat z );\n\nGLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );\n\nGLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );\n\n\n/*\n * Display Lists\n */\n\nGLAPI GLboolean GLAPIENTRY glIsList( GLuint list );\n\nGLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );\n\nGLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );\n\nGLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );\n\nGLAPI void GLAPIENTRY glEndList( void );\n\nGLAPI void GLAPIENTRY glCallList( GLuint list );\n\nGLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,\n                                     const GLvoid *lists );\n\nGLAPI void GLAPIENTRY glListBase( GLuint base );\n\n\n/*\n * Drawing Functions\n */\n\nGLAPI void GLAPIENTRY glBegin( GLenum mode );\n\nGLAPI void GLAPIENTRY glEnd( void );\n\n\nGLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );\nGLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );\nGLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );\nGLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );\n\nGLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );\nGLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );\nGLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );\n\nGLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );\nGLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );\nGLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );\nGLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );\n\nGLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex2iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex3iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex4iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );\nGLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );\nGLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );\nGLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );\nGLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );\n\nGLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glNormal3iv( const GLint *v );\nGLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glIndexd( GLdouble c );\nGLAPI void GLAPIENTRY glIndexf( GLfloat c );\nGLAPI void GLAPIENTRY glIndexi( GLint c );\nGLAPI void GLAPIENTRY glIndexs( GLshort c );\nGLAPI void GLAPIENTRY glIndexub( GLubyte c );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );\nGLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );\nGLAPI void GLAPIENTRY glIndexiv( const GLint *c );\nGLAPI void GLAPIENTRY glIndexsv( const GLshort *c );\nGLAPI void GLAPIENTRY glIndexubv( const GLubyte *c );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );\nGLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );\nGLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );\nGLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );\nGLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );\nGLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );\nGLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );\nGLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );\n\nGLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,\n                                   GLbyte blue, GLbyte alpha );\nGLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,\n                                   GLdouble blue, GLdouble alpha );\nGLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,\n                                   GLfloat blue, GLfloat alpha );\nGLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,\n                                   GLint blue, GLint alpha );\nGLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,\n                                   GLshort blue, GLshort alpha );\nGLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,\n                                    GLubyte blue, GLubyte alpha );\nGLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,\n                                    GLuint blue, GLuint alpha );\nGLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,\n                                    GLushort blue, GLushort alpha );\n\n\nGLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glColor3iv( const GLint *v );\nGLAPI void GLAPIENTRY glColor3sv( const GLshort *v );\nGLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );\nGLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );\nGLAPI void GLAPIENTRY glColor3usv( const GLushort *v );\n\nGLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glColor4iv( const GLint *v );\nGLAPI void GLAPIENTRY glColor4sv( const GLshort *v );\nGLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );\nGLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );\nGLAPI void GLAPIENTRY glColor4usv( const GLushort *v );\n\n\nGLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );\nGLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );\nGLAPI void GLAPIENTRY glTexCoord1i( GLint s );\nGLAPI void GLAPIENTRY glTexCoord1s( GLshort s );\n\nGLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );\nGLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );\nGLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );\nGLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );\n\nGLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );\nGLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );\nGLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );\nGLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );\n\nGLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );\nGLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );\nGLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );\nGLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );\n\nGLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );\nGLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );\nGLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );\nGLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );\n\nGLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );\nGLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );\nGLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );\n\nGLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );\nGLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );\nGLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );\nGLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );\n\nGLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );\nGLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );\nGLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );\nGLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );\n\n\nGLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );\nGLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );\nGLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );\nGLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );\n\n\n/*\n * Vertex Arrays  (1.1)\n */\n\nGLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,\n                                       GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,\n                                       const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,\n                                      GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,\n                                      const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,\n                                         GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );\n\nGLAPI void GLAPIENTRY glArrayElement( GLint i );\n\nGLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );\n\nGLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,\n                                      GLenum type, const GLvoid *indices );\n\nGLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,\n                                           const GLvoid *pointer );\n\n/*\n * Lighting\n */\n\nGLAPI void GLAPIENTRY glShadeModel( GLenum mode );\n\nGLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,\n                                 const GLfloat *params );\nGLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,\n                                 const GLint *params );\n\nGLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,\n                                    GLfloat *params );\nGLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,\n                                    GLint *params );\n\nGLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );\n\nGLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );\n\n\n/*\n * Raster functions\n */\n\nGLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );\n\nGLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,\n                                    const GLfloat *values );\nGLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,\n                                     const GLuint *values );\nGLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,\n                                     const GLushort *values );\n\nGLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );\nGLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );\nGLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );\n\nGLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,\n                                GLfloat xorig, GLfloat yorig,\n                                GLfloat xmove, GLfloat ymove,\n                                const GLubyte *bitmap );\n\nGLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,\n                                    GLsizei width, GLsizei height,\n                                    GLenum format, GLenum type,\n                                    GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,\n                                    GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,\n                                    GLsizei width, GLsizei height,\n                                    GLenum type );\n\n/*\n * Stenciling\n */\n\nGLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );\n\nGLAPI void GLAPIENTRY glStencilMask( GLuint mask );\n\nGLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );\n\nGLAPI void GLAPIENTRY glClearStencil( GLint s );\n\n\n\n/*\n * Texture mapping\n */\n\nGLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );\nGLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );\nGLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );\nGLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,\n                                          const GLfloat *params );\nGLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,\n                                          const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,\n                                           GLenum pname, GLfloat *params);\nGLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,\n                                           GLenum pname, GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,\n                                                GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,\n                                                GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,\n                                    GLint internalFormat,\n                                    GLsizei width, GLint border,\n                                    GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,\n                                    GLint internalFormat,\n                                    GLsizei width, GLsizei height,\n                                    GLint border, GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,\n                                     GLenum format, GLenum type,\n                                     GLvoid *pixels );\n\n\n/* 1.1 functions */\n\nGLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );\n\nGLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);\n\nGLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );\n\nGLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,\n                                            const GLuint *textures,\n                                            const GLclampf *priorities );\n\nGLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,\n                                                  const GLuint *textures,\n                                                  GLboolean *residences );\n\nGLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );\n\n\nGLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,\n                                       GLint xoffset,\n                                       GLsizei width, GLenum format,\n                                       GLenum type, const GLvoid *pixels );\n\n\nGLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,\n                                       GLint xoffset, GLint yoffset,\n                                       GLsizei width, GLsizei height,\n                                       GLenum format, GLenum type,\n                                       const GLvoid *pixels );\n\n\nGLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,\n                                        GLenum internalformat,\n                                        GLint x, GLint y,\n                                        GLsizei width, GLint border );\n\n\nGLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,\n                                        GLenum internalformat,\n                                        GLint x, GLint y,\n                                        GLsizei width, GLsizei height,\n                                        GLint border );\n\n\nGLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,\n                                           GLint xoffset, GLint x, GLint y,\n                                           GLsizei width );\n\n\nGLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,\n                                           GLint xoffset, GLint yoffset,\n                                           GLint x, GLint y,\n                                           GLsizei width, GLsizei height );\n\n\n/*\n * Evaluators\n */\n\nGLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,\n                               GLint stride,\n                               GLint order, const GLdouble *points );\nGLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,\n                               GLint stride,\n                               GLint order, const GLfloat *points );\n\nGLAPI void GLAPIENTRY glMap2d( GLenum target,\n\t\t     GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,\n\t\t     GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,\n\t\t     const GLdouble *points );\nGLAPI void GLAPIENTRY glMap2f( GLenum target,\n\t\t     GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,\n\t\t     GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,\n\t\t     const GLfloat *points );\n\nGLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );\nGLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );\nGLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );\n\nGLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );\nGLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );\n\nGLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );\nGLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );\n\nGLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );\nGLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );\n\nGLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );\nGLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );\n\nGLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );\nGLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );\n\nGLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,\n                                   GLint vn, GLdouble v1, GLdouble v2 );\nGLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,\n                                   GLint vn, GLfloat v1, GLfloat v2 );\n\nGLAPI void GLAPIENTRY glEvalPoint1( GLint i );\n\nGLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );\n\nGLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );\n\nGLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );\n\n\n/*\n * Fog\n */\n\nGLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );\n\nGLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );\n\nGLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );\n\n\n/*\n * Selection and Feedback\n */\n\nGLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );\n\nGLAPI void GLAPIENTRY glPassThrough( GLfloat token );\n\nGLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );\n\nGLAPI void GLAPIENTRY glInitNames( void );\n\nGLAPI void GLAPIENTRY glLoadName( GLuint name );\n\nGLAPI void GLAPIENTRY glPushName( GLuint name );\n\nGLAPI void GLAPIENTRY glPopName( void );\n\n\n\n/*\n * OpenGL 1.2\n */\n\n#define GL_RESCALE_NORMAL\t\t\t0x803A\n#define GL_CLAMP_TO_EDGE\t\t\t0x812F\n#define GL_MAX_ELEMENTS_VERTICES\t\t0x80E8\n#define GL_MAX_ELEMENTS_INDICES\t\t\t0x80E9\n#define GL_BGR\t\t\t\t\t0x80E0\n#define GL_BGRA\t\t\t\t\t0x80E1\n#define GL_UNSIGNED_BYTE_3_3_2\t\t\t0x8032\n#define GL_UNSIGNED_BYTE_2_3_3_REV\t\t0x8362\n#define GL_UNSIGNED_SHORT_5_6_5\t\t\t0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV\t\t0x8364\n#define GL_UNSIGNED_SHORT_4_4_4_4\t\t0x8033\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV\t\t0x8365\n#define GL_UNSIGNED_SHORT_5_5_5_1\t\t0x8034\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV\t\t0x8366\n#define GL_UNSIGNED_INT_8_8_8_8\t\t\t0x8035\n#define GL_UNSIGNED_INT_8_8_8_8_REV\t\t0x8367\n#define GL_UNSIGNED_INT_10_10_10_2\t\t0x8036\n#define GL_UNSIGNED_INT_2_10_10_10_REV\t\t0x8368\n#define GL_LIGHT_MODEL_COLOR_CONTROL\t\t0x81F8\n#define GL_SINGLE_COLOR\t\t\t\t0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR\t\t0x81FA\n#define GL_TEXTURE_MIN_LOD\t\t\t0x813A\n#define GL_TEXTURE_MAX_LOD\t\t\t0x813B\n#define GL_TEXTURE_BASE_LEVEL\t\t\t0x813C\n#define GL_TEXTURE_MAX_LEVEL\t\t\t0x813D\n#define GL_SMOOTH_POINT_SIZE_RANGE\t\t0x0B12\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY\t0x0B13\n#define GL_SMOOTH_LINE_WIDTH_RANGE\t\t0x0B22\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY\t0x0B23\n#define GL_ALIASED_POINT_SIZE_RANGE\t\t0x846D\n#define GL_ALIASED_LINE_WIDTH_RANGE\t\t0x846E\n#define GL_PACK_SKIP_IMAGES\t\t\t0x806B\n#define GL_PACK_IMAGE_HEIGHT\t\t\t0x806C\n#define GL_UNPACK_SKIP_IMAGES\t\t\t0x806D\n#define GL_UNPACK_IMAGE_HEIGHT\t\t\t0x806E\n#define GL_TEXTURE_3D\t\t\t\t0x806F\n#define GL_PROXY_TEXTURE_3D\t\t\t0x8070\n#define GL_TEXTURE_DEPTH\t\t\t0x8071\n#define GL_TEXTURE_WRAP_R\t\t\t0x8072\n#define GL_MAX_3D_TEXTURE_SIZE\t\t\t0x8073\n#define GL_TEXTURE_BINDING_3D\t\t\t0x806A\n\nGLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,\n\tGLuint end, GLsizei count, GLenum type, const GLvoid *indices );\n\nGLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,\n                                      GLint internalFormat,\n                                      GLsizei width, GLsizei height,\n                                      GLsizei depth, GLint border,\n                                      GLenum format, GLenum type,\n                                      const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,\n                                         GLint xoffset, GLint yoffset,\n                                         GLint zoffset, GLsizei width,\n                                         GLsizei height, GLsizei depth,\n                                         GLenum format,\n                                         GLenum type, const GLvoid *pixels);\n\nGLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,\n                                             GLint xoffset, GLint yoffset,\n                                             GLint zoffset, GLint x,\n                                             GLint y, GLsizei width,\n                                             GLsizei height );\n\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n\n\n/*\n * GL_ARB_imaging\n */\n\n#define GL_CONSTANT_COLOR\t\t\t0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR\t\t0x8002\n#define GL_CONSTANT_ALPHA\t\t\t0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA\t\t0x8004\n#define GL_COLOR_TABLE\t\t\t\t0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE\t\t0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE\t0x80D2\n#define GL_PROXY_COLOR_TABLE\t\t\t0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\t0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\t0x80D5\n#define GL_COLOR_TABLE_SCALE\t\t\t0x80D6\n#define GL_COLOR_TABLE_BIAS\t\t\t0x80D7\n#define GL_COLOR_TABLE_FORMAT\t\t\t0x80D8\n#define GL_COLOR_TABLE_WIDTH\t\t\t0x80D9\n#define GL_COLOR_TABLE_RED_SIZE\t\t\t0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE\t\t0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE\t\t0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE\t\t0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE\t\t0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE\t\t0x80DF\n#define GL_CONVOLUTION_1D\t\t\t0x8010\n#define GL_CONVOLUTION_2D\t\t\t0x8011\n#define GL_SEPARABLE_2D\t\t\t\t0x8012\n#define GL_CONVOLUTION_BORDER_MODE\t\t0x8013\n#define GL_CONVOLUTION_FILTER_SCALE\t\t0x8014\n#define GL_CONVOLUTION_FILTER_BIAS\t\t0x8015\n#define GL_REDUCE\t\t\t\t0x8016\n#define GL_CONVOLUTION_FORMAT\t\t\t0x8017\n#define GL_CONVOLUTION_WIDTH\t\t\t0x8018\n#define GL_CONVOLUTION_HEIGHT\t\t\t0x8019\n#define GL_MAX_CONVOLUTION_WIDTH\t\t0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT\t\t0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE\t\t0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE\t\t0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE\t\t0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE\t\t0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS\t\t0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS\t\t0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS\t\t0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS\t\t0x8023\n#define GL_CONSTANT_BORDER\t\t\t0x8151\n#define GL_REPLICATE_BORDER\t\t\t0x8153\n#define GL_CONVOLUTION_BORDER_COLOR\t\t0x8154\n#define GL_COLOR_MATRIX\t\t\t\t0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH\t\t0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH\t\t0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE\t\t0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE\t0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE\t\t0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE\t0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS\t\t0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS\t\t0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS\t\t0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS\t\t0x80BB\n#define GL_HISTOGRAM\t\t\t\t0x8024\n#define GL_PROXY_HISTOGRAM\t\t\t0x8025\n#define GL_HISTOGRAM_WIDTH\t\t\t0x8026\n#define GL_HISTOGRAM_FORMAT\t\t\t0x8027\n#define GL_HISTOGRAM_RED_SIZE\t\t\t0x8028\n#define GL_HISTOGRAM_GREEN_SIZE\t\t\t0x8029\n#define GL_HISTOGRAM_BLUE_SIZE\t\t\t0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE\t\t\t0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE\t\t0x802C\n#define GL_HISTOGRAM_SINK\t\t\t0x802D\n#define GL_MINMAX\t\t\t\t0x802E\n#define GL_MINMAX_FORMAT\t\t\t0x802F\n#define GL_MINMAX_SINK\t\t\t\t0x8030\n#define GL_TABLE_TOO_LARGE\t\t\t0x8031\n#define GL_BLEND_EQUATION\t\t\t0x8009\n#define GL_MIN\t\t\t\t\t0x8007\n#define GL_MAX\t\t\t\t\t0x8008\n#define GL_FUNC_ADD\t\t\t\t0x8006\n#define GL_FUNC_SUBTRACT\t\t\t0x800A\n#define GL_FUNC_REVERSE_SUBTRACT\t\t0x800B\n#define GL_BLEND_COLOR\t\t\t\t0x8005\n\n\nGLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,\n                                    GLsizei width, GLenum format,\n                                    GLenum type, const GLvoid *table );\n\nGLAPI void GLAPIENTRY glColorSubTable( GLenum target,\n                                       GLsizei start, GLsizei count,\n                                       GLenum format, GLenum type,\n                                       const GLvoid *data );\n\nGLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,\n                                              const GLint *params);\n\nGLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,\n                                              const GLfloat *params);\n\nGLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,\n                                           GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,\n                                        GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,\n                                       GLenum type, GLvoid *table );\n\nGLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,\n                                                  GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,\n                                                  GLint *params );\n\nGLAPI void GLAPIENTRY glBlendEquation( GLenum mode );\n\nGLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,\n                                    GLclampf blue, GLclampf alpha );\n\nGLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,\n\t\t\t\t   GLenum internalformat, GLboolean sink );\n\nGLAPI void GLAPIENTRY glResetHistogram( GLenum target );\n\nGLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,\n\t\t\t\t      GLenum format, GLenum type,\n\t\t\t\t      GLvoid *values );\n\nGLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,\n\t\t\t\t\t\t GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,\n\t\t\t\t\t\t GLint *params );\n\nGLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,\n\t\t\t\tGLboolean sink );\n\nGLAPI void GLAPIENTRY glResetMinmax( GLenum target );\n\nGLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,\n                                   GLenum format, GLenum types,\n                                   GLvoid *values );\n\nGLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,\n\t\t\t\t\t      GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,\n\t\t\t\t\t      GLint *params );\n\nGLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLenum format, GLenum type,\n\tconst GLvoid *image );\n\nGLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLsizei height, GLenum format,\n\tGLenum type, const GLvoid *image );\n\nGLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,\n\tGLfloat params );\n\nGLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,\n\tconst GLfloat *params );\n\nGLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,\n\tGLint params );\n\nGLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,\n\tconst GLint *params );\n\nGLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,\n\tGLenum internalformat, GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,\n\tGLenum internalformat, GLint x, GLint y, GLsizei width,\n\tGLsizei height);\n\nGLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,\n\tGLenum type, GLvoid *image );\n\nGLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,\n\tGLfloat *params );\n\nGLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,\n\tGLint *params );\n\nGLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLsizei height, GLenum format,\n\tGLenum type, const GLvoid *row, const GLvoid *column );\n\nGLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,\n\tGLenum type, GLvoid *row, GLvoid *column, GLvoid *span );\n\n\n\n\n/*\n * OpenGL 1.3\n */\n\n/* multitexture */\n#define GL_TEXTURE0\t\t\t\t0x84C0\n#define GL_TEXTURE1\t\t\t\t0x84C1\n#define GL_TEXTURE2\t\t\t\t0x84C2\n#define GL_TEXTURE3\t\t\t\t0x84C3\n#define GL_TEXTURE4\t\t\t\t0x84C4\n#define GL_TEXTURE5\t\t\t\t0x84C5\n#define GL_TEXTURE6\t\t\t\t0x84C6\n#define GL_TEXTURE7\t\t\t\t0x84C7\n#define GL_TEXTURE8\t\t\t\t0x84C8\n#define GL_TEXTURE9\t\t\t\t0x84C9\n#define GL_TEXTURE10\t\t\t\t0x84CA\n#define GL_TEXTURE11\t\t\t\t0x84CB\n#define GL_TEXTURE12\t\t\t\t0x84CC\n#define GL_TEXTURE13\t\t\t\t0x84CD\n#define GL_TEXTURE14\t\t\t\t0x84CE\n#define GL_TEXTURE15\t\t\t\t0x84CF\n#define GL_TEXTURE16\t\t\t\t0x84D0\n#define GL_TEXTURE17\t\t\t\t0x84D1\n#define GL_TEXTURE18\t\t\t\t0x84D2\n#define GL_TEXTURE19\t\t\t\t0x84D3\n#define GL_TEXTURE20\t\t\t\t0x84D4\n#define GL_TEXTURE21\t\t\t\t0x84D5\n#define GL_TEXTURE22\t\t\t\t0x84D6\n#define GL_TEXTURE23\t\t\t\t0x84D7\n#define GL_TEXTURE24\t\t\t\t0x84D8\n#define GL_TEXTURE25\t\t\t\t0x84D9\n#define GL_TEXTURE26\t\t\t\t0x84DA\n#define GL_TEXTURE27\t\t\t\t0x84DB\n#define GL_TEXTURE28\t\t\t\t0x84DC\n#define GL_TEXTURE29\t\t\t\t0x84DD\n#define GL_TEXTURE30\t\t\t\t0x84DE\n#define GL_TEXTURE31\t\t\t\t0x84DF\n#define GL_ACTIVE_TEXTURE\t\t\t0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE\t\t0x84E1\n#define GL_MAX_TEXTURE_UNITS\t\t\t0x84E2\n/* texture_cube_map */\n#define GL_NORMAL_MAP\t\t\t\t0x8511\n#define GL_REFLECTION_MAP\t\t\t0x8512\n#define GL_TEXTURE_CUBE_MAP\t\t\t0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP\t\t0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X\t\t0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X\t\t0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y\t\t0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\t\t0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z\t\t0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\t\t0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP\t\t0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE\t\t0x851C\n/* texture_compression */\n#define GL_COMPRESSED_ALPHA\t\t\t0x84E9\n#define GL_COMPRESSED_LUMINANCE\t\t\t0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA\t\t0x84EB\n#define GL_COMPRESSED_INTENSITY\t\t\t0x84EC\n#define GL_COMPRESSED_RGB\t\t\t0x84ED\n#define GL_COMPRESSED_RGBA\t\t\t0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT\t\t0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE\t0x86A0\n#define GL_TEXTURE_COMPRESSED\t\t\t0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS\t0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS\t\t0x86A3\n/* multisample */\n#define GL_MULTISAMPLE\t\t\t\t0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE\t\t0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE\t\t\t0x809F\n#define GL_SAMPLE_COVERAGE\t\t\t0x80A0\n#define GL_SAMPLE_BUFFERS\t\t\t0x80A8\n#define GL_SAMPLES\t\t\t\t0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE\t\t0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT\t\t0x80AB\n#define GL_MULTISAMPLE_BIT\t\t\t0x20000000\n/* transpose_matrix */\n#define GL_TRANSPOSE_MODELVIEW_MATRIX\t\t0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX\t\t0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX\t\t0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX\t\t0x84E6\n/* texture_env_combine */\n#define GL_COMBINE\t\t\t\t0x8570\n#define GL_COMBINE_RGB\t\t\t\t0x8571\n#define GL_COMBINE_ALPHA\t\t\t0x8572\n#define GL_SOURCE0_RGB\t\t\t\t0x8580\n#define GL_SOURCE1_RGB\t\t\t\t0x8581\n#define GL_SOURCE2_RGB\t\t\t\t0x8582\n#define GL_SOURCE0_ALPHA\t\t\t0x8588\n#define GL_SOURCE1_ALPHA\t\t\t0x8589\n#define GL_SOURCE2_ALPHA\t\t\t0x858A\n#define GL_OPERAND0_RGB\t\t\t\t0x8590\n#define GL_OPERAND1_RGB\t\t\t\t0x8591\n#define GL_OPERAND2_RGB\t\t\t\t0x8592\n#define GL_OPERAND0_ALPHA\t\t\t0x8598\n#define GL_OPERAND1_ALPHA\t\t\t0x8599\n#define GL_OPERAND2_ALPHA\t\t\t0x859A\n#define GL_RGB_SCALE\t\t\t\t0x8573\n#define GL_ADD_SIGNED\t\t\t\t0x8574\n#define GL_INTERPOLATE\t\t\t\t0x8575\n#define GL_SUBTRACT\t\t\t\t0x84E7\n#define GL_CONSTANT\t\t\t\t0x8576\n#define GL_PRIMARY_COLOR\t\t\t0x8577\n#define GL_PREVIOUS\t\t\t\t0x8578\n/* texture_env_dot3 */\n#define GL_DOT3_RGB\t\t\t\t0x86AE\n#define GL_DOT3_RGBA\t\t\t\t0x86AF\n/* texture_border_clamp */\n#define GL_CLAMP_TO_BORDER\t\t\t0x812D\n\nGLAPI void GLAPIENTRY glActiveTexture( GLenum texture );\n\nGLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );\n\nGLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );\n\nGLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );\n\nGLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );\n\nGLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );\n\nGLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );\n\n\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);\n\n\n\n/*\n * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)\n */\n#ifndef GL_ARB_multitexture\n#define GL_ARB_multitexture 1\n\n#define GL_TEXTURE0_ARB\t\t\t\t0x84C0\n#define GL_TEXTURE1_ARB\t\t\t\t0x84C1\n#define GL_TEXTURE2_ARB\t\t\t\t0x84C2\n#define GL_TEXTURE3_ARB\t\t\t\t0x84C3\n#define GL_TEXTURE4_ARB\t\t\t\t0x84C4\n#define GL_TEXTURE5_ARB\t\t\t\t0x84C5\n#define GL_TEXTURE6_ARB\t\t\t\t0x84C6\n#define GL_TEXTURE7_ARB\t\t\t\t0x84C7\n#define GL_TEXTURE8_ARB\t\t\t\t0x84C8\n#define GL_TEXTURE9_ARB\t\t\t\t0x84C9\n#define GL_TEXTURE10_ARB\t\t\t0x84CA\n#define GL_TEXTURE11_ARB\t\t\t0x84CB\n#define GL_TEXTURE12_ARB\t\t\t0x84CC\n#define GL_TEXTURE13_ARB\t\t\t0x84CD\n#define GL_TEXTURE14_ARB\t\t\t0x84CE\n#define GL_TEXTURE15_ARB\t\t\t0x84CF\n#define GL_TEXTURE16_ARB\t\t\t0x84D0\n#define GL_TEXTURE17_ARB\t\t\t0x84D1\n#define GL_TEXTURE18_ARB\t\t\t0x84D2\n#define GL_TEXTURE19_ARB\t\t\t0x84D3\n#define GL_TEXTURE20_ARB\t\t\t0x84D4\n#define GL_TEXTURE21_ARB\t\t\t0x84D5\n#define GL_TEXTURE22_ARB\t\t\t0x84D6\n#define GL_TEXTURE23_ARB\t\t\t0x84D7\n#define GL_TEXTURE24_ARB\t\t\t0x84D8\n#define GL_TEXTURE25_ARB\t\t\t0x84D9\n#define GL_TEXTURE26_ARB\t\t\t0x84DA\n#define GL_TEXTURE27_ARB\t\t\t0x84DB\n#define GL_TEXTURE28_ARB\t\t\t0x84DC\n#define GL_TEXTURE29_ARB\t\t\t0x84DD\n#define GL_TEXTURE30_ARB\t\t\t0x84DE\n#define GL_TEXTURE31_ARB\t\t\t0x84DF\n#define GL_ACTIVE_TEXTURE_ARB\t\t\t0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE_ARB\t\t0x84E1\n#define GL_MAX_TEXTURE_UNITS_ARB\t\t0x84E2\n\nGLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);\nGLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);\nGLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);\nGLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);\nGLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);\nGLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);\nGLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\nGLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\nGLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\nGLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\nGLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\nGLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);\n\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);\n\n#endif /* GL_ARB_multitexture */\n\n\n\n/*\n * Define this token if you want \"old-style\" header file behaviour (extensions\n * defined in gl.h).  Otherwise, extensions will be included from glext.h.\n */\n#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)\n#include \"SDL_opengl_glext.h\"\n#endif  /* GL_GLEXT_LEGACY */\n\n\n\n/*\n * ???. GL_MESA_packed_depth_stencil\n * XXX obsolete\n */\n#ifndef GL_MESA_packed_depth_stencil\n#define GL_MESA_packed_depth_stencil 1\n\n#define GL_DEPTH_STENCIL_MESA\t\t\t0x8750\n#define GL_UNSIGNED_INT_24_8_MESA\t\t0x8751\n#define GL_UNSIGNED_INT_8_24_REV_MESA\t\t0x8752\n#define GL_UNSIGNED_SHORT_15_1_MESA\t\t0x8753\n#define GL_UNSIGNED_SHORT_1_15_REV_MESA\t\t0x8754\n\n#endif /* GL_MESA_packed_depth_stencil */\n\n\n#ifndef GL_ATI_blend_equation_separate\n#define GL_ATI_blend_equation_separate 1\n\n#define GL_ALPHA_BLEND_EQUATION_ATI\t        0x883D\n\nGLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);\n\n#endif /* GL_ATI_blend_equation_separate */\n\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\ntypedef void* GLeglImageOES;\n#endif\n\n#ifndef GL_OES_EGL_image\n#define GL_OES_EGL_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);\nGLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);\n#endif\ntypedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);\ntypedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);\n#endif\n\n\n/**\n ** NOTE!!!!!  If you add new functions to this file, or update\n ** glext.h be sure to regenerate the gl_mangle.h file.  See comments\n ** in that file for details.\n **/\n\n\n\n/**********************************************************************\n * Begin system-specific stuff\n */\n#if defined(PRAGMA_EXPORT_SUPPORTED)\n#pragma export off\n#endif\n\n/*\n * End system-specific stuff\n **********************************************************************/\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl_h_ */\n\n#endif /* !__IPHONEOS__ */\n\n#endif /* SDL_opengl_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengl_glext.h",
    "content": "#ifndef __glext_h_\n#define __glext_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2014 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $\n*/\n\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#include <windows.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n#define GL_GLEXT_VERSION 20140521\n\n/* Generated C header for:\n * API: gl\n * Profile: compatibility\n * Versions considered: .*\n * Versions emitted: 1\\.[2-9]|[234]\\.[0-9]\n * Default extensions included: gl\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef GL_VERSION_1_2\n#define GL_VERSION_1_2 1\n#define GL_UNSIGNED_BYTE_3_3_2            0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034\n#define GL_UNSIGNED_INT_8_8_8_8           0x8035\n#define GL_UNSIGNED_INT_10_10_10_2        0x8036\n#define GL_TEXTURE_BINDING_3D             0x806A\n#define GL_PACK_SKIP_IMAGES               0x806B\n#define GL_PACK_IMAGE_HEIGHT              0x806C\n#define GL_UNPACK_SKIP_IMAGES             0x806D\n#define GL_UNPACK_IMAGE_HEIGHT            0x806E\n#define GL_TEXTURE_3D                     0x806F\n#define GL_PROXY_TEXTURE_3D               0x8070\n#define GL_TEXTURE_DEPTH                  0x8071\n#define GL_TEXTURE_WRAP_R                 0x8072\n#define GL_MAX_3D_TEXTURE_SIZE            0x8073\n#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362\n#define GL_UNSIGNED_SHORT_5_6_5           0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366\n#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367\n#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368\n#define GL_BGR                            0x80E0\n#define GL_BGRA                           0x80E1\n#define GL_MAX_ELEMENTS_VERTICES          0x80E8\n#define GL_MAX_ELEMENTS_INDICES           0x80E9\n#define GL_CLAMP_TO_EDGE                  0x812F\n#define GL_TEXTURE_MIN_LOD                0x813A\n#define GL_TEXTURE_MAX_LOD                0x813B\n#define GL_TEXTURE_BASE_LEVEL             0x813C\n#define GL_TEXTURE_MAX_LEVEL              0x813D\n#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13\n#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23\n#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E\n#define GL_RESCALE_NORMAL                 0x803A\n#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8\n#define GL_SINGLE_COLOR                   0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR        0x81FA\n#define GL_ALIASED_POINT_SIZE_RANGE       0x846D\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\nGLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_VERSION_1_2 */\n\n#ifndef GL_VERSION_1_3\n#define GL_VERSION_1_3 1\n#define GL_TEXTURE0                       0x84C0\n#define GL_TEXTURE1                       0x84C1\n#define GL_TEXTURE2                       0x84C2\n#define GL_TEXTURE3                       0x84C3\n#define GL_TEXTURE4                       0x84C4\n#define GL_TEXTURE5                       0x84C5\n#define GL_TEXTURE6                       0x84C6\n#define GL_TEXTURE7                       0x84C7\n#define GL_TEXTURE8                       0x84C8\n#define GL_TEXTURE9                       0x84C9\n#define GL_TEXTURE10                      0x84CA\n#define GL_TEXTURE11                      0x84CB\n#define GL_TEXTURE12                      0x84CC\n#define GL_TEXTURE13                      0x84CD\n#define GL_TEXTURE14                      0x84CE\n#define GL_TEXTURE15                      0x84CF\n#define GL_TEXTURE16                      0x84D0\n#define GL_TEXTURE17                      0x84D1\n#define GL_TEXTURE18                      0x84D2\n#define GL_TEXTURE19                      0x84D3\n#define GL_TEXTURE20                      0x84D4\n#define GL_TEXTURE21                      0x84D5\n#define GL_TEXTURE22                      0x84D6\n#define GL_TEXTURE23                      0x84D7\n#define GL_TEXTURE24                      0x84D8\n#define GL_TEXTURE25                      0x84D9\n#define GL_TEXTURE26                      0x84DA\n#define GL_TEXTURE27                      0x84DB\n#define GL_TEXTURE28                      0x84DC\n#define GL_TEXTURE29                      0x84DD\n#define GL_TEXTURE30                      0x84DE\n#define GL_TEXTURE31                      0x84DF\n#define GL_ACTIVE_TEXTURE                 0x84E0\n#define GL_MULTISAMPLE                    0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE            0x809F\n#define GL_SAMPLE_COVERAGE                0x80A0\n#define GL_SAMPLE_BUFFERS                 0x80A8\n#define GL_SAMPLES                        0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE          0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT         0x80AB\n#define GL_TEXTURE_CUBE_MAP               0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C\n#define GL_COMPRESSED_RGB                 0x84ED\n#define GL_COMPRESSED_RGBA                0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT       0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0\n#define GL_TEXTURE_COMPRESSED             0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3\n#define GL_CLAMP_TO_BORDER                0x812D\n#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1\n#define GL_MAX_TEXTURE_UNITS              0x84E2\n#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6\n#define GL_MULTISAMPLE_BIT                0x20000000\n#define GL_NORMAL_MAP                     0x8511\n#define GL_REFLECTION_MAP                 0x8512\n#define GL_COMPRESSED_ALPHA               0x84E9\n#define GL_COMPRESSED_LUMINANCE           0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB\n#define GL_COMPRESSED_INTENSITY           0x84EC\n#define GL_COMBINE                        0x8570\n#define GL_COMBINE_RGB                    0x8571\n#define GL_COMBINE_ALPHA                  0x8572\n#define GL_SOURCE0_RGB                    0x8580\n#define GL_SOURCE1_RGB                    0x8581\n#define GL_SOURCE2_RGB                    0x8582\n#define GL_SOURCE0_ALPHA                  0x8588\n#define GL_SOURCE1_ALPHA                  0x8589\n#define GL_SOURCE2_ALPHA                  0x858A\n#define GL_OPERAND0_RGB                   0x8590\n#define GL_OPERAND1_RGB                   0x8591\n#define GL_OPERAND2_RGB                   0x8592\n#define GL_OPERAND0_ALPHA                 0x8598\n#define GL_OPERAND1_ALPHA                 0x8599\n#define GL_OPERAND2_ALPHA                 0x859A\n#define GL_RGB_SCALE                      0x8573\n#define GL_ADD_SIGNED                     0x8574\n#define GL_INTERPOLATE                    0x8575\n#define GL_SUBTRACT                       0x84E7\n#define GL_CONSTANT                       0x8576\n#define GL_PRIMARY_COLOR                  0x8577\n#define GL_PREVIOUS                       0x8578\n#define GL_DOT3_RGB                       0x86AE\n#define GL_DOT3_RGBA                      0x86AF\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTexture (GLenum texture);\nGLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);\nGLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);\nGLAPI void APIENTRY glClientActiveTexture (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);\n#endif\n#endif /* GL_VERSION_1_3 */\n\n#ifndef GL_VERSION_1_4\n#define GL_VERSION_1_4 1\n#define GL_BLEND_DST_RGB                  0x80C8\n#define GL_BLEND_SRC_RGB                  0x80C9\n#define GL_BLEND_DST_ALPHA                0x80CA\n#define GL_BLEND_SRC_ALPHA                0x80CB\n#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128\n#define GL_DEPTH_COMPONENT16              0x81A5\n#define GL_DEPTH_COMPONENT24              0x81A6\n#define GL_DEPTH_COMPONENT32              0x81A7\n#define GL_MIRRORED_REPEAT                0x8370\n#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD\n#define GL_TEXTURE_LOD_BIAS               0x8501\n#define GL_INCR_WRAP                      0x8507\n#define GL_DECR_WRAP                      0x8508\n#define GL_TEXTURE_DEPTH_SIZE             0x884A\n#define GL_TEXTURE_COMPARE_MODE           0x884C\n#define GL_TEXTURE_COMPARE_FUNC           0x884D\n#define GL_POINT_SIZE_MIN                 0x8126\n#define GL_POINT_SIZE_MAX                 0x8127\n#define GL_POINT_DISTANCE_ATTENUATION     0x8129\n#define GL_GENERATE_MIPMAP                0x8191\n#define GL_GENERATE_MIPMAP_HINT           0x8192\n#define GL_FOG_COORDINATE_SOURCE          0x8450\n#define GL_FOG_COORDINATE                 0x8451\n#define GL_FRAGMENT_DEPTH                 0x8452\n#define GL_CURRENT_FOG_COORDINATE         0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456\n#define GL_FOG_COORDINATE_ARRAY           0x8457\n#define GL_COLOR_SUM                      0x8458\n#define GL_CURRENT_SECONDARY_COLOR        0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D\n#define GL_SECONDARY_COLOR_ARRAY          0x845E\n#define GL_TEXTURE_FILTER_CONTROL         0x8500\n#define GL_DEPTH_TEXTURE_MODE             0x884B\n#define GL_COMPARE_R_TO_TEXTURE           0x884E\n#define GL_FUNC_ADD                       0x8006\n#define GL_FUNC_SUBTRACT                  0x800A\n#define GL_FUNC_REVERSE_SUBTRACT          0x800B\n#define GL_MIN                            0x8007\n#define GL_MAX                            0x8008\n#define GL_CONSTANT_COLOR                 0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002\n#define GL_CONSTANT_ALPHA                 0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\nGLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\nGLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);\nGLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFogCoordf (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoordd (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2sv (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3sv (const GLshort *v);\nGLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\nGLAPI void APIENTRY glBlendEquation (GLenum mode);\n#endif\n#endif /* GL_VERSION_1_4 */\n\n#ifndef GL_VERSION_1_5\n#define GL_VERSION_1_5 1\n#include <stddef.h>\n#ifdef __MACOSX__\ntypedef long GLsizeiptr;\ntypedef long GLintptr;\n#else\ntypedef ptrdiff_t GLsizeiptr;\ntypedef ptrdiff_t GLintptr;\n#endif\n#define GL_BUFFER_SIZE                    0x8764\n#define GL_BUFFER_USAGE                   0x8765\n#define GL_QUERY_COUNTER_BITS             0x8864\n#define GL_CURRENT_QUERY                  0x8865\n#define GL_QUERY_RESULT                   0x8866\n#define GL_QUERY_RESULT_AVAILABLE         0x8867\n#define GL_ARRAY_BUFFER                   0x8892\n#define GL_ELEMENT_ARRAY_BUFFER           0x8893\n#define GL_ARRAY_BUFFER_BINDING           0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n#define GL_READ_ONLY                      0x88B8\n#define GL_WRITE_ONLY                     0x88B9\n#define GL_READ_WRITE                     0x88BA\n#define GL_BUFFER_ACCESS                  0x88BB\n#define GL_BUFFER_MAPPED                  0x88BC\n#define GL_BUFFER_MAP_POINTER             0x88BD\n#define GL_STREAM_DRAW                    0x88E0\n#define GL_STREAM_READ                    0x88E1\n#define GL_STREAM_COPY                    0x88E2\n#define GL_STATIC_DRAW                    0x88E4\n#define GL_STATIC_READ                    0x88E5\n#define GL_STATIC_COPY                    0x88E6\n#define GL_DYNAMIC_DRAW                   0x88E8\n#define GL_DYNAMIC_READ                   0x88E9\n#define GL_DYNAMIC_COPY                   0x88EA\n#define GL_SAMPLES_PASSED                 0x8914\n#define GL_SRC1_ALPHA                     0x8589\n#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E\n#define GL_FOG_COORD_SRC                  0x8450\n#define GL_FOG_COORD                      0x8451\n#define GL_CURRENT_FOG_COORD              0x8453\n#define GL_FOG_COORD_ARRAY_TYPE           0x8454\n#define GL_FOG_COORD_ARRAY_STRIDE         0x8455\n#define GL_FOG_COORD_ARRAY_POINTER        0x8456\n#define GL_FOG_COORD_ARRAY                0x8457\n#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D\n#define GL_SRC0_RGB                       0x8580\n#define GL_SRC1_RGB                       0x8581\n#define GL_SRC2_RGB                       0x8582\n#define GL_SRC0_ALPHA                     0x8588\n#define GL_SRC2_ALPHA                     0x858A\ntypedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQuery (GLuint id);\nGLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQuery (GLenum target);\nGLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);\nGLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);\nGLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);\nGLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);\nGLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_VERSION_1_5 */\n\n#ifndef GL_VERSION_2_0\n#define GL_VERSION_2_0 1\ntypedef char GLchar;\n#define GL_BLEND_EQUATION_RGB             0x8009\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625\n#define GL_CURRENT_VERTEX_ATTRIB          0x8626\n#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645\n#define GL_STENCIL_BACK_FUNC              0x8800\n#define GL_STENCIL_BACK_FAIL              0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803\n#define GL_MAX_DRAW_BUFFERS               0x8824\n#define GL_DRAW_BUFFER0                   0x8825\n#define GL_DRAW_BUFFER1                   0x8826\n#define GL_DRAW_BUFFER2                   0x8827\n#define GL_DRAW_BUFFER3                   0x8828\n#define GL_DRAW_BUFFER4                   0x8829\n#define GL_DRAW_BUFFER5                   0x882A\n#define GL_DRAW_BUFFER6                   0x882B\n#define GL_DRAW_BUFFER7                   0x882C\n#define GL_DRAW_BUFFER8                   0x882D\n#define GL_DRAW_BUFFER9                   0x882E\n#define GL_DRAW_BUFFER10                  0x882F\n#define GL_DRAW_BUFFER11                  0x8830\n#define GL_DRAW_BUFFER12                  0x8831\n#define GL_DRAW_BUFFER13                  0x8832\n#define GL_DRAW_BUFFER14                  0x8833\n#define GL_DRAW_BUFFER15                  0x8834\n#define GL_BLEND_EQUATION_ALPHA           0x883D\n#define GL_MAX_VERTEX_ATTRIBS             0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A\n#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872\n#define GL_FRAGMENT_SHADER                0x8B30\n#define GL_VERTEX_SHADER                  0x8B31\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A\n#define GL_MAX_VARYING_FLOATS             0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_SHADER_TYPE                    0x8B4F\n#define GL_FLOAT_VEC2                     0x8B50\n#define GL_FLOAT_VEC3                     0x8B51\n#define GL_FLOAT_VEC4                     0x8B52\n#define GL_INT_VEC2                       0x8B53\n#define GL_INT_VEC3                       0x8B54\n#define GL_INT_VEC4                       0x8B55\n#define GL_BOOL                           0x8B56\n#define GL_BOOL_VEC2                      0x8B57\n#define GL_BOOL_VEC3                      0x8B58\n#define GL_BOOL_VEC4                      0x8B59\n#define GL_FLOAT_MAT2                     0x8B5A\n#define GL_FLOAT_MAT3                     0x8B5B\n#define GL_FLOAT_MAT4                     0x8B5C\n#define GL_SAMPLER_1D                     0x8B5D\n#define GL_SAMPLER_2D                     0x8B5E\n#define GL_SAMPLER_3D                     0x8B5F\n#define GL_SAMPLER_CUBE                   0x8B60\n#define GL_SAMPLER_1D_SHADOW              0x8B61\n#define GL_SAMPLER_2D_SHADOW              0x8B62\n#define GL_DELETE_STATUS                  0x8B80\n#define GL_COMPILE_STATUS                 0x8B81\n#define GL_LINK_STATUS                    0x8B82\n#define GL_VALIDATE_STATUS                0x8B83\n#define GL_INFO_LOG_LENGTH                0x8B84\n#define GL_ATTACHED_SHADERS               0x8B85\n#define GL_ACTIVE_UNIFORMS                0x8B86\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87\n#define GL_SHADER_SOURCE_LENGTH           0x8B88\n#define GL_ACTIVE_ATTRIBUTES              0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B\n#define GL_SHADING_LANGUAGE_VERSION       0x8B8C\n#define GL_CURRENT_PROGRAM                0x8B8D\n#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0\n#define GL_LOWER_LEFT                     0x8CA1\n#define GL_UPPER_LEFT                     0x8CA2\n#define GL_STENCIL_BACK_REF               0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK         0x8CA5\n#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643\n#define GL_POINT_SPRITE                   0x8861\n#define GL_COORD_REPLACE                  0x8862\n#define GL_MAX_TEXTURE_COORDS             0x8871\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);\ntypedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);\ntypedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);\ntypedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);\nGLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);\nGLAPI void APIENTRY glCompileShader (GLuint shader);\nGLAPI GLuint APIENTRY glCreateProgram (void);\nGLAPI GLuint APIENTRY glCreateShader (GLenum type);\nGLAPI void APIENTRY glDeleteProgram (GLuint program);\nGLAPI void APIENTRY glDeleteShader (GLuint shader);\nGLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);\nGLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\nGLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);\nGLAPI GLboolean APIENTRY glIsProgram (GLuint program);\nGLAPI GLboolean APIENTRY glIsShader (GLuint shader);\nGLAPI void APIENTRY glLinkProgram (GLuint program);\nGLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);\nGLAPI void APIENTRY glUseProgram (GLuint program);\nGLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1i (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glValidateProgram (GLuint program);\nGLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_VERSION_2_0 */\n\n#ifndef GL_VERSION_2_1\n#define GL_VERSION_2_1 1\n#define GL_PIXEL_PACK_BUFFER              0x88EB\n#define GL_PIXEL_UNPACK_BUFFER            0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF\n#define GL_FLOAT_MAT2x3                   0x8B65\n#define GL_FLOAT_MAT2x4                   0x8B66\n#define GL_FLOAT_MAT3x2                   0x8B67\n#define GL_FLOAT_MAT3x4                   0x8B68\n#define GL_FLOAT_MAT4x2                   0x8B69\n#define GL_FLOAT_MAT4x3                   0x8B6A\n#define GL_SRGB                           0x8C40\n#define GL_SRGB8                          0x8C41\n#define GL_SRGB_ALPHA                     0x8C42\n#define GL_SRGB8_ALPHA8                   0x8C43\n#define GL_COMPRESSED_SRGB                0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA          0x8C49\n#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F\n#define GL_SLUMINANCE_ALPHA               0x8C44\n#define GL_SLUMINANCE8_ALPHA8             0x8C45\n#define GL_SLUMINANCE                     0x8C46\n#define GL_SLUMINANCE8                    0x8C47\n#define GL_COMPRESSED_SLUMINANCE          0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#endif\n#endif /* GL_VERSION_2_1 */\n\n#ifndef GL_VERSION_3_0\n#define GL_VERSION_3_0 1\ntypedef unsigned short GLhalf;\n#define GL_COMPARE_REF_TO_TEXTURE         0x884E\n#define GL_CLIP_DISTANCE0                 0x3000\n#define GL_CLIP_DISTANCE1                 0x3001\n#define GL_CLIP_DISTANCE2                 0x3002\n#define GL_CLIP_DISTANCE3                 0x3003\n#define GL_CLIP_DISTANCE4                 0x3004\n#define GL_CLIP_DISTANCE5                 0x3005\n#define GL_CLIP_DISTANCE6                 0x3006\n#define GL_CLIP_DISTANCE7                 0x3007\n#define GL_MAX_CLIP_DISTANCES             0x0D32\n#define GL_MAJOR_VERSION                  0x821B\n#define GL_MINOR_VERSION                  0x821C\n#define GL_NUM_EXTENSIONS                 0x821D\n#define GL_CONTEXT_FLAGS                  0x821E\n#define GL_COMPRESSED_RED                 0x8225\n#define GL_COMPRESSED_RG                  0x8226\n#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001\n#define GL_RGBA32F                        0x8814\n#define GL_RGB32F                         0x8815\n#define GL_RGBA16F                        0x881A\n#define GL_RGB16F                         0x881B\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD\n#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF\n#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905\n#define GL_CLAMP_READ_COLOR               0x891C\n#define GL_FIXED_ONLY                     0x891D\n#define GL_MAX_VARYING_COMPONENTS         0x8B4B\n#define GL_TEXTURE_1D_ARRAY               0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19\n#define GL_TEXTURE_2D_ARRAY               0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D\n#define GL_R11F_G11F_B10F                 0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B\n#define GL_RGB9_E5                        0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E\n#define GL_TEXTURE_SHARED_SIZE            0x8C3F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85\n#define GL_PRIMITIVES_GENERATED           0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88\n#define GL_RASTERIZER_DISCARD             0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS            0x8C8C\n#define GL_SEPARATE_ATTRIBS               0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F\n#define GL_RGBA32UI                       0x8D70\n#define GL_RGB32UI                        0x8D71\n#define GL_RGBA16UI                       0x8D76\n#define GL_RGB16UI                        0x8D77\n#define GL_RGBA8UI                        0x8D7C\n#define GL_RGB8UI                         0x8D7D\n#define GL_RGBA32I                        0x8D82\n#define GL_RGB32I                         0x8D83\n#define GL_RGBA16I                        0x8D88\n#define GL_RGB16I                         0x8D89\n#define GL_RGBA8I                         0x8D8E\n#define GL_RGB8I                          0x8D8F\n#define GL_RED_INTEGER                    0x8D94\n#define GL_GREEN_INTEGER                  0x8D95\n#define GL_BLUE_INTEGER                   0x8D96\n#define GL_RGB_INTEGER                    0x8D98\n#define GL_RGBA_INTEGER                   0x8D99\n#define GL_BGR_INTEGER                    0x8D9A\n#define GL_BGRA_INTEGER                   0x8D9B\n#define GL_SAMPLER_1D_ARRAY               0x8DC0\n#define GL_SAMPLER_2D_ARRAY               0x8DC1\n#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW            0x8DC5\n#define GL_UNSIGNED_INT_VEC2              0x8DC6\n#define GL_UNSIGNED_INT_VEC3              0x8DC7\n#define GL_UNSIGNED_INT_VEC4              0x8DC8\n#define GL_INT_SAMPLER_1D                 0x8DC9\n#define GL_INT_SAMPLER_2D                 0x8DCA\n#define GL_INT_SAMPLER_3D                 0x8DCB\n#define GL_INT_SAMPLER_CUBE               0x8DCC\n#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF\n#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7\n#define GL_QUERY_WAIT                     0x8E13\n#define GL_QUERY_NO_WAIT                  0x8E14\n#define GL_QUERY_BY_REGION_WAIT           0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16\n#define GL_BUFFER_ACCESS_FLAGS            0x911F\n#define GL_BUFFER_MAP_LENGTH              0x9120\n#define GL_BUFFER_MAP_OFFSET              0x9121\n#define GL_DEPTH_COMPONENT32F             0x8CAC\n#define GL_DEPTH32F_STENCIL8              0x8CAD\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD\n#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211\n#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212\n#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213\n#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214\n#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215\n#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216\n#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217\n#define GL_FRAMEBUFFER_DEFAULT            0x8218\n#define GL_FRAMEBUFFER_UNDEFINED          0x8219\n#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A\n#define GL_MAX_RENDERBUFFER_SIZE          0x84E8\n#define GL_DEPTH_STENCIL                  0x84F9\n#define GL_UNSIGNED_INT_24_8              0x84FA\n#define GL_DEPTH24_STENCIL8               0x88F0\n#define GL_TEXTURE_STENCIL_SIZE           0x88F1\n#define GL_TEXTURE_RED_TYPE               0x8C10\n#define GL_TEXTURE_GREEN_TYPE             0x8C11\n#define GL_TEXTURE_BLUE_TYPE              0x8C12\n#define GL_TEXTURE_ALPHA_TYPE             0x8C13\n#define GL_TEXTURE_DEPTH_TYPE             0x8C16\n#define GL_UNSIGNED_NORMALIZED            0x8C17\n#define GL_FRAMEBUFFER_BINDING            0x8CA6\n#define GL_DRAW_FRAMEBUFFER_BINDING       0x8CA6\n#define GL_RENDERBUFFER_BINDING           0x8CA7\n#define GL_READ_FRAMEBUFFER               0x8CA8\n#define GL_DRAW_FRAMEBUFFER               0x8CA9\n#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA\n#define GL_RENDERBUFFER_SAMPLES           0x8CAB\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE           0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF\n#define GL_COLOR_ATTACHMENT0              0x8CE0\n#define GL_COLOR_ATTACHMENT1              0x8CE1\n#define GL_COLOR_ATTACHMENT2              0x8CE2\n#define GL_COLOR_ATTACHMENT3              0x8CE3\n#define GL_COLOR_ATTACHMENT4              0x8CE4\n#define GL_COLOR_ATTACHMENT5              0x8CE5\n#define GL_COLOR_ATTACHMENT6              0x8CE6\n#define GL_COLOR_ATTACHMENT7              0x8CE7\n#define GL_COLOR_ATTACHMENT8              0x8CE8\n#define GL_COLOR_ATTACHMENT9              0x8CE9\n#define GL_COLOR_ATTACHMENT10             0x8CEA\n#define GL_COLOR_ATTACHMENT11             0x8CEB\n#define GL_COLOR_ATTACHMENT12             0x8CEC\n#define GL_COLOR_ATTACHMENT13             0x8CED\n#define GL_COLOR_ATTACHMENT14             0x8CEE\n#define GL_COLOR_ATTACHMENT15             0x8CEF\n#define GL_DEPTH_ATTACHMENT               0x8D00\n#define GL_STENCIL_ATTACHMENT             0x8D20\n#define GL_FRAMEBUFFER                    0x8D40\n#define GL_RENDERBUFFER                   0x8D41\n#define GL_RENDERBUFFER_WIDTH             0x8D42\n#define GL_RENDERBUFFER_HEIGHT            0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44\n#define GL_STENCIL_INDEX1                 0x8D46\n#define GL_STENCIL_INDEX4                 0x8D47\n#define GL_STENCIL_INDEX8                 0x8D48\n#define GL_STENCIL_INDEX16                0x8D49\n#define GL_RENDERBUFFER_RED_SIZE          0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56\n#define GL_MAX_SAMPLES                    0x8D57\n#define GL_INDEX                          0x8222\n#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE         0x8C15\n#define GL_FRAMEBUFFER_SRGB               0x8DB9\n#define GL_HALF_FLOAT                     0x140B\n#define GL_MAP_READ_BIT                   0x0001\n#define GL_MAP_WRITE_BIT                  0x0002\n#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004\n#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008\n#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010\n#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020\n#define GL_COMPRESSED_RED_RGTC1           0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC\n#define GL_COMPRESSED_RG_RGTC2            0x8DBD\n#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE\n#define GL_RG                             0x8227\n#define GL_RG_INTEGER                     0x8228\n#define GL_R8                             0x8229\n#define GL_R16                            0x822A\n#define GL_RG8                            0x822B\n#define GL_RG16                           0x822C\n#define GL_R16F                           0x822D\n#define GL_R32F                           0x822E\n#define GL_RG16F                          0x822F\n#define GL_RG32F                          0x8230\n#define GL_R8I                            0x8231\n#define GL_R8UI                           0x8232\n#define GL_R16I                           0x8233\n#define GL_R16UI                          0x8234\n#define GL_R32I                           0x8235\n#define GL_R32UI                          0x8236\n#define GL_RG8I                           0x8237\n#define GL_RG8UI                          0x8238\n#define GL_RG16I                          0x8239\n#define GL_RG16UI                         0x823A\n#define GL_RG32I                          0x823B\n#define GL_RG32UI                         0x823C\n#define GL_VERTEX_ARRAY_BINDING           0x85B5\n#define GL_CLAMP_VERTEX_COLOR             0x891A\n#define GL_CLAMP_FRAGMENT_COLOR           0x891B\n#define GL_ALPHA_INTEGER                  0x8D97\ntypedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\ntypedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\ntypedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\nGLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glEnablei (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisablei (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);\nGLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedback (void);\nGLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);\nGLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRender (void);\nGLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);\nGLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);\nGLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);\nGLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\nGLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);\nGLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmap (GLenum target);\nGLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\nGLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glBindVertexArray (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);\n#endif\n#endif /* GL_VERSION_3_0 */\n\n#ifndef GL_VERSION_3_1\n#define GL_VERSION_3_1 1\n#define GL_SAMPLER_2D_RECT                0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64\n#define GL_SAMPLER_BUFFER                 0x8DC2\n#define GL_INT_SAMPLER_2D_RECT            0x8DCD\n#define GL_INT_SAMPLER_BUFFER             0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT   0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8\n#define GL_TEXTURE_BUFFER                 0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE        0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER         0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D\n#define GL_TEXTURE_RECTANGLE              0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE      0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE        0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE     0x84F8\n#define GL_R8_SNORM                       0x8F94\n#define GL_RG8_SNORM                      0x8F95\n#define GL_RGB8_SNORM                     0x8F96\n#define GL_RGBA8_SNORM                    0x8F97\n#define GL_R16_SNORM                      0x8F98\n#define GL_RG16_SNORM                     0x8F99\n#define GL_RGB16_SNORM                    0x8F9A\n#define GL_RGBA16_SNORM                   0x8F9B\n#define GL_SIGNED_NORMALIZED              0x8F9C\n#define GL_PRIMITIVE_RESTART              0x8F9D\n#define GL_PRIMITIVE_RESTART_INDEX        0x8F9E\n#define GL_COPY_READ_BUFFER               0x8F36\n#define GL_COPY_WRITE_BUFFER              0x8F37\n#define GL_UNIFORM_BUFFER                 0x8A11\n#define GL_UNIFORM_BUFFER_BINDING         0x8A28\n#define GL_UNIFORM_BUFFER_START           0x8A29\n#define GL_UNIFORM_BUFFER_SIZE            0x8A2A\n#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B\n#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D\n#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E\n#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F\n#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30\n#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31\n#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33\n#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34\n#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35\n#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36\n#define GL_UNIFORM_TYPE                   0x8A37\n#define GL_UNIFORM_SIZE                   0x8A38\n#define GL_UNIFORM_NAME_LENGTH            0x8A39\n#define GL_UNIFORM_BLOCK_INDEX            0x8A3A\n#define GL_UNIFORM_OFFSET                 0x8A3B\n#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C\n#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D\n#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E\n#define GL_UNIFORM_BLOCK_BINDING          0x8A3F\n#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40\n#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46\n#define GL_INVALID_INDEX                  0xFFFFFFFFu\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\ntypedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\nGLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);\nGLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);\nGLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\nGLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);\nGLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\nGLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);\nGLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\nGLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#endif\n#endif /* GL_VERSION_3_1 */\n\n#ifndef GL_VERSION_3_2\n#define GL_VERSION_3_2 1\ntypedef struct __GLsync *GLsync;\n#ifndef GLEXT_64_TYPES_DEFINED\n/* This code block is duplicated in glxext.h, so must be protected */\n#define GLEXT_64_TYPES_DEFINED\n/* Define int32_t, int64_t, and uint64_t types for UST/MSC */\n/* (as used in the GL_EXT_timer_query extension). */\n#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#include <inttypes.h>\n#elif defined(__sun__) || defined(__digital__)\n#include <inttypes.h>\n#if defined(__STDC__)\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int int64_t;\ntypedef unsigned long int uint64_t;\n#else\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#endif /* __arch64__ */\n#endif /* __STDC__ */\n#elif defined( __VMS ) || defined(__sgi)\n#include <inttypes.h>\n#elif defined(__SCO__) || defined(__USLC__)\n#include <stdint.h>\n#elif defined(__UNIXOS2__) || defined(__SOL64__)\ntypedef long int int32_t;\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#elif defined(_WIN32) && defined(__GNUC__)\n#include <stdint.h>\n#elif defined(_WIN32)\ntypedef __int32 int32_t;\ntypedef __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#else\n/* Fallback if nothing above works */\n#include <inttypes.h>\n#endif\n#endif\ntypedef uint64_t GLuint64;\ntypedef int64_t GLint64;\n#define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001\n#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define GL_LINES_ADJACENCY                0x000A\n#define GL_LINE_STRIP_ADJACENCY           0x000B\n#define GL_TRIANGLES_ADJACENCY            0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY       0x000D\n#define GL_PROGRAM_POINT_SIZE             0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8\n#define GL_GEOMETRY_SHADER                0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT          0x8916\n#define GL_GEOMETRY_INPUT_TYPE            0x8917\n#define GL_GEOMETRY_OUTPUT_TYPE           0x8918\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES   0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1\n#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122\n#define GL_MAX_GEOMETRY_INPUT_COMPONENTS  0x9123\n#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124\n#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125\n#define GL_CONTEXT_PROFILE_MASK           0x9126\n#define GL_DEPTH_CLAMP                    0x864F\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION        0x8E4D\n#define GL_LAST_VERTEX_CONVENTION         0x8E4E\n#define GL_PROVOKING_VERTEX               0x8E4F\n#define GL_TEXTURE_CUBE_MAP_SEAMLESS      0x884F\n#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111\n#define GL_OBJECT_TYPE                    0x9112\n#define GL_SYNC_CONDITION                 0x9113\n#define GL_SYNC_STATUS                    0x9114\n#define GL_SYNC_FLAGS                     0x9115\n#define GL_SYNC_FENCE                     0x9116\n#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117\n#define GL_UNSIGNALED                     0x9118\n#define GL_SIGNALED                       0x9119\n#define GL_ALREADY_SIGNALED               0x911A\n#define GL_TIMEOUT_EXPIRED                0x911B\n#define GL_CONDITION_SATISFIED            0x911C\n#define GL_WAIT_FAILED                    0x911D\n#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull\n#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001\n#define GL_SAMPLE_POSITION                0x8E50\n#define GL_SAMPLE_MASK                    0x8E51\n#define GL_SAMPLE_MASK_VALUE              0x8E52\n#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59\n#define GL_TEXTURE_2D_MULTISAMPLE         0x9100\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE   0x9101\n#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105\n#define GL_TEXTURE_SAMPLES                0x9106\n#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107\n#define GL_SAMPLER_2D_MULTISAMPLE         0x9108\n#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A\n#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY   0x910B\n#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D\n#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E\n#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F\n#define GL_MAX_INTEGER_SAMPLES            0x9110\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);\ntypedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);\ntypedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);\ntypedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);\ntypedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);\ntypedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\ntypedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);\nGLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);\nGLAPI void APIENTRY glProvokingVertex (GLenum mode);\nGLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);\nGLAPI GLboolean APIENTRY glIsSync (GLsync sync);\nGLAPI void APIENTRY glDeleteSync (GLsync sync);\nGLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);\nGLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\nGLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);\nGLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);\n#endif\n#endif /* GL_VERSION_3_2 */\n\n#ifndef GL_VERSION_3_3\n#define GL_VERSION_3_3 1\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE\n#define GL_SRC1_COLOR                     0x88F9\n#define GL_ONE_MINUS_SRC1_COLOR           0x88FA\n#define GL_ONE_MINUS_SRC1_ALPHA           0x88FB\n#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS   0x88FC\n#define GL_ANY_SAMPLES_PASSED             0x8C2F\n#define GL_SAMPLER_BINDING                0x8919\n#define GL_RGB10_A2UI                     0x906F\n#define GL_TEXTURE_SWIZZLE_R              0x8E42\n#define GL_TEXTURE_SWIZZLE_G              0x8E43\n#define GL_TEXTURE_SWIZZLE_B              0x8E44\n#define GL_TEXTURE_SWIZZLE_A              0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA           0x8E46\n#define GL_TIME_ELAPSED                   0x88BF\n#define GL_TIMESTAMP                      0x8E28\n#define GL_INT_2_10_10_10_REV             0x8D9F\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);\ntypedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);\ntypedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);\ntypedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);\nGLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);\nGLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);\nGLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);\nGLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);\nGLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);\nGLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);\nGLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);\nGLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);\nGLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);\n#endif\n#endif /* GL_VERSION_3_3 */\n\n#ifndef GL_VERSION_4_0\n#define GL_VERSION_4_0 1\n#define GL_SAMPLE_SHADING                 0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE       0x8C37\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F\n#define GL_TEXTURE_CUBE_MAP_ARRAY         0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY   0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY         0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW  0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY     0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F\n#define GL_DRAW_INDIRECT_BUFFER           0x8F3F\n#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43\n#define GL_GEOMETRY_SHADER_INVOCATIONS    0x887F\n#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C\n#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D\n#define GL_MAX_VERTEX_STREAMS             0x8E71\n#define GL_DOUBLE_VEC2                    0x8FFC\n#define GL_DOUBLE_VEC3                    0x8FFD\n#define GL_DOUBLE_VEC4                    0x8FFE\n#define GL_DOUBLE_MAT2                    0x8F46\n#define GL_DOUBLE_MAT3                    0x8F47\n#define GL_DOUBLE_MAT4                    0x8F48\n#define GL_DOUBLE_MAT2x3                  0x8F49\n#define GL_DOUBLE_MAT2x4                  0x8F4A\n#define GL_DOUBLE_MAT3x2                  0x8F4B\n#define GL_DOUBLE_MAT3x4                  0x8F4C\n#define GL_DOUBLE_MAT4x2                  0x8F4D\n#define GL_DOUBLE_MAT4x3                  0x8F4E\n#define GL_ACTIVE_SUBROUTINES             0x8DE5\n#define GL_ACTIVE_SUBROUTINE_UNIFORMS     0x8DE6\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47\n#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH   0x8E48\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49\n#define GL_MAX_SUBROUTINES                0x8DE7\n#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8\n#define GL_NUM_COMPATIBLE_SUBROUTINES     0x8E4A\n#define GL_COMPATIBLE_SUBROUTINES         0x8E4B\n#define GL_PATCHES                        0x000E\n#define GL_PATCH_VERTICES                 0x8E72\n#define GL_PATCH_DEFAULT_INNER_LEVEL      0x8E73\n#define GL_PATCH_DEFAULT_OUTER_LEVEL      0x8E74\n#define GL_TESS_CONTROL_OUTPUT_VERTICES   0x8E75\n#define GL_TESS_GEN_MODE                  0x8E76\n#define GL_TESS_GEN_SPACING               0x8E77\n#define GL_TESS_GEN_VERTEX_ORDER          0x8E78\n#define GL_TESS_GEN_POINT_MODE            0x8E79\n#define GL_ISOLINES                       0x8E7A\n#define GL_FRACTIONAL_ODD                 0x8E7B\n#define GL_FRACTIONAL_EVEN                0x8E7C\n#define GL_MAX_PATCH_VERTICES             0x8E7D\n#define GL_MAX_TESS_GEN_LEVEL             0x8E7E\n#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F\n#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80\n#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81\n#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82\n#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83\n#define GL_MAX_TESS_PATCH_COMPONENTS      0x8E84\n#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85\n#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86\n#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89\n#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A\n#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C\n#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D\n#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E\n#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1\n#define GL_TESS_EVALUATION_SHADER         0x8E87\n#define GL_TESS_CONTROL_SHADER            0x8E88\n#define GL_TRANSFORM_FEEDBACK             0x8E22\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24\n#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25\n#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);\ntypedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);\ntypedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);\ntypedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShading (GLfloat value);\nGLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);\nGLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);\nGLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);\nGLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);\nGLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\nGLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);\nGLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);\nGLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\nGLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);\nGLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);\nGLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedback (void);\nGLAPI void APIENTRY glResumeTransformFeedback (void);\nGLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);\nGLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);\nGLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);\nGLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);\nGLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);\n#endif\n#endif /* GL_VERSION_4_0 */\n\n#ifndef GL_VERSION_4_1\n#define GL_VERSION_4_1 1\n#define GL_FIXED                          0x140C\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B\n#define GL_LOW_FLOAT                      0x8DF0\n#define GL_MEDIUM_FLOAT                   0x8DF1\n#define GL_HIGH_FLOAT                     0x8DF2\n#define GL_LOW_INT                        0x8DF3\n#define GL_MEDIUM_INT                     0x8DF4\n#define GL_HIGH_INT                       0x8DF5\n#define GL_SHADER_COMPILER                0x8DFA\n#define GL_SHADER_BINARY_FORMATS          0x8DF8\n#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9\n#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB\n#define GL_MAX_VARYING_VECTORS            0x8DFC\n#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD\n#define GL_RGB565                         0x8D62\n#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257\n#define GL_PROGRAM_BINARY_LENGTH          0x8741\n#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE\n#define GL_PROGRAM_BINARY_FORMATS         0x87FF\n#define GL_VERTEX_SHADER_BIT              0x00000001\n#define GL_FRAGMENT_SHADER_BIT            0x00000002\n#define GL_GEOMETRY_SHADER_BIT            0x00000004\n#define GL_TESS_CONTROL_SHADER_BIT        0x00000008\n#define GL_TESS_EVALUATION_SHADER_BIT     0x00000010\n#define GL_ALL_SHADER_BITS                0xFFFFFFFF\n#define GL_PROGRAM_SEPARABLE              0x8258\n#define GL_ACTIVE_PROGRAM                 0x8259\n#define GL_PROGRAM_PIPELINE_BINDING       0x825A\n#define GL_MAX_VIEWPORTS                  0x825B\n#define GL_VIEWPORT_SUBPIXEL_BITS         0x825C\n#define GL_VIEWPORT_BOUNDS_RANGE          0x825D\n#define GL_LAYER_PROVOKING_VERTEX         0x825E\n#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F\n#define GL_UNDEFINED_VERTEX               0x8260\ntypedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);\ntypedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);\ntypedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\ntypedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);\ntypedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);\ntypedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReleaseShaderCompiler (void);\nGLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);\nGLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\nGLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);\nGLAPI void APIENTRY glClearDepthf (GLfloat d);\nGLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\nGLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);\nGLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);\nGLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);\nGLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);\nGLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);\nGLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);\nGLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);\nGLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);\nGLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);\nGLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\nGLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\nGLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\nGLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);\nGLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);\nGLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);\n#endif\n#endif /* GL_VERSION_4_1 */\n\n#ifndef GL_VERSION_4_2\n#define GL_VERSION_4_2 1\n#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH  0x9127\n#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128\n#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH  0x9129\n#define GL_UNPACK_COMPRESSED_BLOCK_SIZE   0x912A\n#define GL_PACK_COMPRESSED_BLOCK_WIDTH    0x912B\n#define GL_PACK_COMPRESSED_BLOCK_HEIGHT   0x912C\n#define GL_PACK_COMPRESSED_BLOCK_DEPTH    0x912D\n#define GL_PACK_COMPRESSED_BLOCK_SIZE     0x912E\n#define GL_NUM_SAMPLE_COUNTS              0x9380\n#define GL_MIN_MAP_BUFFER_ALIGNMENT       0x90BC\n#define GL_ATOMIC_COUNTER_BUFFER          0x92C0\n#define GL_ATOMIC_COUNTER_BUFFER_BINDING  0x92C1\n#define GL_ATOMIC_COUNTER_BUFFER_START    0x92C2\n#define GL_ATOMIC_COUNTER_BUFFER_SIZE     0x92C3\n#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB\n#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0\n#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1\n#define GL_MAX_VERTEX_ATOMIC_COUNTERS     0x92D2\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS   0x92D5\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS   0x92D6\n#define GL_MAX_COMBINED_ATOMIC_COUNTERS   0x92D7\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC\n#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS  0x92D9\n#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA\n#define GL_UNSIGNED_INT_ATOMIC_COUNTER    0x92DB\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT      0x00000002\n#define GL_UNIFORM_BARRIER_BIT            0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT      0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020\n#define GL_COMMAND_BARRIER_BIT            0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT       0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT     0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT      0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT        0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT     0x00001000\n#define GL_ALL_BARRIER_BITS               0xFFFFFFFF\n#define GL_MAX_IMAGE_UNITS                0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39\n#define GL_IMAGE_BINDING_NAME             0x8F3A\n#define GL_IMAGE_BINDING_LEVEL            0x8F3B\n#define GL_IMAGE_BINDING_LAYERED          0x8F3C\n#define GL_IMAGE_BINDING_LAYER            0x8F3D\n#define GL_IMAGE_BINDING_ACCESS           0x8F3E\n#define GL_IMAGE_1D                       0x904C\n#define GL_IMAGE_2D                       0x904D\n#define GL_IMAGE_3D                       0x904E\n#define GL_IMAGE_2D_RECT                  0x904F\n#define GL_IMAGE_CUBE                     0x9050\n#define GL_IMAGE_BUFFER                   0x9051\n#define GL_IMAGE_1D_ARRAY                 0x9052\n#define GL_IMAGE_2D_ARRAY                 0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY           0x9054\n#define GL_IMAGE_2D_MULTISAMPLE           0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY     0x9056\n#define GL_INT_IMAGE_1D                   0x9057\n#define GL_INT_IMAGE_2D                   0x9058\n#define GL_INT_IMAGE_3D                   0x9059\n#define GL_INT_IMAGE_2D_RECT              0x905A\n#define GL_INT_IMAGE_CUBE                 0x905B\n#define GL_INT_IMAGE_BUFFER               0x905C\n#define GL_INT_IMAGE_1D_ARRAY             0x905D\n#define GL_INT_IMAGE_2D_ARRAY             0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY       0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE       0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D          0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D          0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D          0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT     0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE        0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER      0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY    0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY    0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C\n#define GL_MAX_IMAGE_SAMPLES              0x906D\n#define GL_IMAGE_BINDING_FORMAT           0x906E\n#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9\n#define GL_MAX_VERTEX_IMAGE_UNIFORMS      0x90CA\n#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB\n#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC\n#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS    0x90CD\n#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE\n#define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF\n#define GL_COMPRESSED_RGBA_BPTC_UNORM     0x8E8C\n#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D\n#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E\n#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F\n#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\nGLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\nGLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\nGLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\nGLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);\nGLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);\nGLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#endif\n#endif /* GL_VERSION_4_2 */\n\n#ifndef GL_VERSION_4_3\n#define GL_VERSION_4_3 1\ntypedef void (APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_NUM_SHADING_LANGUAGE_VERSIONS  0x82E9\n#define GL_VERTEX_ATTRIB_ARRAY_LONG       0x874E\n#define GL_COMPRESSED_RGB8_ETC2           0x9274\n#define GL_COMPRESSED_SRGB8_ETC2          0x9275\n#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276\n#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277\n#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278\n#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279\n#define GL_COMPRESSED_R11_EAC             0x9270\n#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271\n#define GL_COMPRESSED_RG11_EAC            0x9272\n#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273\n#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69\n#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A\n#define GL_MAX_ELEMENT_INDEX              0x8D6B\n#define GL_COMPUTE_SHADER                 0x91B9\n#define GL_MAX_COMPUTE_UNIFORM_BLOCKS     0x91BB\n#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC\n#define GL_MAX_COMPUTE_IMAGE_UNIFORMS     0x91BD\n#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262\n#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263\n#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264\n#define GL_MAX_COMPUTE_ATOMIC_COUNTERS    0x8265\n#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266\n#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB\n#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE\n#define GL_MAX_COMPUTE_WORK_GROUP_SIZE    0x91BF\n#define GL_COMPUTE_WORK_GROUP_SIZE        0x8267\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED\n#define GL_DISPATCH_INDIRECT_BUFFER       0x90EE\n#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS       0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION        0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM      0x8245\n#define GL_DEBUG_SOURCE_API               0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM     0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY       0x8249\n#define GL_DEBUG_SOURCE_APPLICATION       0x824A\n#define GL_DEBUG_SOURCE_OTHER             0x824B\n#define GL_DEBUG_TYPE_ERROR               0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR  0x824E\n#define GL_DEBUG_TYPE_PORTABILITY         0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE         0x8250\n#define GL_DEBUG_TYPE_OTHER               0x8251\n#define GL_MAX_DEBUG_MESSAGE_LENGTH       0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES      0x9144\n#define GL_DEBUG_LOGGED_MESSAGES          0x9145\n#define GL_DEBUG_SEVERITY_HIGH            0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM          0x9147\n#define GL_DEBUG_SEVERITY_LOW             0x9148\n#define GL_DEBUG_TYPE_MARKER              0x8268\n#define GL_DEBUG_TYPE_PUSH_GROUP          0x8269\n#define GL_DEBUG_TYPE_POP_GROUP           0x826A\n#define GL_DEBUG_SEVERITY_NOTIFICATION    0x826B\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH    0x826C\n#define GL_DEBUG_GROUP_STACK_DEPTH        0x826D\n#define GL_BUFFER                         0x82E0\n#define GL_SHADER                         0x82E1\n#define GL_PROGRAM                        0x82E2\n#define GL_QUERY                          0x82E3\n#define GL_PROGRAM_PIPELINE               0x82E4\n#define GL_SAMPLER                        0x82E6\n#define GL_MAX_LABEL_LENGTH               0x82E8\n#define GL_DEBUG_OUTPUT                   0x92E0\n#define GL_CONTEXT_FLAG_DEBUG_BIT         0x00000002\n#define GL_MAX_UNIFORM_LOCATIONS          0x826E\n#define GL_FRAMEBUFFER_DEFAULT_WIDTH      0x9310\n#define GL_FRAMEBUFFER_DEFAULT_HEIGHT     0x9311\n#define GL_FRAMEBUFFER_DEFAULT_LAYERS     0x9312\n#define GL_FRAMEBUFFER_DEFAULT_SAMPLES    0x9313\n#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314\n#define GL_MAX_FRAMEBUFFER_WIDTH          0x9315\n#define GL_MAX_FRAMEBUFFER_HEIGHT         0x9316\n#define GL_MAX_FRAMEBUFFER_LAYERS         0x9317\n#define GL_MAX_FRAMEBUFFER_SAMPLES        0x9318\n#define GL_INTERNALFORMAT_SUPPORTED       0x826F\n#define GL_INTERNALFORMAT_PREFERRED       0x8270\n#define GL_INTERNALFORMAT_RED_SIZE        0x8271\n#define GL_INTERNALFORMAT_GREEN_SIZE      0x8272\n#define GL_INTERNALFORMAT_BLUE_SIZE       0x8273\n#define GL_INTERNALFORMAT_ALPHA_SIZE      0x8274\n#define GL_INTERNALFORMAT_DEPTH_SIZE      0x8275\n#define GL_INTERNALFORMAT_STENCIL_SIZE    0x8276\n#define GL_INTERNALFORMAT_SHARED_SIZE     0x8277\n#define GL_INTERNALFORMAT_RED_TYPE        0x8278\n#define GL_INTERNALFORMAT_GREEN_TYPE      0x8279\n#define GL_INTERNALFORMAT_BLUE_TYPE       0x827A\n#define GL_INTERNALFORMAT_ALPHA_TYPE      0x827B\n#define GL_INTERNALFORMAT_DEPTH_TYPE      0x827C\n#define GL_INTERNALFORMAT_STENCIL_TYPE    0x827D\n#define GL_MAX_WIDTH                      0x827E\n#define GL_MAX_HEIGHT                     0x827F\n#define GL_MAX_DEPTH                      0x8280\n#define GL_MAX_LAYERS                     0x8281\n#define GL_MAX_COMBINED_DIMENSIONS        0x8282\n#define GL_COLOR_COMPONENTS               0x8283\n#define GL_DEPTH_COMPONENTS               0x8284\n#define GL_STENCIL_COMPONENTS             0x8285\n#define GL_COLOR_RENDERABLE               0x8286\n#define GL_DEPTH_RENDERABLE               0x8287\n#define GL_STENCIL_RENDERABLE             0x8288\n#define GL_FRAMEBUFFER_RENDERABLE         0x8289\n#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A\n#define GL_FRAMEBUFFER_BLEND              0x828B\n#define GL_READ_PIXELS                    0x828C\n#define GL_READ_PIXELS_FORMAT             0x828D\n#define GL_READ_PIXELS_TYPE               0x828E\n#define GL_TEXTURE_IMAGE_FORMAT           0x828F\n#define GL_TEXTURE_IMAGE_TYPE             0x8290\n#define GL_GET_TEXTURE_IMAGE_FORMAT       0x8291\n#define GL_GET_TEXTURE_IMAGE_TYPE         0x8292\n#define GL_MIPMAP                         0x8293\n#define GL_MANUAL_GENERATE_MIPMAP         0x8294\n#define GL_AUTO_GENERATE_MIPMAP           0x8295\n#define GL_COLOR_ENCODING                 0x8296\n#define GL_SRGB_READ                      0x8297\n#define GL_SRGB_WRITE                     0x8298\n#define GL_FILTER                         0x829A\n#define GL_VERTEX_TEXTURE                 0x829B\n#define GL_TESS_CONTROL_TEXTURE           0x829C\n#define GL_TESS_EVALUATION_TEXTURE        0x829D\n#define GL_GEOMETRY_TEXTURE               0x829E\n#define GL_FRAGMENT_TEXTURE               0x829F\n#define GL_COMPUTE_TEXTURE                0x82A0\n#define GL_TEXTURE_SHADOW                 0x82A1\n#define GL_TEXTURE_GATHER                 0x82A2\n#define GL_TEXTURE_GATHER_SHADOW          0x82A3\n#define GL_SHADER_IMAGE_LOAD              0x82A4\n#define GL_SHADER_IMAGE_STORE             0x82A5\n#define GL_SHADER_IMAGE_ATOMIC            0x82A6\n#define GL_IMAGE_TEXEL_SIZE               0x82A7\n#define GL_IMAGE_COMPATIBILITY_CLASS      0x82A8\n#define GL_IMAGE_PIXEL_FORMAT             0x82A9\n#define GL_IMAGE_PIXEL_TYPE               0x82AA\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF\n#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1\n#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2\n#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE  0x82B3\n#define GL_CLEAR_BUFFER                   0x82B4\n#define GL_TEXTURE_VIEW                   0x82B5\n#define GL_VIEW_COMPATIBILITY_CLASS       0x82B6\n#define GL_FULL_SUPPORT                   0x82B7\n#define GL_CAVEAT_SUPPORT                 0x82B8\n#define GL_IMAGE_CLASS_4_X_32             0x82B9\n#define GL_IMAGE_CLASS_2_X_32             0x82BA\n#define GL_IMAGE_CLASS_1_X_32             0x82BB\n#define GL_IMAGE_CLASS_4_X_16             0x82BC\n#define GL_IMAGE_CLASS_2_X_16             0x82BD\n#define GL_IMAGE_CLASS_1_X_16             0x82BE\n#define GL_IMAGE_CLASS_4_X_8              0x82BF\n#define GL_IMAGE_CLASS_2_X_8              0x82C0\n#define GL_IMAGE_CLASS_1_X_8              0x82C1\n#define GL_IMAGE_CLASS_11_11_10           0x82C2\n#define GL_IMAGE_CLASS_10_10_10_2         0x82C3\n#define GL_VIEW_CLASS_128_BITS            0x82C4\n#define GL_VIEW_CLASS_96_BITS             0x82C5\n#define GL_VIEW_CLASS_64_BITS             0x82C6\n#define GL_VIEW_CLASS_48_BITS             0x82C7\n#define GL_VIEW_CLASS_32_BITS             0x82C8\n#define GL_VIEW_CLASS_24_BITS             0x82C9\n#define GL_VIEW_CLASS_16_BITS             0x82CA\n#define GL_VIEW_CLASS_8_BITS              0x82CB\n#define GL_VIEW_CLASS_S3TC_DXT1_RGB       0x82CC\n#define GL_VIEW_CLASS_S3TC_DXT1_RGBA      0x82CD\n#define GL_VIEW_CLASS_S3TC_DXT3_RGBA      0x82CE\n#define GL_VIEW_CLASS_S3TC_DXT5_RGBA      0x82CF\n#define GL_VIEW_CLASS_RGTC1_RED           0x82D0\n#define GL_VIEW_CLASS_RGTC2_RG            0x82D1\n#define GL_VIEW_CLASS_BPTC_UNORM          0x82D2\n#define GL_VIEW_CLASS_BPTC_FLOAT          0x82D3\n#define GL_UNIFORM                        0x92E1\n#define GL_UNIFORM_BLOCK                  0x92E2\n#define GL_PROGRAM_INPUT                  0x92E3\n#define GL_PROGRAM_OUTPUT                 0x92E4\n#define GL_BUFFER_VARIABLE                0x92E5\n#define GL_SHADER_STORAGE_BLOCK           0x92E6\n#define GL_VERTEX_SUBROUTINE              0x92E8\n#define GL_TESS_CONTROL_SUBROUTINE        0x92E9\n#define GL_TESS_EVALUATION_SUBROUTINE     0x92EA\n#define GL_GEOMETRY_SUBROUTINE            0x92EB\n#define GL_FRAGMENT_SUBROUTINE            0x92EC\n#define GL_COMPUTE_SUBROUTINE             0x92ED\n#define GL_VERTEX_SUBROUTINE_UNIFORM      0x92EE\n#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF\n#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0\n#define GL_GEOMETRY_SUBROUTINE_UNIFORM    0x92F1\n#define GL_FRAGMENT_SUBROUTINE_UNIFORM    0x92F2\n#define GL_COMPUTE_SUBROUTINE_UNIFORM     0x92F3\n#define GL_TRANSFORM_FEEDBACK_VARYING     0x92F4\n#define GL_ACTIVE_RESOURCES               0x92F5\n#define GL_MAX_NAME_LENGTH                0x92F6\n#define GL_MAX_NUM_ACTIVE_VARIABLES       0x92F7\n#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8\n#define GL_NAME_LENGTH                    0x92F9\n#define GL_TYPE                           0x92FA\n#define GL_ARRAY_SIZE                     0x92FB\n#define GL_OFFSET                         0x92FC\n#define GL_BLOCK_INDEX                    0x92FD\n#define GL_ARRAY_STRIDE                   0x92FE\n#define GL_MATRIX_STRIDE                  0x92FF\n#define GL_IS_ROW_MAJOR                   0x9300\n#define GL_ATOMIC_COUNTER_BUFFER_INDEX    0x9301\n#define GL_BUFFER_BINDING                 0x9302\n#define GL_BUFFER_DATA_SIZE               0x9303\n#define GL_NUM_ACTIVE_VARIABLES           0x9304\n#define GL_ACTIVE_VARIABLES               0x9305\n#define GL_REFERENCED_BY_VERTEX_SHADER    0x9306\n#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307\n#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308\n#define GL_REFERENCED_BY_GEOMETRY_SHADER  0x9309\n#define GL_REFERENCED_BY_FRAGMENT_SHADER  0x930A\n#define GL_REFERENCED_BY_COMPUTE_SHADER   0x930B\n#define GL_TOP_LEVEL_ARRAY_SIZE           0x930C\n#define GL_TOP_LEVEL_ARRAY_STRIDE         0x930D\n#define GL_LOCATION                       0x930E\n#define GL_LOCATION_INDEX                 0x930F\n#define GL_IS_PER_PATCH                   0x92E7\n#define GL_SHADER_STORAGE_BUFFER          0x90D2\n#define GL_SHADER_STORAGE_BUFFER_BINDING  0x90D3\n#define GL_SHADER_STORAGE_BUFFER_START    0x90D4\n#define GL_SHADER_STORAGE_BUFFER_SIZE     0x90D5\n#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6\n#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7\n#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8\n#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9\n#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA\n#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB\n#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC\n#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD\n#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE  0x90DE\n#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF\n#define GL_SHADER_STORAGE_BARRIER_BIT     0x00002000\n#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39\n#define GL_DEPTH_STENCIL_TEXTURE_MODE     0x90EA\n#define GL_TEXTURE_BUFFER_OFFSET          0x919D\n#define GL_TEXTURE_BUFFER_SIZE            0x919E\n#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F\n#define GL_TEXTURE_VIEW_MIN_LEVEL         0x82DB\n#define GL_TEXTURE_VIEW_NUM_LEVELS        0x82DC\n#define GL_TEXTURE_VIEW_MIN_LAYER         0x82DD\n#define GL_TEXTURE_VIEW_NUM_LAYERS        0x82DE\n#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF\n#define GL_VERTEX_ATTRIB_BINDING          0x82D4\n#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET  0x82D5\n#define GL_VERTEX_BINDING_DIVISOR         0x82D6\n#define GL_VERTEX_BINDING_OFFSET          0x82D7\n#define GL_VERTEX_BINDING_STRIDE          0x82D8\n#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9\n#define GL_MAX_VERTEX_ATTRIB_BINDINGS     0x82DA\n#define GL_VERTEX_BINDING_BUFFER          0x8F4F\n#define GL_DISPLAY_LIST                   0x82E7\ntypedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\ntypedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\ntypedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\ntypedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\ntypedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\ntypedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\ntypedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\ntypedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);\ntypedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\nGLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);\nGLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\nGLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\nGLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);\nGLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);\nGLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);\nGLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\nGLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\nGLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\nGLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\nGLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\nGLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);\nGLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\nGLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);\nGLAPI void APIENTRY glPopDebugGroup (void);\nGLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\nGLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n#endif /* GL_VERSION_4_3 */\n\n#ifndef GL_VERSION_4_4\n#define GL_VERSION_4_4 1\n#define GL_MAX_VERTEX_ATTRIB_STRIDE       0x82E5\n#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221\n#define GL_TEXTURE_BUFFER_BINDING         0x8C2A\n#define GL_MAP_PERSISTENT_BIT             0x0040\n#define GL_MAP_COHERENT_BIT               0x0080\n#define GL_DYNAMIC_STORAGE_BIT            0x0100\n#define GL_CLIENT_STORAGE_BIT             0x0200\n#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000\n#define GL_BUFFER_IMMUTABLE_STORAGE       0x821F\n#define GL_BUFFER_STORAGE_FLAGS           0x8220\n#define GL_CLEAR_TEXTURE                  0x9365\n#define GL_LOCATION_COMPONENT             0x934A\n#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B\n#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C\n#define GL_QUERY_BUFFER                   0x9192\n#define GL_QUERY_BUFFER_BARRIER_BIT       0x00008000\n#define GL_QUERY_BUFFER_BINDING           0x9193\n#define GL_QUERY_RESULT_NO_WAIT           0x9194\n#define GL_MIRROR_CLAMP_TO_EDGE           0x8743\ntypedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);\ntypedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);\nGLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);\nGLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);\nGLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);\nGLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);\nGLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);\nGLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);\n#endif\n#endif /* GL_VERSION_4_4 */\n\n#ifndef GL_ARB_ES2_compatibility\n#define GL_ARB_ES2_compatibility 1\n#endif /* GL_ARB_ES2_compatibility */\n\n#ifndef GL_ARB_ES3_compatibility\n#define GL_ARB_ES3_compatibility 1\n#endif /* GL_ARB_ES3_compatibility */\n\n#ifndef GL_ARB_arrays_of_arrays\n#define GL_ARB_arrays_of_arrays 1\n#endif /* GL_ARB_arrays_of_arrays */\n\n#ifndef GL_ARB_base_instance\n#define GL_ARB_base_instance 1\n#endif /* GL_ARB_base_instance */\n\n#ifndef GL_ARB_bindless_texture\n#define GL_ARB_bindless_texture 1\ntypedef uint64_t GLuint64EXT;\n#define GL_UNSIGNED_INT64_ARB             0x140F\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);\ntypedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);\nGLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);\nGLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);\nGLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\nGLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);\nGLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);\nGLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);\nGLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);\nGLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\nGLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);\nGLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);\nGLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);\n#endif\n#endif /* GL_ARB_bindless_texture */\n\n#ifndef GL_ARB_blend_func_extended\n#define GL_ARB_blend_func_extended 1\n#endif /* GL_ARB_blend_func_extended */\n\n#ifndef GL_ARB_buffer_storage\n#define GL_ARB_buffer_storage 1\n#endif /* GL_ARB_buffer_storage */\n\n#ifndef GL_ARB_cl_event\n#define GL_ARB_cl_event 1\nstruct _cl_context;\nstruct _cl_event;\n#define GL_SYNC_CL_EVENT_ARB              0x8240\n#define GL_SYNC_CL_EVENT_COMPLETE_ARB     0x8241\ntypedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);\n#endif\n#endif /* GL_ARB_cl_event */\n\n#ifndef GL_ARB_clear_buffer_object\n#define GL_ARB_clear_buffer_object 1\n#endif /* GL_ARB_clear_buffer_object */\n\n#ifndef GL_ARB_clear_texture\n#define GL_ARB_clear_texture 1\n#endif /* GL_ARB_clear_texture */\n\n#ifndef GL_ARB_color_buffer_float\n#define GL_ARB_color_buffer_float 1\n#define GL_RGBA_FLOAT_MODE_ARB            0x8820\n#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A\n#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B\n#define GL_CLAMP_READ_COLOR_ARB           0x891C\n#define GL_FIXED_ONLY_ARB                 0x891D\ntypedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);\n#endif\n#endif /* GL_ARB_color_buffer_float */\n\n#ifndef GL_ARB_compatibility\n#define GL_ARB_compatibility 1\n#endif /* GL_ARB_compatibility */\n\n#ifndef GL_ARB_compressed_texture_pixel_storage\n#define GL_ARB_compressed_texture_pixel_storage 1\n#endif /* GL_ARB_compressed_texture_pixel_storage */\n\n#ifndef GL_ARB_compute_shader\n#define GL_ARB_compute_shader 1\n#define GL_COMPUTE_SHADER_BIT             0x00000020\n#endif /* GL_ARB_compute_shader */\n\n#ifndef GL_ARB_compute_variable_group_size\n#define GL_ARB_compute_variable_group_size 1\n#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344\n#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB\n#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345\n#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);\n#endif\n#endif /* GL_ARB_compute_variable_group_size */\n\n#ifndef GL_ARB_conservative_depth\n#define GL_ARB_conservative_depth 1\n#endif /* GL_ARB_conservative_depth */\n\n#ifndef GL_ARB_copy_buffer\n#define GL_ARB_copy_buffer 1\n#define GL_COPY_READ_BUFFER_BINDING       0x8F36\n#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37\n#endif /* GL_ARB_copy_buffer */\n\n#ifndef GL_ARB_copy_image\n#define GL_ARB_copy_image 1\n#endif /* GL_ARB_copy_image */\n\n#ifndef GL_ARB_debug_output\n#define GL_ARB_debug_output 1\ntypedef void (APIENTRY  *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION_ARB    0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM_ARB  0x8245\n#define GL_DEBUG_SOURCE_API_ARB           0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB   0x8249\n#define GL_DEBUG_SOURCE_APPLICATION_ARB   0x824A\n#define GL_DEBUG_SOURCE_OTHER_ARB         0x824B\n#define GL_DEBUG_TYPE_ERROR_ARB           0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E\n#define GL_DEBUG_TYPE_PORTABILITY_ARB     0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE_ARB     0x8250\n#define GL_DEBUG_TYPE_OTHER_ARB           0x8251\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_ARB      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_ARB        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147\n#define GL_DEBUG_SEVERITY_LOW_ARB         0x9148\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#endif\n#endif /* GL_ARB_debug_output */\n\n#ifndef GL_ARB_depth_buffer_float\n#define GL_ARB_depth_buffer_float 1\n#endif /* GL_ARB_depth_buffer_float */\n\n#ifndef GL_ARB_depth_clamp\n#define GL_ARB_depth_clamp 1\n#endif /* GL_ARB_depth_clamp */\n\n#ifndef GL_ARB_depth_texture\n#define GL_ARB_depth_texture 1\n#define GL_DEPTH_COMPONENT16_ARB          0x81A5\n#define GL_DEPTH_COMPONENT24_ARB          0x81A6\n#define GL_DEPTH_COMPONENT32_ARB          0x81A7\n#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A\n#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B\n#endif /* GL_ARB_depth_texture */\n\n#ifndef GL_ARB_draw_buffers\n#define GL_ARB_draw_buffers 1\n#define GL_MAX_DRAW_BUFFERS_ARB           0x8824\n#define GL_DRAW_BUFFER0_ARB               0x8825\n#define GL_DRAW_BUFFER1_ARB               0x8826\n#define GL_DRAW_BUFFER2_ARB               0x8827\n#define GL_DRAW_BUFFER3_ARB               0x8828\n#define GL_DRAW_BUFFER4_ARB               0x8829\n#define GL_DRAW_BUFFER5_ARB               0x882A\n#define GL_DRAW_BUFFER6_ARB               0x882B\n#define GL_DRAW_BUFFER7_ARB               0x882C\n#define GL_DRAW_BUFFER8_ARB               0x882D\n#define GL_DRAW_BUFFER9_ARB               0x882E\n#define GL_DRAW_BUFFER10_ARB              0x882F\n#define GL_DRAW_BUFFER11_ARB              0x8830\n#define GL_DRAW_BUFFER12_ARB              0x8831\n#define GL_DRAW_BUFFER13_ARB              0x8832\n#define GL_DRAW_BUFFER14_ARB              0x8833\n#define GL_DRAW_BUFFER15_ARB              0x8834\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);\n#endif\n#endif /* GL_ARB_draw_buffers */\n\n#ifndef GL_ARB_draw_buffers_blend\n#define GL_ARB_draw_buffers_blend 1\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif\n#endif /* GL_ARB_draw_buffers_blend */\n\n#ifndef GL_ARB_draw_elements_base_vertex\n#define GL_ARB_draw_elements_base_vertex 1\n#endif /* GL_ARB_draw_elements_base_vertex */\n\n#ifndef GL_ARB_draw_indirect\n#define GL_ARB_draw_indirect 1\n#endif /* GL_ARB_draw_indirect */\n\n#ifndef GL_ARB_draw_instanced\n#define GL_ARB_draw_instanced 1\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#endif\n#endif /* GL_ARB_draw_instanced */\n\n#ifndef GL_ARB_enhanced_layouts\n#define GL_ARB_enhanced_layouts 1\n#endif /* GL_ARB_enhanced_layouts */\n\n#ifndef GL_ARB_explicit_attrib_location\n#define GL_ARB_explicit_attrib_location 1\n#endif /* GL_ARB_explicit_attrib_location */\n\n#ifndef GL_ARB_explicit_uniform_location\n#define GL_ARB_explicit_uniform_location 1\n#endif /* GL_ARB_explicit_uniform_location */\n\n#ifndef GL_ARB_fragment_coord_conventions\n#define GL_ARB_fragment_coord_conventions 1\n#endif /* GL_ARB_fragment_coord_conventions */\n\n#ifndef GL_ARB_fragment_layer_viewport\n#define GL_ARB_fragment_layer_viewport 1\n#endif /* GL_ARB_fragment_layer_viewport */\n\n#ifndef GL_ARB_fragment_program\n#define GL_ARB_fragment_program 1\n#define GL_FRAGMENT_PROGRAM_ARB           0x8804\n#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875\n#define GL_PROGRAM_LENGTH_ARB             0x8627\n#define GL_PROGRAM_FORMAT_ARB             0x8876\n#define GL_PROGRAM_BINDING_ARB            0x8677\n#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0\n#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1\n#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2\n#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3\n#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4\n#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5\n#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6\n#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7\n#define GL_PROGRAM_PARAMETERS_ARB         0x88A8\n#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9\n#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA\n#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB\n#define GL_PROGRAM_ATTRIBS_ARB            0x88AC\n#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD\n#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE\n#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF\n#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4\n#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5\n#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6\n#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805\n#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806\n#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807\n#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808\n#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809\n#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A\n#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B\n#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C\n#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D\n#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E\n#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F\n#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810\n#define GL_PROGRAM_STRING_ARB             0x8628\n#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B\n#define GL_CURRENT_MATRIX_ARB             0x8641\n#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7\n#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640\n#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F\n#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E\n#define GL_MAX_TEXTURE_COORDS_ARB         0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872\n#define GL_PROGRAM_ERROR_STRING_ARB       0x8874\n#define GL_MATRIX0_ARB                    0x88C0\n#define GL_MATRIX1_ARB                    0x88C1\n#define GL_MATRIX2_ARB                    0x88C2\n#define GL_MATRIX3_ARB                    0x88C3\n#define GL_MATRIX4_ARB                    0x88C4\n#define GL_MATRIX5_ARB                    0x88C5\n#define GL_MATRIX6_ARB                    0x88C6\n#define GL_MATRIX7_ARB                    0x88C7\n#define GL_MATRIX8_ARB                    0x88C8\n#define GL_MATRIX9_ARB                    0x88C9\n#define GL_MATRIX10_ARB                   0x88CA\n#define GL_MATRIX11_ARB                   0x88CB\n#define GL_MATRIX12_ARB                   0x88CC\n#define GL_MATRIX13_ARB                   0x88CD\n#define GL_MATRIX14_ARB                   0x88CE\n#define GL_MATRIX15_ARB                   0x88CF\n#define GL_MATRIX16_ARB                   0x88D0\n#define GL_MATRIX17_ARB                   0x88D1\n#define GL_MATRIX18_ARB                   0x88D2\n#define GL_MATRIX19_ARB                   0x88D3\n#define GL_MATRIX20_ARB                   0x88D4\n#define GL_MATRIX21_ARB                   0x88D5\n#define GL_MATRIX22_ARB                   0x88D6\n#define GL_MATRIX23_ARB                   0x88D7\n#define GL_MATRIX24_ARB                   0x88D8\n#define GL_MATRIX25_ARB                   0x88D9\n#define GL_MATRIX26_ARB                   0x88DA\n#define GL_MATRIX27_ARB                   0x88DB\n#define GL_MATRIX28_ARB                   0x88DC\n#define GL_MATRIX29_ARB                   0x88DD\n#define GL_MATRIX30_ARB                   0x88DE\n#define GL_MATRIX31_ARB                   0x88DF\ntypedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);\nGLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);\nGLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);\nGLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);\n#endif\n#endif /* GL_ARB_fragment_program */\n\n#ifndef GL_ARB_fragment_program_shadow\n#define GL_ARB_fragment_program_shadow 1\n#endif /* GL_ARB_fragment_program_shadow */\n\n#ifndef GL_ARB_fragment_shader\n#define GL_ARB_fragment_shader 1\n#define GL_FRAGMENT_SHADER_ARB            0x8B30\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B\n#endif /* GL_ARB_fragment_shader */\n\n#ifndef GL_ARB_framebuffer_no_attachments\n#define GL_ARB_framebuffer_no_attachments 1\n#endif /* GL_ARB_framebuffer_no_attachments */\n\n#ifndef GL_ARB_framebuffer_object\n#define GL_ARB_framebuffer_object 1\n#endif /* GL_ARB_framebuffer_object */\n\n#ifndef GL_ARB_framebuffer_sRGB\n#define GL_ARB_framebuffer_sRGB 1\n#endif /* GL_ARB_framebuffer_sRGB */\n\n#ifndef GL_KHR_context_flush_control\n#define GL_CONTEXT_RELEASE_BEHAVIOR       0x82FB\n#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC\n#endif /* GL_KHR_context_flush_control */\n\n#ifndef GL_ARB_geometry_shader4\n#define GL_ARB_geometry_shader4 1\n#define GL_LINES_ADJACENCY_ARB            0x000A\n#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B\n#define GL_TRIANGLES_ADJACENCY_ARB        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D\n#define GL_PROGRAM_POINT_SIZE_ARB         0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9\n#define GL_GEOMETRY_SHADER_ARB            0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);\nGLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n#endif /* GL_ARB_geometry_shader4 */\n\n#ifndef GL_ARB_get_program_binary\n#define GL_ARB_get_program_binary 1\n#endif /* GL_ARB_get_program_binary */\n\n#ifndef GL_ARB_gpu_shader5\n#define GL_ARB_gpu_shader5 1\n#endif /* GL_ARB_gpu_shader5 */\n\n#ifndef GL_ARB_gpu_shader_fp64\n#define GL_ARB_gpu_shader_fp64 1\n#endif /* GL_ARB_gpu_shader_fp64 */\n\n#ifndef GL_ARB_half_float_pixel\n#define GL_ARB_half_float_pixel 1\ntypedef unsigned short GLhalfARB;\n#define GL_HALF_FLOAT_ARB                 0x140B\n#endif /* GL_ARB_half_float_pixel */\n\n#ifndef GL_ARB_half_float_vertex\n#define GL_ARB_half_float_vertex 1\n#endif /* GL_ARB_half_float_vertex */\n\n#ifndef GL_ARB_imaging\n#define GL_ARB_imaging 1\n#define GL_BLEND_COLOR                    0x8005\n#define GL_BLEND_EQUATION                 0x8009\n#define GL_CONVOLUTION_1D                 0x8010\n#define GL_CONVOLUTION_2D                 0x8011\n#define GL_SEPARABLE_2D                   0x8012\n#define GL_CONVOLUTION_BORDER_MODE        0x8013\n#define GL_CONVOLUTION_FILTER_SCALE       0x8014\n#define GL_CONVOLUTION_FILTER_BIAS        0x8015\n#define GL_REDUCE                         0x8016\n#define GL_CONVOLUTION_FORMAT             0x8017\n#define GL_CONVOLUTION_WIDTH              0x8018\n#define GL_CONVOLUTION_HEIGHT             0x8019\n#define GL_MAX_CONVOLUTION_WIDTH          0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT         0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE     0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS      0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023\n#define GL_HISTOGRAM                      0x8024\n#define GL_PROXY_HISTOGRAM                0x8025\n#define GL_HISTOGRAM_WIDTH                0x8026\n#define GL_HISTOGRAM_FORMAT               0x8027\n#define GL_HISTOGRAM_RED_SIZE             0x8028\n#define GL_HISTOGRAM_GREEN_SIZE           0x8029\n#define GL_HISTOGRAM_BLUE_SIZE            0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE           0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C\n#define GL_HISTOGRAM_SINK                 0x802D\n#define GL_MINMAX                         0x802E\n#define GL_MINMAX_FORMAT                  0x802F\n#define GL_MINMAX_SINK                    0x8030\n#define GL_TABLE_TOO_LARGE                0x8031\n#define GL_COLOR_MATRIX                   0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB\n#define GL_COLOR_TABLE                    0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2\n#define GL_PROXY_COLOR_TABLE              0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5\n#define GL_COLOR_TABLE_SCALE              0x80D6\n#define GL_COLOR_TABLE_BIAS               0x80D7\n#define GL_COLOR_TABLE_FORMAT             0x80D8\n#define GL_COLOR_TABLE_WIDTH              0x80D9\n#define GL_COLOR_TABLE_RED_SIZE           0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF\n#define GL_CONSTANT_BORDER                0x8151\n#define GL_REPLICATE_BORDER               0x8153\n#define GL_CONVOLUTION_BORDER_COLOR       0x8154\ntypedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);\nGLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);\nGLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\nGLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\nGLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogram (GLenum target);\nGLAPI void APIENTRY glResetMinmax (GLenum target);\n#endif\n#endif /* GL_ARB_imaging */\n\n#ifndef GL_ARB_indirect_parameters\n#define GL_ARB_indirect_parameters 1\n#define GL_PARAMETER_BUFFER_ARB           0x80EE\n#define GL_PARAMETER_BUFFER_BINDING_ARB   0x80EF\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\n#endif\n#endif /* GL_ARB_indirect_parameters */\n\n#ifndef GL_ARB_instanced_arrays\n#define GL_ARB_instanced_arrays 1\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);\n#endif\n#endif /* GL_ARB_instanced_arrays */\n\n#ifndef GL_ARB_internalformat_query\n#define GL_ARB_internalformat_query 1\n#endif /* GL_ARB_internalformat_query */\n\n#ifndef GL_ARB_internalformat_query2\n#define GL_ARB_internalformat_query2 1\n#define GL_SRGB_DECODE_ARB                0x8299\n#endif /* GL_ARB_internalformat_query2 */\n\n#ifndef GL_ARB_invalidate_subdata\n#define GL_ARB_invalidate_subdata 1\n#endif /* GL_ARB_invalidate_subdata */\n\n#ifndef GL_ARB_map_buffer_alignment\n#define GL_ARB_map_buffer_alignment 1\n#endif /* GL_ARB_map_buffer_alignment */\n\n#ifndef GL_ARB_map_buffer_range\n#define GL_ARB_map_buffer_range 1\n#endif /* GL_ARB_map_buffer_range */\n\n#ifndef GL_ARB_matrix_palette\n#define GL_ARB_matrix_palette 1\n#define GL_MATRIX_PALETTE_ARB             0x8840\n#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841\n#define GL_MAX_PALETTE_MATRICES_ARB       0x8842\n#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843\n#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844\n#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845\n#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846\n#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847\n#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848\n#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849\ntypedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);\nGLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);\nGLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);\nGLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);\nGLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_ARB_matrix_palette */\n\n#ifndef GL_ARB_multi_bind\n#define GL_ARB_multi_bind 1\n#endif /* GL_ARB_multi_bind */\n\n#ifndef GL_ARB_multi_draw_indirect\n#define GL_ARB_multi_draw_indirect 1\n#endif /* GL_ARB_multi_draw_indirect */\n\n#ifndef GL_ARB_multisample\n#define GL_ARB_multisample 1\n#define GL_MULTISAMPLE_ARB                0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F\n#define GL_SAMPLE_COVERAGE_ARB            0x80A0\n#define GL_SAMPLE_BUFFERS_ARB             0x80A8\n#define GL_SAMPLES_ARB                    0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB\n#define GL_MULTISAMPLE_BIT_ARB            0x20000000\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);\n#endif\n#endif /* GL_ARB_multisample */\n\n#ifndef GL_ARB_multitexture\n#define GL_ARB_multitexture 1\n#define GL_TEXTURE0_ARB                   0x84C0\n#define GL_TEXTURE1_ARB                   0x84C1\n#define GL_TEXTURE2_ARB                   0x84C2\n#define GL_TEXTURE3_ARB                   0x84C3\n#define GL_TEXTURE4_ARB                   0x84C4\n#define GL_TEXTURE5_ARB                   0x84C5\n#define GL_TEXTURE6_ARB                   0x84C6\n#define GL_TEXTURE7_ARB                   0x84C7\n#define GL_TEXTURE8_ARB                   0x84C8\n#define GL_TEXTURE9_ARB                   0x84C9\n#define GL_TEXTURE10_ARB                  0x84CA\n#define GL_TEXTURE11_ARB                  0x84CB\n#define GL_TEXTURE12_ARB                  0x84CC\n#define GL_TEXTURE13_ARB                  0x84CD\n#define GL_TEXTURE14_ARB                  0x84CE\n#define GL_TEXTURE15_ARB                  0x84CF\n#define GL_TEXTURE16_ARB                  0x84D0\n#define GL_TEXTURE17_ARB                  0x84D1\n#define GL_TEXTURE18_ARB                  0x84D2\n#define GL_TEXTURE19_ARB                  0x84D3\n#define GL_TEXTURE20_ARB                  0x84D4\n#define GL_TEXTURE21_ARB                  0x84D5\n#define GL_TEXTURE22_ARB                  0x84D6\n#define GL_TEXTURE23_ARB                  0x84D7\n#define GL_TEXTURE24_ARB                  0x84D8\n#define GL_TEXTURE25_ARB                  0x84D9\n#define GL_TEXTURE26_ARB                  0x84DA\n#define GL_TEXTURE27_ARB                  0x84DB\n#define GL_TEXTURE28_ARB                  0x84DC\n#define GL_TEXTURE29_ARB                  0x84DD\n#define GL_TEXTURE30_ARB                  0x84DE\n#define GL_TEXTURE31_ARB                  0x84DF\n#define GL_ACTIVE_TEXTURE_ARB             0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1\n#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);\n#endif\n#endif /* GL_ARB_multitexture */\n\n#ifndef GL_ARB_occlusion_query\n#define GL_ARB_occlusion_query 1\n#define GL_QUERY_COUNTER_BITS_ARB         0x8864\n#define GL_CURRENT_QUERY_ARB              0x8865\n#define GL_QUERY_RESULT_ARB               0x8866\n#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867\n#define GL_SAMPLES_PASSED_ARB             0x8914\ntypedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);\nGLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQueryARB (GLenum target);\nGLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_ARB_occlusion_query */\n\n#ifndef GL_ARB_occlusion_query2\n#define GL_ARB_occlusion_query2 1\n#endif /* GL_ARB_occlusion_query2 */\n\n#ifndef GL_ARB_pixel_buffer_object\n#define GL_ARB_pixel_buffer_object 1\n#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF\n#endif /* GL_ARB_pixel_buffer_object */\n\n#ifndef GL_ARB_point_parameters\n#define GL_ARB_point_parameters 1\n#define GL_POINT_SIZE_MIN_ARB             0x8126\n#define GL_POINT_SIZE_MAX_ARB             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128\n#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_ARB_point_parameters */\n\n#ifndef GL_ARB_point_sprite\n#define GL_ARB_point_sprite 1\n#define GL_POINT_SPRITE_ARB               0x8861\n#define GL_COORD_REPLACE_ARB              0x8862\n#endif /* GL_ARB_point_sprite */\n\n#ifndef GL_ARB_program_interface_query\n#define GL_ARB_program_interface_query 1\n#endif /* GL_ARB_program_interface_query */\n\n#ifndef GL_ARB_provoking_vertex\n#define GL_ARB_provoking_vertex 1\n#endif /* GL_ARB_provoking_vertex */\n\n#ifndef GL_ARB_query_buffer_object\n#define GL_ARB_query_buffer_object 1\n#endif /* GL_ARB_query_buffer_object */\n\n#ifndef GL_ARB_robust_buffer_access_behavior\n#define GL_ARB_robust_buffer_access_behavior 1\n#endif /* GL_ARB_robust_buffer_access_behavior */\n\n#ifndef GL_ARB_robustness\n#define GL_ARB_robustness 1\n#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define GL_LOSE_CONTEXT_ON_RESET_ARB      0x8252\n#define GL_GUILTY_CONTEXT_RESET_ARB       0x8253\n#define GL_INNOCENT_CONTEXT_RESET_ARB     0x8254\n#define GL_UNKNOWN_CONTEXT_RESET_ARB      0x8255\n#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GL_NO_RESET_NOTIFICATION_ARB      0x8261\ntypedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);\ntypedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);\ntypedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\ntypedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\ntypedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);\ntypedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);\ntypedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);\ntypedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);\ntypedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);\ntypedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\ntypedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);\nGLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);\nGLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\nGLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);\nGLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\nGLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);\nGLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\nGLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\nGLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\nGLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\nGLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\nGLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);\nGLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);\nGLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);\nGLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);\nGLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);\nGLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);\nGLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);\nGLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\nGLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\n#endif\n#endif /* GL_ARB_robustness */\n\n#ifndef GL_ARB_robustness_isolation\n#define GL_ARB_robustness_isolation 1\n#endif /* GL_ARB_robustness_isolation */\n\n#ifndef GL_ARB_sample_shading\n#define GL_ARB_sample_shading 1\n#define GL_SAMPLE_SHADING_ARB             0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE_ARB   0x8C37\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);\n#endif\n#endif /* GL_ARB_sample_shading */\n\n#ifndef GL_ARB_sampler_objects\n#define GL_ARB_sampler_objects 1\n#endif /* GL_ARB_sampler_objects */\n\n#ifndef GL_ARB_seamless_cube_map\n#define GL_ARB_seamless_cube_map 1\n#endif /* GL_ARB_seamless_cube_map */\n\n#ifndef GL_ARB_seamless_cubemap_per_texture\n#define GL_ARB_seamless_cubemap_per_texture 1\n#endif /* GL_ARB_seamless_cubemap_per_texture */\n\n#ifndef GL_ARB_separate_shader_objects\n#define GL_ARB_separate_shader_objects 1\n#endif /* GL_ARB_separate_shader_objects */\n\n#ifndef GL_ARB_shader_atomic_counters\n#define GL_ARB_shader_atomic_counters 1\n#endif /* GL_ARB_shader_atomic_counters */\n\n#ifndef GL_ARB_shader_bit_encoding\n#define GL_ARB_shader_bit_encoding 1\n#endif /* GL_ARB_shader_bit_encoding */\n\n#ifndef GL_ARB_shader_draw_parameters\n#define GL_ARB_shader_draw_parameters 1\n#endif /* GL_ARB_shader_draw_parameters */\n\n#ifndef GL_ARB_shader_group_vote\n#define GL_ARB_shader_group_vote 1\n#endif /* GL_ARB_shader_group_vote */\n\n#ifndef GL_ARB_shader_image_load_store\n#define GL_ARB_shader_image_load_store 1\n#endif /* GL_ARB_shader_image_load_store */\n\n#ifndef GL_ARB_shader_image_size\n#define GL_ARB_shader_image_size 1\n#endif /* GL_ARB_shader_image_size */\n\n#ifndef GL_ARB_shader_objects\n#define GL_ARB_shader_objects 1\n#ifdef __APPLE__\ntypedef void *GLhandleARB;\n#else\ntypedef unsigned int GLhandleARB;\n#endif\ntypedef char GLcharARB;\n#define GL_PROGRAM_OBJECT_ARB             0x8B40\n#define GL_SHADER_OBJECT_ARB              0x8B48\n#define GL_OBJECT_TYPE_ARB                0x8B4E\n#define GL_OBJECT_SUBTYPE_ARB             0x8B4F\n#define GL_FLOAT_VEC2_ARB                 0x8B50\n#define GL_FLOAT_VEC3_ARB                 0x8B51\n#define GL_FLOAT_VEC4_ARB                 0x8B52\n#define GL_INT_VEC2_ARB                   0x8B53\n#define GL_INT_VEC3_ARB                   0x8B54\n#define GL_INT_VEC4_ARB                   0x8B55\n#define GL_BOOL_ARB                       0x8B56\n#define GL_BOOL_VEC2_ARB                  0x8B57\n#define GL_BOOL_VEC3_ARB                  0x8B58\n#define GL_BOOL_VEC4_ARB                  0x8B59\n#define GL_FLOAT_MAT2_ARB                 0x8B5A\n#define GL_FLOAT_MAT3_ARB                 0x8B5B\n#define GL_FLOAT_MAT4_ARB                 0x8B5C\n#define GL_SAMPLER_1D_ARB                 0x8B5D\n#define GL_SAMPLER_2D_ARB                 0x8B5E\n#define GL_SAMPLER_3D_ARB                 0x8B5F\n#define GL_SAMPLER_CUBE_ARB               0x8B60\n#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61\n#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62\n#define GL_SAMPLER_2D_RECT_ARB            0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64\n#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80\n#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81\n#define GL_OBJECT_LINK_STATUS_ARB         0x8B82\n#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83\n#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84\n#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85\n#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86\n#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87\n#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88\ntypedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);\ntypedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);\ntypedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\ntypedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);\nGLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);\nGLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);\nGLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);\nGLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);\nGLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);\nGLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);\nGLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);\nGLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);\nGLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\nGLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\nGLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);\nGLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#endif\n#endif /* GL_ARB_shader_objects */\n\n#ifndef GL_ARB_shader_precision\n#define GL_ARB_shader_precision 1\n#endif /* GL_ARB_shader_precision */\n\n#ifndef GL_ARB_shader_stencil_export\n#define GL_ARB_shader_stencil_export 1\n#endif /* GL_ARB_shader_stencil_export */\n\n#ifndef GL_ARB_shader_storage_buffer_object\n#define GL_ARB_shader_storage_buffer_object 1\n#endif /* GL_ARB_shader_storage_buffer_object */\n\n#ifndef GL_ARB_shader_subroutine\n#define GL_ARB_shader_subroutine 1\n#endif /* GL_ARB_shader_subroutine */\n\n#ifndef GL_ARB_shader_texture_lod\n#define GL_ARB_shader_texture_lod 1\n#endif /* GL_ARB_shader_texture_lod */\n\n#ifndef GL_ARB_shading_language_100\n#define GL_ARB_shading_language_100 1\n#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C\n#endif /* GL_ARB_shading_language_100 */\n\n#ifndef GL_ARB_shading_language_420pack\n#define GL_ARB_shading_language_420pack 1\n#endif /* GL_ARB_shading_language_420pack */\n\n#ifndef GL_ARB_shading_language_include\n#define GL_ARB_shading_language_include 1\n#define GL_SHADER_INCLUDE_ARB             0x8DAE\n#define GL_NAMED_STRING_LENGTH_ARB        0x8DE9\n#define GL_NAMED_STRING_TYPE_ARB          0x8DEA\ntypedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\ntypedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\nGLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);\nGLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\nGLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ARB_shading_language_include */\n\n#ifndef GL_ARB_shading_language_packing\n#define GL_ARB_shading_language_packing 1\n#endif /* GL_ARB_shading_language_packing */\n\n#ifndef GL_ARB_shadow\n#define GL_ARB_shadow 1\n#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C\n#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D\n#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E\n#endif /* GL_ARB_shadow */\n\n#ifndef GL_ARB_shadow_ambient\n#define GL_ARB_shadow_ambient 1\n#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF\n#endif /* GL_ARB_shadow_ambient */\n\n#ifndef GL_ARB_sparse_texture\n#define GL_ARB_sparse_texture 1\n#define GL_TEXTURE_SPARSE_ARB             0x91A6\n#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB    0x91A7\n#define GL_MIN_SPARSE_LEVEL_ARB           0x919B\n#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB     0x91A8\n#define GL_VIRTUAL_PAGE_SIZE_X_ARB        0x9195\n#define GL_VIRTUAL_PAGE_SIZE_Y_ARB        0x9196\n#define GL_VIRTUAL_PAGE_SIZE_Z_ARB        0x9197\n#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB    0x9198\n#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199\n#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A\n#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9\ntypedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\n#endif\n#endif /* GL_ARB_sparse_texture */\n\n#ifndef GL_ARB_stencil_texturing\n#define GL_ARB_stencil_texturing 1\n#endif /* GL_ARB_stencil_texturing */\n\n#ifndef GL_ARB_sync\n#define GL_ARB_sync 1\n#endif /* GL_ARB_sync */\n\n#ifndef GL_ARB_tessellation_shader\n#define GL_ARB_tessellation_shader 1\n#endif /* GL_ARB_tessellation_shader */\n\n#ifndef GL_ARB_texture_border_clamp\n#define GL_ARB_texture_border_clamp 1\n#define GL_CLAMP_TO_BORDER_ARB            0x812D\n#endif /* GL_ARB_texture_border_clamp */\n\n#ifndef GL_ARB_texture_buffer_object\n#define GL_ARB_texture_buffer_object 1\n#define GL_TEXTURE_BUFFER_ARB             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E\ntypedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n#endif /* GL_ARB_texture_buffer_object */\n\n#ifndef GL_ARB_texture_buffer_object_rgb32\n#define GL_ARB_texture_buffer_object_rgb32 1\n#endif /* GL_ARB_texture_buffer_object_rgb32 */\n\n#ifndef GL_ARB_texture_buffer_range\n#define GL_ARB_texture_buffer_range 1\n#endif /* GL_ARB_texture_buffer_range */\n\n#ifndef GL_ARB_texture_compression\n#define GL_ARB_texture_compression 1\n#define GL_COMPRESSED_ALPHA_ARB           0x84E9\n#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB\n#define GL_COMPRESSED_INTENSITY_ARB       0x84EC\n#define GL_COMPRESSED_RGB_ARB             0x84ED\n#define GL_COMPRESSED_RGBA_ARB            0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0\n#define GL_TEXTURE_COMPRESSED_ARB         0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);\n#endif\n#endif /* GL_ARB_texture_compression */\n\n#ifndef GL_ARB_texture_compression_bptc\n#define GL_ARB_texture_compression_bptc 1\n#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C\n#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D\n#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E\n#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F\n#endif /* GL_ARB_texture_compression_bptc */\n\n#ifndef GL_ARB_texture_compression_rgtc\n#define GL_ARB_texture_compression_rgtc 1\n#endif /* GL_ARB_texture_compression_rgtc */\n\n#ifndef GL_ARB_texture_cube_map\n#define GL_ARB_texture_cube_map 1\n#define GL_NORMAL_MAP_ARB                 0x8511\n#define GL_REFLECTION_MAP_ARB             0x8512\n#define GL_TEXTURE_CUBE_MAP_ARB           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C\n#endif /* GL_ARB_texture_cube_map */\n\n#ifndef GL_ARB_texture_cube_map_array\n#define GL_ARB_texture_cube_map_array 1\n#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB     0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB     0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F\n#endif /* GL_ARB_texture_cube_map_array */\n\n#ifndef GL_ARB_texture_env_add\n#define GL_ARB_texture_env_add 1\n#endif /* GL_ARB_texture_env_add */\n\n#ifndef GL_ARB_texture_env_combine\n#define GL_ARB_texture_env_combine 1\n#define GL_COMBINE_ARB                    0x8570\n#define GL_COMBINE_RGB_ARB                0x8571\n#define GL_COMBINE_ALPHA_ARB              0x8572\n#define GL_SOURCE0_RGB_ARB                0x8580\n#define GL_SOURCE1_RGB_ARB                0x8581\n#define GL_SOURCE2_RGB_ARB                0x8582\n#define GL_SOURCE0_ALPHA_ARB              0x8588\n#define GL_SOURCE1_ALPHA_ARB              0x8589\n#define GL_SOURCE2_ALPHA_ARB              0x858A\n#define GL_OPERAND0_RGB_ARB               0x8590\n#define GL_OPERAND1_RGB_ARB               0x8591\n#define GL_OPERAND2_RGB_ARB               0x8592\n#define GL_OPERAND0_ALPHA_ARB             0x8598\n#define GL_OPERAND1_ALPHA_ARB             0x8599\n#define GL_OPERAND2_ALPHA_ARB             0x859A\n#define GL_RGB_SCALE_ARB                  0x8573\n#define GL_ADD_SIGNED_ARB                 0x8574\n#define GL_INTERPOLATE_ARB                0x8575\n#define GL_SUBTRACT_ARB                   0x84E7\n#define GL_CONSTANT_ARB                   0x8576\n#define GL_PRIMARY_COLOR_ARB              0x8577\n#define GL_PREVIOUS_ARB                   0x8578\n#endif /* GL_ARB_texture_env_combine */\n\n#ifndef GL_ARB_texture_env_crossbar\n#define GL_ARB_texture_env_crossbar 1\n#endif /* GL_ARB_texture_env_crossbar */\n\n#ifndef GL_ARB_texture_env_dot3\n#define GL_ARB_texture_env_dot3 1\n#define GL_DOT3_RGB_ARB                   0x86AE\n#define GL_DOT3_RGBA_ARB                  0x86AF\n#endif /* GL_ARB_texture_env_dot3 */\n\n#ifndef GL_ARB_texture_float\n#define GL_ARB_texture_float 1\n#define GL_TEXTURE_RED_TYPE_ARB           0x8C10\n#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11\n#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12\n#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13\n#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15\n#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16\n#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17\n#define GL_RGBA32F_ARB                    0x8814\n#define GL_RGB32F_ARB                     0x8815\n#define GL_ALPHA32F_ARB                   0x8816\n#define GL_INTENSITY32F_ARB               0x8817\n#define GL_LUMINANCE32F_ARB               0x8818\n#define GL_LUMINANCE_ALPHA32F_ARB         0x8819\n#define GL_RGBA16F_ARB                    0x881A\n#define GL_RGB16F_ARB                     0x881B\n#define GL_ALPHA16F_ARB                   0x881C\n#define GL_INTENSITY16F_ARB               0x881D\n#define GL_LUMINANCE16F_ARB               0x881E\n#define GL_LUMINANCE_ALPHA16F_ARB         0x881F\n#endif /* GL_ARB_texture_float */\n\n#ifndef GL_ARB_texture_gather\n#define GL_ARB_texture_gather 1\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F\n#endif /* GL_ARB_texture_gather */\n\n#ifndef GL_ARB_texture_mirror_clamp_to_edge\n#define GL_ARB_texture_mirror_clamp_to_edge 1\n#endif /* GL_ARB_texture_mirror_clamp_to_edge */\n\n#ifndef GL_ARB_texture_mirrored_repeat\n#define GL_ARB_texture_mirrored_repeat 1\n#define GL_MIRRORED_REPEAT_ARB            0x8370\n#endif /* GL_ARB_texture_mirrored_repeat */\n\n#ifndef GL_ARB_texture_multisample\n#define GL_ARB_texture_multisample 1\n#endif /* GL_ARB_texture_multisample */\n\n#ifndef GL_ARB_texture_non_power_of_two\n#define GL_ARB_texture_non_power_of_two 1\n#endif /* GL_ARB_texture_non_power_of_two */\n\n#ifndef GL_ARB_texture_query_levels\n#define GL_ARB_texture_query_levels 1\n#endif /* GL_ARB_texture_query_levels */\n\n#ifndef GL_ARB_texture_query_lod\n#define GL_ARB_texture_query_lod 1\n#endif /* GL_ARB_texture_query_lod */\n\n#ifndef GL_ARB_texture_rectangle\n#define GL_ARB_texture_rectangle 1\n#define GL_TEXTURE_RECTANGLE_ARB          0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8\n#endif /* GL_ARB_texture_rectangle */\n\n#ifndef GL_ARB_texture_rg\n#define GL_ARB_texture_rg 1\n#endif /* GL_ARB_texture_rg */\n\n#ifndef GL_ARB_texture_rgb10_a2ui\n#define GL_ARB_texture_rgb10_a2ui 1\n#endif /* GL_ARB_texture_rgb10_a2ui */\n\n#ifndef GL_ARB_texture_stencil8\n#define GL_ARB_texture_stencil8 1\n#endif /* GL_ARB_texture_stencil8 */\n\n#ifndef GL_ARB_texture_storage\n#define GL_ARB_texture_storage 1\n#endif /* GL_ARB_texture_storage */\n\n#ifndef GL_ARB_texture_storage_multisample\n#define GL_ARB_texture_storage_multisample 1\n#endif /* GL_ARB_texture_storage_multisample */\n\n#ifndef GL_ARB_texture_swizzle\n#define GL_ARB_texture_swizzle 1\n#endif /* GL_ARB_texture_swizzle */\n\n#ifndef GL_ARB_texture_view\n#define GL_ARB_texture_view 1\n#endif /* GL_ARB_texture_view */\n\n#ifndef GL_ARB_timer_query\n#define GL_ARB_timer_query 1\n#endif /* GL_ARB_timer_query */\n\n#ifndef GL_ARB_transform_feedback2\n#define GL_ARB_transform_feedback2 1\n#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23\n#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24\n#endif /* GL_ARB_transform_feedback2 */\n\n#ifndef GL_ARB_transform_feedback3\n#define GL_ARB_transform_feedback3 1\n#endif /* GL_ARB_transform_feedback3 */\n\n#ifndef GL_ARB_transform_feedback_instanced\n#define GL_ARB_transform_feedback_instanced 1\n#endif /* GL_ARB_transform_feedback_instanced */\n\n#ifndef GL_ARB_transpose_matrix\n#define GL_ARB_transpose_matrix 1\n#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);\n#endif\n#endif /* GL_ARB_transpose_matrix */\n\n#ifndef GL_ARB_uniform_buffer_object\n#define GL_ARB_uniform_buffer_object 1\n#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS    0x8A2C\n#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45\n#endif /* GL_ARB_uniform_buffer_object */\n\n#ifndef GL_ARB_vertex_array_bgra\n#define GL_ARB_vertex_array_bgra 1\n#endif /* GL_ARB_vertex_array_bgra */\n\n#ifndef GL_ARB_vertex_array_object\n#define GL_ARB_vertex_array_object 1\n#endif /* GL_ARB_vertex_array_object */\n\n#ifndef GL_ARB_vertex_attrib_64bit\n#define GL_ARB_vertex_attrib_64bit 1\n#endif /* GL_ARB_vertex_attrib_64bit */\n\n#ifndef GL_ARB_vertex_attrib_binding\n#define GL_ARB_vertex_attrib_binding 1\n#endif /* GL_ARB_vertex_attrib_binding */\n\n#ifndef GL_ARB_vertex_blend\n#define GL_ARB_vertex_blend 1\n#define GL_MAX_VERTEX_UNITS_ARB           0x86A4\n#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5\n#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6\n#define GL_VERTEX_BLEND_ARB               0x86A7\n#define GL_CURRENT_WEIGHT_ARB             0x86A8\n#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9\n#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA\n#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB\n#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC\n#define GL_WEIGHT_ARRAY_ARB               0x86AD\n#define GL_MODELVIEW0_ARB                 0x1700\n#define GL_MODELVIEW1_ARB                 0x850A\n#define GL_MODELVIEW2_ARB                 0x8722\n#define GL_MODELVIEW3_ARB                 0x8723\n#define GL_MODELVIEW4_ARB                 0x8724\n#define GL_MODELVIEW5_ARB                 0x8725\n#define GL_MODELVIEW6_ARB                 0x8726\n#define GL_MODELVIEW7_ARB                 0x8727\n#define GL_MODELVIEW8_ARB                 0x8728\n#define GL_MODELVIEW9_ARB                 0x8729\n#define GL_MODELVIEW10_ARB                0x872A\n#define GL_MODELVIEW11_ARB                0x872B\n#define GL_MODELVIEW12_ARB                0x872C\n#define GL_MODELVIEW13_ARB                0x872D\n#define GL_MODELVIEW14_ARB                0x872E\n#define GL_MODELVIEW15_ARB                0x872F\n#define GL_MODELVIEW16_ARB                0x8730\n#define GL_MODELVIEW17_ARB                0x8731\n#define GL_MODELVIEW18_ARB                0x8732\n#define GL_MODELVIEW19_ARB                0x8733\n#define GL_MODELVIEW20_ARB                0x8734\n#define GL_MODELVIEW21_ARB                0x8735\n#define GL_MODELVIEW22_ARB                0x8736\n#define GL_MODELVIEW23_ARB                0x8737\n#define GL_MODELVIEW24_ARB                0x8738\n#define GL_MODELVIEW25_ARB                0x8739\n#define GL_MODELVIEW26_ARB                0x873A\n#define GL_MODELVIEW27_ARB                0x873B\n#define GL_MODELVIEW28_ARB                0x873C\n#define GL_MODELVIEW29_ARB                0x873D\n#define GL_MODELVIEW30_ARB                0x873E\n#define GL_MODELVIEW31_ARB                0x873F\ntypedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);\nGLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);\nGLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);\nGLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);\nGLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);\nGLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);\nGLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);\nGLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);\nGLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glVertexBlendARB (GLint count);\n#endif\n#endif /* GL_ARB_vertex_blend */\n\n#ifndef GL_ARB_vertex_buffer_object\n#define GL_ARB_vertex_buffer_object 1\n#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */\ntypedef long GLsizeiptrARB;\ntypedef long GLintptrARB;\n#else\ntypedef ptrdiff_t GLsizeiptrARB;\ntypedef ptrdiff_t GLintptrARB;\n#endif\n#define GL_BUFFER_SIZE_ARB                0x8764\n#define GL_BUFFER_USAGE_ARB               0x8765\n#define GL_ARRAY_BUFFER_ARB               0x8892\n#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893\n#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895\n#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F\n#define GL_READ_ONLY_ARB                  0x88B8\n#define GL_WRITE_ONLY_ARB                 0x88B9\n#define GL_READ_WRITE_ARB                 0x88BA\n#define GL_BUFFER_ACCESS_ARB              0x88BB\n#define GL_BUFFER_MAPPED_ARB              0x88BC\n#define GL_BUFFER_MAP_POINTER_ARB         0x88BD\n#define GL_STREAM_DRAW_ARB                0x88E0\n#define GL_STREAM_READ_ARB                0x88E1\n#define GL_STREAM_COPY_ARB                0x88E2\n#define GL_STATIC_DRAW_ARB                0x88E4\n#define GL_STATIC_READ_ARB                0x88E5\n#define GL_STATIC_COPY_ARB                0x88E6\n#define GL_DYNAMIC_DRAW_ARB               0x88E8\n#define GL_DYNAMIC_READ_ARB               0x88E9\n#define GL_DYNAMIC_COPY_ARB               0x88EA\ntypedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);\nGLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);\nGLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);\nGLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);\nGLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_ARB_vertex_buffer_object */\n\n#ifndef GL_ARB_vertex_program\n#define GL_ARB_vertex_program 1\n#define GL_COLOR_SUM_ARB                  0x8458\n#define GL_VERTEX_PROGRAM_ARB             0x8620\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625\n#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626\n#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645\n#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A\n#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0\n#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1\n#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2\n#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);\n#endif\n#endif /* GL_ARB_vertex_program */\n\n#ifndef GL_ARB_vertex_shader\n#define GL_ARB_vertex_shader 1\n#define GL_VERTEX_SHADER_ARB              0x8B31\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A\n#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D\n#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89\n#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);\n#endif\n#endif /* GL_ARB_vertex_shader */\n\n#ifndef GL_ARB_vertex_type_10f_11f_11f_rev\n#define GL_ARB_vertex_type_10f_11f_11f_rev 1\n#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */\n\n#ifndef GL_ARB_vertex_type_2_10_10_10_rev\n#define GL_ARB_vertex_type_2_10_10_10_rev 1\n#endif /* GL_ARB_vertex_type_2_10_10_10_rev */\n\n#ifndef GL_ARB_viewport_array\n#define GL_ARB_viewport_array 1\n#endif /* GL_ARB_viewport_array */\n\n#ifndef GL_ARB_window_pos\n#define GL_ARB_window_pos 1\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);\n#endif\n#endif /* GL_ARB_window_pos */\n\n#ifndef GL_KHR_debug\n#define GL_KHR_debug 1\n#endif /* GL_KHR_debug */\n\n#ifndef GL_KHR_texture_compression_astc_hdr\n#define GL_KHR_texture_compression_astc_hdr 1\n#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0\n#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1\n#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2\n#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3\n#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4\n#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5\n#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6\n#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7\n#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8\n#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9\n#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA\n#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB\n#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC\n#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD\n#endif /* GL_KHR_texture_compression_astc_hdr */\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_KHR_texture_compression_astc_ldr 1\n#endif /* GL_KHR_texture_compression_astc_ldr */\n\n#ifndef GL_OES_byte_coordinates\n#define GL_OES_byte_coordinates 1\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);\ntypedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);\ntypedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);\ntypedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);\nGLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);\nGLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord1bOES (GLbyte s);\nGLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);\nGLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex2bOES (GLbyte x);\nGLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);\nGLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);\nGLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);\n#endif\n#endif /* GL_OES_byte_coordinates */\n\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_OES_compressed_paletted_texture 1\n#define GL_PALETTE4_RGB8_OES              0x8B90\n#define GL_PALETTE4_RGBA8_OES             0x8B91\n#define GL_PALETTE4_R5_G6_B5_OES          0x8B92\n#define GL_PALETTE4_RGBA4_OES             0x8B93\n#define GL_PALETTE4_RGB5_A1_OES           0x8B94\n#define GL_PALETTE8_RGB8_OES              0x8B95\n#define GL_PALETTE8_RGBA8_OES             0x8B96\n#define GL_PALETTE8_R5_G6_B5_OES          0x8B97\n#define GL_PALETTE8_RGBA4_OES             0x8B98\n#define GL_PALETTE8_RGB5_A1_OES           0x8B99\n#endif /* GL_OES_compressed_paletted_texture */\n\n#ifndef GL_OES_fixed_point\n#define GL_OES_fixed_point 1\ntypedef GLint GLfixed;\n#define GL_FIXED_OES                      0x140C\ntypedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);\ntypedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);\ntypedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);\ntypedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);\ntypedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);\ntypedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);\ntypedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);\ntypedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);\ntypedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\ntypedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);\ntypedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);\ntypedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);\ntypedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);\ntypedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);\ntypedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);\ntypedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);\ntypedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\ntypedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);\ntypedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);\nGLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearDepthxOES (GLfixed depth);\nGLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);\nGLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);\nGLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);\nGLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glLineWidthxOES (GLfixed width);\nGLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);\nGLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glPointSizexOES (GLfixed size);\nGLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);\nGLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);\nGLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);\nGLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\nGLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);\nGLAPI void APIENTRY glColor3xvOES (const GLfixed *components);\nGLAPI void APIENTRY glColor4xvOES (const GLfixed *components);\nGLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);\nGLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);\nGLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);\nGLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);\nGLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);\nGLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glIndexxOES (GLfixed component);\nGLAPI void APIENTRY glIndexxvOES (const GLfixed *component);\nGLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\nGLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\nGLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);\nGLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\nGLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);\nGLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);\nGLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glPassThroughxOES (GLfixed token);\nGLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);\nGLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);\nGLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);\nGLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\nGLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\nGLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);\nGLAPI void APIENTRY glTexCoord1xOES (GLfixed s);\nGLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);\nGLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glVertex2xOES (GLfixed x);\nGLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);\n#endif\n#endif /* GL_OES_fixed_point */\n\n#ifndef GL_OES_query_matrix\n#define GL_OES_query_matrix 1\ntypedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);\n#endif\n#endif /* GL_OES_query_matrix */\n\n#ifndef GL_OES_read_format\n#define GL_OES_read_format 1\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B\n#endif /* GL_OES_read_format */\n\n#ifndef GL_OES_single_precision\n#define GL_OES_single_precision 1\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);\ntypedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);\ntypedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);\ntypedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClearDepthfOES (GLclampf depth);\nGLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);\nGLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);\nGLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\nGLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);\nGLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\n#endif\n#endif /* GL_OES_single_precision */\n\n#ifndef GL_3DFX_multisample\n#define GL_3DFX_multisample 1\n#define GL_MULTISAMPLE_3DFX               0x86B2\n#define GL_SAMPLE_BUFFERS_3DFX            0x86B3\n#define GL_SAMPLES_3DFX                   0x86B4\n#define GL_MULTISAMPLE_BIT_3DFX           0x20000000\n#endif /* GL_3DFX_multisample */\n\n#ifndef GL_3DFX_tbuffer\n#define GL_3DFX_tbuffer 1\ntypedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);\n#endif\n#endif /* GL_3DFX_tbuffer */\n\n#ifndef GL_3DFX_texture_compression_FXT1\n#define GL_3DFX_texture_compression_FXT1 1\n#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0\n#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1\n#endif /* GL_3DFX_texture_compression_FXT1 */\n\n#ifndef GL_AMD_blend_minmax_factor\n#define GL_AMD_blend_minmax_factor 1\n#define GL_FACTOR_MIN_AMD                 0x901C\n#define GL_FACTOR_MAX_AMD                 0x901D\n#endif /* GL_AMD_blend_minmax_factor */\n\n#ifndef GL_AMD_conservative_depth\n#define GL_AMD_conservative_depth 1\n#endif /* GL_AMD_conservative_depth */\n\n#ifndef GL_AMD_debug_output\n#define GL_AMD_debug_output 1\ntypedef void (APIENTRY  *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_AMD      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_AMD        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_AMD      0x9147\n#define GL_DEBUG_SEVERITY_LOW_AMD         0x9148\n#define GL_DEBUG_CATEGORY_API_ERROR_AMD   0x9149\n#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A\n#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B\n#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C\n#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D\n#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E\n#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F\n#define GL_DEBUG_CATEGORY_OTHER_AMD       0x9150\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#endif\n#endif /* GL_AMD_debug_output */\n\n#ifndef GL_AMD_depth_clamp_separate\n#define GL_AMD_depth_clamp_separate 1\n#define GL_DEPTH_CLAMP_NEAR_AMD           0x901E\n#define GL_DEPTH_CLAMP_FAR_AMD            0x901F\n#endif /* GL_AMD_depth_clamp_separate */\n\n#ifndef GL_AMD_draw_buffers_blend\n#define GL_AMD_draw_buffers_blend 1\ntypedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#endif\n#endif /* GL_AMD_draw_buffers_blend */\n\n#ifndef GL_AMD_gcn_shader\n#define GL_AMD_gcn_shader 1\n#endif /* GL_AMD_gcn_shader */\n\n#ifndef GL_AMD_gpu_shader_int64\n#define GL_AMD_gpu_shader_int64 1\ntypedef int64_t GLint64EXT;\n#define GL_INT64_NV                       0x140E\n#define GL_UNSIGNED_INT64_NV              0x140F\n#define GL_INT8_NV                        0x8FE0\n#define GL_INT8_VEC2_NV                   0x8FE1\n#define GL_INT8_VEC3_NV                   0x8FE2\n#define GL_INT8_VEC4_NV                   0x8FE3\n#define GL_INT16_NV                       0x8FE4\n#define GL_INT16_VEC2_NV                  0x8FE5\n#define GL_INT16_VEC3_NV                  0x8FE6\n#define GL_INT16_VEC4_NV                  0x8FE7\n#define GL_INT64_VEC2_NV                  0x8FE9\n#define GL_INT64_VEC3_NV                  0x8FEA\n#define GL_INT64_VEC4_NV                  0x8FEB\n#define GL_UNSIGNED_INT8_NV               0x8FEC\n#define GL_UNSIGNED_INT8_VEC2_NV          0x8FED\n#define GL_UNSIGNED_INT8_VEC3_NV          0x8FEE\n#define GL_UNSIGNED_INT8_VEC4_NV          0x8FEF\n#define GL_UNSIGNED_INT16_NV              0x8FF0\n#define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1\n#define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2\n#define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3\n#define GL_UNSIGNED_INT64_VEC2_NV         0x8FF5\n#define GL_UNSIGNED_INT64_VEC3_NV         0x8FF6\n#define GL_UNSIGNED_INT64_VEC4_NV         0x8FF7\n#define GL_FLOAT16_NV                     0x8FF8\n#define GL_FLOAT16_VEC2_NV                0x8FF9\n#define GL_FLOAT16_VEC3_NV                0x8FFA\n#define GL_FLOAT16_VEC4_NV                0x8FFB\ntypedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);\nGLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);\nGLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);\nGLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);\nGLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n#endif /* GL_AMD_gpu_shader_int64 */\n\n#ifndef GL_AMD_interleaved_elements\n#define GL_AMD_interleaved_elements 1\n#define GL_VERTEX_ELEMENT_SWIZZLE_AMD     0x91A4\n#define GL_VERTEX_ID_SWIZZLE_AMD          0x91A5\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);\n#endif\n#endif /* GL_AMD_interleaved_elements */\n\n#ifndef GL_AMD_multi_draw_indirect\n#define GL_AMD_multi_draw_indirect 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);\n#endif\n#endif /* GL_AMD_multi_draw_indirect */\n\n#ifndef GL_AMD_name_gen_delete\n#define GL_AMD_name_gen_delete 1\n#define GL_DATA_BUFFER_AMD                0x9151\n#define GL_PERFORMANCE_MONITOR_AMD        0x9152\n#define GL_QUERY_OBJECT_AMD               0x9153\n#define GL_VERTEX_ARRAY_OBJECT_AMD        0x9154\n#define GL_SAMPLER_OBJECT_AMD             0x9155\ntypedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);\ntypedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);\nGLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);\nGLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);\n#endif\n#endif /* GL_AMD_name_gen_delete */\n\n#ifndef GL_AMD_occlusion_query_event\n#define GL_AMD_occlusion_query_event 1\n#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F\n#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001\n#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002\n#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004\n#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008\n#define GL_QUERY_ALL_EVENT_BITS_AMD       0xFFFFFFFF\ntypedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);\n#endif\n#endif /* GL_AMD_occlusion_query_event */\n\n#ifndef GL_AMD_performance_monitor\n#define GL_AMD_performance_monitor 1\n#define GL_COUNTER_TYPE_AMD               0x8BC0\n#define GL_COUNTER_RANGE_AMD              0x8BC1\n#define GL_UNSIGNED_INT64_AMD             0x8BC2\n#define GL_PERCENTAGE_AMD                 0x8BC3\n#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4\n#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5\n#define GL_PERFMON_RESULT_AMD             0x8BC6\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);\ntypedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\ntypedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\nGLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\nGLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\nGLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\nGLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);\nGLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\nGLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\n#endif /* GL_AMD_performance_monitor */\n\n#ifndef GL_AMD_pinned_memory\n#define GL_AMD_pinned_memory 1\n#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160\n#endif /* GL_AMD_pinned_memory */\n\n#ifndef GL_AMD_query_buffer_object\n#define GL_AMD_query_buffer_object 1\n#define GL_QUERY_BUFFER_AMD               0x9192\n#define GL_QUERY_BUFFER_BINDING_AMD       0x9193\n#define GL_QUERY_RESULT_NO_WAIT_AMD       0x9194\n#endif /* GL_AMD_query_buffer_object */\n\n#ifndef GL_AMD_sample_positions\n#define GL_AMD_sample_positions 1\n#define GL_SUBSAMPLE_DISTANCE_AMD         0x883F\ntypedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);\n#endif\n#endif /* GL_AMD_sample_positions */\n\n#ifndef GL_AMD_seamless_cubemap_per_texture\n#define GL_AMD_seamless_cubemap_per_texture 1\n#endif /* GL_AMD_seamless_cubemap_per_texture */\n\n#ifndef GL_AMD_shader_atomic_counter_ops\n#define GL_AMD_shader_atomic_counter_ops 1\n#endif /* GL_AMD_shader_atomic_counter_ops */\n\n#ifndef GL_AMD_shader_stencil_export\n#define GL_AMD_shader_stencil_export 1\n#endif /* GL_AMD_shader_stencil_export */\n\n#ifndef GL_AMD_shader_trinary_minmax\n#define GL_AMD_shader_trinary_minmax 1\n#endif /* GL_AMD_shader_trinary_minmax */\n\n#ifndef GL_AMD_sparse_texture\n#define GL_AMD_sparse_texture 1\n#define GL_VIRTUAL_PAGE_SIZE_X_AMD        0x9195\n#define GL_VIRTUAL_PAGE_SIZE_Y_AMD        0x9196\n#define GL_VIRTUAL_PAGE_SIZE_Z_AMD        0x9197\n#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD    0x9198\n#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199\n#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A\n#define GL_MIN_SPARSE_LEVEL_AMD           0x919B\n#define GL_MIN_LOD_WARNING_AMD            0x919C\n#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001\ntypedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\nGLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#endif\n#endif /* GL_AMD_sparse_texture */\n\n#ifndef GL_AMD_stencil_operation_extended\n#define GL_AMD_stencil_operation_extended 1\n#define GL_SET_AMD                        0x874A\n#define GL_REPLACE_VALUE_AMD              0x874B\n#define GL_STENCIL_OP_VALUE_AMD           0x874C\n#define GL_STENCIL_BACK_OP_VALUE_AMD      0x874D\ntypedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);\n#endif\n#endif /* GL_AMD_stencil_operation_extended */\n\n#ifndef GL_AMD_texture_texture4\n#define GL_AMD_texture_texture4 1\n#endif /* GL_AMD_texture_texture4 */\n\n#ifndef GL_AMD_transform_feedback3_lines_triangles\n#define GL_AMD_transform_feedback3_lines_triangles 1\n#endif /* GL_AMD_transform_feedback3_lines_triangles */\n\n#ifndef GL_AMD_transform_feedback4\n#define GL_AMD_transform_feedback4 1\n#define GL_STREAM_RASTERIZATION_AMD       0x91A0\n#endif /* GL_AMD_transform_feedback4 */\n\n#ifndef GL_AMD_vertex_shader_layer\n#define GL_AMD_vertex_shader_layer 1\n#endif /* GL_AMD_vertex_shader_layer */\n\n#ifndef GL_AMD_vertex_shader_tessellator\n#define GL_AMD_vertex_shader_tessellator 1\n#define GL_SAMPLER_BUFFER_AMD             0x9001\n#define GL_INT_SAMPLER_BUFFER_AMD         0x9002\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003\n#define GL_TESSELLATION_MODE_AMD          0x9004\n#define GL_TESSELLATION_FACTOR_AMD        0x9005\n#define GL_DISCRETE_AMD                   0x9006\n#define GL_CONTINUOUS_AMD                 0x9007\ntypedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);\nGLAPI void APIENTRY glTessellationModeAMD (GLenum mode);\n#endif\n#endif /* GL_AMD_vertex_shader_tessellator */\n\n#ifndef GL_AMD_vertex_shader_viewport_index\n#define GL_AMD_vertex_shader_viewport_index 1\n#endif /* GL_AMD_vertex_shader_viewport_index */\n\n#ifndef GL_APPLE_aux_depth_stencil\n#define GL_APPLE_aux_depth_stencil 1\n#define GL_AUX_DEPTH_STENCIL_APPLE        0x8A14\n#endif /* GL_APPLE_aux_depth_stencil */\n\n#ifndef GL_APPLE_client_storage\n#define GL_APPLE_client_storage 1\n#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2\n#endif /* GL_APPLE_client_storage */\n\n#ifndef GL_APPLE_element_array\n#define GL_APPLE_element_array 1\n#define GL_ELEMENT_ARRAY_APPLE            0x8A0C\n#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8A0D\n#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x8A0E\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);\nGLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\nGLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#endif\n#endif /* GL_APPLE_element_array */\n\n#ifndef GL_APPLE_fence\n#define GL_APPLE_fence 1\n#define GL_DRAW_PIXELS_APPLE              0x8A0A\n#define GL_FENCE_APPLE                    0x8A0B\ntypedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);\ntypedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);\ntypedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);\nGLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);\nGLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);\nGLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);\n#endif\n#endif /* GL_APPLE_fence */\n\n#ifndef GL_APPLE_float_pixels\n#define GL_APPLE_float_pixels 1\n#define GL_HALF_APPLE                     0x140B\n#define GL_RGBA_FLOAT32_APPLE             0x8814\n#define GL_RGB_FLOAT32_APPLE              0x8815\n#define GL_ALPHA_FLOAT32_APPLE            0x8816\n#define GL_INTENSITY_FLOAT32_APPLE        0x8817\n#define GL_LUMINANCE_FLOAT32_APPLE        0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE  0x8819\n#define GL_RGBA_FLOAT16_APPLE             0x881A\n#define GL_RGB_FLOAT16_APPLE              0x881B\n#define GL_ALPHA_FLOAT16_APPLE            0x881C\n#define GL_INTENSITY_FLOAT16_APPLE        0x881D\n#define GL_LUMINANCE_FLOAT16_APPLE        0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE  0x881F\n#define GL_COLOR_FLOAT_APPLE              0x8A0F\n#endif /* GL_APPLE_float_pixels */\n\n#ifndef GL_APPLE_flush_buffer_range\n#define GL_APPLE_flush_buffer_range 1\n#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12\n#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13\ntypedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);\n#endif\n#endif /* GL_APPLE_flush_buffer_range */\n\n#ifndef GL_APPLE_object_purgeable\n#define GL_APPLE_object_purgeable 1\n#define GL_BUFFER_OBJECT_APPLE            0x85B3\n#define GL_RELEASED_APPLE                 0x8A19\n#define GL_VOLATILE_APPLE                 0x8A1A\n#define GL_RETAINED_APPLE                 0x8A1B\n#define GL_UNDEFINED_APPLE                0x8A1C\n#define GL_PURGEABLE_APPLE                0x8A1D\ntypedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#endif\n#endif /* GL_APPLE_object_purgeable */\n\n#ifndef GL_APPLE_rgb_422\n#define GL_APPLE_rgb_422 1\n#define GL_RGB_422_APPLE                  0x8A1F\n#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB\n#define GL_RGB_RAW_422_APPLE              0x8A51\n#endif /* GL_APPLE_rgb_422 */\n\n#ifndef GL_APPLE_row_bytes\n#define GL_APPLE_row_bytes 1\n#define GL_PACK_ROW_BYTES_APPLE           0x8A15\n#define GL_UNPACK_ROW_BYTES_APPLE         0x8A16\n#endif /* GL_APPLE_row_bytes */\n\n#ifndef GL_APPLE_specular_vector\n#define GL_APPLE_specular_vector 1\n#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0\n#endif /* GL_APPLE_specular_vector */\n\n#ifndef GL_APPLE_texture_range\n#define GL_APPLE_texture_range 1\n#define GL_TEXTURE_RANGE_LENGTH_APPLE     0x85B7\n#define GL_TEXTURE_RANGE_POINTER_APPLE    0x85B8\n#define GL_TEXTURE_STORAGE_HINT_APPLE     0x85BC\n#define GL_STORAGE_PRIVATE_APPLE          0x85BD\n#define GL_STORAGE_CACHED_APPLE           0x85BE\n#define GL_STORAGE_SHARED_APPLE           0x85BF\ntypedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);\nGLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_APPLE_texture_range */\n\n#ifndef GL_APPLE_transform_hint\n#define GL_APPLE_transform_hint 1\n#define GL_TRANSFORM_HINT_APPLE           0x85B1\n#endif /* GL_APPLE_transform_hint */\n\n#ifndef GL_APPLE_vertex_array_object\n#define GL_APPLE_vertex_array_object 1\n#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);\n#endif\n#endif /* GL_APPLE_vertex_array_object */\n\n#ifndef GL_APPLE_vertex_array_range\n#define GL_APPLE_vertex_array_range 1\n#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E\n#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F\n#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521\n#define GL_STORAGE_CLIENT_APPLE           0x85B4\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);\nGLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);\nGLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);\n#endif\n#endif /* GL_APPLE_vertex_array_range */\n\n#ifndef GL_APPLE_vertex_program_evaluators\n#define GL_APPLE_vertex_program_evaluators 1\n#define GL_VERTEX_ATTRIB_MAP1_APPLE       0x8A00\n#define GL_VERTEX_ATTRIB_MAP2_APPLE       0x8A01\n#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE  0x8A02\n#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03\n#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04\n#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05\n#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE  0x8A06\n#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07\n#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08\n#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\nGLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#endif\n#endif /* GL_APPLE_vertex_program_evaluators */\n\n#ifndef GL_APPLE_ycbcr_422\n#define GL_APPLE_ycbcr_422 1\n#define GL_YCBCR_422_APPLE                0x85B9\n#endif /* GL_APPLE_ycbcr_422 */\n\n#ifndef GL_ATI_draw_buffers\n#define GL_ATI_draw_buffers 1\n#define GL_MAX_DRAW_BUFFERS_ATI           0x8824\n#define GL_DRAW_BUFFER0_ATI               0x8825\n#define GL_DRAW_BUFFER1_ATI               0x8826\n#define GL_DRAW_BUFFER2_ATI               0x8827\n#define GL_DRAW_BUFFER3_ATI               0x8828\n#define GL_DRAW_BUFFER4_ATI               0x8829\n#define GL_DRAW_BUFFER5_ATI               0x882A\n#define GL_DRAW_BUFFER6_ATI               0x882B\n#define GL_DRAW_BUFFER7_ATI               0x882C\n#define GL_DRAW_BUFFER8_ATI               0x882D\n#define GL_DRAW_BUFFER9_ATI               0x882E\n#define GL_DRAW_BUFFER10_ATI              0x882F\n#define GL_DRAW_BUFFER11_ATI              0x8830\n#define GL_DRAW_BUFFER12_ATI              0x8831\n#define GL_DRAW_BUFFER13_ATI              0x8832\n#define GL_DRAW_BUFFER14_ATI              0x8833\n#define GL_DRAW_BUFFER15_ATI              0x8834\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);\n#endif\n#endif /* GL_ATI_draw_buffers */\n\n#ifndef GL_ATI_element_array\n#define GL_ATI_element_array 1\n#define GL_ELEMENT_ARRAY_ATI              0x8768\n#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769\n#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);\nGLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#endif\n#endif /* GL_ATI_element_array */\n\n#ifndef GL_ATI_envmap_bumpmap\n#define GL_ATI_envmap_bumpmap 1\n#define GL_BUMP_ROT_MATRIX_ATI            0x8775\n#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776\n#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777\n#define GL_BUMP_TEX_UNITS_ATI             0x8778\n#define GL_DUDV_ATI                       0x8779\n#define GL_DU8DV8_ATI                     0x877A\n#define GL_BUMP_ENVMAP_ATI                0x877B\n#define GL_BUMP_TARGET_ATI                0x877C\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);\nGLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);\n#endif\n#endif /* GL_ATI_envmap_bumpmap */\n\n#ifndef GL_ATI_fragment_shader\n#define GL_ATI_fragment_shader 1\n#define GL_FRAGMENT_SHADER_ATI            0x8920\n#define GL_REG_0_ATI                      0x8921\n#define GL_REG_1_ATI                      0x8922\n#define GL_REG_2_ATI                      0x8923\n#define GL_REG_3_ATI                      0x8924\n#define GL_REG_4_ATI                      0x8925\n#define GL_REG_5_ATI                      0x8926\n#define GL_REG_6_ATI                      0x8927\n#define GL_REG_7_ATI                      0x8928\n#define GL_REG_8_ATI                      0x8929\n#define GL_REG_9_ATI                      0x892A\n#define GL_REG_10_ATI                     0x892B\n#define GL_REG_11_ATI                     0x892C\n#define GL_REG_12_ATI                     0x892D\n#define GL_REG_13_ATI                     0x892E\n#define GL_REG_14_ATI                     0x892F\n#define GL_REG_15_ATI                     0x8930\n#define GL_REG_16_ATI                     0x8931\n#define GL_REG_17_ATI                     0x8932\n#define GL_REG_18_ATI                     0x8933\n#define GL_REG_19_ATI                     0x8934\n#define GL_REG_20_ATI                     0x8935\n#define GL_REG_21_ATI                     0x8936\n#define GL_REG_22_ATI                     0x8937\n#define GL_REG_23_ATI                     0x8938\n#define GL_REG_24_ATI                     0x8939\n#define GL_REG_25_ATI                     0x893A\n#define GL_REG_26_ATI                     0x893B\n#define GL_REG_27_ATI                     0x893C\n#define GL_REG_28_ATI                     0x893D\n#define GL_REG_29_ATI                     0x893E\n#define GL_REG_30_ATI                     0x893F\n#define GL_REG_31_ATI                     0x8940\n#define GL_CON_0_ATI                      0x8941\n#define GL_CON_1_ATI                      0x8942\n#define GL_CON_2_ATI                      0x8943\n#define GL_CON_3_ATI                      0x8944\n#define GL_CON_4_ATI                      0x8945\n#define GL_CON_5_ATI                      0x8946\n#define GL_CON_6_ATI                      0x8947\n#define GL_CON_7_ATI                      0x8948\n#define GL_CON_8_ATI                      0x8949\n#define GL_CON_9_ATI                      0x894A\n#define GL_CON_10_ATI                     0x894B\n#define GL_CON_11_ATI                     0x894C\n#define GL_CON_12_ATI                     0x894D\n#define GL_CON_13_ATI                     0x894E\n#define GL_CON_14_ATI                     0x894F\n#define GL_CON_15_ATI                     0x8950\n#define GL_CON_16_ATI                     0x8951\n#define GL_CON_17_ATI                     0x8952\n#define GL_CON_18_ATI                     0x8953\n#define GL_CON_19_ATI                     0x8954\n#define GL_CON_20_ATI                     0x8955\n#define GL_CON_21_ATI                     0x8956\n#define GL_CON_22_ATI                     0x8957\n#define GL_CON_23_ATI                     0x8958\n#define GL_CON_24_ATI                     0x8959\n#define GL_CON_25_ATI                     0x895A\n#define GL_CON_26_ATI                     0x895B\n#define GL_CON_27_ATI                     0x895C\n#define GL_CON_28_ATI                     0x895D\n#define GL_CON_29_ATI                     0x895E\n#define GL_CON_30_ATI                     0x895F\n#define GL_CON_31_ATI                     0x8960\n#define GL_MOV_ATI                        0x8961\n#define GL_ADD_ATI                        0x8963\n#define GL_MUL_ATI                        0x8964\n#define GL_SUB_ATI                        0x8965\n#define GL_DOT3_ATI                       0x8966\n#define GL_DOT4_ATI                       0x8967\n#define GL_MAD_ATI                        0x8968\n#define GL_LERP_ATI                       0x8969\n#define GL_CND_ATI                        0x896A\n#define GL_CND0_ATI                       0x896B\n#define GL_DOT2_ADD_ATI                   0x896C\n#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D\n#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E\n#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F\n#define GL_NUM_PASSES_ATI                 0x8970\n#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971\n#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972\n#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973\n#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974\n#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975\n#define GL_SWIZZLE_STR_ATI                0x8976\n#define GL_SWIZZLE_STQ_ATI                0x8977\n#define GL_SWIZZLE_STR_DR_ATI             0x8978\n#define GL_SWIZZLE_STQ_DQ_ATI             0x8979\n#define GL_SWIZZLE_STRQ_ATI               0x897A\n#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B\n#define GL_RED_BIT_ATI                    0x00000001\n#define GL_GREEN_BIT_ATI                  0x00000002\n#define GL_BLUE_BIT_ATI                   0x00000004\n#define GL_2X_BIT_ATI                     0x00000001\n#define GL_4X_BIT_ATI                     0x00000002\n#define GL_8X_BIT_ATI                     0x00000004\n#define GL_HALF_BIT_ATI                   0x00000008\n#define GL_QUARTER_BIT_ATI                0x00000010\n#define GL_EIGHTH_BIT_ATI                 0x00000020\n#define GL_SATURATE_BIT_ATI               0x00000040\n#define GL_COMP_BIT_ATI                   0x00000002\n#define GL_NEGATE_BIT_ATI                 0x00000004\n#define GL_BIAS_BIT_ATI                   0x00000008\ntypedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);\nGLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glBeginFragmentShaderATI (void);\nGLAPI void APIENTRY glEndFragmentShaderATI (void);\nGLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);\nGLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);\nGLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);\n#endif\n#endif /* GL_ATI_fragment_shader */\n\n#ifndef GL_ATI_map_object_buffer\n#define GL_ATI_map_object_buffer 1\ntypedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);\n#endif\n#endif /* GL_ATI_map_object_buffer */\n\n#ifndef GL_ATI_meminfo\n#define GL_ATI_meminfo 1\n#define GL_VBO_FREE_MEMORY_ATI            0x87FB\n#define GL_TEXTURE_FREE_MEMORY_ATI        0x87FC\n#define GL_RENDERBUFFER_FREE_MEMORY_ATI   0x87FD\n#endif /* GL_ATI_meminfo */\n\n#ifndef GL_ATI_pixel_format_float\n#define GL_ATI_pixel_format_float 1\n#define GL_RGBA_FLOAT_MODE_ATI            0x8820\n#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835\n#endif /* GL_ATI_pixel_format_float */\n\n#ifndef GL_ATI_pn_triangles\n#define GL_ATI_pn_triangles 1\n#define GL_PN_TRIANGLES_ATI               0x87F0\n#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1\n#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2\n#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3\n#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4\n#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5\n#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6\n#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7\n#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8\ntypedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);\n#endif\n#endif /* GL_ATI_pn_triangles */\n\n#ifndef GL_ATI_separate_stencil\n#define GL_ATI_separate_stencil 1\n#define GL_STENCIL_BACK_FUNC_ATI          0x8800\n#define GL_STENCIL_BACK_FAIL_ATI          0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#endif\n#endif /* GL_ATI_separate_stencil */\n\n#ifndef GL_ATI_text_fragment_shader\n#define GL_ATI_text_fragment_shader 1\n#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200\n#endif /* GL_ATI_text_fragment_shader */\n\n#ifndef GL_ATI_texture_env_combine3\n#define GL_ATI_texture_env_combine3 1\n#define GL_MODULATE_ADD_ATI               0x8744\n#define GL_MODULATE_SIGNED_ADD_ATI        0x8745\n#define GL_MODULATE_SUBTRACT_ATI          0x8746\n#endif /* GL_ATI_texture_env_combine3 */\n\n#ifndef GL_ATI_texture_float\n#define GL_ATI_texture_float 1\n#define GL_RGBA_FLOAT32_ATI               0x8814\n#define GL_RGB_FLOAT32_ATI                0x8815\n#define GL_ALPHA_FLOAT32_ATI              0x8816\n#define GL_INTENSITY_FLOAT32_ATI          0x8817\n#define GL_LUMINANCE_FLOAT32_ATI          0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819\n#define GL_RGBA_FLOAT16_ATI               0x881A\n#define GL_RGB_FLOAT16_ATI                0x881B\n#define GL_ALPHA_FLOAT16_ATI              0x881C\n#define GL_INTENSITY_FLOAT16_ATI          0x881D\n#define GL_LUMINANCE_FLOAT16_ATI          0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F\n#endif /* GL_ATI_texture_float */\n\n#ifndef GL_ATI_texture_mirror_once\n#define GL_ATI_texture_mirror_once 1\n#define GL_MIRROR_CLAMP_ATI               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743\n#endif /* GL_ATI_texture_mirror_once */\n\n#ifndef GL_ATI_vertex_array_object\n#define GL_ATI_vertex_array_object 1\n#define GL_STATIC_ATI                     0x8760\n#define GL_DYNAMIC_ATI                    0x8761\n#define GL_PRESERVE_ATI                   0x8762\n#define GL_DISCARD_ATI                    0x8763\n#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764\n#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765\n#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766\n#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767\ntypedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);\ntypedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);\nGLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);\nGLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);\nGLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ATI_vertex_array_object */\n\n#ifndef GL_ATI_vertex_attrib_array_object\n#define GL_ATI_vertex_attrib_array_object 1\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ATI_vertex_attrib_array_object */\n\n#ifndef GL_ATI_vertex_streams\n#define GL_ATI_vertex_streams 1\n#define GL_MAX_VERTEX_STREAMS_ATI         0x876B\n#define GL_VERTEX_STREAM0_ATI             0x876C\n#define GL_VERTEX_STREAM1_ATI             0x876D\n#define GL_VERTEX_STREAM2_ATI             0x876E\n#define GL_VERTEX_STREAM3_ATI             0x876F\n#define GL_VERTEX_STREAM4_ATI             0x8770\n#define GL_VERTEX_STREAM5_ATI             0x8771\n#define GL_VERTEX_STREAM6_ATI             0x8772\n#define GL_VERTEX_STREAM7_ATI             0x8773\n#define GL_VERTEX_SOURCE_ATI              0x8774\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);\nGLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);\nGLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);\nGLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);\nGLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);\nGLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\nGLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);\nGLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\nGLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);\nGLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\nGLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\nGLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);\nGLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);\n#endif\n#endif /* GL_ATI_vertex_streams */\n\n#ifndef GL_EXT_422_pixels\n#define GL_EXT_422_pixels 1\n#define GL_422_EXT                        0x80CC\n#define GL_422_REV_EXT                    0x80CD\n#define GL_422_AVERAGE_EXT                0x80CE\n#define GL_422_REV_AVERAGE_EXT            0x80CF\n#endif /* GL_EXT_422_pixels */\n\n#ifndef GL_EXT_abgr\n#define GL_EXT_abgr 1\n#define GL_ABGR_EXT                       0x8000\n#endif /* GL_EXT_abgr */\n\n#ifndef GL_EXT_bgra\n#define GL_EXT_bgra 1\n#define GL_BGR_EXT                        0x80E0\n#define GL_BGRA_EXT                       0x80E1\n#endif /* GL_EXT_bgra */\n\n#ifndef GL_EXT_bindable_uniform\n#define GL_EXT_bindable_uniform 1\n#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2\n#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3\n#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4\n#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED\n#define GL_UNIFORM_BUFFER_EXT             0x8DEE\n#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF\ntypedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);\ntypedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);\nGLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);\nGLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);\n#endif\n#endif /* GL_EXT_bindable_uniform */\n\n#ifndef GL_EXT_blend_color\n#define GL_EXT_blend_color 1\n#define GL_CONSTANT_COLOR_EXT             0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002\n#define GL_CONSTANT_ALPHA_EXT             0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004\n#define GL_BLEND_COLOR_EXT                0x8005\ntypedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#endif\n#endif /* GL_EXT_blend_color */\n\n#ifndef GL_EXT_blend_equation_separate\n#define GL_EXT_blend_equation_separate 1\n#define GL_BLEND_EQUATION_RGB_EXT         0x8009\n#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);\n#endif\n#endif /* GL_EXT_blend_equation_separate */\n\n#ifndef GL_EXT_blend_func_separate\n#define GL_EXT_blend_func_separate 1\n#define GL_BLEND_DST_RGB_EXT              0x80C8\n#define GL_BLEND_SRC_RGB_EXT              0x80C9\n#define GL_BLEND_DST_ALPHA_EXT            0x80CA\n#define GL_BLEND_SRC_ALPHA_EXT            0x80CB\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n#endif /* GL_EXT_blend_func_separate */\n\n#ifndef GL_EXT_blend_logic_op\n#define GL_EXT_blend_logic_op 1\n#endif /* GL_EXT_blend_logic_op */\n\n#ifndef GL_EXT_blend_minmax\n#define GL_EXT_blend_minmax 1\n#define GL_MIN_EXT                        0x8007\n#define GL_MAX_EXT                        0x8008\n#define GL_FUNC_ADD_EXT                   0x8006\n#define GL_BLEND_EQUATION_EXT             0x8009\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_blend_minmax */\n\n#ifndef GL_EXT_blend_subtract\n#define GL_EXT_blend_subtract 1\n#define GL_FUNC_SUBTRACT_EXT              0x800A\n#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B\n#endif /* GL_EXT_blend_subtract */\n\n#ifndef GL_EXT_clip_volume_hint\n#define GL_EXT_clip_volume_hint 1\n#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0\n#endif /* GL_EXT_clip_volume_hint */\n\n#ifndef GL_EXT_cmyka\n#define GL_EXT_cmyka 1\n#define GL_CMYK_EXT                       0x800C\n#define GL_CMYKA_EXT                      0x800D\n#define GL_PACK_CMYK_HINT_EXT             0x800E\n#define GL_UNPACK_CMYK_HINT_EXT           0x800F\n#endif /* GL_EXT_cmyka */\n\n#ifndef GL_EXT_color_subtable\n#define GL_EXT_color_subtable 1\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#endif\n#endif /* GL_EXT_color_subtable */\n\n#ifndef GL_EXT_compiled_vertex_array\n#define GL_EXT_compiled_vertex_array 1\n#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8\n#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9\ntypedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);\nGLAPI void APIENTRY glUnlockArraysEXT (void);\n#endif\n#endif /* GL_EXT_compiled_vertex_array */\n\n#ifndef GL_EXT_convolution\n#define GL_EXT_convolution 1\n#define GL_CONVOLUTION_1D_EXT             0x8010\n#define GL_CONVOLUTION_2D_EXT             0x8011\n#define GL_SEPARABLE_2D_EXT               0x8012\n#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013\n#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014\n#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015\n#define GL_REDUCE_EXT                     0x8016\n#define GL_CONVOLUTION_FORMAT_EXT         0x8017\n#define GL_CONVOLUTION_WIDTH_EXT          0x8018\n#define GL_CONVOLUTION_HEIGHT_EXT         0x8019\n#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);\nGLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\nGLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\n#endif\n#endif /* GL_EXT_convolution */\n\n#ifndef GL_EXT_coordinate_frame\n#define GL_EXT_coordinate_frame 1\n#define GL_TANGENT_ARRAY_EXT              0x8439\n#define GL_BINORMAL_ARRAY_EXT             0x843A\n#define GL_CURRENT_TANGENT_EXT            0x843B\n#define GL_CURRENT_BINORMAL_EXT           0x843C\n#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E\n#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F\n#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440\n#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441\n#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442\n#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443\n#define GL_MAP1_TANGENT_EXT               0x8444\n#define GL_MAP2_TANGENT_EXT               0x8445\n#define GL_MAP1_BINORMAL_EXT              0x8446\n#define GL_MAP2_BINORMAL_EXT              0x8447\ntypedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);\ntypedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);\ntypedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);\ntypedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);\ntypedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);\ntypedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);\nGLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);\nGLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);\nGLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);\nGLAPI void APIENTRY glTangent3ivEXT (const GLint *v);\nGLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);\nGLAPI void APIENTRY glTangent3svEXT (const GLshort *v);\nGLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);\nGLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);\nGLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);\nGLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);\nGLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);\nGLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);\nGLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);\nGLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_coordinate_frame */\n\n#ifndef GL_EXT_copy_texture\n#define GL_EXT_copy_texture 1\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_EXT_copy_texture */\n\n#ifndef GL_EXT_cull_vertex\n#define GL_EXT_cull_vertex 1\n#define GL_CULL_VERTEX_EXT                0x81AA\n#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB\n#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC\ntypedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_cull_vertex */\n\n#ifndef GL_EXT_debug_label\n#define GL_EXT_debug_label 1\n#define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F\n#define GL_PROGRAM_OBJECT_EXT             0x8B40\n#define GL_SHADER_OBJECT_EXT              0x8B48\n#define GL_BUFFER_OBJECT_EXT              0x9151\n#define GL_QUERY_OBJECT_EXT               0x9153\n#define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154\ntypedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n#endif /* GL_EXT_debug_label */\n\n#ifndef GL_EXT_debug_marker\n#define GL_EXT_debug_marker 1\ntypedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);\nGLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);\nGLAPI void APIENTRY glPopGroupMarkerEXT (void);\n#endif\n#endif /* GL_EXT_debug_marker */\n\n#ifndef GL_EXT_depth_bounds_test\n#define GL_EXT_depth_bounds_test 1\n#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890\n#define GL_DEPTH_BOUNDS_EXT               0x8891\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);\n#endif\n#endif /* GL_EXT_depth_bounds_test */\n\n#ifndef GL_EXT_direct_state_access\n#define GL_EXT_direct_state_access 1\n#define GL_PROGRAM_MATRIX_EXT             0x8E2D\n#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT   0x8E2E\n#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F\ntypedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);\ntypedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);\ntypedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\ntypedef 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 void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\ntypedef 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 void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);\ntypedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);\ntypedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\ntypedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);\ntypedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixPopEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixPushEXT (GLenum mode);\nGLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\nGLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);\nGLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\nGLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\nGLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\nGLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\nGLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);\nGLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);\nGLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);\nGLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);\nGLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);\nGLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);\nGLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);\nGLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);\nGLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);\nGLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);\nGLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);\nGLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);\nGLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);\nGLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);\nGLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);\nGLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\nGLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\nGLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);\nGLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);\nGLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);\nGLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);\nGLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);\nGLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);\nGLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);\nGLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);\nGLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);\nGLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\nGLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);\n#endif\n#endif /* GL_EXT_direct_state_access */\n\n#ifndef GL_EXT_draw_buffers2\n#define GL_EXT_draw_buffers2 1\ntypedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\n#endif\n#endif /* GL_EXT_draw_buffers2 */\n\n#ifndef GL_EXT_draw_instanced\n#define GL_EXT_draw_instanced 1\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#endif\n#endif /* GL_EXT_draw_instanced */\n\n#ifndef GL_EXT_draw_range_elements\n#define GL_EXT_draw_range_elements 1\n#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8\n#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\n#endif\n#endif /* GL_EXT_draw_range_elements */\n\n#ifndef GL_EXT_fog_coord\n#define GL_EXT_fog_coord 1\n#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450\n#define GL_FOG_COORDINATE_EXT             0x8451\n#define GL_FRAGMENT_DEPTH_EXT             0x8452\n#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456\n#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457\ntypedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_fog_coord */\n\n#ifndef GL_EXT_framebuffer_blit\n#define GL_EXT_framebuffer_blit 1\n#define GL_READ_FRAMEBUFFER_EXT           0x8CA8\n#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n#endif /* GL_EXT_framebuffer_blit */\n\n#ifndef GL_EXT_framebuffer_multisample\n#define GL_EXT_framebuffer_multisample 1\n#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56\n#define GL_MAX_SAMPLES_EXT                0x8D57\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_EXT_framebuffer_multisample */\n\n#ifndef GL_EXT_framebuffer_multisample_blit_scaled\n#define GL_EXT_framebuffer_multisample_blit_scaled 1\n#define GL_SCALED_RESOLVE_FASTEST_EXT     0x90BA\n#define GL_SCALED_RESOLVE_NICEST_EXT      0x90BB\n#endif /* GL_EXT_framebuffer_multisample_blit_scaled */\n\n#ifndef GL_EXT_framebuffer_object\n#define GL_EXT_framebuffer_object 1\n#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506\n#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8\n#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6\n#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9\n#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF\n#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0\n#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1\n#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2\n#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3\n#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4\n#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5\n#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6\n#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7\n#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8\n#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9\n#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA\n#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB\n#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC\n#define GL_COLOR_ATTACHMENT13_EXT         0x8CED\n#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE\n#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF\n#define GL_DEPTH_ATTACHMENT_EXT           0x8D00\n#define GL_STENCIL_ATTACHMENT_EXT         0x8D20\n#define GL_FRAMEBUFFER_EXT                0x8D40\n#define GL_RENDERBUFFER_EXT               0x8D41\n#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42\n#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44\n#define GL_STENCIL_INDEX1_EXT             0x8D46\n#define GL_STENCIL_INDEX4_EXT             0x8D47\n#define GL_STENCIL_INDEX8_EXT             0x8D48\n#define GL_STENCIL_INDEX16_EXT            0x8D49\n#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);\n#endif\n#endif /* GL_EXT_framebuffer_object */\n\n#ifndef GL_EXT_framebuffer_sRGB\n#define GL_EXT_framebuffer_sRGB 1\n#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9\n#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA\n#endif /* GL_EXT_framebuffer_sRGB */\n\n#ifndef GL_EXT_geometry_shader4\n#define GL_EXT_geometry_shader4 1\n#define GL_GEOMETRY_SHADER_EXT            0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE\n#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1\n#define GL_LINES_ADJACENCY_EXT            0x000A\n#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B\n#define GL_TRIANGLES_ADJACENCY_EXT        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4\n#define GL_PROGRAM_POINT_SIZE_EXT         0x8642\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\n#endif\n#endif /* GL_EXT_geometry_shader4 */\n\n#ifndef GL_EXT_gpu_program_parameters\n#define GL_EXT_gpu_program_parameters 1\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#endif\n#endif /* GL_EXT_gpu_program_parameters */\n\n#ifndef GL_EXT_gpu_shader4\n#define GL_EXT_gpu_shader4 1\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD\n#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0\n#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1\n#define GL_SAMPLER_BUFFER_EXT             0x8DC2\n#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5\n#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6\n#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7\n#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8\n#define GL_INT_SAMPLER_1D_EXT             0x8DC9\n#define GL_INT_SAMPLER_2D_EXT             0x8DCA\n#define GL_INT_SAMPLER_3D_EXT             0x8DCB\n#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC\n#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD\n#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF\n#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8\n#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT   0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT   0x8905\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);\n#endif\n#endif /* GL_EXT_gpu_shader4 */\n\n#ifndef GL_EXT_histogram\n#define GL_EXT_histogram 1\n#define GL_HISTOGRAM_EXT                  0x8024\n#define GL_PROXY_HISTOGRAM_EXT            0x8025\n#define GL_HISTOGRAM_WIDTH_EXT            0x8026\n#define GL_HISTOGRAM_FORMAT_EXT           0x8027\n#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028\n#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029\n#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C\n#define GL_HISTOGRAM_SINK_EXT             0x802D\n#define GL_MINMAX_EXT                     0x802E\n#define GL_MINMAX_FORMAT_EXT              0x802F\n#define GL_MINMAX_SINK_EXT                0x8030\n#define GL_TABLE_TOO_LARGE_EXT            0x8031\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogramEXT (GLenum target);\nGLAPI void APIENTRY glResetMinmaxEXT (GLenum target);\n#endif\n#endif /* GL_EXT_histogram */\n\n#ifndef GL_EXT_index_array_formats\n#define GL_EXT_index_array_formats 1\n#define GL_IUI_V2F_EXT                    0x81AD\n#define GL_IUI_V3F_EXT                    0x81AE\n#define GL_IUI_N3F_V2F_EXT                0x81AF\n#define GL_IUI_N3F_V3F_EXT                0x81B0\n#define GL_T2F_IUI_V2F_EXT                0x81B1\n#define GL_T2F_IUI_V3F_EXT                0x81B2\n#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3\n#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4\n#endif /* GL_EXT_index_array_formats */\n\n#ifndef GL_EXT_index_func\n#define GL_EXT_index_func 1\n#define GL_INDEX_TEST_EXT                 0x81B5\n#define GL_INDEX_TEST_FUNC_EXT            0x81B6\n#define GL_INDEX_TEST_REF_EXT             0x81B7\ntypedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);\n#endif\n#endif /* GL_EXT_index_func */\n\n#ifndef GL_EXT_index_material\n#define GL_EXT_index_material 1\n#define GL_INDEX_MATERIAL_EXT             0x81B8\n#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9\n#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA\ntypedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);\n#endif\n#endif /* GL_EXT_index_material */\n\n#ifndef GL_EXT_index_texture\n#define GL_EXT_index_texture 1\n#endif /* GL_EXT_index_texture */\n\n#ifndef GL_EXT_light_texture\n#define GL_EXT_light_texture 1\n#define GL_FRAGMENT_MATERIAL_EXT          0x8349\n#define GL_FRAGMENT_NORMAL_EXT            0x834A\n#define GL_FRAGMENT_COLOR_EXT             0x834C\n#define GL_ATTENUATION_EXT                0x834D\n#define GL_SHADOW_ATTENUATION_EXT         0x834E\n#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F\n#define GL_TEXTURE_LIGHT_EXT              0x8350\n#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351\n#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352\ntypedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glApplyTextureEXT (GLenum mode);\nGLAPI void APIENTRY glTextureLightEXT (GLenum pname);\nGLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);\n#endif\n#endif /* GL_EXT_light_texture */\n\n#ifndef GL_EXT_misc_attribute\n#define GL_EXT_misc_attribute 1\n#endif /* GL_EXT_misc_attribute */\n\n#ifndef GL_EXT_multi_draw_arrays\n#define GL_EXT_multi_draw_arrays 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\n#endif\n#endif /* GL_EXT_multi_draw_arrays */\n\n#ifndef GL_EXT_multisample\n#define GL_EXT_multisample 1\n#define GL_MULTISAMPLE_EXT                0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F\n#define GL_SAMPLE_MASK_EXT                0x80A0\n#define GL_1PASS_EXT                      0x80A1\n#define GL_2PASS_0_EXT                    0x80A2\n#define GL_2PASS_1_EXT                    0x80A3\n#define GL_4PASS_0_EXT                    0x80A4\n#define GL_4PASS_1_EXT                    0x80A5\n#define GL_4PASS_2_EXT                    0x80A6\n#define GL_4PASS_3_EXT                    0x80A7\n#define GL_SAMPLE_BUFFERS_EXT             0x80A8\n#define GL_SAMPLES_EXT                    0x80A9\n#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA\n#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB\n#define GL_SAMPLE_PATTERN_EXT             0x80AC\n#define GL_MULTISAMPLE_BIT_EXT            0x20000000\ntypedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);\n#endif\n#endif /* GL_EXT_multisample */\n\n#ifndef GL_EXT_packed_depth_stencil\n#define GL_EXT_packed_depth_stencil 1\n#define GL_DEPTH_STENCIL_EXT              0x84F9\n#define GL_UNSIGNED_INT_24_8_EXT          0x84FA\n#define GL_DEPTH24_STENCIL8_EXT           0x88F0\n#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1\n#endif /* GL_EXT_packed_depth_stencil */\n\n#ifndef GL_EXT_packed_float\n#define GL_EXT_packed_float 1\n#define GL_R11F_G11F_B10F_EXT             0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B\n#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C\n#endif /* GL_EXT_packed_float */\n\n#ifndef GL_EXT_packed_pixels\n#define GL_EXT_packed_pixels 1\n#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034\n#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035\n#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036\n#endif /* GL_EXT_packed_pixels */\n\n#ifndef GL_EXT_paletted_texture\n#define GL_EXT_paletted_texture 1\n#define GL_COLOR_INDEX1_EXT               0x80E2\n#define GL_COLOR_INDEX2_EXT               0x80E3\n#define GL_COLOR_INDEX4_EXT               0x80E4\n#define GL_COLOR_INDEX8_EXT               0x80E5\n#define GL_COLOR_INDEX12_EXT              0x80E6\n#define GL_COLOR_INDEX16_EXT              0x80E7\n#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED\ntypedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);\nGLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_paletted_texture */\n\n#ifndef GL_EXT_pixel_buffer_object\n#define GL_EXT_pixel_buffer_object 1\n#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF\n#endif /* GL_EXT_pixel_buffer_object */\n\n#ifndef GL_EXT_pixel_transform\n#define GL_EXT_pixel_transform 1\n#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330\n#define GL_PIXEL_MAG_FILTER_EXT           0x8331\n#define GL_PIXEL_MIN_FILTER_EXT           0x8332\n#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333\n#define GL_CUBIC_EXT                      0x8334\n#define GL_AVERAGE_EXT                    0x8335\n#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336\n#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337\n#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_pixel_transform */\n\n#ifndef GL_EXT_pixel_transform_color_table\n#define GL_EXT_pixel_transform_color_table 1\n#endif /* GL_EXT_pixel_transform_color_table */\n\n#ifndef GL_EXT_point_parameters\n#define GL_EXT_point_parameters 1\n#define GL_POINT_SIZE_MIN_EXT             0x8126\n#define GL_POINT_SIZE_MAX_EXT             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128\n#define GL_DISTANCE_ATTENUATION_EXT       0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_EXT_point_parameters */\n\n#ifndef GL_EXT_polygon_offset\n#define GL_EXT_polygon_offset 1\n#define GL_POLYGON_OFFSET_EXT             0x8037\n#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038\n#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);\n#endif\n#endif /* GL_EXT_polygon_offset */\n\n#ifndef GL_EXT_provoking_vertex\n#define GL_EXT_provoking_vertex 1\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D\n#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E\n#define GL_PROVOKING_VERTEX_EXT           0x8E4F\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_provoking_vertex */\n\n#ifndef GL_EXT_rescale_normal\n#define GL_EXT_rescale_normal 1\n#define GL_RESCALE_NORMAL_EXT             0x803A\n#endif /* GL_EXT_rescale_normal */\n\n#ifndef GL_EXT_secondary_color\n#define GL_EXT_secondary_color 1\n#define GL_COLOR_SUM_EXT                  0x8458\n#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D\n#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_secondary_color */\n\n#ifndef GL_EXT_separate_shader_objects\n#define GL_EXT_separate_shader_objects 1\n#define GL_ACTIVE_PROGRAM_EXT             0x8B8D\ntypedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);\nGLAPI void APIENTRY glActiveProgramEXT (GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);\n#endif\n#endif /* GL_EXT_separate_shader_objects */\n\n#ifndef GL_EXT_separate_specular_color\n#define GL_EXT_separate_specular_color 1\n#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8\n#define GL_SINGLE_COLOR_EXT               0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA\n#endif /* GL_EXT_separate_specular_color */\n\n#ifndef GL_EXT_shader_image_load_formatted\n#define GL_EXT_shader_image_load_formatted 1\n#endif /* GL_EXT_shader_image_load_formatted */\n\n#ifndef GL_EXT_shader_image_load_store\n#define GL_EXT_shader_image_load_store 1\n#define GL_MAX_IMAGE_UNITS_EXT            0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39\n#define GL_IMAGE_BINDING_NAME_EXT         0x8F3A\n#define GL_IMAGE_BINDING_LEVEL_EXT        0x8F3B\n#define GL_IMAGE_BINDING_LAYERED_EXT      0x8F3C\n#define GL_IMAGE_BINDING_LAYER_EXT        0x8F3D\n#define GL_IMAGE_BINDING_ACCESS_EXT       0x8F3E\n#define GL_IMAGE_1D_EXT                   0x904C\n#define GL_IMAGE_2D_EXT                   0x904D\n#define GL_IMAGE_3D_EXT                   0x904E\n#define GL_IMAGE_2D_RECT_EXT              0x904F\n#define GL_IMAGE_CUBE_EXT                 0x9050\n#define GL_IMAGE_BUFFER_EXT               0x9051\n#define GL_IMAGE_1D_ARRAY_EXT             0x9052\n#define GL_IMAGE_2D_ARRAY_EXT             0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054\n#define GL_IMAGE_2D_MULTISAMPLE_EXT       0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056\n#define GL_INT_IMAGE_1D_EXT               0x9057\n#define GL_INT_IMAGE_2D_EXT               0x9058\n#define GL_INT_IMAGE_3D_EXT               0x9059\n#define GL_INT_IMAGE_2D_RECT_EXT          0x905A\n#define GL_INT_IMAGE_CUBE_EXT             0x905B\n#define GL_INT_IMAGE_BUFFER_EXT           0x905C\n#define GL_INT_IMAGE_1D_ARRAY_EXT         0x905D\n#define GL_INT_IMAGE_2D_ARRAY_EXT         0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT   0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D_EXT      0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D_EXT      0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D_EXT      0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT    0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C\n#define GL_MAX_IMAGE_SAMPLES_EXT          0x906D\n#define GL_IMAGE_BINDING_FORMAT_EXT       0x906E\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT  0x00000002\n#define GL_UNIFORM_BARRIER_BIT_EXT        0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT  0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020\n#define GL_COMMAND_BARRIER_BIT_EXT        0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT   0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT  0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT_EXT    0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000\n#define GL_ALL_BARRIER_BITS_EXT           0xFFFFFFFF\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\nGLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);\n#endif\n#endif /* GL_EXT_shader_image_load_store */\n\n#ifndef GL_EXT_shader_integer_mix\n#define GL_EXT_shader_integer_mix 1\n#endif /* GL_EXT_shader_integer_mix */\n\n#ifndef GL_EXT_shadow_funcs\n#define GL_EXT_shadow_funcs 1\n#endif /* GL_EXT_shadow_funcs */\n\n#ifndef GL_EXT_shared_texture_palette\n#define GL_EXT_shared_texture_palette 1\n#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB\n#endif /* GL_EXT_shared_texture_palette */\n\n#ifndef GL_EXT_stencil_clear_tag\n#define GL_EXT_stencil_clear_tag 1\n#define GL_STENCIL_TAG_BITS_EXT           0x88F2\n#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3\ntypedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);\n#endif\n#endif /* GL_EXT_stencil_clear_tag */\n\n#ifndef GL_EXT_stencil_two_side\n#define GL_EXT_stencil_two_side 1\n#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910\n#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911\ntypedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);\n#endif\n#endif /* GL_EXT_stencil_two_side */\n\n#ifndef GL_EXT_stencil_wrap\n#define GL_EXT_stencil_wrap 1\n#define GL_INCR_WRAP_EXT                  0x8507\n#define GL_DECR_WRAP_EXT                  0x8508\n#endif /* GL_EXT_stencil_wrap */\n\n#ifndef GL_EXT_subtexture\n#define GL_EXT_subtexture 1\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_EXT_subtexture */\n\n#ifndef GL_EXT_texture\n#define GL_EXT_texture 1\n#define GL_ALPHA4_EXT                     0x803B\n#define GL_ALPHA8_EXT                     0x803C\n#define GL_ALPHA12_EXT                    0x803D\n#define GL_ALPHA16_EXT                    0x803E\n#define GL_LUMINANCE4_EXT                 0x803F\n#define GL_LUMINANCE8_EXT                 0x8040\n#define GL_LUMINANCE12_EXT                0x8041\n#define GL_LUMINANCE16_EXT                0x8042\n#define GL_LUMINANCE4_ALPHA4_EXT          0x8043\n#define GL_LUMINANCE6_ALPHA2_EXT          0x8044\n#define GL_LUMINANCE8_ALPHA8_EXT          0x8045\n#define GL_LUMINANCE12_ALPHA4_EXT         0x8046\n#define GL_LUMINANCE12_ALPHA12_EXT        0x8047\n#define GL_LUMINANCE16_ALPHA16_EXT        0x8048\n#define GL_INTENSITY_EXT                  0x8049\n#define GL_INTENSITY4_EXT                 0x804A\n#define GL_INTENSITY8_EXT                 0x804B\n#define GL_INTENSITY12_EXT                0x804C\n#define GL_INTENSITY16_EXT                0x804D\n#define GL_RGB2_EXT                       0x804E\n#define GL_RGB4_EXT                       0x804F\n#define GL_RGB5_EXT                       0x8050\n#define GL_RGB8_EXT                       0x8051\n#define GL_RGB10_EXT                      0x8052\n#define GL_RGB12_EXT                      0x8053\n#define GL_RGB16_EXT                      0x8054\n#define GL_RGBA2_EXT                      0x8055\n#define GL_RGBA4_EXT                      0x8056\n#define GL_RGB5_A1_EXT                    0x8057\n#define GL_RGBA8_EXT                      0x8058\n#define GL_RGB10_A2_EXT                   0x8059\n#define GL_RGBA12_EXT                     0x805A\n#define GL_RGBA16_EXT                     0x805B\n#define GL_TEXTURE_RED_SIZE_EXT           0x805C\n#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D\n#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E\n#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F\n#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060\n#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061\n#define GL_REPLACE_EXT                    0x8062\n#define GL_PROXY_TEXTURE_1D_EXT           0x8063\n#define GL_PROXY_TEXTURE_2D_EXT           0x8064\n#define GL_TEXTURE_TOO_LARGE_EXT          0x8065\n#endif /* GL_EXT_texture */\n\n#ifndef GL_EXT_texture3D\n#define GL_EXT_texture3D 1\n#define GL_PACK_SKIP_IMAGES_EXT           0x806B\n#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C\n#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D\n#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E\n#define GL_TEXTURE_3D_EXT                 0x806F\n#define GL_PROXY_TEXTURE_3D_EXT           0x8070\n#define GL_TEXTURE_DEPTH_EXT              0x8071\n#define GL_TEXTURE_WRAP_R_EXT             0x8072\n#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_EXT_texture3D */\n\n#ifndef GL_EXT_texture_array\n#define GL_EXT_texture_array 1\n#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19\n#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D\n#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF\n#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E\n#endif /* GL_EXT_texture_array */\n\n#ifndef GL_EXT_texture_buffer_object\n#define GL_EXT_texture_buffer_object 1\n#define GL_TEXTURE_BUFFER_EXT             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E\ntypedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n#endif /* GL_EXT_texture_buffer_object */\n\n#ifndef GL_EXT_texture_compression_latc\n#define GL_EXT_texture_compression_latc 1\n#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70\n#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71\n#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72\n#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73\n#endif /* GL_EXT_texture_compression_latc */\n\n#ifndef GL_EXT_texture_compression_rgtc\n#define GL_EXT_texture_compression_rgtc 1\n#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC\n#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD\n#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE\n#endif /* GL_EXT_texture_compression_rgtc */\n\n#ifndef GL_EXT_texture_compression_s3tc\n#define GL_EXT_texture_compression_s3tc 1\n#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0\n#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1\n#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2\n#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3\n#endif /* GL_EXT_texture_compression_s3tc */\n\n#ifndef GL_EXT_texture_cube_map\n#define GL_EXT_texture_cube_map 1\n#define GL_NORMAL_MAP_EXT                 0x8511\n#define GL_REFLECTION_MAP_EXT             0x8512\n#define GL_TEXTURE_CUBE_MAP_EXT           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C\n#endif /* GL_EXT_texture_cube_map */\n\n#ifndef GL_EXT_texture_env_add\n#define GL_EXT_texture_env_add 1\n#endif /* GL_EXT_texture_env_add */\n\n#ifndef GL_EXT_texture_env_combine\n#define GL_EXT_texture_env_combine 1\n#define GL_COMBINE_EXT                    0x8570\n#define GL_COMBINE_RGB_EXT                0x8571\n#define GL_COMBINE_ALPHA_EXT              0x8572\n#define GL_RGB_SCALE_EXT                  0x8573\n#define GL_ADD_SIGNED_EXT                 0x8574\n#define GL_INTERPOLATE_EXT                0x8575\n#define GL_CONSTANT_EXT                   0x8576\n#define GL_PRIMARY_COLOR_EXT              0x8577\n#define GL_PREVIOUS_EXT                   0x8578\n#define GL_SOURCE0_RGB_EXT                0x8580\n#define GL_SOURCE1_RGB_EXT                0x8581\n#define GL_SOURCE2_RGB_EXT                0x8582\n#define GL_SOURCE0_ALPHA_EXT              0x8588\n#define GL_SOURCE1_ALPHA_EXT              0x8589\n#define GL_SOURCE2_ALPHA_EXT              0x858A\n#define GL_OPERAND0_RGB_EXT               0x8590\n#define GL_OPERAND1_RGB_EXT               0x8591\n#define GL_OPERAND2_RGB_EXT               0x8592\n#define GL_OPERAND0_ALPHA_EXT             0x8598\n#define GL_OPERAND1_ALPHA_EXT             0x8599\n#define GL_OPERAND2_ALPHA_EXT             0x859A\n#endif /* GL_EXT_texture_env_combine */\n\n#ifndef GL_EXT_texture_env_dot3\n#define GL_EXT_texture_env_dot3 1\n#define GL_DOT3_RGB_EXT                   0x8740\n#define GL_DOT3_RGBA_EXT                  0x8741\n#endif /* GL_EXT_texture_env_dot3 */\n\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_EXT_texture_filter_anisotropic 1\n#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE\n#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF\n#endif /* GL_EXT_texture_filter_anisotropic */\n\n#ifndef GL_EXT_texture_integer\n#define GL_EXT_texture_integer 1\n#define GL_RGBA32UI_EXT                   0x8D70\n#define GL_RGB32UI_EXT                    0x8D71\n#define GL_ALPHA32UI_EXT                  0x8D72\n#define GL_INTENSITY32UI_EXT              0x8D73\n#define GL_LUMINANCE32UI_EXT              0x8D74\n#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75\n#define GL_RGBA16UI_EXT                   0x8D76\n#define GL_RGB16UI_EXT                    0x8D77\n#define GL_ALPHA16UI_EXT                  0x8D78\n#define GL_INTENSITY16UI_EXT              0x8D79\n#define GL_LUMINANCE16UI_EXT              0x8D7A\n#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B\n#define GL_RGBA8UI_EXT                    0x8D7C\n#define GL_RGB8UI_EXT                     0x8D7D\n#define GL_ALPHA8UI_EXT                   0x8D7E\n#define GL_INTENSITY8UI_EXT               0x8D7F\n#define GL_LUMINANCE8UI_EXT               0x8D80\n#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81\n#define GL_RGBA32I_EXT                    0x8D82\n#define GL_RGB32I_EXT                     0x8D83\n#define GL_ALPHA32I_EXT                   0x8D84\n#define GL_INTENSITY32I_EXT               0x8D85\n#define GL_LUMINANCE32I_EXT               0x8D86\n#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87\n#define GL_RGBA16I_EXT                    0x8D88\n#define GL_RGB16I_EXT                     0x8D89\n#define GL_ALPHA16I_EXT                   0x8D8A\n#define GL_INTENSITY16I_EXT               0x8D8B\n#define GL_LUMINANCE16I_EXT               0x8D8C\n#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D\n#define GL_RGBA8I_EXT                     0x8D8E\n#define GL_RGB8I_EXT                      0x8D8F\n#define GL_ALPHA8I_EXT                    0x8D90\n#define GL_INTENSITY8I_EXT                0x8D91\n#define GL_LUMINANCE8I_EXT                0x8D92\n#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93\n#define GL_RED_INTEGER_EXT                0x8D94\n#define GL_GREEN_INTEGER_EXT              0x8D95\n#define GL_BLUE_INTEGER_EXT               0x8D96\n#define GL_ALPHA_INTEGER_EXT              0x8D97\n#define GL_RGB_INTEGER_EXT                0x8D98\n#define GL_RGBA_INTEGER_EXT               0x8D99\n#define GL_BGR_INTEGER_EXT                0x8D9A\n#define GL_BGRA_INTEGER_EXT               0x8D9B\n#define GL_LUMINANCE_INTEGER_EXT          0x8D9C\n#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D\n#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);\nGLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#endif\n#endif /* GL_EXT_texture_integer */\n\n#ifndef GL_EXT_texture_lod_bias\n#define GL_EXT_texture_lod_bias 1\n#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD\n#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500\n#define GL_TEXTURE_LOD_BIAS_EXT           0x8501\n#endif /* GL_EXT_texture_lod_bias */\n\n#ifndef GL_EXT_texture_mirror_clamp\n#define GL_EXT_texture_mirror_clamp 1\n#define GL_MIRROR_CLAMP_EXT               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743\n#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912\n#endif /* GL_EXT_texture_mirror_clamp */\n\n#ifndef GL_EXT_texture_object\n#define GL_EXT_texture_object 1\n#define GL_TEXTURE_PRIORITY_EXT           0x8066\n#define GL_TEXTURE_RESIDENT_EXT           0x8067\n#define GL_TEXTURE_1D_BINDING_EXT         0x8068\n#define GL_TEXTURE_2D_BINDING_EXT         0x8069\n#define GL_TEXTURE_3D_BINDING_EXT         0x806A\ntypedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);\nGLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);\nGLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);\nGLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);\nGLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);\nGLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#endif\n#endif /* GL_EXT_texture_object */\n\n#ifndef GL_EXT_texture_perturb_normal\n#define GL_EXT_texture_perturb_normal 1\n#define GL_PERTURB_EXT                    0x85AE\n#define GL_TEXTURE_NORMAL_EXT             0x85AF\ntypedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureNormalEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_texture_perturb_normal */\n\n#ifndef GL_EXT_texture_sRGB\n#define GL_EXT_texture_sRGB 1\n#define GL_SRGB_EXT                       0x8C40\n#define GL_SRGB8_EXT                      0x8C41\n#define GL_SRGB_ALPHA_EXT                 0x8C42\n#define GL_SRGB8_ALPHA8_EXT               0x8C43\n#define GL_SLUMINANCE_ALPHA_EXT           0x8C44\n#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45\n#define GL_SLUMINANCE_EXT                 0x8C46\n#define GL_SLUMINANCE8_EXT                0x8C47\n#define GL_COMPRESSED_SRGB_EXT            0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49\n#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B\n#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F\n#endif /* GL_EXT_texture_sRGB */\n\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_EXT_texture_sRGB_decode 1\n#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48\n#define GL_DECODE_EXT                     0x8A49\n#define GL_SKIP_DECODE_EXT                0x8A4A\n#endif /* GL_EXT_texture_sRGB_decode */\n\n#ifndef GL_EXT_texture_shared_exponent\n#define GL_EXT_texture_shared_exponent 1\n#define GL_RGB9_E5_EXT                    0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E\n#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F\n#endif /* GL_EXT_texture_shared_exponent */\n\n#ifndef GL_EXT_texture_snorm\n#define GL_EXT_texture_snorm 1\n#define GL_ALPHA_SNORM                    0x9010\n#define GL_LUMINANCE_SNORM                0x9011\n#define GL_LUMINANCE_ALPHA_SNORM          0x9012\n#define GL_INTENSITY_SNORM                0x9013\n#define GL_ALPHA8_SNORM                   0x9014\n#define GL_LUMINANCE8_SNORM               0x9015\n#define GL_LUMINANCE8_ALPHA8_SNORM        0x9016\n#define GL_INTENSITY8_SNORM               0x9017\n#define GL_ALPHA16_SNORM                  0x9018\n#define GL_LUMINANCE16_SNORM              0x9019\n#define GL_LUMINANCE16_ALPHA16_SNORM      0x901A\n#define GL_INTENSITY16_SNORM              0x901B\n#define GL_RED_SNORM                      0x8F90\n#define GL_RG_SNORM                       0x8F91\n#define GL_RGB_SNORM                      0x8F92\n#define GL_RGBA_SNORM                     0x8F93\n#endif /* GL_EXT_texture_snorm */\n\n#ifndef GL_EXT_texture_swizzle\n#define GL_EXT_texture_swizzle 1\n#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42\n#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43\n#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44\n#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46\n#endif /* GL_EXT_texture_swizzle */\n\n#ifndef GL_EXT_timer_query\n#define GL_EXT_timer_query 1\n#define GL_TIME_ELAPSED_EXT               0x88BF\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);\n#endif\n#endif /* GL_EXT_timer_query */\n\n#ifndef GL_EXT_transform_feedback\n#define GL_EXT_transform_feedback 1\n#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT  0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F\n#define GL_INTERLEAVED_ATTRIBS_EXT        0x8C8C\n#define GL_SEPARATE_ATTRIBS_EXT           0x8C8D\n#define GL_PRIMITIVES_GENERATED_EXT       0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88\n#define GL_RASTERIZER_DISCARD_EXT         0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackEXT (void);\nGLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#endif\n#endif /* GL_EXT_transform_feedback */\n\n#ifndef GL_EXT_vertex_array\n#define GL_EXT_vertex_array 1\n#define GL_VERTEX_ARRAY_EXT               0x8074\n#define GL_NORMAL_ARRAY_EXT               0x8075\n#define GL_COLOR_ARRAY_EXT                0x8076\n#define GL_INDEX_ARRAY_EXT                0x8077\n#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078\n#define GL_EDGE_FLAG_ARRAY_EXT            0x8079\n#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A\n#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B\n#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C\n#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D\n#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E\n#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F\n#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080\n#define GL_COLOR_ARRAY_SIZE_EXT           0x8081\n#define GL_COLOR_ARRAY_TYPE_EXT           0x8082\n#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083\n#define GL_COLOR_ARRAY_COUNT_EXT          0x8084\n#define GL_INDEX_ARRAY_TYPE_EXT           0x8085\n#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086\n#define GL_INDEX_ARRAY_COUNT_EXT          0x8087\n#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088\n#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089\n#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A\n#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B\n#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C\n#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D\n#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E\n#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F\n#define GL_COLOR_ARRAY_POINTER_EXT        0x8090\n#define GL_INDEX_ARRAY_POINTER_EXT        0x8091\n#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092\n#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093\ntypedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);\ntypedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);\ntypedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);\ntypedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glArrayElementEXT (GLint i);\nGLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);\nGLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);\nGLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\n#endif\n#endif /* GL_EXT_vertex_array */\n\n#ifndef GL_EXT_vertex_array_bgra\n#define GL_EXT_vertex_array_bgra 1\n#endif /* GL_EXT_vertex_array_bgra */\n\n#ifndef GL_EXT_vertex_attrib_64bit\n#define GL_EXT_vertex_attrib_64bit 1\n#define GL_DOUBLE_VEC2_EXT                0x8FFC\n#define GL_DOUBLE_VEC3_EXT                0x8FFD\n#define GL_DOUBLE_VEC4_EXT                0x8FFE\n#define GL_DOUBLE_MAT2_EXT                0x8F46\n#define GL_DOUBLE_MAT3_EXT                0x8F47\n#define GL_DOUBLE_MAT4_EXT                0x8F48\n#define GL_DOUBLE_MAT2x3_EXT              0x8F49\n#define GL_DOUBLE_MAT2x4_EXT              0x8F4A\n#define GL_DOUBLE_MAT3x2_EXT              0x8F4B\n#define GL_DOUBLE_MAT3x4_EXT              0x8F4C\n#define GL_DOUBLE_MAT4x2_EXT              0x8F4D\n#define GL_DOUBLE_MAT4x3_EXT              0x8F4E\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);\n#endif\n#endif /* GL_EXT_vertex_attrib_64bit */\n\n#ifndef GL_EXT_vertex_shader\n#define GL_EXT_vertex_shader 1\n#define GL_VERTEX_SHADER_EXT              0x8780\n#define GL_VERTEX_SHADER_BINDING_EXT      0x8781\n#define GL_OP_INDEX_EXT                   0x8782\n#define GL_OP_NEGATE_EXT                  0x8783\n#define GL_OP_DOT3_EXT                    0x8784\n#define GL_OP_DOT4_EXT                    0x8785\n#define GL_OP_MUL_EXT                     0x8786\n#define GL_OP_ADD_EXT                     0x8787\n#define GL_OP_MADD_EXT                    0x8788\n#define GL_OP_FRAC_EXT                    0x8789\n#define GL_OP_MAX_EXT                     0x878A\n#define GL_OP_MIN_EXT                     0x878B\n#define GL_OP_SET_GE_EXT                  0x878C\n#define GL_OP_SET_LT_EXT                  0x878D\n#define GL_OP_CLAMP_EXT                   0x878E\n#define GL_OP_FLOOR_EXT                   0x878F\n#define GL_OP_ROUND_EXT                   0x8790\n#define GL_OP_EXP_BASE_2_EXT              0x8791\n#define GL_OP_LOG_BASE_2_EXT              0x8792\n#define GL_OP_POWER_EXT                   0x8793\n#define GL_OP_RECIP_EXT                   0x8794\n#define GL_OP_RECIP_SQRT_EXT              0x8795\n#define GL_OP_SUB_EXT                     0x8796\n#define GL_OP_CROSS_PRODUCT_EXT           0x8797\n#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798\n#define GL_OP_MOV_EXT                     0x8799\n#define GL_OUTPUT_VERTEX_EXT              0x879A\n#define GL_OUTPUT_COLOR0_EXT              0x879B\n#define GL_OUTPUT_COLOR1_EXT              0x879C\n#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D\n#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E\n#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F\n#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0\n#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1\n#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2\n#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3\n#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4\n#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5\n#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6\n#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7\n#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8\n#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9\n#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA\n#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB\n#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC\n#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD\n#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE\n#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF\n#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0\n#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1\n#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2\n#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3\n#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4\n#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5\n#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6\n#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7\n#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8\n#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9\n#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA\n#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB\n#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC\n#define GL_OUTPUT_FOG_EXT                 0x87BD\n#define GL_SCALAR_EXT                     0x87BE\n#define GL_VECTOR_EXT                     0x87BF\n#define GL_MATRIX_EXT                     0x87C0\n#define GL_VARIANT_EXT                    0x87C1\n#define GL_INVARIANT_EXT                  0x87C2\n#define GL_LOCAL_CONSTANT_EXT             0x87C3\n#define GL_LOCAL_EXT                      0x87C4\n#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5\n#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6\n#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7\n#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8\n#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE\n#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF\n#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0\n#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1\n#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2\n#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3\n#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4\n#define GL_X_EXT                          0x87D5\n#define GL_Y_EXT                          0x87D6\n#define GL_Z_EXT                          0x87D7\n#define GL_W_EXT                          0x87D8\n#define GL_NEGATIVE_X_EXT                 0x87D9\n#define GL_NEGATIVE_Y_EXT                 0x87DA\n#define GL_NEGATIVE_Z_EXT                 0x87DB\n#define GL_NEGATIVE_W_EXT                 0x87DC\n#define GL_ZERO_EXT                       0x87DD\n#define GL_ONE_EXT                        0x87DE\n#define GL_NEGATIVE_ONE_EXT               0x87DF\n#define GL_NORMALIZED_RANGE_EXT           0x87E0\n#define GL_FULL_RANGE_EXT                 0x87E1\n#define GL_CURRENT_VERTEX_EXT             0x87E2\n#define GL_MVP_MATRIX_EXT                 0x87E3\n#define GL_VARIANT_VALUE_EXT              0x87E4\n#define GL_VARIANT_DATATYPE_EXT           0x87E5\n#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6\n#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7\n#define GL_VARIANT_ARRAY_EXT              0x87E8\n#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9\n#define GL_INVARIANT_VALUE_EXT            0x87EA\n#define GL_INVARIANT_DATATYPE_EXT         0x87EB\n#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC\n#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED\ntypedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);\ntypedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\ntypedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\ntypedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\ntypedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);\ntypedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);\ntypedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);\ntypedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);\ntypedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);\ntypedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);\ntypedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVertexShaderEXT (void);\nGLAPI void APIENTRY glEndVertexShaderEXT (void);\nGLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);\nGLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);\nGLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);\nGLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);\nGLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\nGLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\nGLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\nGLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);\nGLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);\nGLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);\nGLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);\nGLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);\nGLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);\nGLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);\nGLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);\nGLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);\nGLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);\nGLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);\nGLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);\nGLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);\nGLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);\nGLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);\nGLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);\nGLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);\nGLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);\nGLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);\nGLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);\nGLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\n#endif\n#endif /* GL_EXT_vertex_shader */\n\n#ifndef GL_EXT_vertex_weighting\n#define GL_EXT_vertex_weighting 1\n#define GL_MODELVIEW0_STACK_DEPTH_EXT     0x0BA3\n#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502\n#define GL_MODELVIEW0_MATRIX_EXT          0x0BA6\n#define GL_MODELVIEW1_MATRIX_EXT          0x8506\n#define GL_VERTEX_WEIGHTING_EXT           0x8509\n#define GL_MODELVIEW0_EXT                 0x1700\n#define GL_MODELVIEW1_EXT                 0x850A\n#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B\n#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C\n#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D\n#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E\n#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F\n#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);\nGLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);\nGLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_vertex_weighting */\n\n#ifndef GL_EXT_x11_sync_object\n#define GL_EXT_x11_sync_object 1\n#define GL_SYNC_X11_FENCE_EXT             0x90E1\ntypedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#endif\n#endif /* GL_EXT_x11_sync_object */\n\n#ifndef GL_GREMEDY_frame_terminator\n#define GL_GREMEDY_frame_terminator 1\ntypedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameTerminatorGREMEDY (void);\n#endif\n#endif /* GL_GREMEDY_frame_terminator */\n\n#ifndef GL_GREMEDY_string_marker\n#define GL_GREMEDY_string_marker 1\ntypedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);\n#endif\n#endif /* GL_GREMEDY_string_marker */\n\n#ifndef GL_HP_convolution_border_modes\n#define GL_HP_convolution_border_modes 1\n#define GL_IGNORE_BORDER_HP               0x8150\n#define GL_CONSTANT_BORDER_HP             0x8151\n#define GL_REPLICATE_BORDER_HP            0x8153\n#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154\n#endif /* GL_HP_convolution_border_modes */\n\n#ifndef GL_HP_image_transform\n#define GL_HP_image_transform 1\n#define GL_IMAGE_SCALE_X_HP               0x8155\n#define GL_IMAGE_SCALE_Y_HP               0x8156\n#define GL_IMAGE_TRANSLATE_X_HP           0x8157\n#define GL_IMAGE_TRANSLATE_Y_HP           0x8158\n#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159\n#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A\n#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B\n#define GL_IMAGE_MAG_FILTER_HP            0x815C\n#define GL_IMAGE_MIN_FILTER_HP            0x815D\n#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E\n#define GL_CUBIC_HP                       0x815F\n#define GL_AVERAGE_HP                     0x8160\n#define GL_IMAGE_TRANSFORM_2D_HP          0x8161\n#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162\n#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_HP_image_transform */\n\n#ifndef GL_HP_occlusion_test\n#define GL_HP_occlusion_test 1\n#define GL_OCCLUSION_TEST_HP              0x8165\n#define GL_OCCLUSION_TEST_RESULT_HP       0x8166\n#endif /* GL_HP_occlusion_test */\n\n#ifndef GL_HP_texture_lighting\n#define GL_HP_texture_lighting 1\n#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167\n#define GL_TEXTURE_POST_SPECULAR_HP       0x8168\n#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169\n#endif /* GL_HP_texture_lighting */\n\n#ifndef GL_IBM_cull_vertex\n#define GL_IBM_cull_vertex 1\n#define GL_CULL_VERTEX_IBM                103050\n#endif /* GL_IBM_cull_vertex */\n\n#ifndef GL_IBM_multimode_draw_arrays\n#define GL_IBM_multimode_draw_arrays 1\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\nGLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);\n#endif\n#endif /* GL_IBM_multimode_draw_arrays */\n\n#ifndef GL_IBM_rasterpos_clip\n#define GL_IBM_rasterpos_clip 1\n#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262\n#endif /* GL_IBM_rasterpos_clip */\n\n#ifndef GL_IBM_static_data\n#define GL_IBM_static_data 1\n#define GL_ALL_STATIC_DATA_IBM            103060\n#define GL_STATIC_VERTEX_ARRAY_IBM        103061\ntypedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);\n#endif\n#endif /* GL_IBM_static_data */\n\n#ifndef GL_IBM_texture_mirrored_repeat\n#define GL_IBM_texture_mirrored_repeat 1\n#define GL_MIRRORED_REPEAT_IBM            0x8370\n#endif /* GL_IBM_texture_mirrored_repeat */\n\n#ifndef GL_IBM_vertex_array_lists\n#define GL_IBM_vertex_array_lists 1\n#define GL_VERTEX_ARRAY_LIST_IBM          103070\n#define GL_NORMAL_ARRAY_LIST_IBM          103071\n#define GL_COLOR_ARRAY_LIST_IBM           103072\n#define GL_INDEX_ARRAY_LIST_IBM           103073\n#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074\n#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075\n#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076\n#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077\n#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080\n#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081\n#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082\n#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083\n#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084\n#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085\n#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086\n#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087\ntypedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);\nGLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\n#endif\n#endif /* GL_IBM_vertex_array_lists */\n\n#ifndef GL_INGR_blend_func_separate\n#define GL_INGR_blend_func_separate 1\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n#endif /* GL_INGR_blend_func_separate */\n\n#ifndef GL_INGR_color_clamp\n#define GL_INGR_color_clamp 1\n#define GL_RED_MIN_CLAMP_INGR             0x8560\n#define GL_GREEN_MIN_CLAMP_INGR           0x8561\n#define GL_BLUE_MIN_CLAMP_INGR            0x8562\n#define GL_ALPHA_MIN_CLAMP_INGR           0x8563\n#define GL_RED_MAX_CLAMP_INGR             0x8564\n#define GL_GREEN_MAX_CLAMP_INGR           0x8565\n#define GL_BLUE_MAX_CLAMP_INGR            0x8566\n#define GL_ALPHA_MAX_CLAMP_INGR           0x8567\n#endif /* GL_INGR_color_clamp */\n\n#ifndef GL_INGR_interlace_read\n#define GL_INGR_interlace_read 1\n#define GL_INTERLACE_READ_INGR            0x8568\n#endif /* GL_INGR_interlace_read */\n\n#ifndef GL_INTEL_fragment_shader_ordering\n#define GL_INTEL_fragment_shader_ordering 1\n#endif /* GL_INTEL_fragment_shader_ordering */\n\n#ifndef GL_INTEL_map_texture\n#define GL_INTEL_map_texture 1\n#define GL_TEXTURE_MEMORY_LAYOUT_INTEL    0x83FF\n#define GL_LAYOUT_DEFAULT_INTEL           0\n#define GL_LAYOUT_LINEAR_INTEL            1\n#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2\ntypedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);\ntypedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);\nGLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);\nGLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);\n#endif\n#endif /* GL_INTEL_map_texture */\n\n#ifndef GL_INTEL_parallel_arrays\n#define GL_INTEL_parallel_arrays 1\n#define GL_PARALLEL_ARRAYS_INTEL          0x83F4\n#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5\n#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6\n#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7\n#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);\nGLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);\nGLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);\nGLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);\n#endif\n#endif /* GL_INTEL_parallel_arrays */\n\n#ifndef GL_INTEL_performance_query\n#define GL_INTEL_performance_query 1\n#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000\n#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001\n#define GL_PERFQUERY_WAIT_INTEL           0x83FB\n#define GL_PERFQUERY_FLUSH_INTEL          0x83FA\n#define GL_PERFQUERY_DONOT_FLUSH_INTEL    0x83F9\n#define GL_PERFQUERY_COUNTER_EVENT_INTEL  0x94F0\n#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1\n#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2\n#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3\n#define GL_PERFQUERY_COUNTER_RAW_INTEL    0x94F4\n#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5\n#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8\n#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9\n#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA\n#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB\n#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC\n#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD\n#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE\n#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF\n#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500\ntypedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);\ntypedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);\ntypedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);\ntypedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);\nGLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);\nGLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);\nGLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\nGLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\nGLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);\nGLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\n#endif\n#endif /* GL_INTEL_performance_query */\n\n#ifndef GL_MESAX_texture_stack\n#define GL_MESAX_texture_stack 1\n#define GL_TEXTURE_1D_STACK_MESAX         0x8759\n#define GL_TEXTURE_2D_STACK_MESAX         0x875A\n#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B\n#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C\n#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D\n#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E\n#endif /* GL_MESAX_texture_stack */\n\n#ifndef GL_MESA_pack_invert\n#define GL_MESA_pack_invert 1\n#define GL_PACK_INVERT_MESA               0x8758\n#endif /* GL_MESA_pack_invert */\n\n#ifndef GL_MESA_resize_buffers\n#define GL_MESA_resize_buffers 1\ntypedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glResizeBuffersMESA (void);\n#endif\n#endif /* GL_MESA_resize_buffers */\n\n#ifndef GL_MESA_window_pos\n#define GL_MESA_window_pos 1\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);\n#endif\n#endif /* GL_MESA_window_pos */\n\n#ifndef GL_MESA_ycbcr_texture\n#define GL_MESA_ycbcr_texture 1\n#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB\n#define GL_YCBCR_MESA                     0x8757\n#endif /* GL_MESA_ycbcr_texture */\n\n#ifndef GL_NVX_conditional_render\n#define GL_NVX_conditional_render 1\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);\nGLAPI void APIENTRY glEndConditionalRenderNVX (void);\n#endif\n#endif /* GL_NVX_conditional_render */\n\n#ifndef GL_NVX_gpu_memory_info\n#define GL_NVX_gpu_memory_info 1\n#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047\n#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048\n#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049\n#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A\n#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B\n#endif /* GL_NVX_gpu_memory_info */\n\n#ifndef GL_NV_bindless_multi_draw_indirect\n#define GL_NV_bindless_multi_draw_indirect 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\nGLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\n#endif\n#endif /* GL_NV_bindless_multi_draw_indirect */\n\n#ifndef GL_NV_bindless_texture\n#define GL_NV_bindless_texture 1\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);\nGLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);\nGLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);\nGLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\nGLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);\nGLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);\nGLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);\nGLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);\nGLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\nGLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);\nGLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);\n#endif\n#endif /* GL_NV_bindless_texture */\n\n#ifndef GL_NV_blend_equation_advanced\n#define GL_NV_blend_equation_advanced 1\n#define GL_BLEND_OVERLAP_NV               0x9281\n#define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280\n#define GL_BLUE_NV                        0x1905\n#define GL_COLORBURN_NV                   0x929A\n#define GL_COLORDODGE_NV                  0x9299\n#define GL_CONJOINT_NV                    0x9284\n#define GL_CONTRAST_NV                    0x92A1\n#define GL_DARKEN_NV                      0x9297\n#define GL_DIFFERENCE_NV                  0x929E\n#define GL_DISJOINT_NV                    0x9283\n#define GL_DST_ATOP_NV                    0x928F\n#define GL_DST_IN_NV                      0x928B\n#define GL_DST_NV                         0x9287\n#define GL_DST_OUT_NV                     0x928D\n#define GL_DST_OVER_NV                    0x9289\n#define GL_EXCLUSION_NV                   0x92A0\n#define GL_GREEN_NV                       0x1904\n#define GL_HARDLIGHT_NV                   0x929B\n#define GL_HARDMIX_NV                     0x92A9\n#define GL_HSL_COLOR_NV                   0x92AF\n#define GL_HSL_HUE_NV                     0x92AD\n#define GL_HSL_LUMINOSITY_NV              0x92B0\n#define GL_HSL_SATURATION_NV              0x92AE\n#define GL_INVERT_OVG_NV                  0x92B4\n#define GL_INVERT_RGB_NV                  0x92A3\n#define GL_LIGHTEN_NV                     0x9298\n#define GL_LINEARBURN_NV                  0x92A5\n#define GL_LINEARDODGE_NV                 0x92A4\n#define GL_LINEARLIGHT_NV                 0x92A7\n#define GL_MINUS_CLAMPED_NV               0x92B3\n#define GL_MINUS_NV                       0x929F\n#define GL_MULTIPLY_NV                    0x9294\n#define GL_OVERLAY_NV                     0x9296\n#define GL_PINLIGHT_NV                    0x92A8\n#define GL_PLUS_CLAMPED_ALPHA_NV          0x92B2\n#define GL_PLUS_CLAMPED_NV                0x92B1\n#define GL_PLUS_DARKER_NV                 0x9292\n#define GL_PLUS_NV                        0x9291\n#define GL_RED_NV                         0x1903\n#define GL_SCREEN_NV                      0x9295\n#define GL_SOFTLIGHT_NV                   0x929C\n#define GL_SRC_ATOP_NV                    0x928E\n#define GL_SRC_IN_NV                      0x928A\n#define GL_SRC_NV                         0x9286\n#define GL_SRC_OUT_NV                     0x928C\n#define GL_SRC_OVER_NV                    0x9288\n#define GL_UNCORRELATED_NV                0x9282\n#define GL_VIVIDLIGHT_NV                  0x92A6\n#define GL_XOR_NV                         0x1506\ntypedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);\nGLAPI void APIENTRY glBlendBarrierNV (void);\n#endif\n#endif /* GL_NV_blend_equation_advanced */\n\n#ifndef GL_NV_blend_equation_advanced_coherent\n#define GL_NV_blend_equation_advanced_coherent 1\n#define GL_BLEND_ADVANCED_COHERENT_NV     0x9285\n#endif /* GL_NV_blend_equation_advanced_coherent */\n\n#ifndef GL_NV_blend_square\n#define GL_NV_blend_square 1\n#endif /* GL_NV_blend_square */\n\n#ifndef GL_NV_compute_program5\n#define GL_NV_compute_program5 1\n#define GL_COMPUTE_PROGRAM_NV             0x90FB\n#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC\n#endif /* GL_NV_compute_program5 */\n\n#ifndef GL_NV_conditional_render\n#define GL_NV_conditional_render 1\n#define GL_QUERY_WAIT_NV                  0x8E13\n#define GL_QUERY_NO_WAIT_NV               0x8E14\n#define GL_QUERY_BY_REGION_WAIT_NV        0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT_NV     0x8E16\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRenderNV (void);\n#endif\n#endif /* GL_NV_conditional_render */\n\n#ifndef GL_NV_copy_depth_to_color\n#define GL_NV_copy_depth_to_color 1\n#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E\n#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F\n#endif /* GL_NV_copy_depth_to_color */\n\n#ifndef GL_NV_copy_image\n#define GL_NV_copy_image 1\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n#endif /* GL_NV_copy_image */\n\n#ifndef GL_NV_deep_texture3D\n#define GL_NV_deep_texture3D 1\n#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0\n#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV   0x90D1\n#endif /* GL_NV_deep_texture3D */\n\n#ifndef GL_NV_depth_buffer_float\n#define GL_NV_depth_buffer_float 1\n#define GL_DEPTH_COMPONENT32F_NV          0x8DAB\n#define GL_DEPTH32F_STENCIL8_NV           0x8DAC\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD\n#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF\ntypedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glClearDepthdNV (GLdouble depth);\nGLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);\n#endif\n#endif /* GL_NV_depth_buffer_float */\n\n#ifndef GL_NV_depth_clamp\n#define GL_NV_depth_clamp 1\n#define GL_DEPTH_CLAMP_NV                 0x864F\n#endif /* GL_NV_depth_clamp */\n\n#ifndef GL_NV_draw_texture\n#define GL_NV_draw_texture 1\ntypedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#endif\n#endif /* GL_NV_draw_texture */\n\n#ifndef GL_NV_evaluators\n#define GL_NV_evaluators 1\n#define GL_EVAL_2D_NV                     0x86C0\n#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1\n#define GL_MAP_TESSELLATION_NV            0x86C2\n#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3\n#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4\n#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5\n#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6\n#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7\n#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8\n#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9\n#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA\n#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB\n#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC\n#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD\n#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE\n#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF\n#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0\n#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1\n#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2\n#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3\n#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4\n#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5\n#define GL_MAX_MAP_TESSELLATION_NV        0x86D6\n#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7\ntypedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);\nGLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);\nGLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);\n#endif\n#endif /* GL_NV_evaluators */\n\n#ifndef GL_NV_explicit_multisample\n#define GL_NV_explicit_multisample 1\n#define GL_SAMPLE_POSITION_NV             0x8E50\n#define GL_SAMPLE_MASK_NV                 0x8E51\n#define GL_SAMPLE_MASK_VALUE_NV           0x8E52\n#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53\n#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54\n#define GL_TEXTURE_RENDERBUFFER_NV        0x8E55\n#define GL_SAMPLER_RENDERBUFFER_NV        0x8E56\n#define GL_INT_SAMPLER_RENDERBUFFER_NV    0x8E57\n#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58\n#define GL_MAX_SAMPLE_MASK_WORDS_NV       0x8E59\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);\ntypedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);\nGLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);\n#endif\n#endif /* GL_NV_explicit_multisample */\n\n#ifndef GL_NV_fence\n#define GL_NV_fence 1\n#define GL_ALL_COMPLETED_NV               0x84F2\n#define GL_FENCE_STATUS_NV                0x84F3\n#define GL_FENCE_CONDITION_NV             0x84F4\ntypedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\ntypedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\nGLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);\nGLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFinishFenceNV (GLuint fence);\nGLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\n#endif\n#endif /* GL_NV_fence */\n\n#ifndef GL_NV_float_buffer\n#define GL_NV_float_buffer 1\n#define GL_FLOAT_R_NV                     0x8880\n#define GL_FLOAT_RG_NV                    0x8881\n#define GL_FLOAT_RGB_NV                   0x8882\n#define GL_FLOAT_RGBA_NV                  0x8883\n#define GL_FLOAT_R16_NV                   0x8884\n#define GL_FLOAT_R32_NV                   0x8885\n#define GL_FLOAT_RG16_NV                  0x8886\n#define GL_FLOAT_RG32_NV                  0x8887\n#define GL_FLOAT_RGB16_NV                 0x8888\n#define GL_FLOAT_RGB32_NV                 0x8889\n#define GL_FLOAT_RGBA16_NV                0x888A\n#define GL_FLOAT_RGBA32_NV                0x888B\n#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C\n#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D\n#define GL_FLOAT_RGBA_MODE_NV             0x888E\n#endif /* GL_NV_float_buffer */\n\n#ifndef GL_NV_fog_distance\n#define GL_NV_fog_distance 1\n#define GL_FOG_DISTANCE_MODE_NV           0x855A\n#define GL_EYE_RADIAL_NV                  0x855B\n#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C\n#endif /* GL_NV_fog_distance */\n\n#ifndef GL_NV_fragment_program\n#define GL_NV_fragment_program 1\n#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868\n#define GL_FRAGMENT_PROGRAM_NV            0x8870\n#define GL_MAX_TEXTURE_COORDS_NV          0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872\n#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873\n#define GL_PROGRAM_ERROR_STRING_NV        0x8874\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\nGLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\nGLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\nGLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#endif\n#endif /* GL_NV_fragment_program */\n\n#ifndef GL_NV_fragment_program2\n#define GL_NV_fragment_program2 1\n#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4\n#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5\n#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6\n#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7\n#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8\n#endif /* GL_NV_fragment_program2 */\n\n#ifndef GL_NV_fragment_program4\n#define GL_NV_fragment_program4 1\n#endif /* GL_NV_fragment_program4 */\n\n#ifndef GL_NV_fragment_program_option\n#define GL_NV_fragment_program_option 1\n#endif /* GL_NV_fragment_program_option */\n\n#ifndef GL_NV_framebuffer_multisample_coverage\n#define GL_NV_framebuffer_multisample_coverage 1\n#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB\n#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10\n#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11\n#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_NV_framebuffer_multisample_coverage */\n\n#ifndef GL_NV_geometry_program4\n#define GL_NV_geometry_program4 1\n#define GL_GEOMETRY_PROGRAM_NV            0x8C26\n#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27\n#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28\ntypedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);\nGLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n#endif /* GL_NV_geometry_program4 */\n\n#ifndef GL_NV_geometry_shader4\n#define GL_NV_geometry_shader4 1\n#endif /* GL_NV_geometry_shader4 */\n\n#ifndef GL_NV_gpu_program4\n#define GL_NV_gpu_program4 1\n#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905\n#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906\n#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907\n#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908\n#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909\n#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5\n#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);\n#endif\n#endif /* GL_NV_gpu_program4 */\n\n#ifndef GL_NV_gpu_program5\n#define GL_NV_gpu_program5 1\n#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C\n#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F\n#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44\n#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV  0x8F45\ntypedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);\n#endif\n#endif /* GL_NV_gpu_program5 */\n\n#ifndef GL_NV_gpu_program5_mem_extended\n#define GL_NV_gpu_program5_mem_extended 1\n#endif /* GL_NV_gpu_program5_mem_extended */\n\n#ifndef GL_NV_gpu_shader5\n#define GL_NV_gpu_shader5 1\n#endif /* GL_NV_gpu_shader5 */\n\n#ifndef GL_NV_half_float\n#define GL_NV_half_float 1\ntypedef unsigned short GLhalfNV;\n#define GL_HALF_FLOAT_NV                  0x140B\ntypedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\ntypedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\ntypedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);\ntypedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\nGLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\nGLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);\nGLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);\nGLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);\nGLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);\nGLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);\nGLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);\nGLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);\nGLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\n#endif\n#endif /* GL_NV_half_float */\n\n#ifndef GL_NV_light_max_exponent\n#define GL_NV_light_max_exponent 1\n#define GL_MAX_SHININESS_NV               0x8504\n#define GL_MAX_SPOT_EXPONENT_NV           0x8505\n#endif /* GL_NV_light_max_exponent */\n\n#ifndef GL_NV_multisample_coverage\n#define GL_NV_multisample_coverage 1\n#define GL_COLOR_SAMPLES_NV               0x8E20\n#endif /* GL_NV_multisample_coverage */\n\n#ifndef GL_NV_multisample_filter_hint\n#define GL_NV_multisample_filter_hint 1\n#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534\n#endif /* GL_NV_multisample_filter_hint */\n\n#ifndef GL_NV_occlusion_query\n#define GL_NV_occlusion_query 1\n#define GL_PIXEL_COUNTER_BITS_NV          0x8864\n#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865\n#define GL_PIXEL_COUNT_NV                 0x8866\n#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867\ntypedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glEndOcclusionQueryNV (void);\nGLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_NV_occlusion_query */\n\n#ifndef GL_NV_packed_depth_stencil\n#define GL_NV_packed_depth_stencil 1\n#define GL_DEPTH_STENCIL_NV               0x84F9\n#define GL_UNSIGNED_INT_24_8_NV           0x84FA\n#endif /* GL_NV_packed_depth_stencil */\n\n#ifndef GL_NV_parameter_buffer_object\n#define GL_NV_parameter_buffer_object 1\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1\n#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2\n#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3\n#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#endif\n#endif /* GL_NV_parameter_buffer_object */\n\n#ifndef GL_NV_parameter_buffer_object2\n#define GL_NV_parameter_buffer_object2 1\n#endif /* GL_NV_parameter_buffer_object2 */\n\n#ifndef GL_NV_path_rendering\n#define GL_NV_path_rendering 1\n#define GL_PATH_FORMAT_SVG_NV             0x9070\n#define GL_PATH_FORMAT_PS_NV              0x9071\n#define GL_STANDARD_FONT_NAME_NV          0x9072\n#define GL_SYSTEM_FONT_NAME_NV            0x9073\n#define GL_FILE_NAME_NV                   0x9074\n#define GL_PATH_STROKE_WIDTH_NV           0x9075\n#define GL_PATH_END_CAPS_NV               0x9076\n#define GL_PATH_INITIAL_END_CAP_NV        0x9077\n#define GL_PATH_TERMINAL_END_CAP_NV       0x9078\n#define GL_PATH_JOIN_STYLE_NV             0x9079\n#define GL_PATH_MITER_LIMIT_NV            0x907A\n#define GL_PATH_DASH_CAPS_NV              0x907B\n#define GL_PATH_INITIAL_DASH_CAP_NV       0x907C\n#define GL_PATH_TERMINAL_DASH_CAP_NV      0x907D\n#define GL_PATH_DASH_OFFSET_NV            0x907E\n#define GL_PATH_CLIENT_LENGTH_NV          0x907F\n#define GL_PATH_FILL_MODE_NV              0x9080\n#define GL_PATH_FILL_MASK_NV              0x9081\n#define GL_PATH_FILL_COVER_MODE_NV        0x9082\n#define GL_PATH_STROKE_COVER_MODE_NV      0x9083\n#define GL_PATH_STROKE_MASK_NV            0x9084\n#define GL_COUNT_UP_NV                    0x9088\n#define GL_COUNT_DOWN_NV                  0x9089\n#define GL_PATH_OBJECT_BOUNDING_BOX_NV    0x908A\n#define GL_CONVEX_HULL_NV                 0x908B\n#define GL_BOUNDING_BOX_NV                0x908D\n#define GL_TRANSLATE_X_NV                 0x908E\n#define GL_TRANSLATE_Y_NV                 0x908F\n#define GL_TRANSLATE_2D_NV                0x9090\n#define GL_TRANSLATE_3D_NV                0x9091\n#define GL_AFFINE_2D_NV                   0x9092\n#define GL_AFFINE_3D_NV                   0x9094\n#define GL_TRANSPOSE_AFFINE_2D_NV         0x9096\n#define GL_TRANSPOSE_AFFINE_3D_NV         0x9098\n#define GL_UTF8_NV                        0x909A\n#define GL_UTF16_NV                       0x909B\n#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C\n#define GL_PATH_COMMAND_COUNT_NV          0x909D\n#define GL_PATH_COORD_COUNT_NV            0x909E\n#define GL_PATH_DASH_ARRAY_COUNT_NV       0x909F\n#define GL_PATH_COMPUTED_LENGTH_NV        0x90A0\n#define GL_PATH_FILL_BOUNDING_BOX_NV      0x90A1\n#define GL_PATH_STROKE_BOUNDING_BOX_NV    0x90A2\n#define GL_SQUARE_NV                      0x90A3\n#define GL_ROUND_NV                       0x90A4\n#define GL_TRIANGULAR_NV                  0x90A5\n#define GL_BEVEL_NV                       0x90A6\n#define GL_MITER_REVERT_NV                0x90A7\n#define GL_MITER_TRUNCATE_NV              0x90A8\n#define GL_SKIP_MISSING_GLYPH_NV          0x90A9\n#define GL_USE_MISSING_GLYPH_NV           0x90AA\n#define GL_PATH_ERROR_POSITION_NV         0x90AB\n#define GL_PATH_FOG_GEN_MODE_NV           0x90AC\n#define GL_ACCUM_ADJACENT_PAIRS_NV        0x90AD\n#define GL_ADJACENT_PAIRS_NV              0x90AE\n#define GL_FIRST_TO_REST_NV               0x90AF\n#define GL_PATH_GEN_MODE_NV               0x90B0\n#define GL_PATH_GEN_COEFF_NV              0x90B1\n#define GL_PATH_GEN_COLOR_FORMAT_NV       0x90B2\n#define GL_PATH_GEN_COMPONENTS_NV         0x90B3\n#define GL_PATH_STENCIL_FUNC_NV           0x90B7\n#define GL_PATH_STENCIL_REF_NV            0x90B8\n#define GL_PATH_STENCIL_VALUE_MASK_NV     0x90B9\n#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD\n#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE\n#define GL_PATH_COVER_DEPTH_FUNC_NV       0x90BF\n#define GL_PATH_DASH_OFFSET_RESET_NV      0x90B4\n#define GL_MOVE_TO_RESETS_NV              0x90B5\n#define GL_MOVE_TO_CONTINUES_NV           0x90B6\n#define GL_CLOSE_PATH_NV                  0x00\n#define GL_MOVE_TO_NV                     0x02\n#define GL_RELATIVE_MOVE_TO_NV            0x03\n#define GL_LINE_TO_NV                     0x04\n#define GL_RELATIVE_LINE_TO_NV            0x05\n#define GL_HORIZONTAL_LINE_TO_NV          0x06\n#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07\n#define GL_VERTICAL_LINE_TO_NV            0x08\n#define GL_RELATIVE_VERTICAL_LINE_TO_NV   0x09\n#define GL_QUADRATIC_CURVE_TO_NV          0x0A\n#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B\n#define GL_CUBIC_CURVE_TO_NV              0x0C\n#define GL_RELATIVE_CUBIC_CURVE_TO_NV     0x0D\n#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV   0x0E\n#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F\n#define GL_SMOOTH_CUBIC_CURVE_TO_NV       0x10\n#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11\n#define GL_SMALL_CCW_ARC_TO_NV            0x12\n#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV   0x13\n#define GL_SMALL_CW_ARC_TO_NV             0x14\n#define GL_RELATIVE_SMALL_CW_ARC_TO_NV    0x15\n#define GL_LARGE_CCW_ARC_TO_NV            0x16\n#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV   0x17\n#define GL_LARGE_CW_ARC_TO_NV             0x18\n#define GL_RELATIVE_LARGE_CW_ARC_TO_NV    0x19\n#define GL_RESTART_PATH_NV                0xF0\n#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV    0xF2\n#define GL_DUP_LAST_CUBIC_CURVE_TO_NV     0xF4\n#define GL_RECT_NV                        0xF6\n#define GL_CIRCULAR_CCW_ARC_TO_NV         0xF8\n#define GL_CIRCULAR_CW_ARC_TO_NV          0xFA\n#define GL_CIRCULAR_TANGENT_ARC_TO_NV     0xFC\n#define GL_ARC_TO_NV                      0xFE\n#define GL_RELATIVE_ARC_TO_NV             0xFF\n#define GL_BOLD_BIT_NV                    0x01\n#define GL_ITALIC_BIT_NV                  0x02\n#define GL_GLYPH_WIDTH_BIT_NV             0x01\n#define GL_GLYPH_HEIGHT_BIT_NV            0x02\n#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04\n#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08\n#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10\n#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20\n#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40\n#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80\n#define GL_GLYPH_HAS_KERNING_BIT_NV       0x100\n#define GL_FONT_X_MIN_BOUNDS_BIT_NV       0x00010000\n#define GL_FONT_Y_MIN_BOUNDS_BIT_NV       0x00020000\n#define GL_FONT_X_MAX_BOUNDS_BIT_NV       0x00040000\n#define GL_FONT_Y_MAX_BOUNDS_BIT_NV       0x00080000\n#define GL_FONT_UNITS_PER_EM_BIT_NV       0x00100000\n#define GL_FONT_ASCENDER_BIT_NV           0x00200000\n#define GL_FONT_DESCENDER_BIT_NV          0x00400000\n#define GL_FONT_HEIGHT_BIT_NV             0x00800000\n#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV  0x01000000\n#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000\n#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000\n#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000\n#define GL_FONT_HAS_KERNING_BIT_NV        0x10000000\n#define GL_PRIMARY_COLOR_NV               0x852C\n#define GL_SECONDARY_COLOR_NV             0x852D\ntypedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);\ntypedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);\ntypedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);\ntypedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\ntypedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);\ntypedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);\ntypedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);\ntypedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);\ntypedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);\ntypedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);\ntypedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);\nGLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);\nGLAPI GLboolean APIENTRY glIsPathNV (GLuint path);\nGLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);\nGLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\nGLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);\nGLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\nGLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);\nGLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);\nGLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);\nGLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);\nGLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\nGLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);\nGLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);\nGLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);\nGLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);\nGLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathFogGenNV (GLenum genMode);\nGLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);\nGLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);\nGLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);\nGLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\nGLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);\nGLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);\nGLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);\nGLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);\nGLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#endif\n#endif /* GL_NV_path_rendering */\n\n#ifndef GL_NV_pixel_data_range\n#define GL_NV_pixel_data_range 1\n#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878\n#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879\n#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A\n#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B\n#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C\n#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D\ntypedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);\nGLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);\n#endif\n#endif /* GL_NV_pixel_data_range */\n\n#ifndef GL_NV_point_sprite\n#define GL_NV_point_sprite 1\n#define GL_POINT_SPRITE_NV                0x8861\n#define GL_COORD_REPLACE_NV               0x8862\n#define GL_POINT_SPRITE_R_MODE_NV         0x8863\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);\n#endif\n#endif /* GL_NV_point_sprite */\n\n#ifndef GL_NV_present_video\n#define GL_NV_present_video 1\n#define GL_FRAME_NV                       0x8E26\n#define GL_FIELDS_NV                      0x8E27\n#define GL_CURRENT_TIME_NV                0x8E28\n#define GL_NUM_FILL_STREAMS_NV            0x8E29\n#define GL_PRESENT_TIME_NV                0x8E2A\n#define GL_PRESENT_DURATION_NV            0x8E2B\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\ntypedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\nGLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\nGLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#endif\n#endif /* GL_NV_present_video */\n\n#ifndef GL_NV_primitive_restart\n#define GL_NV_primitive_restart 1\n#define GL_PRIMITIVE_RESTART_NV           0x8558\n#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPrimitiveRestartNV (void);\nGLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);\n#endif\n#endif /* GL_NV_primitive_restart */\n\n#ifndef GL_NV_register_combiners\n#define GL_NV_register_combiners 1\n#define GL_REGISTER_COMBINERS_NV          0x8522\n#define GL_VARIABLE_A_NV                  0x8523\n#define GL_VARIABLE_B_NV                  0x8524\n#define GL_VARIABLE_C_NV                  0x8525\n#define GL_VARIABLE_D_NV                  0x8526\n#define GL_VARIABLE_E_NV                  0x8527\n#define GL_VARIABLE_F_NV                  0x8528\n#define GL_VARIABLE_G_NV                  0x8529\n#define GL_CONSTANT_COLOR0_NV             0x852A\n#define GL_CONSTANT_COLOR1_NV             0x852B\n#define GL_SPARE0_NV                      0x852E\n#define GL_SPARE1_NV                      0x852F\n#define GL_DISCARD_NV                     0x8530\n#define GL_E_TIMES_F_NV                   0x8531\n#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532\n#define GL_UNSIGNED_IDENTITY_NV           0x8536\n#define GL_UNSIGNED_INVERT_NV             0x8537\n#define GL_EXPAND_NORMAL_NV               0x8538\n#define GL_EXPAND_NEGATE_NV               0x8539\n#define GL_HALF_BIAS_NORMAL_NV            0x853A\n#define GL_HALF_BIAS_NEGATE_NV            0x853B\n#define GL_SIGNED_IDENTITY_NV             0x853C\n#define GL_SIGNED_NEGATE_NV               0x853D\n#define GL_SCALE_BY_TWO_NV                0x853E\n#define GL_SCALE_BY_FOUR_NV               0x853F\n#define GL_SCALE_BY_ONE_HALF_NV           0x8540\n#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541\n#define GL_COMBINER_INPUT_NV              0x8542\n#define GL_COMBINER_MAPPING_NV            0x8543\n#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544\n#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545\n#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546\n#define GL_COMBINER_MUX_SUM_NV            0x8547\n#define GL_COMBINER_SCALE_NV              0x8548\n#define GL_COMBINER_BIAS_NV               0x8549\n#define GL_COMBINER_AB_OUTPUT_NV          0x854A\n#define GL_COMBINER_CD_OUTPUT_NV          0x854B\n#define GL_COMBINER_SUM_OUTPUT_NV         0x854C\n#define GL_MAX_GENERAL_COMBINERS_NV       0x854D\n#define GL_NUM_GENERAL_COMBINERS_NV       0x854E\n#define GL_COLOR_SUM_CLAMP_NV             0x854F\n#define GL_COMBINER0_NV                   0x8550\n#define GL_COMBINER1_NV                   0x8551\n#define GL_COMBINER2_NV                   0x8552\n#define GL_COMBINER3_NV                   0x8553\n#define GL_COMBINER4_NV                   0x8554\n#define GL_COMBINER5_NV                   0x8555\n#define GL_COMBINER6_NV                   0x8556\n#define GL_COMBINER7_NV                   0x8557\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\ntypedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\nGLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);\n#endif\n#endif /* GL_NV_register_combiners */\n\n#ifndef GL_NV_register_combiners2\n#define GL_NV_register_combiners2 1\n#define GL_PER_STAGE_CONSTANTS_NV         0x8535\ntypedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_NV_register_combiners2 */\n\n#ifndef GL_NV_shader_atomic_counters\n#define GL_NV_shader_atomic_counters 1\n#endif /* GL_NV_shader_atomic_counters */\n\n#ifndef GL_NV_shader_atomic_float\n#define GL_NV_shader_atomic_float 1\n#endif /* GL_NV_shader_atomic_float */\n\n#ifndef GL_NV_shader_buffer_load\n#define GL_NV_shader_buffer_load 1\n#define GL_BUFFER_GPU_ADDRESS_NV          0x8F1D\n#define GL_GPU_ADDRESS_NV                 0x8F34\n#define GL_MAX_SHADER_BUFFER_ADDRESS_NV   0x8F35\ntypedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);\nGLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);\nGLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);\nGLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);\nGLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);\nGLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);\nGLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);\nGLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n#endif /* GL_NV_shader_buffer_load */\n\n#ifndef GL_NV_shader_buffer_store\n#define GL_NV_shader_buffer_store 1\n#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010\n#endif /* GL_NV_shader_buffer_store */\n\n#ifndef GL_NV_shader_storage_buffer_object\n#define GL_NV_shader_storage_buffer_object 1\n#endif /* GL_NV_shader_storage_buffer_object */\n\n#ifndef GL_NV_shader_thread_group\n#define GL_NV_shader_thread_group 1\n#define GL_WARP_SIZE_NV                   0x9339\n#define GL_WARPS_PER_SM_NV                0x933A\n#define GL_SM_COUNT_NV                    0x933B\n#endif /* GL_NV_shader_thread_group */\n\n#ifndef GL_NV_shader_thread_shuffle\n#define GL_NV_shader_thread_shuffle 1\n#endif /* GL_NV_shader_thread_shuffle */\n\n#ifndef GL_NV_tessellation_program5\n#define GL_NV_tessellation_program5 1\n#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV   0x86D8\n#define GL_TESS_CONTROL_PROGRAM_NV        0x891E\n#define GL_TESS_EVALUATION_PROGRAM_NV     0x891F\n#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74\n#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75\n#endif /* GL_NV_tessellation_program5 */\n\n#ifndef GL_NV_texgen_emboss\n#define GL_NV_texgen_emboss 1\n#define GL_EMBOSS_LIGHT_NV                0x855D\n#define GL_EMBOSS_CONSTANT_NV             0x855E\n#define GL_EMBOSS_MAP_NV                  0x855F\n#endif /* GL_NV_texgen_emboss */\n\n#ifndef GL_NV_texgen_reflection\n#define GL_NV_texgen_reflection 1\n#define GL_NORMAL_MAP_NV                  0x8511\n#define GL_REFLECTION_MAP_NV              0x8512\n#endif /* GL_NV_texgen_reflection */\n\n#ifndef GL_NV_texture_barrier\n#define GL_NV_texture_barrier 1\ntypedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureBarrierNV (void);\n#endif\n#endif /* GL_NV_texture_barrier */\n\n#ifndef GL_NV_texture_compression_vtc\n#define GL_NV_texture_compression_vtc 1\n#endif /* GL_NV_texture_compression_vtc */\n\n#ifndef GL_NV_texture_env_combine4\n#define GL_NV_texture_env_combine4 1\n#define GL_COMBINE4_NV                    0x8503\n#define GL_SOURCE3_RGB_NV                 0x8583\n#define GL_SOURCE3_ALPHA_NV               0x858B\n#define GL_OPERAND3_RGB_NV                0x8593\n#define GL_OPERAND3_ALPHA_NV              0x859B\n#endif /* GL_NV_texture_env_combine4 */\n\n#ifndef GL_NV_texture_expand_normal\n#define GL_NV_texture_expand_normal 1\n#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F\n#endif /* GL_NV_texture_expand_normal */\n\n#ifndef GL_NV_texture_multisample\n#define GL_NV_texture_multisample 1\n#define GL_TEXTURE_COVERAGE_SAMPLES_NV    0x9045\n#define GL_TEXTURE_COLOR_SAMPLES_NV       0x9046\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#endif\n#endif /* GL_NV_texture_multisample */\n\n#ifndef GL_NV_texture_rectangle\n#define GL_NV_texture_rectangle 1\n#define GL_TEXTURE_RECTANGLE_NV           0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8\n#endif /* GL_NV_texture_rectangle */\n\n#ifndef GL_NV_texture_shader\n#define GL_NV_texture_shader 1\n#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C\n#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D\n#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E\n#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9\n#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA\n#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB\n#define GL_DSDT_MAG_INTENSITY_NV          0x86DC\n#define GL_SHADER_CONSISTENT_NV           0x86DD\n#define GL_TEXTURE_SHADER_NV              0x86DE\n#define GL_SHADER_OPERATION_NV            0x86DF\n#define GL_CULL_MODES_NV                  0x86E0\n#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1\n#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2\n#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3\n#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    0x86E1\n#define GL_OFFSET_TEXTURE_2D_SCALE_NV     0x86E2\n#define GL_OFFSET_TEXTURE_2D_BIAS_NV      0x86E3\n#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4\n#define GL_CONST_EYE_NV                   0x86E5\n#define GL_PASS_THROUGH_NV                0x86E6\n#define GL_CULL_FRAGMENT_NV               0x86E7\n#define GL_OFFSET_TEXTURE_2D_NV           0x86E8\n#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9\n#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA\n#define GL_DOT_PRODUCT_NV                 0x86EC\n#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED\n#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE\n#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0\n#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1\n#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2\n#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3\n#define GL_HILO_NV                        0x86F4\n#define GL_DSDT_NV                        0x86F5\n#define GL_DSDT_MAG_NV                    0x86F6\n#define GL_DSDT_MAG_VIB_NV                0x86F7\n#define GL_HILO16_NV                      0x86F8\n#define GL_SIGNED_HILO_NV                 0x86F9\n#define GL_SIGNED_HILO16_NV               0x86FA\n#define GL_SIGNED_RGBA_NV                 0x86FB\n#define GL_SIGNED_RGBA8_NV                0x86FC\n#define GL_SIGNED_RGB_NV                  0x86FE\n#define GL_SIGNED_RGB8_NV                 0x86FF\n#define GL_SIGNED_LUMINANCE_NV            0x8701\n#define GL_SIGNED_LUMINANCE8_NV           0x8702\n#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703\n#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704\n#define GL_SIGNED_ALPHA_NV                0x8705\n#define GL_SIGNED_ALPHA8_NV               0x8706\n#define GL_SIGNED_INTENSITY_NV            0x8707\n#define GL_SIGNED_INTENSITY8_NV           0x8708\n#define GL_DSDT8_NV                       0x8709\n#define GL_DSDT8_MAG8_NV                  0x870A\n#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B\n#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C\n#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D\n#define GL_HI_SCALE_NV                    0x870E\n#define GL_LO_SCALE_NV                    0x870F\n#define GL_DS_SCALE_NV                    0x8710\n#define GL_DT_SCALE_NV                    0x8711\n#define GL_MAGNITUDE_SCALE_NV             0x8712\n#define GL_VIBRANCE_SCALE_NV              0x8713\n#define GL_HI_BIAS_NV                     0x8714\n#define GL_LO_BIAS_NV                     0x8715\n#define GL_DS_BIAS_NV                     0x8716\n#define GL_DT_BIAS_NV                     0x8717\n#define GL_MAGNITUDE_BIAS_NV              0x8718\n#define GL_VIBRANCE_BIAS_NV               0x8719\n#define GL_TEXTURE_BORDER_VALUES_NV       0x871A\n#define GL_TEXTURE_HI_SIZE_NV             0x871B\n#define GL_TEXTURE_LO_SIZE_NV             0x871C\n#define GL_TEXTURE_DS_SIZE_NV             0x871D\n#define GL_TEXTURE_DT_SIZE_NV             0x871E\n#define GL_TEXTURE_MAG_SIZE_NV            0x871F\n#endif /* GL_NV_texture_shader */\n\n#ifndef GL_NV_texture_shader2\n#define GL_NV_texture_shader2 1\n#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF\n#endif /* GL_NV_texture_shader2 */\n\n#ifndef GL_NV_texture_shader3\n#define GL_NV_texture_shader3 1\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853\n#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854\n#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857\n#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858\n#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859\n#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A\n#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B\n#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C\n#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D\n#define GL_HILO8_NV                       0x885E\n#define GL_SIGNED_HILO8_NV                0x885F\n#define GL_FORCE_BLUE_TO_ONE_NV           0x8860\n#endif /* GL_NV_texture_shader3 */\n\n#ifndef GL_NV_transform_feedback\n#define GL_NV_transform_feedback 1\n#define GL_BACK_PRIMARY_COLOR_NV          0x8C77\n#define GL_BACK_SECONDARY_COLOR_NV        0x8C78\n#define GL_TEXTURE_COORD_NV               0x8C79\n#define GL_CLIP_DISTANCE_NV               0x8C7A\n#define GL_VERTEX_ID_NV                   0x8C7B\n#define GL_PRIMITIVE_ID_NV                0x8C7C\n#define GL_GENERIC_ATTRIB_NV              0x8C7D\n#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80\n#define GL_ACTIVE_VARYINGS_NV             0x8C81\n#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85\n#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86\n#define GL_PRIMITIVES_GENERATED_NV        0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88\n#define GL_RASTERIZER_DISCARD_NV          0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C\n#define GL_SEPARATE_ATTRIBS_NV            0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F\n#define GL_LAYER_NV                       0x8DAA\n#define GL_NEXT_BUFFER_NV                 -2\n#define GL_SKIP_COMPONENTS4_NV            -3\n#define GL_SKIP_COMPONENTS3_NV            -4\n#define GL_SKIP_COMPONENTS2_NV            -5\n#define GL_SKIP_COMPONENTS1_NV            -6\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackNV (void);\nGLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);\nGLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\nGLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);\nGLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);\nGLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#endif\n#endif /* GL_NV_transform_feedback */\n\n#ifndef GL_NV_transform_feedback2\n#define GL_NV_transform_feedback2 1\n#define GL_TRANSFORM_FEEDBACK_NV          0x8E22\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24\n#define GL_TRANSFORM_FEEDBACK_BINDING_NV  0x8E25\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedbackNV (void);\nGLAPI void APIENTRY glResumeTransformFeedbackNV (void);\nGLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);\n#endif\n#endif /* GL_NV_transform_feedback2 */\n\n#ifndef GL_NV_vdpau_interop\n#define GL_NV_vdpau_interop 1\ntypedef GLintptr GLvdpauSurfaceNV;\n#define GL_SURFACE_STATE_NV               0x86EB\n#define GL_SURFACE_REGISTERED_NV          0x86FD\n#define GL_SURFACE_MAPPED_NV              0x8700\n#define GL_WRITE_DISCARD_NV               0x88BE\ntypedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);\ntypedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\ntypedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);\ntypedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\ntypedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);\nGLAPI void APIENTRY glVDPAUFiniNV (void);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\nGLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);\nGLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\nGLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#endif\n#endif /* GL_NV_vdpau_interop */\n\n#ifndef GL_NV_vertex_array_range\n#define GL_NV_vertex_array_range 1\n#define GL_VERTEX_ARRAY_RANGE_NV          0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E\n#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F\n#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520\n#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushVertexArrayRangeNV (void);\nGLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);\n#endif\n#endif /* GL_NV_vertex_array_range */\n\n#ifndef GL_NV_vertex_array_range2\n#define GL_NV_vertex_array_range2 1\n#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533\n#endif /* GL_NV_vertex_array_range2 */\n\n#ifndef GL_NV_vertex_attrib_integer_64bit\n#define GL_NV_vertex_attrib_integer_64bit 1\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\n#endif\n#endif /* GL_NV_vertex_attrib_integer_64bit */\n\n#ifndef GL_NV_vertex_buffer_unified_memory\n#define GL_NV_vertex_buffer_unified_memory 1\n#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E\n#define GL_ELEMENT_ARRAY_UNIFIED_NV       0x8F1F\n#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20\n#define GL_VERTEX_ARRAY_ADDRESS_NV        0x8F21\n#define GL_NORMAL_ARRAY_ADDRESS_NV        0x8F22\n#define GL_COLOR_ARRAY_ADDRESS_NV         0x8F23\n#define GL_INDEX_ARRAY_ADDRESS_NV         0x8F24\n#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25\n#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV     0x8F26\n#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27\n#define GL_FOG_COORD_ARRAY_ADDRESS_NV     0x8F28\n#define GL_ELEMENT_ARRAY_ADDRESS_NV       0x8F29\n#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV  0x8F2A\n#define GL_VERTEX_ARRAY_LENGTH_NV         0x8F2B\n#define GL_NORMAL_ARRAY_LENGTH_NV         0x8F2C\n#define GL_COLOR_ARRAY_LENGTH_NV          0x8F2D\n#define GL_INDEX_ARRAY_LENGTH_NV          0x8F2E\n#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV  0x8F2F\n#define GL_EDGE_FLAG_ARRAY_LENGTH_NV      0x8F30\n#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31\n#define GL_FOG_COORD_ARRAY_LENGTH_NV      0x8F32\n#define GL_ELEMENT_ARRAY_LENGTH_NV        0x8F33\n#define GL_DRAW_INDIRECT_UNIFIED_NV       0x8F40\n#define GL_DRAW_INDIRECT_ADDRESS_NV       0x8F41\n#define GL_DRAW_INDIRECT_LENGTH_NV        0x8F42\ntypedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\nGLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);\nGLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);\n#endif\n#endif /* GL_NV_vertex_buffer_unified_memory */\n\n#ifndef GL_NV_vertex_program\n#define GL_NV_vertex_program 1\n#define GL_VERTEX_PROGRAM_NV              0x8620\n#define GL_VERTEX_STATE_PROGRAM_NV        0x8621\n#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623\n#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624\n#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625\n#define GL_CURRENT_ATTRIB_NV              0x8626\n#define GL_PROGRAM_LENGTH_NV              0x8627\n#define GL_PROGRAM_STRING_NV              0x8628\n#define GL_MODELVIEW_PROJECTION_NV        0x8629\n#define GL_IDENTITY_NV                    0x862A\n#define GL_INVERSE_NV                     0x862B\n#define GL_TRANSPOSE_NV                   0x862C\n#define GL_INVERSE_TRANSPOSE_NV           0x862D\n#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E\n#define GL_MAX_TRACK_MATRICES_NV          0x862F\n#define GL_MATRIX0_NV                     0x8630\n#define GL_MATRIX1_NV                     0x8631\n#define GL_MATRIX2_NV                     0x8632\n#define GL_MATRIX3_NV                     0x8633\n#define GL_MATRIX4_NV                     0x8634\n#define GL_MATRIX5_NV                     0x8635\n#define GL_MATRIX6_NV                     0x8636\n#define GL_MATRIX7_NV                     0x8637\n#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640\n#define GL_CURRENT_MATRIX_NV              0x8641\n#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643\n#define GL_PROGRAM_PARAMETER_NV           0x8644\n#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645\n#define GL_PROGRAM_TARGET_NV              0x8646\n#define GL_PROGRAM_RESIDENT_NV            0x8647\n#define GL_TRACK_MATRIX_NV                0x8648\n#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649\n#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A\n#define GL_PROGRAM_ERROR_POSITION_NV      0x864B\n#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650\n#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651\n#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652\n#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653\n#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654\n#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655\n#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656\n#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657\n#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658\n#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659\n#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A\n#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B\n#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C\n#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D\n#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E\n#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F\n#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660\n#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661\n#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662\n#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663\n#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664\n#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665\n#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666\n#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667\n#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668\n#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669\n#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A\n#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B\n#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C\n#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D\n#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E\n#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F\n#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670\n#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671\n#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672\n#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673\n#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674\n#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675\n#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676\n#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677\n#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678\n#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679\n#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A\n#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B\n#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C\n#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D\n#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E\n#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F\ntypedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);\ntypedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);\nGLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);\nGLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);\nGLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);\nGLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);\nGLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\nGLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);\nGLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);\n#endif\n#endif /* GL_NV_vertex_program */\n\n#ifndef GL_NV_vertex_program1_1\n#define GL_NV_vertex_program1_1 1\n#endif /* GL_NV_vertex_program1_1 */\n\n#ifndef GL_NV_vertex_program2\n#define GL_NV_vertex_program2 1\n#endif /* GL_NV_vertex_program2 */\n\n#ifndef GL_NV_vertex_program2_option\n#define GL_NV_vertex_program2_option 1\n#endif /* GL_NV_vertex_program2_option */\n\n#ifndef GL_NV_vertex_program3\n#define GL_NV_vertex_program3 1\n#endif /* GL_NV_vertex_program3 */\n\n#ifndef GL_NV_vertex_program4\n#define GL_NV_vertex_program4 1\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_NV_vertex_program4 */\n\n#ifndef GL_NV_video_capture\n#define GL_NV_video_capture 1\n#define GL_VIDEO_BUFFER_NV                0x9020\n#define GL_VIDEO_BUFFER_BINDING_NV        0x9021\n#define GL_FIELD_UPPER_NV                 0x9022\n#define GL_FIELD_LOWER_NV                 0x9023\n#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV   0x9024\n#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025\n#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026\n#define GL_LAST_VIDEO_CAPTURE_STATUS_NV   0x9027\n#define GL_VIDEO_BUFFER_PITCH_NV          0x9028\n#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029\n#define GL_VIDEO_COLOR_CONVERSION_MAX_NV  0x902A\n#define GL_VIDEO_COLOR_CONVERSION_MIN_NV  0x902B\n#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C\n#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D\n#define GL_PARTIAL_SUCCESS_NV             0x902E\n#define GL_SUCCESS_NV                     0x902F\n#define GL_FAILURE_NV                     0x9030\n#define GL_YCBYCR8_422_NV                 0x9031\n#define GL_YCBAYCR8A_4224_NV              0x9032\n#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV  0x9033\n#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034\n#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV  0x9035\n#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036\n#define GL_Z4Y12Z4CB12Z4CR12_444_NV       0x9037\n#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV   0x9038\n#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV  0x9039\n#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A\n#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B\n#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C\ntypedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\ntypedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\nGLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\nGLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\nGLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\nGLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#endif\n#endif /* GL_NV_video_capture */\n\n#ifndef GL_OML_interlace\n#define GL_OML_interlace 1\n#define GL_INTERLACE_OML                  0x8980\n#define GL_INTERLACE_READ_OML             0x8981\n#endif /* GL_OML_interlace */\n\n#ifndef GL_OML_resample\n#define GL_OML_resample 1\n#define GL_PACK_RESAMPLE_OML              0x8984\n#define GL_UNPACK_RESAMPLE_OML            0x8985\n#define GL_RESAMPLE_REPLICATE_OML         0x8986\n#define GL_RESAMPLE_ZERO_FILL_OML         0x8987\n#define GL_RESAMPLE_AVERAGE_OML           0x8988\n#define GL_RESAMPLE_DECIMATE_OML          0x8989\n#endif /* GL_OML_resample */\n\n#ifndef GL_OML_subsample\n#define GL_OML_subsample 1\n#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982\n#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983\n#endif /* GL_OML_subsample */\n\n#ifndef GL_PGI_misc_hints\n#define GL_PGI_misc_hints 1\n#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8\n#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD\n#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE\n#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202\n#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203\n#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204\n#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C\n#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D\n#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E\n#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F\n#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210\n#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211\n#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216\n#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217\n#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218\n#define GL_FULL_STIPPLE_HINT_PGI          0x1A219\n#define GL_CLIP_NEAR_HINT_PGI             0x1A220\n#define GL_CLIP_FAR_HINT_PGI              0x1A221\n#define GL_WIDE_LINE_HINT_PGI             0x1A222\n#define GL_BACK_NORMALS_HINT_PGI          0x1A223\ntypedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);\n#endif\n#endif /* GL_PGI_misc_hints */\n\n#ifndef GL_PGI_vertex_hints\n#define GL_PGI_vertex_hints 1\n#define GL_VERTEX_DATA_HINT_PGI           0x1A22A\n#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B\n#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C\n#define GL_MAX_VERTEX_HINT_PGI            0x1A22D\n#define GL_COLOR3_BIT_PGI                 0x00010000\n#define GL_COLOR4_BIT_PGI                 0x00020000\n#define GL_EDGEFLAG_BIT_PGI               0x00040000\n#define GL_INDEX_BIT_PGI                  0x00080000\n#define GL_MAT_AMBIENT_BIT_PGI            0x00100000\n#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000\n#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000\n#define GL_MAT_EMISSION_BIT_PGI           0x00800000\n#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000\n#define GL_MAT_SHININESS_BIT_PGI          0x02000000\n#define GL_MAT_SPECULAR_BIT_PGI           0x04000000\n#define GL_NORMAL_BIT_PGI                 0x08000000\n#define GL_TEXCOORD1_BIT_PGI              0x10000000\n#define GL_TEXCOORD2_BIT_PGI              0x20000000\n#define GL_TEXCOORD3_BIT_PGI              0x40000000\n#define GL_TEXCOORD4_BIT_PGI              0x80000000\n#define GL_VERTEX23_BIT_PGI               0x00000004\n#define GL_VERTEX4_BIT_PGI                0x00000008\n#endif /* GL_PGI_vertex_hints */\n\n#ifndef GL_REND_screen_coordinates\n#define GL_REND_screen_coordinates 1\n#define GL_SCREEN_COORDINATES_REND        0x8490\n#define GL_INVERTED_SCREEN_W_REND         0x8491\n#endif /* GL_REND_screen_coordinates */\n\n#ifndef GL_S3_s3tc\n#define GL_S3_s3tc 1\n#define GL_RGB_S3TC                       0x83A0\n#define GL_RGB4_S3TC                      0x83A1\n#define GL_RGBA_S3TC                      0x83A2\n#define GL_RGBA4_S3TC                     0x83A3\n#define GL_RGBA_DXT5_S3TC                 0x83A4\n#define GL_RGBA4_DXT5_S3TC                0x83A5\n#endif /* GL_S3_s3tc */\n\n#ifndef GL_SGIS_detail_texture\n#define GL_SGIS_detail_texture 1\n#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095\n#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096\n#define GL_LINEAR_DETAIL_SGIS             0x8097\n#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098\n#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099\n#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A\n#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B\n#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C\ntypedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);\n#endif\n#endif /* GL_SGIS_detail_texture */\n\n#ifndef GL_SGIS_fog_function\n#define GL_SGIS_fog_function 1\n#define GL_FOG_FUNC_SGIS                  0x812A\n#define GL_FOG_FUNC_POINTS_SGIS           0x812B\n#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C\ntypedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);\n#endif\n#endif /* GL_SGIS_fog_function */\n\n#ifndef GL_SGIS_generate_mipmap\n#define GL_SGIS_generate_mipmap 1\n#define GL_GENERATE_MIPMAP_SGIS           0x8191\n#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192\n#endif /* GL_SGIS_generate_mipmap */\n\n#ifndef GL_SGIS_multisample\n#define GL_SGIS_multisample 1\n#define GL_MULTISAMPLE_SGIS               0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F\n#define GL_SAMPLE_MASK_SGIS               0x80A0\n#define GL_1PASS_SGIS                     0x80A1\n#define GL_2PASS_0_SGIS                   0x80A2\n#define GL_2PASS_1_SGIS                   0x80A3\n#define GL_4PASS_0_SGIS                   0x80A4\n#define GL_4PASS_1_SGIS                   0x80A5\n#define GL_4PASS_2_SGIS                   0x80A6\n#define GL_4PASS_3_SGIS                   0x80A7\n#define GL_SAMPLE_BUFFERS_SGIS            0x80A8\n#define GL_SAMPLES_SGIS                   0x80A9\n#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA\n#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB\n#define GL_SAMPLE_PATTERN_SGIS            0x80AC\ntypedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);\n#endif\n#endif /* GL_SGIS_multisample */\n\n#ifndef GL_SGIS_pixel_texture\n#define GL_SGIS_pixel_texture 1\n#define GL_PIXEL_TEXTURE_SGIS             0x8353\n#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354\n#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355\n#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_SGIS_pixel_texture */\n\n#ifndef GL_SGIS_point_line_texgen\n#define GL_SGIS_point_line_texgen 1\n#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0\n#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1\n#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2\n#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3\n#define GL_EYE_POINT_SGIS                 0x81F4\n#define GL_OBJECT_POINT_SGIS              0x81F5\n#define GL_EYE_LINE_SGIS                  0x81F6\n#define GL_OBJECT_LINE_SGIS               0x81F7\n#endif /* GL_SGIS_point_line_texgen */\n\n#ifndef GL_SGIS_point_parameters\n#define GL_SGIS_point_parameters 1\n#define GL_POINT_SIZE_MIN_SGIS            0x8126\n#define GL_POINT_SIZE_MAX_SGIS            0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128\n#define GL_DISTANCE_ATTENUATION_SGIS      0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_SGIS_point_parameters */\n\n#ifndef GL_SGIS_sharpen_texture\n#define GL_SGIS_sharpen_texture 1\n#define GL_LINEAR_SHARPEN_SGIS            0x80AD\n#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE\n#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF\n#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0\ntypedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);\n#endif\n#endif /* GL_SGIS_sharpen_texture */\n\n#ifndef GL_SGIS_texture4D\n#define GL_SGIS_texture4D 1\n#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130\n#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131\n#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132\n#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133\n#define GL_TEXTURE_4D_SGIS                0x8134\n#define GL_PROXY_TEXTURE_4D_SGIS          0x8135\n#define GL_TEXTURE_4DSIZE_SGIS            0x8136\n#define GL_TEXTURE_WRAP_Q_SGIS            0x8137\n#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138\n#define GL_TEXTURE_4D_BINDING_SGIS        0x814F\ntypedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_SGIS_texture4D */\n\n#ifndef GL_SGIS_texture_border_clamp\n#define GL_SGIS_texture_border_clamp 1\n#define GL_CLAMP_TO_BORDER_SGIS           0x812D\n#endif /* GL_SGIS_texture_border_clamp */\n\n#ifndef GL_SGIS_texture_color_mask\n#define GL_SGIS_texture_color_mask 1\n#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF\ntypedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#endif\n#endif /* GL_SGIS_texture_color_mask */\n\n#ifndef GL_SGIS_texture_edge_clamp\n#define GL_SGIS_texture_edge_clamp 1\n#define GL_CLAMP_TO_EDGE_SGIS             0x812F\n#endif /* GL_SGIS_texture_edge_clamp */\n\n#ifndef GL_SGIS_texture_filter4\n#define GL_SGIS_texture_filter4 1\n#define GL_FILTER4_SGIS                   0x8146\n#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147\ntypedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);\ntypedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);\nGLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#endif\n#endif /* GL_SGIS_texture_filter4 */\n\n#ifndef GL_SGIS_texture_lod\n#define GL_SGIS_texture_lod 1\n#define GL_TEXTURE_MIN_LOD_SGIS           0x813A\n#define GL_TEXTURE_MAX_LOD_SGIS           0x813B\n#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C\n#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D\n#endif /* GL_SGIS_texture_lod */\n\n#ifndef GL_SGIS_texture_select\n#define GL_SGIS_texture_select 1\n#define GL_DUAL_ALPHA4_SGIS               0x8110\n#define GL_DUAL_ALPHA8_SGIS               0x8111\n#define GL_DUAL_ALPHA12_SGIS              0x8112\n#define GL_DUAL_ALPHA16_SGIS              0x8113\n#define GL_DUAL_LUMINANCE4_SGIS           0x8114\n#define GL_DUAL_LUMINANCE8_SGIS           0x8115\n#define GL_DUAL_LUMINANCE12_SGIS          0x8116\n#define GL_DUAL_LUMINANCE16_SGIS          0x8117\n#define GL_DUAL_INTENSITY4_SGIS           0x8118\n#define GL_DUAL_INTENSITY8_SGIS           0x8119\n#define GL_DUAL_INTENSITY12_SGIS          0x811A\n#define GL_DUAL_INTENSITY16_SGIS          0x811B\n#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C\n#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D\n#define GL_QUAD_ALPHA4_SGIS               0x811E\n#define GL_QUAD_ALPHA8_SGIS               0x811F\n#define GL_QUAD_LUMINANCE4_SGIS           0x8120\n#define GL_QUAD_LUMINANCE8_SGIS           0x8121\n#define GL_QUAD_INTENSITY4_SGIS           0x8122\n#define GL_QUAD_INTENSITY8_SGIS           0x8123\n#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124\n#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125\n#endif /* GL_SGIS_texture_select */\n\n#ifndef GL_SGIX_async\n#define GL_SGIX_async 1\n#define GL_ASYNC_MARKER_SGIX              0x8329\ntypedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);\ntypedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);\nGLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);\nGLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);\nGLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);\nGLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);\nGLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);\n#endif\n#endif /* GL_SGIX_async */\n\n#ifndef GL_SGIX_async_histogram\n#define GL_SGIX_async_histogram 1\n#define GL_ASYNC_HISTOGRAM_SGIX           0x832C\n#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D\n#endif /* GL_SGIX_async_histogram */\n\n#ifndef GL_SGIX_async_pixel\n#define GL_SGIX_async_pixel 1\n#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C\n#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D\n#define GL_ASYNC_READ_PIXELS_SGIX         0x835E\n#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F\n#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360\n#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361\n#endif /* GL_SGIX_async_pixel */\n\n#ifndef GL_SGIX_blend_alpha_minmax\n#define GL_SGIX_blend_alpha_minmax 1\n#define GL_ALPHA_MIN_SGIX                 0x8320\n#define GL_ALPHA_MAX_SGIX                 0x8321\n#endif /* GL_SGIX_blend_alpha_minmax */\n\n#ifndef GL_SGIX_calligraphic_fragment\n#define GL_SGIX_calligraphic_fragment 1\n#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183\n#endif /* GL_SGIX_calligraphic_fragment */\n\n#ifndef GL_SGIX_clipmap\n#define GL_SGIX_clipmap 1\n#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170\n#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171\n#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172\n#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173\n#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174\n#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175\n#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176\n#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177\n#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178\n#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D\n#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E\n#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F\n#endif /* GL_SGIX_clipmap */\n\n#ifndef GL_SGIX_convolution_accuracy\n#define GL_SGIX_convolution_accuracy 1\n#define GL_CONVOLUTION_HINT_SGIX          0x8316\n#endif /* GL_SGIX_convolution_accuracy */\n\n#ifndef GL_SGIX_depth_pass_instrument\n#define GL_SGIX_depth_pass_instrument 1\n#endif /* GL_SGIX_depth_pass_instrument */\n\n#ifndef GL_SGIX_depth_texture\n#define GL_SGIX_depth_texture 1\n#define GL_DEPTH_COMPONENT16_SGIX         0x81A5\n#define GL_DEPTH_COMPONENT24_SGIX         0x81A6\n#define GL_DEPTH_COMPONENT32_SGIX         0x81A7\n#endif /* GL_SGIX_depth_texture */\n\n#ifndef GL_SGIX_flush_raster\n#define GL_SGIX_flush_raster 1\ntypedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushRasterSGIX (void);\n#endif\n#endif /* GL_SGIX_flush_raster */\n\n#ifndef GL_SGIX_fog_offset\n#define GL_SGIX_fog_offset 1\n#define GL_FOG_OFFSET_SGIX                0x8198\n#define GL_FOG_OFFSET_VALUE_SGIX          0x8199\n#endif /* GL_SGIX_fog_offset */\n\n#ifndef GL_SGIX_fragment_lighting\n#define GL_SGIX_fragment_lighting 1\n#define GL_FRAGMENT_LIGHTING_SGIX         0x8400\n#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401\n#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402\n#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403\n#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404\n#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405\n#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406\n#define GL_LIGHT_ENV_MODE_SGIX            0x8407\n#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408\n#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409\n#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A\n#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B\n#define GL_FRAGMENT_LIGHT0_SGIX           0x840C\n#define GL_FRAGMENT_LIGHT1_SGIX           0x840D\n#define GL_FRAGMENT_LIGHT2_SGIX           0x840E\n#define GL_FRAGMENT_LIGHT3_SGIX           0x840F\n#define GL_FRAGMENT_LIGHT4_SGIX           0x8410\n#define GL_FRAGMENT_LIGHT5_SGIX           0x8411\n#define GL_FRAGMENT_LIGHT6_SGIX           0x8412\n#define GL_FRAGMENT_LIGHT7_SGIX           0x8413\ntypedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);\nGLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);\nGLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);\n#endif\n#endif /* GL_SGIX_fragment_lighting */\n\n#ifndef GL_SGIX_framezoom\n#define GL_SGIX_framezoom 1\n#define GL_FRAMEZOOM_SGIX                 0x818B\n#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C\n#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D\ntypedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameZoomSGIX (GLint factor);\n#endif\n#endif /* GL_SGIX_framezoom */\n\n#ifndef GL_SGIX_igloo_interface\n#define GL_SGIX_igloo_interface 1\ntypedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);\n#endif\n#endif /* GL_SGIX_igloo_interface */\n\n#ifndef GL_SGIX_instruments\n#define GL_SGIX_instruments 1\n#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180\n#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181\ntypedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);\ntypedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);\ntypedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);\ntypedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLint APIENTRY glGetInstrumentsSGIX (void);\nGLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);\nGLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);\nGLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);\nGLAPI void APIENTRY glStartInstrumentsSGIX (void);\nGLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);\n#endif\n#endif /* GL_SGIX_instruments */\n\n#ifndef GL_SGIX_interlace\n#define GL_SGIX_interlace 1\n#define GL_INTERLACE_SGIX                 0x8094\n#endif /* GL_SGIX_interlace */\n\n#ifndef GL_SGIX_ir_instrument1\n#define GL_SGIX_ir_instrument1 1\n#define GL_IR_INSTRUMENT1_SGIX            0x817F\n#endif /* GL_SGIX_ir_instrument1 */\n\n#ifndef GL_SGIX_list_priority\n#define GL_SGIX_list_priority 1\n#define GL_LIST_PRIORITY_SGIX             0x8182\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);\nGLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);\nGLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);\n#endif\n#endif /* GL_SGIX_list_priority */\n\n#ifndef GL_SGIX_pixel_texture\n#define GL_SGIX_pixel_texture 1\n#define GL_PIXEL_TEX_GEN_SGIX             0x8139\n#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B\ntypedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);\n#endif\n#endif /* GL_SGIX_pixel_texture */\n\n#ifndef GL_SGIX_pixel_tiles\n#define GL_SGIX_pixel_tiles 1\n#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E\n#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F\n#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140\n#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141\n#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142\n#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143\n#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144\n#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145\n#endif /* GL_SGIX_pixel_tiles */\n\n#ifndef GL_SGIX_polynomial_ffd\n#define GL_SGIX_polynomial_ffd 1\n#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001\n#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002\n#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194\n#define GL_TEXTURE_DEFORMATION_SGIX       0x8195\n#define GL_DEFORMATIONS_MASK_SGIX         0x8196\n#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197\ntypedef 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);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);\nGLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);\nGLAPI void APIENTRY glDeformSGIX (GLbitfield mask);\nGLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);\n#endif\n#endif /* GL_SGIX_polynomial_ffd */\n\n#ifndef GL_SGIX_reference_plane\n#define GL_SGIX_reference_plane 1\n#define GL_REFERENCE_PLANE_SGIX           0x817D\n#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E\ntypedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);\n#endif\n#endif /* GL_SGIX_reference_plane */\n\n#ifndef GL_SGIX_resample\n#define GL_SGIX_resample 1\n#define GL_PACK_RESAMPLE_SGIX             0x842C\n#define GL_UNPACK_RESAMPLE_SGIX           0x842D\n#define GL_RESAMPLE_REPLICATE_SGIX        0x842E\n#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F\n#define GL_RESAMPLE_DECIMATE_SGIX         0x8430\n#endif /* GL_SGIX_resample */\n\n#ifndef GL_SGIX_scalebias_hint\n#define GL_SGIX_scalebias_hint 1\n#define GL_SCALEBIAS_HINT_SGIX            0x8322\n#endif /* GL_SGIX_scalebias_hint */\n\n#ifndef GL_SGIX_shadow\n#define GL_SGIX_shadow 1\n#define GL_TEXTURE_COMPARE_SGIX           0x819A\n#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B\n#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C\n#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D\n#endif /* GL_SGIX_shadow */\n\n#ifndef GL_SGIX_shadow_ambient\n#define GL_SGIX_shadow_ambient 1\n#define GL_SHADOW_AMBIENT_SGIX            0x80BF\n#endif /* GL_SGIX_shadow_ambient */\n\n#ifndef GL_SGIX_sprite\n#define GL_SGIX_sprite 1\n#define GL_SPRITE_SGIX                    0x8148\n#define GL_SPRITE_MODE_SGIX               0x8149\n#define GL_SPRITE_AXIS_SGIX               0x814A\n#define GL_SPRITE_TRANSLATION_SGIX        0x814B\n#define GL_SPRITE_AXIAL_SGIX              0x814C\n#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D\n#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);\n#endif\n#endif /* GL_SGIX_sprite */\n\n#ifndef GL_SGIX_subsample\n#define GL_SGIX_subsample 1\n#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0\n#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1\n#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2\n#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3\n#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4\n#endif /* GL_SGIX_subsample */\n\n#ifndef GL_SGIX_tag_sample_buffer\n#define GL_SGIX_tag_sample_buffer 1\ntypedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTagSampleBufferSGIX (void);\n#endif\n#endif /* GL_SGIX_tag_sample_buffer */\n\n#ifndef GL_SGIX_texture_add_env\n#define GL_SGIX_texture_add_env 1\n#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE\n#endif /* GL_SGIX_texture_add_env */\n\n#ifndef GL_SGIX_texture_coordinate_clamp\n#define GL_SGIX_texture_coordinate_clamp 1\n#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369\n#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A\n#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B\n#endif /* GL_SGIX_texture_coordinate_clamp */\n\n#ifndef GL_SGIX_texture_lod_bias\n#define GL_SGIX_texture_lod_bias 1\n#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E\n#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F\n#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190\n#endif /* GL_SGIX_texture_lod_bias */\n\n#ifndef GL_SGIX_texture_multi_buffer\n#define GL_SGIX_texture_multi_buffer 1\n#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E\n#endif /* GL_SGIX_texture_multi_buffer */\n\n#ifndef GL_SGIX_texture_scale_bias\n#define GL_SGIX_texture_scale_bias 1\n#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179\n#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A\n#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B\n#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C\n#endif /* GL_SGIX_texture_scale_bias */\n\n#ifndef GL_SGIX_vertex_preclip\n#define GL_SGIX_vertex_preclip 1\n#define GL_VERTEX_PRECLIP_SGIX            0x83EE\n#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF\n#endif /* GL_SGIX_vertex_preclip */\n\n#ifndef GL_SGIX_ycrcb\n#define GL_SGIX_ycrcb 1\n#define GL_YCRCB_422_SGIX                 0x81BB\n#define GL_YCRCB_444_SGIX                 0x81BC\n#endif /* GL_SGIX_ycrcb */\n\n#ifndef GL_SGIX_ycrcb_subsample\n#define GL_SGIX_ycrcb_subsample 1\n#endif /* GL_SGIX_ycrcb_subsample */\n\n#ifndef GL_SGIX_ycrcba\n#define GL_SGIX_ycrcba 1\n#define GL_YCRCB_SGIX                     0x8318\n#define GL_YCRCBA_SGIX                    0x8319\n#endif /* GL_SGIX_ycrcba */\n\n#ifndef GL_SGI_color_matrix\n#define GL_SGI_color_matrix 1\n#define GL_COLOR_MATRIX_SGI               0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB\n#endif /* GL_SGI_color_matrix */\n\n#ifndef GL_SGI_color_table\n#define GL_SGI_color_table 1\n#define GL_COLOR_TABLE_SGI                0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2\n#define GL_PROXY_COLOR_TABLE_SGI          0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5\n#define GL_COLOR_TABLE_SCALE_SGI          0x80D6\n#define GL_COLOR_TABLE_BIAS_SGI           0x80D7\n#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8\n#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9\n#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF\ntypedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);\nGLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);\n#endif\n#endif /* GL_SGI_color_table */\n\n#ifndef GL_SGI_texture_color_table\n#define GL_SGI_texture_color_table 1\n#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC\n#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD\n#endif /* GL_SGI_texture_color_table */\n\n#ifndef GL_SUNX_constant_data\n#define GL_SUNX_constant_data 1\n#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5\n#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6\ntypedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFinishTextureSUNX (void);\n#endif\n#endif /* GL_SUNX_constant_data */\n\n#ifndef GL_SUN_convolution_border_modes\n#define GL_SUN_convolution_border_modes 1\n#define GL_WRAP_BORDER_SUN                0x81D4\n#endif /* GL_SUN_convolution_border_modes */\n\n#ifndef GL_SUN_global_alpha\n#define GL_SUN_global_alpha 1\n#define GL_GLOBAL_ALPHA_SUN               0x81D9\n#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);\nGLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);\nGLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);\nGLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);\n#endif\n#endif /* GL_SUN_global_alpha */\n\n#ifndef GL_SUN_mesh_array\n#define GL_SUN_mesh_array 1\n#define GL_QUAD_MESH_SUN                  0x8614\n#define GL_TRIANGLE_MESH_SUN              0x8615\ntypedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#endif\n#endif /* GL_SUN_mesh_array */\n\n#ifndef GL_SUN_slice_accum\n#define GL_SUN_slice_accum 1\n#define GL_SLICE_ACCUM_SUN                0x85CC\n#endif /* GL_SUN_slice_accum */\n\n#ifndef GL_SUN_triangle_list\n#define GL_SUN_triangle_list 1\n#define GL_RESTART_SUN                    0x0001\n#define GL_REPLACE_MIDDLE_SUN             0x0002\n#define GL_REPLACE_OLDEST_SUN             0x0003\n#define GL_TRIANGLE_LIST_SUN              0x81D7\n#define GL_REPLACEMENT_CODE_SUN           0x81D8\n#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0\n#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1\n#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2\n#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3\n#define GL_R1UI_V3F_SUN                   0x85C4\n#define GL_R1UI_C4UB_V3F_SUN              0x85C5\n#define GL_R1UI_C3F_V3F_SUN               0x85C6\n#define GL_R1UI_N3F_V3F_SUN               0x85C7\n#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8\n#define GL_R1UI_T2F_V3F_SUN               0x85C9\n#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA\n#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);\nGLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);\nGLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);\nGLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);\nGLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);\nGLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);\nGLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);\n#endif\n#endif /* GL_SUN_triangle_list */\n\n#ifndef GL_SUN_vertex\n#define GL_SUN_vertex 1\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#endif\n#endif /* GL_SUN_vertex */\n\n#ifndef GL_WIN_phong_shading\n#define GL_WIN_phong_shading 1\n#define GL_PHONG_WIN                      0x80EA\n#define GL_PHONG_HINT_WIN                 0x80EB\n#endif /* GL_WIN_phong_shading */\n\n#ifndef GL_WIN_specular_fog\n#define GL_WIN_specular_fog 1\n#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC\n#endif /* GL_WIN_specular_fog */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengles.h\n *\n *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.\n */\n#include \"SDL_config.h\"\n\n#ifdef __IPHONEOS__\n#include <OpenGLES/ES1/gl.h>\n#include <OpenGLES/ES1/glext.h>\n#else\n#include <GLES/gl.h>\n#include <GLES/glext.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles2.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengles2.h\n *\n *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.\n */\n#include \"SDL_config.h\"\n\n#ifndef _MSC_VER\n\n#ifdef __IPHONEOS__\n#include <OpenGLES/ES2/gl.h>\n#include <OpenGLES/ES2/glext.h>\n#else\n#include <GLES2/gl2platform.h>\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n#endif\n\n#else /* _MSC_VER */\n\n/* OpenGL ES2 headers for Visual Studio */\n#include \"SDL_opengles2_khrplatform.h\"\n#include \"SDL_opengles2_gl2platform.h\"\n#include \"SDL_opengles2_gl2.h\"\n#include \"SDL_opengles2_gl2ext.h\"\n\n#endif /* _MSC_VER */\n\n#ifndef APIENTRY\n#define APIENTRY GL_APIENTRY\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles2_gl2.h",
    "content": "#ifndef __gl2_h_\n#define __gl2_h_\n\n/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */\n\n/*#include <GLES2/gl2platform.h>*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n/*-------------------------------------------------------------------------\n * Data type definitions\n *-----------------------------------------------------------------------*/\n\ntypedef void             GLvoid;\ntypedef char             GLchar;\ntypedef unsigned int     GLenum;\ntypedef unsigned char    GLboolean;\ntypedef unsigned int     GLbitfield;\ntypedef khronos_int8_t   GLbyte;\ntypedef short            GLshort;\ntypedef int              GLint;\ntypedef int              GLsizei;\ntypedef khronos_uint8_t  GLubyte;\ntypedef unsigned short   GLushort;\ntypedef unsigned int     GLuint;\ntypedef khronos_float_t  GLfloat;\ntypedef khronos_float_t  GLclampf;\ntypedef khronos_int32_t  GLfixed;\n\n/* GL types for handling large vertex buffer objects */\ntypedef khronos_intptr_t GLintptr;\ntypedef khronos_ssize_t  GLsizeiptr;\n\n/* OpenGL ES core versions */\n#define GL_ES_VERSION_2_0                 1\n\n/* ClearBufferMask */\n#define GL_DEPTH_BUFFER_BIT               0x00000100\n#define GL_STENCIL_BUFFER_BIT             0x00000400\n#define GL_COLOR_BUFFER_BIT               0x00004000\n\n/* Boolean */\n#define GL_FALSE                          0\n#define GL_TRUE                           1\n\n/* BeginMode */\n#define GL_POINTS                         0x0000\n#define GL_LINES                          0x0001\n#define GL_LINE_LOOP                      0x0002\n#define GL_LINE_STRIP                     0x0003\n#define GL_TRIANGLES                      0x0004\n#define GL_TRIANGLE_STRIP                 0x0005\n#define GL_TRIANGLE_FAN                   0x0006\n\n/* AlphaFunction (not supported in ES20) */\n/*      GL_NEVER */\n/*      GL_LESS */\n/*      GL_EQUAL */\n/*      GL_LEQUAL */\n/*      GL_GREATER */\n/*      GL_NOTEQUAL */\n/*      GL_GEQUAL */\n/*      GL_ALWAYS */\n\n/* BlendingFactorDest */\n#define GL_ZERO                           0\n#define GL_ONE                            1\n#define GL_SRC_COLOR                      0x0300\n#define GL_ONE_MINUS_SRC_COLOR            0x0301\n#define GL_SRC_ALPHA                      0x0302\n#define GL_ONE_MINUS_SRC_ALPHA            0x0303\n#define GL_DST_ALPHA                      0x0304\n#define GL_ONE_MINUS_DST_ALPHA            0x0305\n\n/* BlendingFactorSrc */\n/*      GL_ZERO */\n/*      GL_ONE */\n#define GL_DST_COLOR                      0x0306\n#define GL_ONE_MINUS_DST_COLOR            0x0307\n#define GL_SRC_ALPHA_SATURATE             0x0308\n/*      GL_SRC_ALPHA */\n/*      GL_ONE_MINUS_SRC_ALPHA */\n/*      GL_DST_ALPHA */\n/*      GL_ONE_MINUS_DST_ALPHA */\n\n/* BlendEquationSeparate */\n#define GL_FUNC_ADD                       0x8006\n#define GL_BLEND_EQUATION                 0x8009\n#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */\n#define GL_BLEND_EQUATION_ALPHA           0x883D\n\n/* BlendSubtract */\n#define GL_FUNC_SUBTRACT                  0x800A\n#define GL_FUNC_REVERSE_SUBTRACT          0x800B\n\n/* Separate Blend Functions */\n#define GL_BLEND_DST_RGB                  0x80C8\n#define GL_BLEND_SRC_RGB                  0x80C9\n#define GL_BLEND_DST_ALPHA                0x80CA\n#define GL_BLEND_SRC_ALPHA                0x80CB\n#define GL_CONSTANT_COLOR                 0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002\n#define GL_CONSTANT_ALPHA                 0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004\n#define GL_BLEND_COLOR                    0x8005\n\n/* Buffer Objects */\n#define GL_ARRAY_BUFFER                   0x8892\n#define GL_ELEMENT_ARRAY_BUFFER           0x8893\n#define GL_ARRAY_BUFFER_BINDING           0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895\n\n#define GL_STREAM_DRAW                    0x88E0\n#define GL_STATIC_DRAW                    0x88E4\n#define GL_DYNAMIC_DRAW                   0x88E8\n\n#define GL_BUFFER_SIZE                    0x8764\n#define GL_BUFFER_USAGE                   0x8765\n\n#define GL_CURRENT_VERTEX_ATTRIB          0x8626\n\n/* CullFaceMode */\n#define GL_FRONT                          0x0404\n#define GL_BACK                           0x0405\n#define GL_FRONT_AND_BACK                 0x0408\n\n/* DepthFunction */\n/*      GL_NEVER */\n/*      GL_LESS */\n/*      GL_EQUAL */\n/*      GL_LEQUAL */\n/*      GL_GREATER */\n/*      GL_NOTEQUAL */\n/*      GL_GEQUAL */\n/*      GL_ALWAYS */\n\n/* EnableCap */\n#define GL_TEXTURE_2D                     0x0DE1\n#define GL_CULL_FACE                      0x0B44\n#define GL_BLEND                          0x0BE2\n#define GL_DITHER                         0x0BD0\n#define GL_STENCIL_TEST                   0x0B90\n#define GL_DEPTH_TEST                     0x0B71\n#define GL_SCISSOR_TEST                   0x0C11\n#define GL_POLYGON_OFFSET_FILL            0x8037\n#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E\n#define GL_SAMPLE_COVERAGE                0x80A0\n\n/* ErrorCode */\n#define GL_NO_ERROR                       0\n#define GL_INVALID_ENUM                   0x0500\n#define GL_INVALID_VALUE                  0x0501\n#define GL_INVALID_OPERATION              0x0502\n#define GL_OUT_OF_MEMORY                  0x0505\n\n/* FrontFaceDirection */\n#define GL_CW                             0x0900\n#define GL_CCW                            0x0901\n\n/* GetPName */\n#define GL_LINE_WIDTH                     0x0B21\n#define GL_ALIASED_POINT_SIZE_RANGE       0x846D\n#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E\n#define GL_CULL_FACE_MODE                 0x0B45\n#define GL_FRONT_FACE                     0x0B46\n#define GL_DEPTH_RANGE                    0x0B70\n#define GL_DEPTH_WRITEMASK                0x0B72\n#define GL_DEPTH_CLEAR_VALUE              0x0B73\n#define GL_DEPTH_FUNC                     0x0B74\n#define GL_STENCIL_CLEAR_VALUE            0x0B91\n#define GL_STENCIL_FUNC                   0x0B92\n#define GL_STENCIL_FAIL                   0x0B94\n#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95\n#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96\n#define GL_STENCIL_REF                    0x0B97\n#define GL_STENCIL_VALUE_MASK             0x0B93\n#define GL_STENCIL_WRITEMASK              0x0B98\n#define GL_STENCIL_BACK_FUNC              0x8800\n#define GL_STENCIL_BACK_FAIL              0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803\n#define GL_STENCIL_BACK_REF               0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK         0x8CA5\n#define GL_VIEWPORT                       0x0BA2\n#define GL_SCISSOR_BOX                    0x0C10\n/*      GL_SCISSOR_TEST */\n#define GL_COLOR_CLEAR_VALUE              0x0C22\n#define GL_COLOR_WRITEMASK                0x0C23\n#define GL_UNPACK_ALIGNMENT               0x0CF5\n#define GL_PACK_ALIGNMENT                 0x0D05\n#define GL_MAX_TEXTURE_SIZE               0x0D33\n#define GL_MAX_VIEWPORT_DIMS              0x0D3A\n#define GL_SUBPIXEL_BITS                  0x0D50\n#define GL_RED_BITS                       0x0D52\n#define GL_GREEN_BITS                     0x0D53\n#define GL_BLUE_BITS                      0x0D54\n#define GL_ALPHA_BITS                     0x0D55\n#define GL_DEPTH_BITS                     0x0D56\n#define GL_STENCIL_BITS                   0x0D57\n#define GL_POLYGON_OFFSET_UNITS           0x2A00\n/*      GL_POLYGON_OFFSET_FILL */\n#define GL_POLYGON_OFFSET_FACTOR          0x8038\n#define GL_TEXTURE_BINDING_2D             0x8069\n#define GL_SAMPLE_BUFFERS                 0x80A8\n#define GL_SAMPLES                        0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE          0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT         0x80AB\n\n/* GetTextureParameter */\n/*      GL_TEXTURE_MAG_FILTER */\n/*      GL_TEXTURE_MIN_FILTER */\n/*      GL_TEXTURE_WRAP_S */\n/*      GL_TEXTURE_WRAP_T */\n\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3\n\n/* HintMode */\n#define GL_DONT_CARE                      0x1100\n#define GL_FASTEST                        0x1101\n#define GL_NICEST                         0x1102\n\n/* HintTarget */\n#define GL_GENERATE_MIPMAP_HINT            0x8192\n\n/* DataType */\n#define GL_BYTE                           0x1400\n#define GL_UNSIGNED_BYTE                  0x1401\n#define GL_SHORT                          0x1402\n#define GL_UNSIGNED_SHORT                 0x1403\n#define GL_INT                            0x1404\n#define GL_UNSIGNED_INT                   0x1405\n#define GL_FLOAT                          0x1406\n#define GL_FIXED                          0x140C\n\n/* PixelFormat */\n#define GL_DEPTH_COMPONENT                0x1902\n#define GL_ALPHA                          0x1906\n#define GL_RGB                            0x1907\n#define GL_RGBA                           0x1908\n#define GL_LUMINANCE                      0x1909\n#define GL_LUMINANCE_ALPHA                0x190A\n\n/* PixelType */\n/*      GL_UNSIGNED_BYTE */\n#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034\n#define GL_UNSIGNED_SHORT_5_6_5           0x8363\n\n/* Shaders */\n#define GL_FRAGMENT_SHADER                  0x8B30\n#define GL_VERTEX_SHADER                    0x8B31\n#define GL_MAX_VERTEX_ATTRIBS               0x8869\n#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB\n#define GL_MAX_VARYING_VECTORS              0x8DFC\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C\n#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872\n#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD\n#define GL_SHADER_TYPE                      0x8B4F\n#define GL_DELETE_STATUS                    0x8B80\n#define GL_LINK_STATUS                      0x8B82\n#define GL_VALIDATE_STATUS                  0x8B83\n#define GL_ATTACHED_SHADERS                 0x8B85\n#define GL_ACTIVE_UNIFORMS                  0x8B86\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87\n#define GL_ACTIVE_ATTRIBUTES                0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A\n#define GL_SHADING_LANGUAGE_VERSION         0x8B8C\n#define GL_CURRENT_PROGRAM                  0x8B8D\n\n/* StencilFunction */\n#define GL_NEVER                          0x0200\n#define GL_LESS                           0x0201\n#define GL_EQUAL                          0x0202\n#define GL_LEQUAL                         0x0203\n#define GL_GREATER                        0x0204\n#define GL_NOTEQUAL                       0x0205\n#define GL_GEQUAL                         0x0206\n#define GL_ALWAYS                         0x0207\n\n/* StencilOp */\n/*      GL_ZERO */\n#define GL_KEEP                           0x1E00\n#define GL_REPLACE                        0x1E01\n#define GL_INCR                           0x1E02\n#define GL_DECR                           0x1E03\n#define GL_INVERT                         0x150A\n#define GL_INCR_WRAP                      0x8507\n#define GL_DECR_WRAP                      0x8508\n\n/* StringName */\n#define GL_VENDOR                         0x1F00\n#define GL_RENDERER                       0x1F01\n#define GL_VERSION                        0x1F02\n#define GL_EXTENSIONS                     0x1F03\n\n/* TextureMagFilter */\n#define GL_NEAREST                        0x2600\n#define GL_LINEAR                         0x2601\n\n/* TextureMinFilter */\n/*      GL_NEAREST */\n/*      GL_LINEAR */\n#define GL_NEAREST_MIPMAP_NEAREST         0x2700\n#define GL_LINEAR_MIPMAP_NEAREST          0x2701\n#define GL_NEAREST_MIPMAP_LINEAR          0x2702\n#define GL_LINEAR_MIPMAP_LINEAR           0x2703\n\n/* TextureParameterName */\n#define GL_TEXTURE_MAG_FILTER             0x2800\n#define GL_TEXTURE_MIN_FILTER             0x2801\n#define GL_TEXTURE_WRAP_S                 0x2802\n#define GL_TEXTURE_WRAP_T                 0x2803\n\n/* TextureTarget */\n/*      GL_TEXTURE_2D */\n#define GL_TEXTURE                        0x1702\n\n#define GL_TEXTURE_CUBE_MAP               0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C\n\n/* TextureUnit */\n#define GL_TEXTURE0                       0x84C0\n#define GL_TEXTURE1                       0x84C1\n#define GL_TEXTURE2                       0x84C2\n#define GL_TEXTURE3                       0x84C3\n#define GL_TEXTURE4                       0x84C4\n#define GL_TEXTURE5                       0x84C5\n#define GL_TEXTURE6                       0x84C6\n#define GL_TEXTURE7                       0x84C7\n#define GL_TEXTURE8                       0x84C8\n#define GL_TEXTURE9                       0x84C9\n#define GL_TEXTURE10                      0x84CA\n#define GL_TEXTURE11                      0x84CB\n#define GL_TEXTURE12                      0x84CC\n#define GL_TEXTURE13                      0x84CD\n#define GL_TEXTURE14                      0x84CE\n#define GL_TEXTURE15                      0x84CF\n#define GL_TEXTURE16                      0x84D0\n#define GL_TEXTURE17                      0x84D1\n#define GL_TEXTURE18                      0x84D2\n#define GL_TEXTURE19                      0x84D3\n#define GL_TEXTURE20                      0x84D4\n#define GL_TEXTURE21                      0x84D5\n#define GL_TEXTURE22                      0x84D6\n#define GL_TEXTURE23                      0x84D7\n#define GL_TEXTURE24                      0x84D8\n#define GL_TEXTURE25                      0x84D9\n#define GL_TEXTURE26                      0x84DA\n#define GL_TEXTURE27                      0x84DB\n#define GL_TEXTURE28                      0x84DC\n#define GL_TEXTURE29                      0x84DD\n#define GL_TEXTURE30                      0x84DE\n#define GL_TEXTURE31                      0x84DF\n#define GL_ACTIVE_TEXTURE                 0x84E0\n\n/* TextureWrapMode */\n#define GL_REPEAT                         0x2901\n#define GL_CLAMP_TO_EDGE                  0x812F\n#define GL_MIRRORED_REPEAT                0x8370\n\n/* Uniform Types */\n#define GL_FLOAT_VEC2                     0x8B50\n#define GL_FLOAT_VEC3                     0x8B51\n#define GL_FLOAT_VEC4                     0x8B52\n#define GL_INT_VEC2                       0x8B53\n#define GL_INT_VEC3                       0x8B54\n#define GL_INT_VEC4                       0x8B55\n#define GL_BOOL                           0x8B56\n#define GL_BOOL_VEC2                      0x8B57\n#define GL_BOOL_VEC3                      0x8B58\n#define GL_BOOL_VEC4                      0x8B59\n#define GL_FLOAT_MAT2                     0x8B5A\n#define GL_FLOAT_MAT3                     0x8B5B\n#define GL_FLOAT_MAT4                     0x8B5C\n#define GL_SAMPLER_2D                     0x8B5E\n#define GL_SAMPLER_CUBE                   0x8B60\n\n/* Vertex Arrays */\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n\n/* Read Format */\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B\n\n/* Shader Source */\n#define GL_COMPILE_STATUS                 0x8B81\n#define GL_INFO_LOG_LENGTH                0x8B84\n#define GL_SHADER_SOURCE_LENGTH           0x8B88\n#define GL_SHADER_COMPILER                0x8DFA\n\n/* Shader Binary */\n#define GL_SHADER_BINARY_FORMATS          0x8DF8\n#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9\n\n/* Shader Precision-Specified Types */\n#define GL_LOW_FLOAT                      0x8DF0\n#define GL_MEDIUM_FLOAT                   0x8DF1\n#define GL_HIGH_FLOAT                     0x8DF2\n#define GL_LOW_INT                        0x8DF3\n#define GL_MEDIUM_INT                     0x8DF4\n#define GL_HIGH_INT                       0x8DF5\n\n/* Framebuffer Object. */\n#define GL_FRAMEBUFFER                    0x8D40\n#define GL_RENDERBUFFER                   0x8D41\n\n#define GL_RGBA4                          0x8056\n#define GL_RGB5_A1                        0x8057\n#define GL_RGB565                         0x8D62\n#define GL_DEPTH_COMPONENT16              0x81A5\n#define GL_STENCIL_INDEX8                 0x8D48\n\n#define GL_RENDERBUFFER_WIDTH             0x8D42\n#define GL_RENDERBUFFER_HEIGHT            0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44\n#define GL_RENDERBUFFER_RED_SIZE          0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55\n\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n\n#define GL_COLOR_ATTACHMENT0              0x8CE0\n#define GL_DEPTH_ATTACHMENT               0x8D00\n#define GL_STENCIL_ATTACHMENT             0x8D20\n\n#define GL_NONE                           0\n\n#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9\n#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD\n\n#define GL_FRAMEBUFFER_BINDING            0x8CA6\n#define GL_RENDERBUFFER_BINDING           0x8CA7\n#define GL_MAX_RENDERBUFFER_SIZE          0x84E8\n\n#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506\n\n/*-------------------------------------------------------------------------\n * GL core functions.\n *-----------------------------------------------------------------------*/\n\nGL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);\nGL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);\nGL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);\nGL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);\nGL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);\nGL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);\nGL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\nGL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );\nGL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);\nGL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);\nGL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);\nGL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);\nGL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);\nGL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);\nGL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\nGL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);\nGL_APICALL void         GL_APIENTRY glClearStencil (GLint s);\nGL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\nGL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);\nGL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);\nGL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);\nGL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);\nGL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);\nGL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);\nGL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);\nGL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);\nGL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);\nGL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);\nGL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);\nGL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);\nGL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);\nGL_APICALL void         GL_APIENTRY glDisable (GLenum cap);\nGL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);\nGL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);\nGL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);\nGL_APICALL void         GL_APIENTRY glEnable (GLenum cap);\nGL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);\nGL_APICALL void         GL_APIENTRY glFinish (void);\nGL_APICALL void         GL_APIENTRY glFlush (void);\nGL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);\nGL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);\nGL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);\nGL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);\nGL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);\nGL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);\nGL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);\nGL_APICALL GLint        GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);\nGL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL GLenum       GL_APIENTRY glGetError (void);\nGL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);\nGL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);\nGL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);\nGL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);\nGL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);\nGL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);\nGL_APICALL GLint        GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);\nGL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);\nGL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);\nGL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);\nGL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);\nGL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);\nGL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);\nGL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);\nGL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);\nGL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);\nGL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);\nGL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);\nGL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);\nGL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);\nGL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);\nGL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);\nGL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);\nGL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);\nGL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);\nGL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);\nGL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);\nGL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);\nGL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);\nGL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);\nGL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);\nGL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);\nGL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);\nGL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);\nGL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl2_h_ */\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles2_gl2ext.h",
    "content": "#ifndef __gl2ext_h_\n#define __gl2ext_h_\n\n/* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n#ifndef GL_APIENTRYP\n#   define GL_APIENTRYP GL_APIENTRY*\n#endif\n\n/* New types shared by several extensions */\n\n#ifndef __gl3_h_\n/* These are defined with respect to <inttypes.h> in the\n * Apple extension spec, but they are also used by non-APPLE\n * extensions, and in the Khronos header we use the Khronos\n * portable types in khrplatform.h, which must be defined.\n */\ntypedef khronos_int64_t GLint64;\ntypedef khronos_uint64_t GLuint64;\ntypedef struct __GLsync *GLsync;\n#endif\n\n\n/*------------------------------------------------------------------------*\n * OES extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_OES_compressed_ETC1_RGB8_texture */\n#ifndef GL_OES_compressed_ETC1_RGB8_texture\n#define GL_ETC1_RGB8_OES                                        0x8D64\n#endif\n\n/* GL_OES_compressed_paletted_texture */\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_PALETTE4_RGB8_OES                                    0x8B90\n#define GL_PALETTE4_RGBA8_OES                                   0x8B91\n#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92\n#define GL_PALETTE4_RGBA4_OES                                   0x8B93\n#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94\n#define GL_PALETTE8_RGB8_OES                                    0x8B95\n#define GL_PALETTE8_RGBA8_OES                                   0x8B96\n#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97\n#define GL_PALETTE8_RGBA4_OES                                   0x8B98\n#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99\n#endif\n\n/* GL_OES_depth24 */\n#ifndef GL_OES_depth24\n#define GL_DEPTH_COMPONENT24_OES                                0x81A6\n#endif\n\n/* GL_OES_depth32 */\n#ifndef GL_OES_depth32\n#define GL_DEPTH_COMPONENT32_OES                                0x81A7\n#endif\n\n/* GL_OES_depth_texture */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\ntypedef void* GLeglImageOES;\n#endif\n\n/* GL_OES_EGL_image_external */\n#ifndef GL_OES_EGL_image_external\n/* GLeglImageOES defined in GL_OES_EGL_image already. */\n#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65\n#define GL_SAMPLER_EXTERNAL_OES                                 0x8D66\n#define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67\n#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68\n#endif\n\n/* GL_OES_element_index_uint */\n#ifndef GL_OES_element_index_uint\n#define GL_UNSIGNED_INT                                         0x1405\n#endif\n\n/* GL_OES_get_program_binary */\n#ifndef GL_OES_get_program_binary\n#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741\n#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE\n#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF\n#endif\n\n/* GL_OES_mapbuffer */\n#ifndef GL_OES_mapbuffer\n#define GL_WRITE_ONLY_OES                                       0x88B9\n#define GL_BUFFER_ACCESS_OES                                    0x88BB\n#define GL_BUFFER_MAPPED_OES                                    0x88BC\n#define GL_BUFFER_MAP_POINTER_OES                               0x88BD\n#endif\n\n/* GL_OES_packed_depth_stencil */\n#ifndef GL_OES_packed_depth_stencil\n#define GL_DEPTH_STENCIL_OES                                    0x84F9\n#define GL_UNSIGNED_INT_24_8_OES                                0x84FA\n#define GL_DEPTH24_STENCIL8_OES                                 0x88F0\n#endif\n\n/* GL_OES_required_internalformat */\n#ifndef GL_OES_required_internalformat\n#define GL_ALPHA8_OES                                           0x803C\n#define GL_DEPTH_COMPONENT16_OES                                0x81A5\n/* reuse GL_DEPTH_COMPONENT24_OES */\n/* reuse GL_DEPTH24_STENCIL8_OES */\n/* reuse GL_DEPTH_COMPONENT32_OES */\n#define GL_LUMINANCE4_ALPHA4_OES                                0x8043\n#define GL_LUMINANCE8_ALPHA8_OES                                0x8045\n#define GL_LUMINANCE8_OES                                       0x8040\n#define GL_RGBA4_OES                                            0x8056\n#define GL_RGB5_A1_OES                                          0x8057\n#define GL_RGB565_OES                                           0x8D62\n/* reuse GL_RGB8_OES */\n/* reuse GL_RGBA8_OES */\n/* reuse GL_RGB10_EXT */\n/* reuse GL_RGB10_A2_EXT */\n#endif\n\n/* GL_OES_rgb8_rgba8 */\n#ifndef GL_OES_rgb8_rgba8\n#define GL_RGB8_OES                                             0x8051\n#define GL_RGBA8_OES                                            0x8058\n#endif\n\n/* GL_OES_standard_derivatives */\n#ifndef GL_OES_standard_derivatives\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B\n#endif\n\n/* GL_OES_stencil1 */\n#ifndef GL_OES_stencil1\n#define GL_STENCIL_INDEX1_OES                                   0x8D46\n#endif\n\n/* GL_OES_stencil4 */\n#ifndef GL_OES_stencil4\n#define GL_STENCIL_INDEX4_OES                                   0x8D47\n#endif\n\n#ifndef GL_OES_surfaceless_context\n#define GL_FRAMEBUFFER_UNDEFINED_OES                            0x8219\n#endif\n\n/* GL_OES_texture_3D */\n#ifndef GL_OES_texture_3D\n#define GL_TEXTURE_WRAP_R_OES                                   0x8072\n#define GL_TEXTURE_3D_OES                                       0x806F\n#define GL_TEXTURE_BINDING_3D_OES                               0x806A\n#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073\n#define GL_SAMPLER_3D_OES                                       0x8B5F\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4\n#endif\n\n/* GL_OES_texture_float */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_float_linear */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_half_float */\n#ifndef GL_OES_texture_half_float\n#define GL_HALF_FLOAT_OES                                       0x8D61\n#endif\n\n/* GL_OES_texture_half_float_linear */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_npot */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_vertex_array_object */\n#ifndef GL_OES_vertex_array_object\n#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5\n#endif\n\n/* GL_OES_vertex_half_float */\n/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */\n\n/* GL_OES_vertex_type_10_10_10_2 */\n#ifndef GL_OES_vertex_type_10_10_10_2\n#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6\n#define GL_INT_10_10_10_2_OES                                   0x8DF7\n#endif\n\n/*------------------------------------------------------------------------*\n * KHR extension tokens\n *------------------------------------------------------------------------*/\n\n#ifndef GL_KHR_debug\ntypedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR                         0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR                 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION_KHR                          0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM_KHR                        0x8245\n#define GL_DEBUG_SOURCE_API_KHR                                 0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR                       0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR                     0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR                         0x8249\n#define GL_DEBUG_SOURCE_APPLICATION_KHR                         0x824A\n#define GL_DEBUG_SOURCE_OTHER_KHR                               0x824B\n#define GL_DEBUG_TYPE_ERROR_KHR                                 0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR                   0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR                    0x824E\n#define GL_DEBUG_TYPE_PORTABILITY_KHR                           0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE_KHR                           0x8250\n#define GL_DEBUG_TYPE_OTHER_KHR                                 0x8251\n#define GL_DEBUG_TYPE_MARKER_KHR                                0x8268\n#define GL_DEBUG_TYPE_PUSH_GROUP_KHR                            0x8269\n#define GL_DEBUG_TYPE_POP_GROUP_KHR                             0x826A\n#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR                      0x826B\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR                      0x826C\n#define GL_DEBUG_GROUP_STACK_DEPTH_KHR                          0x826D\n#define GL_BUFFER_KHR                                           0x82E0\n#define GL_SHADER_KHR                                           0x82E1\n#define GL_PROGRAM_KHR                                          0x82E2\n#define GL_QUERY_KHR                                            0x82E3\n/* PROGRAM_PIPELINE only in GL */\n#define GL_SAMPLER_KHR                                          0x82E6\n/* DISPLAY_LIST only in GL */\n#define GL_MAX_LABEL_LENGTH_KHR                                 0x82E8\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR                         0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR                        0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_KHR                            0x9145\n#define GL_DEBUG_SEVERITY_HIGH_KHR                              0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_KHR                            0x9147\n#define GL_DEBUG_SEVERITY_LOW_KHR                               0x9148\n#define GL_DEBUG_OUTPUT_KHR                                     0x92E0\n#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR                           0x00000002\n#define GL_STACK_OVERFLOW_KHR                                   0x0503\n#define GL_STACK_UNDERFLOW_KHR                                  0x0504\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         0x93B0\n#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         0x93B1\n#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         0x93B2\n#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         0x93B3\n#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         0x93B4\n#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         0x93B5\n#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         0x93B6\n#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         0x93B7\n#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        0x93B8\n#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        0x93B9\n#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        0x93BA\n#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       0x93BB\n#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       0x93BC\n#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       0x93BD\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 0x93D0\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 0x93D1\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 0x93D2\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 0x93D3\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 0x93D4\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 0x93D5\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 0x93D6\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 0x93D7\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                0x93D8\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                0x93D9\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                0x93DA\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               0x93DB\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               0x93DC\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               0x93DD\n#endif\n\n/*------------------------------------------------------------------------*\n * AMD extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_AMD_compressed_3DC_texture */\n#ifndef GL_AMD_compressed_3DC_texture\n#define GL_3DC_X_AMD                                            0x87F9\n#define GL_3DC_XY_AMD                                           0x87FA\n#endif\n\n/* GL_AMD_compressed_ATC_texture */\n#ifndef GL_AMD_compressed_ATC_texture\n#define GL_ATC_RGB_AMD                                          0x8C92\n#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93\n#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE\n#endif\n\n/* GL_AMD_performance_monitor */\n#ifndef GL_AMD_performance_monitor\n#define GL_COUNTER_TYPE_AMD                                     0x8BC0\n#define GL_COUNTER_RANGE_AMD                                    0x8BC1\n#define GL_UNSIGNED_INT64_AMD                                   0x8BC2\n#define GL_PERCENTAGE_AMD                                       0x8BC3\n#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4\n#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5\n#define GL_PERFMON_RESULT_AMD                                   0x8BC6\n#endif\n\n/* GL_AMD_program_binary_Z400 */\n#ifndef GL_AMD_program_binary_Z400\n#define GL_Z400_BINARY_AMD                                      0x8740\n#endif\n\n/*------------------------------------------------------------------------*\n * ANGLE extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_ANGLE_depth_texture */\n#ifndef GL_ANGLE_depth_texture\n#define GL_DEPTH_COMPONENT                                      0x1902\n#define GL_DEPTH_STENCIL_OES                                    0x84F9\n#define GL_UNSIGNED_SHORT                                       0x1403\n#define GL_UNSIGNED_INT                                         0x1405\n#define GL_UNSIGNED_INT_24_8_OES                                0x84FA\n#define GL_DEPTH_COMPONENT16                                    0x81A5\n#define GL_DEPTH_COMPONENT32_OES                                0x81A7\n#define GL_DEPTH24_STENCIL8_OES                                 0x88F0\n#endif\n\n/* GL_ANGLE_framebuffer_blit */\n#ifndef GL_ANGLE_framebuffer_blit\n#define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8\n#define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA\n#endif\n\n/* GL_ANGLE_framebuffer_multisample */\n#ifndef GL_ANGLE_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56\n#define GL_MAX_SAMPLES_ANGLE                                    0x8D57\n#endif\n\n/* GL_ANGLE_instanced_arrays */\n#ifndef GL_ANGLE_instanced_arrays\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE\n#endif\n\n/* GL_ANGLE_pack_reverse_row_order */\n#ifndef GL_ANGLE_pack_reverse_row_order\n#define GL_PACK_REVERSE_ROW_ORDER_ANGLE                         0x93A4\n#endif\n\n/* GL_ANGLE_program_binary */\n#ifndef GL_ANGLE_program_binary\n#define GL_PROGRAM_BINARY_ANGLE                                 0x93A6\n#endif\n\n/* GL_ANGLE_texture_compression_dxt3 */\n#ifndef GL_ANGLE_texture_compression_dxt3\n#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE                      0x83F2\n#endif\n\n/* GL_ANGLE_texture_compression_dxt5 */\n#ifndef GL_ANGLE_texture_compression_dxt5\n#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE                      0x83F3\n#endif\n\n/* GL_ANGLE_texture_usage */\n#ifndef GL_ANGLE_texture_usage\n#define GL_TEXTURE_USAGE_ANGLE                                  0x93A2\n#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3\n#endif\n\n/* GL_ANGLE_translated_shader_source */\n#ifndef GL_ANGLE_translated_shader_source\n#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE                0x93A0\n#endif\n\n/*------------------------------------------------------------------------*\n * APPLE extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_APPLE_copy_texture_levels */\n/* No new tokens introduced by this extension. */\n\n/* GL_APPLE_framebuffer_multisample */\n#ifndef GL_APPLE_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56\n#define GL_MAX_SAMPLES_APPLE                                    0x8D57\n#define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8\n#define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA\n#endif\n\n/* GL_APPLE_rgb_422 */\n#ifndef GL_APPLE_rgb_422\n#define GL_RGB_422_APPLE                                        0x8A1F\n#define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB\n#endif\n\n/* GL_APPLE_sync */\n#ifndef GL_APPLE_sync\n\n#define GL_SYNC_OBJECT_APPLE                                    0x8A53\n#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111\n#define GL_OBJECT_TYPE_APPLE                                    0x9112\n#define GL_SYNC_CONDITION_APPLE                                 0x9113\n#define GL_SYNC_STATUS_APPLE                                    0x9114\n#define GL_SYNC_FLAGS_APPLE                                     0x9115\n#define GL_SYNC_FENCE_APPLE                                     0x9116\n#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117\n#define GL_UNSIGNALED_APPLE                                     0x9118\n#define GL_SIGNALED_APPLE                                       0x9119\n#define GL_ALREADY_SIGNALED_APPLE                               0x911A\n#define GL_TIMEOUT_EXPIRED_APPLE                                0x911B\n#define GL_CONDITION_SATISFIED_APPLE                            0x911C\n#define GL_WAIT_FAILED_APPLE                                    0x911D\n#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001\n#define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull\n#endif\n\n/* GL_APPLE_texture_format_BGRA8888 */\n#ifndef GL_APPLE_texture_format_BGRA8888\n#define GL_BGRA_EXT                                             0x80E1\n#endif\n\n/* GL_APPLE_texture_max_level */\n#ifndef GL_APPLE_texture_max_level\n#define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D\n#endif\n\n/*------------------------------------------------------------------------*\n * ARM extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_ARM_mali_program_binary */\n#ifndef GL_ARM_mali_program_binary\n#define GL_MALI_PROGRAM_BINARY_ARM                              0x8F61\n#endif\n\n/* GL_ARM_mali_shader_binary */\n#ifndef GL_ARM_mali_shader_binary\n#define GL_MALI_SHADER_BINARY_ARM                               0x8F60\n#endif\n\n/* GL_ARM_rgba8 */\n/* No new tokens introduced by this extension. */\n\n/*------------------------------------------------------------------------*\n * EXT extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_EXT_blend_minmax */\n#ifndef GL_EXT_blend_minmax\n#define GL_MIN_EXT                                              0x8007\n#define GL_MAX_EXT                                              0x8008\n#endif\n\n/* GL_EXT_color_buffer_half_float */\n#ifndef GL_EXT_color_buffer_half_float\n#define GL_RGBA16F_EXT                                          0x881A\n#define GL_RGB16F_EXT                                           0x881B\n#define GL_RG16F_EXT                                            0x822F\n#define GL_R16F_EXT                                             0x822D\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211\n#define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17\n#endif\n\n/* GL_EXT_debug_label */\n#ifndef GL_EXT_debug_label\n#define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F\n#define GL_PROGRAM_OBJECT_EXT                                   0x8B40\n#define GL_SHADER_OBJECT_EXT                                    0x8B48\n#define GL_BUFFER_OBJECT_EXT                                    0x9151\n#define GL_QUERY_OBJECT_EXT                                     0x9153\n#define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154\n#endif\n\n/* GL_EXT_debug_marker */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_discard_framebuffer */\n#ifndef GL_EXT_discard_framebuffer\n#define GL_COLOR_EXT                                            0x1800\n#define GL_DEPTH_EXT                                            0x1801\n#define GL_STENCIL_EXT                                          0x1802\n#endif\n\n#ifndef GL_EXT_disjoint_timer_query\n#define GL_QUERY_COUNTER_BITS_EXT                               0x8864\n#define GL_CURRENT_QUERY_EXT                                    0x8865\n#define GL_QUERY_RESULT_EXT                                     0x8866\n#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867\n#define GL_TIME_ELAPSED_EXT                                     0x88BF\n#define GL_TIMESTAMP_EXT                                        0x8E28\n#define GL_GPU_DISJOINT_EXT                                     0x8FBB\n#endif\n\n#ifndef GL_EXT_draw_buffers\n#define GL_EXT_draw_buffers 1\n#define GL_MAX_COLOR_ATTACHMENTS_EXT                            0x8CDF\n#define GL_MAX_DRAW_BUFFERS_EXT                                 0x8824\n#define GL_DRAW_BUFFER0_EXT                                     0x8825\n#define GL_DRAW_BUFFER1_EXT                                     0x8826\n#define GL_DRAW_BUFFER2_EXT                                     0x8827\n#define GL_DRAW_BUFFER3_EXT                                     0x8828\n#define GL_DRAW_BUFFER4_EXT                                     0x8829\n#define GL_DRAW_BUFFER5_EXT                                     0x882A\n#define GL_DRAW_BUFFER6_EXT                                     0x882B\n#define GL_DRAW_BUFFER7_EXT                                     0x882C\n#define GL_DRAW_BUFFER8_EXT                                     0x882D\n#define GL_DRAW_BUFFER9_EXT                                     0x882E\n#define GL_DRAW_BUFFER10_EXT                                    0x882F\n#define GL_DRAW_BUFFER11_EXT                                    0x8830\n#define GL_DRAW_BUFFER12_EXT                                    0x8831\n#define GL_DRAW_BUFFER13_EXT                                    0x8832\n#define GL_DRAW_BUFFER14_EXT                                    0x8833\n#define GL_DRAW_BUFFER15_EXT                                    0x8834\n#define GL_COLOR_ATTACHMENT0_EXT                                0x8CE0\n#define GL_COLOR_ATTACHMENT1_EXT                                0x8CE1\n#define GL_COLOR_ATTACHMENT2_EXT                                0x8CE2\n#define GL_COLOR_ATTACHMENT3_EXT                                0x8CE3\n#define GL_COLOR_ATTACHMENT4_EXT                                0x8CE4\n#define GL_COLOR_ATTACHMENT5_EXT                                0x8CE5\n#define GL_COLOR_ATTACHMENT6_EXT                                0x8CE6\n#define GL_COLOR_ATTACHMENT7_EXT                                0x8CE7\n#define GL_COLOR_ATTACHMENT8_EXT                                0x8CE8\n#define GL_COLOR_ATTACHMENT9_EXT                                0x8CE9\n#define GL_COLOR_ATTACHMENT10_EXT                               0x8CEA\n#define GL_COLOR_ATTACHMENT11_EXT                               0x8CEB\n#define GL_COLOR_ATTACHMENT12_EXT                               0x8CEC\n#define GL_COLOR_ATTACHMENT13_EXT                               0x8CED\n#define GL_COLOR_ATTACHMENT14_EXT                               0x8CEE\n#define GL_COLOR_ATTACHMENT15_EXT                               0x8CEF\n#endif\n\n/* GL_EXT_map_buffer_range */\n#ifndef GL_EXT_map_buffer_range\n#define GL_MAP_READ_BIT_EXT                                     0x0001\n#define GL_MAP_WRITE_BIT_EXT                                    0x0002\n#define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004\n#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008\n#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010\n#define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020\n#endif\n\n/* GL_EXT_multisampled_render_to_texture */\n#ifndef GL_EXT_multisampled_render_to_texture\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C\n/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */\n#define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56\n#define GL_MAX_SAMPLES_EXT                                      0x8D57\n#endif\n\n/* GL_EXT_multiview_draw_buffers */\n#ifndef GL_EXT_multiview_draw_buffers\n#define GL_COLOR_ATTACHMENT_EXT                                 0x90F0\n#define GL_MULTIVIEW_EXT                                        0x90F1\n#define GL_DRAW_BUFFER_EXT                                      0x0C01\n#define GL_READ_BUFFER_EXT                                      0x0C02\n#define GL_MAX_MULTIVIEW_BUFFERS_EXT                            0x90F2\n#endif\n\n/* GL_EXT_multi_draw_arrays */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_occlusion_query_boolean */\n#ifndef GL_EXT_occlusion_query_boolean\n#define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F\n#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A\n#define GL_CURRENT_QUERY_EXT                                    0x8865\n#define GL_QUERY_RESULT_EXT                                     0x8866\n#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867\n#endif\n\n/* GL_EXT_read_format_bgra */\n#ifndef GL_EXT_read_format_bgra\n#define GL_BGRA_EXT                                             0x80E1\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366\n#endif\n\n/* GL_EXT_robustness */\n#ifndef GL_EXT_robustness\n/* reuse GL_NO_ERROR */\n#define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253\n#define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254\n#define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255\n#define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3\n#define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256\n#define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252\n#define GL_NO_RESET_NOTIFICATION_EXT                            0x8261\n#endif\n\n/* GL_EXT_separate_shader_objects */\n#ifndef GL_EXT_separate_shader_objects\n#define GL_VERTEX_SHADER_BIT_EXT                                0x00000001\n#define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002\n#define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF\n#define GL_PROGRAM_SEPARABLE_EXT                                0x8258\n#define GL_ACTIVE_PROGRAM_EXT                                   0x8259\n#define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A\n#endif\n\n/* GL_EXT_shader_framebuffer_fetch */\n#ifndef GL_EXT_shader_framebuffer_fetch\n#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT                 0x8A52\n#endif\n\n/* GL_EXT_shader_texture_lod */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_shadow_samplers */\n#ifndef GL_EXT_shadow_samplers\n#define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C\n#define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D\n#define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E\n#define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62\n#endif\n\n/* GL_EXT_sRGB */\n#ifndef GL_EXT_sRGB\n#define GL_SRGB_EXT                                             0x8C40\n#define GL_SRGB_ALPHA_EXT                                       0x8C42\n#define GL_SRGB8_ALPHA8_EXT                                     0x8C43\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210\n#endif\n\n/* GL_EXT_sRGB_write_control */\n#ifndef GL_EXT_sRGB_write_control\n#define GL_EXT_sRGB_write_control 1\n#define GL_FRAMEBUFFER_SRGB_EXT                                 0x8DB9\n#endif\n\n/* GL_EXT_texture_compression_dxt1 */\n#ifndef GL_EXT_texture_compression_dxt1\n#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0\n#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1\n#endif\n\n/* GL_EXT_texture_filter_anisotropic */\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE\n#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF\n#endif\n\n/* GL_EXT_texture_format_BGRA8888 */\n#ifndef GL_EXT_texture_format_BGRA8888\n#define GL_BGRA_EXT                                             0x80E1\n#endif\n\n/* GL_EXT_texture_rg */\n#ifndef GL_EXT_texture_rg\n#define GL_RED_EXT                                              0x1903\n#define GL_RG_EXT                                               0x8227\n#define GL_R8_EXT                                               0x8229\n#define GL_RG8_EXT                                              0x822B\n#endif\n\n/* GL_EXT_texture_sRGB_decode */\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_EXT_texture_sRGB_decode 1\n#define GL_TEXTURE_SRGB_DECODE_EXT                              0x8A48\n#define GL_DECODE_EXT                                           0x8A49\n#define GL_SKIP_DECODE_EXT                                      0x8A4A\n#endif\n\n/* GL_EXT_texture_storage */\n#ifndef GL_EXT_texture_storage\n#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F\n#define GL_ALPHA8_EXT                                           0x803C\n#define GL_LUMINANCE8_EXT                                       0x8040\n#define GL_LUMINANCE8_ALPHA8_EXT                                0x8045\n#define GL_RGBA32F_EXT                                          0x8814\n#define GL_RGB32F_EXT                                           0x8815\n#define GL_ALPHA32F_EXT                                         0x8816\n#define GL_LUMINANCE32F_EXT                                     0x8818\n#define GL_LUMINANCE_ALPHA32F_EXT                               0x8819\n/* reuse GL_RGBA16F_EXT */\n/* reuse GL_RGB16F_EXT */\n#define GL_ALPHA16F_EXT                                         0x881C\n#define GL_LUMINANCE16F_EXT                                     0x881E\n#define GL_LUMINANCE_ALPHA16F_EXT                               0x881F\n#define GL_RGB10_A2_EXT                                         0x8059\n#define GL_RGB10_EXT                                            0x8052\n#define GL_BGRA8_EXT                                            0x93A1\n#define GL_R8_EXT                                               0x8229\n#define GL_RG8_EXT                                              0x822B\n#define GL_R32F_EXT                                             0x822E\n#define GL_RG32F_EXT                                            0x8230\n#define GL_R16F_EXT                                             0x822D\n#define GL_RG16F_EXT                                            0x822F\n#endif\n\n/* GL_EXT_texture_type_2_10_10_10_REV */\n#ifndef GL_EXT_texture_type_2_10_10_10_REV\n#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368\n#endif\n\n/* GL_EXT_unpack_subimage */\n#ifndef GL_EXT_unpack_subimage\n#define GL_UNPACK_ROW_LENGTH_EXT                                0x0CF2\n#define GL_UNPACK_SKIP_ROWS_EXT                                 0x0CF3\n#define GL_UNPACK_SKIP_PIXELS_EXT                               0x0CF4\n#endif\n\n/*------------------------------------------------------------------------*\n * DMP extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_DMP_shader_binary */\n#ifndef GL_DMP_shader_binary\n#define GL_SHADER_BINARY_DMP                                    0x9250\n#endif\n\n/*------------------------------------------------------------------------*\n * FJ extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_FJ_shader_binary_GCCSO */\n#ifndef GL_FJ_shader_binary_GCCSO\n#define GL_GCCSO_SHADER_BINARY_FJ                               0x9260\n#endif\n\n/*------------------------------------------------------------------------*\n * IMG extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_IMG_program_binary */\n#ifndef GL_IMG_program_binary\n#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130\n#endif\n\n/* GL_IMG_read_format */\n#ifndef GL_IMG_read_format\n#define GL_BGRA_IMG                                             0x80E1\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365\n#endif\n\n/* GL_IMG_shader_binary */\n#ifndef GL_IMG_shader_binary\n#define GL_SGX_BINARY_IMG                                       0x8C0A\n#endif\n\n/* GL_IMG_texture_compression_pvrtc */\n#ifndef GL_IMG_texture_compression_pvrtc\n#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00\n#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01\n#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02\n#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03\n#endif\n\n/* GL_IMG_texture_compression_pvrtc2 */\n#ifndef GL_IMG_texture_compression_pvrtc2\n#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG                     0x9137\n#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG                     0x9138\n#endif\n\n/* GL_IMG_multisampled_render_to_texture */\n#ifndef GL_IMG_multisampled_render_to_texture\n#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134\n#define GL_MAX_SAMPLES_IMG                                      0x9135\n#define GL_TEXTURE_SAMPLES_IMG                                  0x9136\n#endif\n\n/*------------------------------------------------------------------------*\n * NV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_NV_coverage_sample */\n#ifndef GL_NV_coverage_sample\n#define GL_COVERAGE_COMPONENT_NV                                0x8ED0\n#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1\n#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2\n#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3\n#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4\n#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5\n#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6\n#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7\n#define GL_COVERAGE_BUFFER_BIT_NV                               0x00008000\n#endif\n\n/* GL_NV_depth_nonlinear */\n#ifndef GL_NV_depth_nonlinear\n#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C\n#endif\n\n/* GL_NV_draw_buffers */\n#ifndef GL_NV_draw_buffers\n#define GL_MAX_DRAW_BUFFERS_NV                                  0x8824\n#define GL_DRAW_BUFFER0_NV                                      0x8825\n#define GL_DRAW_BUFFER1_NV                                      0x8826\n#define GL_DRAW_BUFFER2_NV                                      0x8827\n#define GL_DRAW_BUFFER3_NV                                      0x8828\n#define GL_DRAW_BUFFER4_NV                                      0x8829\n#define GL_DRAW_BUFFER5_NV                                      0x882A\n#define GL_DRAW_BUFFER6_NV                                      0x882B\n#define GL_DRAW_BUFFER7_NV                                      0x882C\n#define GL_DRAW_BUFFER8_NV                                      0x882D\n#define GL_DRAW_BUFFER9_NV                                      0x882E\n#define GL_DRAW_BUFFER10_NV                                     0x882F\n#define GL_DRAW_BUFFER11_NV                                     0x8830\n#define GL_DRAW_BUFFER12_NV                                     0x8831\n#define GL_DRAW_BUFFER13_NV                                     0x8832\n#define GL_DRAW_BUFFER14_NV                                     0x8833\n#define GL_DRAW_BUFFER15_NV                                     0x8834\n#define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0\n#define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1\n#define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2\n#define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3\n#define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4\n#define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5\n#define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6\n#define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7\n#define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8\n#define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9\n#define GL_COLOR_ATTACHMENT10_NV                                0x8CEA\n#define GL_COLOR_ATTACHMENT11_NV                                0x8CEB\n#define GL_COLOR_ATTACHMENT12_NV                                0x8CEC\n#define GL_COLOR_ATTACHMENT13_NV                                0x8CED\n#define GL_COLOR_ATTACHMENT14_NV                                0x8CEE\n#define GL_COLOR_ATTACHMENT15_NV                                0x8CEF\n#endif\n\n/* GL_NV_draw_instanced */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_fbo_color_attachments */\n#ifndef GL_NV_fbo_color_attachments\n#define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF\n/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */\n#endif\n\n/* GL_NV_fence */\n#ifndef GL_NV_fence\n#define GL_ALL_COMPLETED_NV                                     0x84F2\n#define GL_FENCE_STATUS_NV                                      0x84F3\n#define GL_FENCE_CONDITION_NV                                   0x84F4\n#endif\n\n/* GL_NV_framebuffer_blit */\n#ifndef GL_NV_framebuffer_blit\n#define GL_READ_FRAMEBUFFER_NV                                  0x8CA8\n#define GL_DRAW_FRAMEBUFFER_NV                                  0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_NV                          0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_NV                          0x8CAA\n#endif\n\n/* GL_NV_framebuffer_multisample */\n#ifndef GL_NV_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_NV                              0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV                0x8D56\n#define GL_MAX_SAMPLES_NV                                       0x8D57\n#endif\n\n/* GL_NV_generate_mipmap_sRGB */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_instanced_arrays */\n#ifndef GL_NV_instanced_arrays\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV                       0x88FE\n#endif\n\n/* GL_NV_read_buffer */\n#ifndef GL_NV_read_buffer\n#define GL_READ_BUFFER_NV                                       0x0C02\n#endif\n\n/* GL_NV_read_buffer_front */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_depth */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_depth_stencil */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_stencil */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_shadow_samplers_array */\n#ifndef GL_NV_shadow_samplers_array\n#define GL_SAMPLER_2D_ARRAY_SHADOW_NV                           0x8DC4\n#endif\n\n/* GL_NV_shadow_samplers_cube */\n#ifndef GL_NV_shadow_samplers_cube\n#define GL_SAMPLER_CUBE_SHADOW_NV                               0x8DC5\n#endif\n\n/* GL_NV_sRGB_formats */\n#ifndef GL_NV_sRGB_formats\n#define GL_SLUMINANCE_NV                                        0x8C46\n#define GL_SLUMINANCE_ALPHA_NV                                  0x8C44\n#define GL_SRGB8_NV                                             0x8C41\n#define GL_SLUMINANCE8_NV                                       0x8C47\n#define GL_SLUMINANCE8_ALPHA8_NV                                0x8C45\n#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV                         0x8C4C\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV                   0x8C4D\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV                   0x8C4E\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV                   0x8C4F\n#define GL_ETC1_SRGB8_NV                                        0x88EE\n#endif\n\n/* GL_NV_texture_border_clamp */\n#ifndef GL_NV_texture_border_clamp\n#define GL_TEXTURE_BORDER_COLOR_NV                              0x1004\n#define GL_CLAMP_TO_BORDER_NV                                   0x812D\n#endif\n\n/* GL_NV_texture_compression_s3tc_update */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_texture_npot_2D_mipmap */\n/* No new tokens introduced by this extension. */\n\n/*------------------------------------------------------------------------*\n * QCOM extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_QCOM_alpha_test */\n#ifndef GL_QCOM_alpha_test\n#define GL_ALPHA_TEST_QCOM                                      0x0BC0\n#define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1\n#define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2\n#endif\n\n/* GL_QCOM_binning_control */\n#ifndef GL_QCOM_binning_control\n#define GL_BINNING_CONTROL_HINT_QCOM                            0x8FB0\n#define GL_CPU_OPTIMIZED_QCOM                                   0x8FB1\n#define GL_GPU_OPTIMIZED_QCOM                                   0x8FB2\n#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM                    0x8FB3\n#endif\n\n/* GL_QCOM_driver_control */\n/* No new tokens introduced by this extension. */\n\n/* GL_QCOM_extended_get */\n#ifndef GL_QCOM_extended_get\n#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2\n#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3\n#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4\n#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5\n#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6\n#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7\n#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8\n#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9\n#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA\n#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB\n#define GL_STATE_RESTORE                                        0x8BDC\n#endif\n\n/* GL_QCOM_extended_get2 */\n/* No new tokens introduced by this extension. */\n\n/* GL_QCOM_perfmon_global_mode */\n#ifndef GL_QCOM_perfmon_global_mode\n#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0\n#endif\n\n/* GL_QCOM_writeonly_rendering */\n#ifndef GL_QCOM_writeonly_rendering\n#define GL_WRITEONLY_RENDERING_QCOM                             0x8823\n#endif\n\n/* GL_QCOM_tiled_rendering */\n#ifndef GL_QCOM_tiled_rendering\n#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001\n#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002\n#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004\n#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008\n#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010\n#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020\n#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040\n#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080\n#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100\n#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200\n#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400\n#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800\n#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000\n#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000\n#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000\n#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000\n#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000\n#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000\n#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000\n#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000\n#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000\n#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000\n#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000\n#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000\n#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000\n#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000\n#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000\n#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000\n#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000\n#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000\n#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000\n#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000\n#endif\n\n/*------------------------------------------------------------------------*\n * VIV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_VIV_shader_binary */\n#ifndef GL_VIV_shader_binary\n#define GL_SHADER_BINARY_VIV                                    0x8FC4\n#endif\n\n/*------------------------------------------------------------------------*\n * End of extension tokens, start of corresponding extension functions\n *------------------------------------------------------------------------*/\n\n/*------------------------------------------------------------------------*\n * OES extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_OES_compressed_ETC1_RGB8_texture */\n#ifndef GL_OES_compressed_ETC1_RGB8_texture\n#define GL_OES_compressed_ETC1_RGB8_texture 1\n#endif\n\n/* GL_OES_compressed_paletted_texture */\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_OES_compressed_paletted_texture 1\n#endif\n\n/* GL_OES_depth24 */\n#ifndef GL_OES_depth24\n#define GL_OES_depth24 1\n#endif\n\n/* GL_OES_depth32 */\n#ifndef GL_OES_depth32\n#define GL_OES_depth32 1\n#endif\n\n/* GL_OES_depth_texture */\n#ifndef GL_OES_depth_texture\n#define GL_OES_depth_texture 1\n#endif\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\n#define GL_OES_EGL_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);\nGL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);\ntypedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);\n#endif\n\n/* GL_OES_EGL_image_external */\n#ifndef GL_OES_EGL_image_external\n#define GL_OES_EGL_image_external 1\n/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */\n#endif\n\n/* GL_OES_element_index_uint */\n#ifndef GL_OES_element_index_uint\n#define GL_OES_element_index_uint 1\n#endif\n\n/* GL_OES_fbo_render_mipmap */\n#ifndef GL_OES_fbo_render_mipmap\n#define GL_OES_fbo_render_mipmap 1\n#endif\n\n/* GL_OES_fragment_precision_high */\n#ifndef GL_OES_fragment_precision_high\n#define GL_OES_fragment_precision_high 1\n#endif\n\n/* GL_OES_get_program_binary */\n#ifndef GL_OES_get_program_binary\n#define GL_OES_get_program_binary 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\nGL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);\n#endif\n\n/* GL_OES_mapbuffer */\n#ifndef GL_OES_mapbuffer\n#define GL_OES_mapbuffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);\nGL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);\nGL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);\n#endif\ntypedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);\ntypedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);\ntypedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);\n#endif\n\n/* GL_OES_packed_depth_stencil */\n#ifndef GL_OES_packed_depth_stencil\n#define GL_OES_packed_depth_stencil 1\n#endif\n\n/* GL_OES_required_internalformat */\n#ifndef GL_OES_required_internalformat\n#define GL_OES_required_internalformat 1\n#endif\n\n/* GL_OES_rgb8_rgba8 */\n#ifndef GL_OES_rgb8_rgba8\n#define GL_OES_rgb8_rgba8 1\n#endif\n\n/* GL_OES_standard_derivatives */\n#ifndef GL_OES_standard_derivatives\n#define GL_OES_standard_derivatives 1\n#endif\n\n/* GL_OES_stencil1 */\n#ifndef GL_OES_stencil1\n#define GL_OES_stencil1 1\n#endif\n\n/* GL_OES_stencil4 */\n#ifndef GL_OES_stencil4\n#define GL_OES_stencil4 1\n#endif\n\n#ifndef GL_OES_surfaceless_context\n#define GL_OES_surfaceless_context 1\n#endif\n\n/* GL_OES_texture_3D */\n#ifndef GL_OES_texture_3D\n#define GL_OES_texture_3D 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\n#endif\ntypedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\ntypedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);\ntypedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);\ntypedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\n#endif\n\n/* GL_OES_texture_float */\n#ifndef GL_OES_texture_float\n#define GL_OES_texture_float 1\n#endif\n\n/* GL_OES_texture_float_linear */\n#ifndef GL_OES_texture_float_linear\n#define GL_OES_texture_float_linear 1\n#endif\n\n/* GL_OES_texture_half_float */\n#ifndef GL_OES_texture_half_float\n#define GL_OES_texture_half_float 1\n#endif\n\n/* GL_OES_texture_half_float_linear */\n#ifndef GL_OES_texture_half_float_linear\n#define GL_OES_texture_half_float_linear 1\n#endif\n\n/* GL_OES_texture_npot */\n#ifndef GL_OES_texture_npot\n#define GL_OES_texture_npot 1\n#endif\n\n/* GL_OES_vertex_array_object */\n#ifndef GL_OES_vertex_array_object\n#define GL_OES_vertex_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);\nGL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);\nGL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);\nGL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);\ntypedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);\n#endif\n\n/* GL_OES_vertex_half_float */\n#ifndef GL_OES_vertex_half_float\n#define GL_OES_vertex_half_float 1\n#endif\n\n/* GL_OES_vertex_type_10_10_10_2 */\n#ifndef GL_OES_vertex_type_10_10_10_2\n#define GL_OES_vertex_type_10_10_10_2 1\n#endif\n\n/*------------------------------------------------------------------------*\n * KHR extension functions\n *------------------------------------------------------------------------*/\n\n#ifndef GL_KHR_debug\n#define GL_KHR_debug 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);\nGL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\nGL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);\nGL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);\nGL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\nGL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\nGL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);\ntypedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\ntypedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\ntypedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);\ntypedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_KHR_texture_compression_astc_ldr 1\n#endif\n\n\n/*------------------------------------------------------------------------*\n * AMD extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_AMD_compressed_3DC_texture */\n#ifndef GL_AMD_compressed_3DC_texture\n#define GL_AMD_compressed_3DC_texture 1\n#endif\n\n/* GL_AMD_compressed_ATC_texture */\n#ifndef GL_AMD_compressed_ATC_texture\n#define GL_AMD_compressed_ATC_texture 1\n#endif\n\n/* AMD_performance_monitor */\n#ifndef GL_AMD_performance_monitor\n#define GL_AMD_performance_monitor 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\nGL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);\nGL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\nGL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\ntypedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);\ntypedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\n\n/* GL_AMD_program_binary_Z400 */\n#ifndef GL_AMD_program_binary_Z400\n#define GL_AMD_program_binary_Z400 1\n#endif\n\n/*------------------------------------------------------------------------*\n * ANGLE extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_ANGLE_depth_texture */\n#ifndef GL_ANGLE_depth_texture\n#define GL_ANGLE_depth_texture 1\n#endif\n\n/* GL_ANGLE_framebuffer_blit */\n#ifndef GL_ANGLE_framebuffer_blit\n#define GL_ANGLE_framebuffer_blit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n\n/* GL_ANGLE_framebuffer_multisample */\n#ifndef GL_ANGLE_framebuffer_multisample\n#define GL_ANGLE_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_ANGLE_instanced_arrays\n#define GL_ANGLE_instanced_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);\n#endif\n\n/* GL_ANGLE_pack_reverse_row_order */\n#ifndef GL_ANGLE_pack_reverse_row_order\n#define GL_ANGLE_pack_reverse_row_order 1\n#endif\n\n/* GL_ANGLE_program_binary */\n#ifndef GL_ANGLE_program_binary\n#define GL_ANGLE_program_binary 1\n#endif\n\n/* GL_ANGLE_texture_compression_dxt3 */\n#ifndef GL_ANGLE_texture_compression_dxt3\n#define GL_ANGLE_texture_compression_dxt3 1\n#endif\n\n/* GL_ANGLE_texture_compression_dxt5 */\n#ifndef GL_ANGLE_texture_compression_dxt5\n#define GL_ANGLE_texture_compression_dxt5 1\n#endif\n\n/* GL_ANGLE_texture_usage */\n#ifndef GL_ANGLE_texture_usage\n#define GL_ANGLE_texture_usage 1\n#endif\n\n#ifndef GL_ANGLE_translated_shader_source\n#define GL_ANGLE_translated_shader_source 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\n#endif\n\n/*------------------------------------------------------------------------*\n * APPLE extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_APPLE_copy_texture_levels */\n#ifndef GL_APPLE_copy_texture_levels\n#define GL_APPLE_copy_texture_levels 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\n#endif\ntypedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\n#endif\n\n/* GL_APPLE_framebuffer_multisample */\n#ifndef GL_APPLE_framebuffer_multisample\n#define GL_APPLE_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);\n#endif\n\n/* GL_APPLE_rgb_422 */\n#ifndef GL_APPLE_rgb_422\n#define GL_APPLE_rgb_422 1\n#endif\n\n/* GL_APPLE_sync */\n#ifndef GL_APPLE_sync\n#define GL_APPLE_sync 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);\nGL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);\nGL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);\nGL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);\nGL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif\ntypedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);\ntypedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);\ntypedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);\ntypedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);\ntypedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif\n\n/* GL_APPLE_texture_format_BGRA8888 */\n#ifndef GL_APPLE_texture_format_BGRA8888\n#define GL_APPLE_texture_format_BGRA8888 1\n#endif\n\n/* GL_APPLE_texture_max_level */\n#ifndef GL_APPLE_texture_max_level\n#define GL_APPLE_texture_max_level 1\n#endif\n\n/*------------------------------------------------------------------------*\n * ARM extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_ARM_mali_program_binary */\n#ifndef GL_ARM_mali_program_binary\n#define GL_ARM_mali_program_binary 1\n#endif\n\n/* GL_ARM_mali_shader_binary */\n#ifndef GL_ARM_mali_shader_binary\n#define GL_ARM_mali_shader_binary 1\n#endif\n\n/* GL_ARM_rgba8 */\n#ifndef GL_ARM_rgba8\n#define GL_ARM_rgba8 1\n#endif\n\n/*------------------------------------------------------------------------*\n * EXT extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_EXT_blend_minmax */\n#ifndef GL_EXT_blend_minmax\n#define GL_EXT_blend_minmax 1\n#endif\n\n/* GL_EXT_color_buffer_half_float */\n#ifndef GL_EXT_color_buffer_half_float\n#define GL_EXT_color_buffer_half_float 1\n#endif\n\n/* GL_EXT_debug_label */\n#ifndef GL_EXT_debug_label\n#define GL_EXT_debug_label 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\ntypedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n\n/* GL_EXT_debug_marker */\n#ifndef GL_EXT_debug_marker\n#define GL_EXT_debug_marker 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);\nGL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);\nGL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);\n#endif\ntypedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);\n#endif\n\n/* GL_EXT_discard_framebuffer */\n#ifndef GL_EXT_discard_framebuffer\n#define GL_EXT_discard_framebuffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\n#endif\n\n#ifndef GL_EXT_disjoint_timer_query\n#define GL_EXT_disjoint_timer_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);\nGL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);\nGL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);\nGL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);\nGL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);\nGL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);\nGL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);\ntypedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);\ntypedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);\ntypedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);\ntypedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);\n#endif /* GL_EXT_disjoint_timer_query */\n\n#ifndef GL_EXT_draw_buffers\n#define GL_EXT_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);\n#endif /* GL_EXT_draw_buffers */\n\n/* GL_EXT_map_buffer_range */\n#ifndef GL_EXT_map_buffer_range\n#define GL_EXT_map_buffer_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif\ntypedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif\n\n/* GL_EXT_multisampled_render_to_texture */\n#ifndef GL_EXT_multisampled_render_to_texture\n#define GL_EXT_multisampled_render_to_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);             \nGL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\n\n/* GL_EXT_multiview_draw_buffers */\n#ifndef GL_EXT_multiview_draw_buffers\n#define GL_EXT_multiview_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);\nGL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);\nGL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);\n#endif\ntypedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);\ntypedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);\n#endif\n\n#ifndef GL_EXT_multi_draw_arrays\n#define GL_EXT_multi_draw_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);\n#endif\n\n/* GL_EXT_occlusion_query_boolean */\n#ifndef GL_EXT_occlusion_query_boolean\n#define GL_EXT_occlusion_query_boolean 1\n/* All entry points also exist in GL_EXT_disjoint_timer_query */\n#endif\n\n/* GL_EXT_read_format_bgra */\n#ifndef GL_EXT_read_format_bgra\n#define GL_EXT_read_format_bgra 1\n#endif\n\n/* GL_EXT_robustness */\n#ifndef GL_EXT_robustness\n#define GL_EXT_robustness 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);\nGL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\nGL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\nGL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);\n#endif\ntypedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);\ntypedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\ntypedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\ntypedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\n#endif\n\n/* GL_EXT_separate_shader_objects */\n#ifndef GL_EXT_separate_shader_objects\n#define GL_EXT_separate_shader_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);\nGL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);\nGL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);\nGL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);\nGL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);\nGL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\nGL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);\nGL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);\nGL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);\nGL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);\nGL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);\nGL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);\nGL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif\ntypedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\ntypedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);\ntypedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);\ntypedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);\ntypedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);\ntypedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif\n\n/* GL_EXT_shader_framebuffer_fetch */\n#ifndef GL_EXT_shader_framebuffer_fetch\n#define GL_EXT_shader_framebuffer_fetch 1\n#endif\n\n/* GL_EXT_shader_texture_lod */\n#ifndef GL_EXT_shader_texture_lod\n#define GL_EXT_shader_texture_lod 1\n#endif\n\n/* GL_EXT_shadow_samplers */\n#ifndef GL_EXT_shadow_samplers\n#define GL_EXT_shadow_samplers 1\n#endif\n\n/* GL_EXT_sRGB */\n#ifndef GL_EXT_sRGB\n#define GL_EXT_sRGB 1\n#endif\n\n/* GL_EXT_texture_compression_dxt1 */\n#ifndef GL_EXT_texture_compression_dxt1\n#define GL_EXT_texture_compression_dxt1 1\n#endif\n\n/* GL_EXT_texture_filter_anisotropic */\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_EXT_texture_filter_anisotropic 1\n#endif\n\n/* GL_EXT_texture_format_BGRA8888 */\n#ifndef GL_EXT_texture_format_BGRA8888\n#define GL_EXT_texture_format_BGRA8888 1\n#endif\n\n/* GL_EXT_texture_rg */\n#ifndef GL_EXT_texture_rg\n#define GL_EXT_texture_rg 1\n#endif\n\n/* GL_EXT_texture_storage */\n#ifndef GL_EXT_texture_storage\n#define GL_EXT_texture_storage 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n\n/* GL_EXT_texture_type_2_10_10_10_REV */\n#ifndef GL_EXT_texture_type_2_10_10_10_REV\n#define GL_EXT_texture_type_2_10_10_10_REV 1\n#endif\n\n/* GL_EXT_unpack_subimage */\n#ifndef GL_EXT_unpack_subimage\n#define GL_EXT_unpack_subimage 1\n#endif\n\n/*------------------------------------------------------------------------*\n * DMP extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_DMP_shader_binary */\n#ifndef GL_DMP_shader_binary\n#define GL_DMP_shader_binary 1\n#endif\n\n/*------------------------------------------------------------------------*\n * FJ extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_FJ_shader_binary_GCCSO */\n#ifndef GL_FJ_shader_binary_GCCSO\n#define GL_FJ_shader_binary_GCCSO 1\n#endif\n\n/*------------------------------------------------------------------------*\n * IMG extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_IMG_program_binary */\n#ifndef GL_IMG_program_binary\n#define GL_IMG_program_binary 1\n#endif\n\n/* GL_IMG_read_format */\n#ifndef GL_IMG_read_format\n#define GL_IMG_read_format 1\n#endif\n\n/* GL_IMG_shader_binary */\n#ifndef GL_IMG_shader_binary\n#define GL_IMG_shader_binary 1\n#endif\n\n/* GL_IMG_texture_compression_pvrtc */\n#ifndef GL_IMG_texture_compression_pvrtc\n#define GL_IMG_texture_compression_pvrtc 1\n#endif\n\n/* GL_IMG_texture_compression_pvrtc2 */\n#ifndef GL_IMG_texture_compression_pvrtc2\n#define GL_IMG_texture_compression_pvrtc2 1\n#endif\n\n/* GL_IMG_multisampled_render_to_texture */\n#ifndef GL_IMG_multisampled_render_to_texture\n#define GL_IMG_multisampled_render_to_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\n\n/*------------------------------------------------------------------------*\n * NV extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_NV_coverage_sample */\n#ifndef GL_NV_coverage_sample\n#define GL_NV_coverage_sample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);\nGL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);\n#endif\ntypedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);\ntypedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);\n#endif\n\n/* GL_NV_depth_nonlinear */\n#ifndef GL_NV_depth_nonlinear\n#define GL_NV_depth_nonlinear 1\n#endif\n\n/* GL_NV_draw_buffers */\n#ifndef GL_NV_draw_buffers\n#define GL_NV_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);\n#endif\n\n/* GL_NV_draw_instanced */\n#ifndef GL_NV_draw_instanced\n#define GL_NV_draw_instanced 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\n\n/* GL_NV_fbo_color_attachments */\n#ifndef GL_NV_fbo_color_attachments\n#define GL_NV_fbo_color_attachments 1\n#endif\n\n/* GL_NV_fence */\n#ifndef GL_NV_fence\n#define GL_NV_fence 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\nGL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\nGL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);\nGL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);\nGL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);\nGL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\ntypedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\ntypedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\ntypedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\ntypedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\ntypedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\n#endif\n\n/* GL_NV_framebuffer_blit */\n#ifndef GL_NV_framebuffer_blit\n#define GL_NV_framebuffer_blit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n\n/* GL_NV_framebuffer_multisample */\n#ifndef GL_NV_framebuffer_multisample\n#define GL_NV_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n/* GL_NV_generate_mipmap_sRGB */\n#ifndef GL_NV_generate_mipmap_sRGB\n#define GL_NV_generate_mipmap_sRGB 1\n#endif\n\n/* GL_NV_instanced_arrays */\n#ifndef GL_NV_instanced_arrays\n#define GL_NV_instanced_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);\n#endif\ntypedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);\n#endif\n\n/* GL_NV_read_buffer */\n#ifndef GL_NV_read_buffer\n#define GL_NV_read_buffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);\n#endif\ntypedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);\n#endif\n\n/* GL_NV_read_buffer_front */\n#ifndef GL_NV_read_buffer_front\n#define GL_NV_read_buffer_front 1\n#endif\n\n/* GL_NV_read_depth */\n#ifndef GL_NV_read_depth\n#define GL_NV_read_depth 1\n#endif\n\n/* GL_NV_read_depth_stencil */\n#ifndef GL_NV_read_depth_stencil\n#define GL_NV_read_depth_stencil 1\n#endif\n\n/* GL_NV_read_stencil */\n#ifndef GL_NV_read_stencil\n#define GL_NV_read_stencil 1\n#endif\n\n/* GL_NV_shadow_samplers_array */\n#ifndef GL_NV_shadow_samplers_array\n#define GL_NV_shadow_samplers_array 1\n#endif\n\n/* GL_NV_shadow_samplers_cube */\n#ifndef GL_NV_shadow_samplers_cube\n#define GL_NV_shadow_samplers_cube 1\n#endif\n\n/* GL_NV_sRGB_formats */\n#ifndef GL_NV_sRGB_formats\n#define GL_NV_sRGB_formats 1\n#endif\n\n/* GL_NV_texture_border_clamp */\n#ifndef GL_NV_texture_border_clamp\n#define GL_NV_texture_border_clamp 1\n#endif\n\n/* GL_NV_texture_compression_s3tc_update */\n#ifndef GL_NV_texture_compression_s3tc_update\n#define GL_NV_texture_compression_s3tc_update 1\n#endif\n\n/* GL_NV_texture_npot_2D_mipmap */\n#ifndef GL_NV_texture_npot_2D_mipmap\n#define GL_NV_texture_npot_2D_mipmap 1\n#endif\n\n/*------------------------------------------------------------------------*\n * QCOM extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_QCOM_alpha_test */\n#ifndef GL_QCOM_alpha_test\n#define GL_QCOM_alpha_test 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);\n#endif\ntypedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);\n#endif\n\n/* GL_QCOM_binning_control */\n#ifndef GL_QCOM_binning_control\n#define GL_QCOM_binning_control 1\n#endif\n\n/* GL_QCOM_driver_control */\n#ifndef GL_QCOM_driver_control\n#define GL_QCOM_driver_control 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);\nGL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\nGL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);\nGL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);\ntypedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\ntypedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\ntypedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\n#endif\n\n/* GL_QCOM_extended_get */\n#ifndef GL_QCOM_extended_get\n#define GL_QCOM_extended_get 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);\nGL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\nGL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\nGL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\nGL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);\nGL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);\nGL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);\ntypedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);\ntypedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);\n#endif\n\n/* GL_QCOM_extended_get2 */\n#ifndef GL_QCOM_extended_get2\n#define GL_QCOM_extended_get2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);\nGL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\nGL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);\nGL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);\ntypedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\ntypedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);\ntypedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\n#endif\n\n/* GL_QCOM_perfmon_global_mode */\n#ifndef GL_QCOM_perfmon_global_mode\n#define GL_QCOM_perfmon_global_mode 1\n#endif\n\n/* GL_QCOM_writeonly_rendering */\n#ifndef GL_QCOM_writeonly_rendering\n#define GL_QCOM_writeonly_rendering 1\n#endif\n\n/* GL_QCOM_tiled_rendering */\n#ifndef GL_QCOM_tiled_rendering\n#define GL_QCOM_tiled_rendering 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\nGL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);\n#endif\ntypedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\ntypedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);\n#endif\n\n/*------------------------------------------------------------------------*\n * VIV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_VIV_shader_binary */\n#ifndef GL_VIV_shader_binary\n#define GL_VIV_shader_binary 1\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl2ext_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles2_gl2platform.h",
    "content": "#ifndef __gl2platform_h_\n#define __gl2platform_h_\n\n/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h\n *\n * Adopters may modify khrplatform.h and this file to suit their platform.\n * You are encouraged to submit all modifications to the Khronos group so that\n * they can be included in future versions of this file.  Please submit changes\n * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)\n * by filing a bug against product \"OpenGL-ES\" component \"Registry\".\n */\n\n/*#include <KHR/khrplatform.h>*/\n\n#ifndef GL_APICALL\n#define GL_APICALL  KHRONOS_APICALL\n#endif\n\n#ifndef GL_APIENTRY\n#define GL_APIENTRY KHRONOS_APIENTRY\n#endif\n\n#endif /* __gl2platform_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_opengles2_khrplatform.h",
    "content": "#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Khronos platform-specific types and definitions.\n *\n * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $\n *\n * Adopters may modify this file to suit their platform. Adopters are\n * encouraged to submit platform specific modifications to the Khronos\n * group so that they can be included in future versions of this file.\n * Please submit changes by sending them to the public Khronos Bugzilla\n * (http://khronos.org/bugzilla) by filing a bug against product\n * \"Khronos (general)\" component \"Registry\".\n *\n * A predefined template which fills in some of the bug fields can be\n * reached using http://tinyurl.com/khrplatform-h-bugreport, but you\n * must create a Bugzilla login first.\n *\n *\n * See the Implementer's Guidelines for information about where this file\n * should be located on your system and for more details of its use:\n *    http://www.khronos.org/registry/implementers_guide.pdf\n *\n * This file should be included as\n *        #include <KHR/khrplatform.h>\n * by Khronos client API header files that use its types and defines.\n *\n * The types in khrplatform.h should only be used to define API-specific types.\n *\n * Types defined in khrplatform.h:\n *    khronos_int8_t              signed   8  bit\n *    khronos_uint8_t             unsigned 8  bit\n *    khronos_int16_t             signed   16 bit\n *    khronos_uint16_t            unsigned 16 bit\n *    khronos_int32_t             signed   32 bit\n *    khronos_uint32_t            unsigned 32 bit\n *    khronos_int64_t             signed   64 bit\n *    khronos_uint64_t            unsigned 64 bit\n *    khronos_intptr_t            signed   same number of bits as a pointer\n *    khronos_uintptr_t           unsigned same number of bits as a pointer\n *    khronos_ssize_t             signed   size\n *    khronos_usize_t             unsigned size\n *    khronos_float_t             signed   32 bit floating point\n *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\n *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\n *                                         nanoseconds\n *    khronos_stime_nanoseconds_t signed time interval in nanoseconds\n *    khronos_boolean_enum_t      enumerated boolean type. This should\n *      only be used as a base type when a client API's boolean type is\n *      an enum. Client APIs which use an integer or other type for\n *      booleans cannot use this as the base type for their boolean.\n *\n * Tokens defined in khrplatform.h:\n *\n *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\n *\n *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\n *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\n *\n * Calling convention macros defined in this file:\n *    KHRONOS_APICALL\n *    KHRONOS_APIENTRY\n *    KHRONOS_APIATTRIBUTES\n *\n * These may be used in function prototypes as:\n *\n *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\n *                                  int arg1,\n *                                  int arg2) KHRONOS_APIATTRIBUTES;\n */\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APICALL\n *-------------------------------------------------------------------------\n * This precedes the return type of the function in the function prototype.\n */\n#if defined(_WIN32) && !defined(__SCITECH_SNAP__)\n#   define KHRONOS_APICALL __declspec(dllimport)\n#elif defined (__SYMBIAN32__)\n#   define KHRONOS_APICALL IMPORT_C\n#else\n#   define KHRONOS_APICALL\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIENTRY\n *-------------------------------------------------------------------------\n * This follows the return type of the function  and precedes the function\n * name in the function prototype.\n */\n#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\n    /* Win32 but not WinCE */\n#   define KHRONOS_APIENTRY __stdcall\n#else\n#   define KHRONOS_APIENTRY\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIATTRIBUTES\n *-------------------------------------------------------------------------\n * This follows the closing parenthesis of the function prototype arguments.\n */\n#if defined (__ARMCC_2__)\n#define KHRONOS_APIATTRIBUTES __softfp\n#else\n#define KHRONOS_APIATTRIBUTES\n#endif\n\n/*-------------------------------------------------------------------------\n * basic type definitions\n *-----------------------------------------------------------------------*/\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\n\n\n/*\n * Using <stdint.h>\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__VMS ) || defined(__sgi)\n\n/*\n * Using <inttypes.h>\n */\n#include <inttypes.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\n\n/*\n * Win32\n */\ntypedef __int32                 khronos_int32_t;\ntypedef unsigned __int32        khronos_uint32_t;\ntypedef __int64                 khronos_int64_t;\ntypedef unsigned __int64        khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__sun__) || defined(__digital__)\n\n/*\n * Sun or Digital\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int                khronos_int64_t;\ntypedef unsigned long int       khronos_uint64_t;\n#else\ntypedef long long int           khronos_int64_t;\ntypedef unsigned long long int  khronos_uint64_t;\n#endif /* __arch64__ */\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif 0\n\n/*\n * Hypothetical platform with no float or int64 support\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#define KHRONOS_SUPPORT_INT64   0\n#define KHRONOS_SUPPORT_FLOAT   0\n\n#else\n\n/*\n * Generic fallback\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#endif\n\n\n/*\n * Types that are (so far) the same on all platforms\n */\ntypedef signed   char          khronos_int8_t;\ntypedef unsigned char          khronos_uint8_t;\ntypedef signed   short int     khronos_int16_t;\ntypedef unsigned short int     khronos_uint16_t;\n\n/*\n * Types that differ between LLP64 and LP64 architectures - in LLP64, \n * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears\n * to be the only LLP64 architecture in current use.\n */\n#ifdef _WIN64\ntypedef signed   long long int khronos_intptr_t;\ntypedef unsigned long long int khronos_uintptr_t;\ntypedef signed   long long int khronos_ssize_t;\ntypedef unsigned long long int khronos_usize_t;\n#else\ntypedef signed   long  int     khronos_intptr_t;\ntypedef unsigned long  int     khronos_uintptr_t;\ntypedef signed   long  int     khronos_ssize_t;\ntypedef unsigned long  int     khronos_usize_t;\n#endif\n\n#if KHRONOS_SUPPORT_FLOAT\n/*\n * Float type\n */\ntypedef          float         khronos_float_t;\n#endif\n\n#if KHRONOS_SUPPORT_INT64\n/* Time types\n *\n * These types can be used to represent a time interval in nanoseconds or\n * an absolute Unadjusted System Time.  Unadjusted System Time is the number\n * of nanoseconds since some arbitrary system event (e.g. since the last\n * time the system booted).  The Unadjusted System Time is an unsigned\n * 64 bit value that wraps back to 0 every 584 years.  Time intervals\n * may be either signed or unsigned.\n */\ntypedef khronos_uint64_t       khronos_utime_nanoseconds_t;\ntypedef khronos_int64_t        khronos_stime_nanoseconds_t;\n#endif\n\n/*\n * Dummy value used to pad enum types to 32 bits.\n */\n#ifndef KHRONOS_MAX_ENUM\n#define KHRONOS_MAX_ENUM 0x7FFFFFFF\n#endif\n\n/*\n * Enumerated boolean type\n *\n * Values other than zero should be considered to be true.  Therefore\n * comparisons should not be made against KHRONOS_TRUE.\n */\ntypedef enum {\n    KHRONOS_FALSE = 0,\n    KHRONOS_TRUE  = 1,\n    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\n} khronos_boolean_enum_t;\n\n#endif /* __khrplatform_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_pixels.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_pixels.h\n *\n *  Header for the enumerated pixel format definitions.\n */\n\n#ifndef SDL_pixels_h_\n#define SDL_pixels_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_endian.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\name Transparency definitions\n *\n *  These define alpha as the opacity of a surface.\n */\n/* @{ */\n#define SDL_ALPHA_OPAQUE 255\n#define SDL_ALPHA_TRANSPARENT 0\n/* @} */\n\n/** Pixel type. */\nenum\n{\n    SDL_PIXELTYPE_UNKNOWN,\n    SDL_PIXELTYPE_INDEX1,\n    SDL_PIXELTYPE_INDEX4,\n    SDL_PIXELTYPE_INDEX8,\n    SDL_PIXELTYPE_PACKED8,\n    SDL_PIXELTYPE_PACKED16,\n    SDL_PIXELTYPE_PACKED32,\n    SDL_PIXELTYPE_ARRAYU8,\n    SDL_PIXELTYPE_ARRAYU16,\n    SDL_PIXELTYPE_ARRAYU32,\n    SDL_PIXELTYPE_ARRAYF16,\n    SDL_PIXELTYPE_ARRAYF32\n};\n\n/** Bitmap pixel order, high bit -> low bit. */\nenum\n{\n    SDL_BITMAPORDER_NONE,\n    SDL_BITMAPORDER_4321,\n    SDL_BITMAPORDER_1234\n};\n\n/** Packed component order, high bit -> low bit. */\nenum\n{\n    SDL_PACKEDORDER_NONE,\n    SDL_PACKEDORDER_XRGB,\n    SDL_PACKEDORDER_RGBX,\n    SDL_PACKEDORDER_ARGB,\n    SDL_PACKEDORDER_RGBA,\n    SDL_PACKEDORDER_XBGR,\n    SDL_PACKEDORDER_BGRX,\n    SDL_PACKEDORDER_ABGR,\n    SDL_PACKEDORDER_BGRA\n};\n\n/** Array component order, low byte -> high byte. */\n/* !!! FIXME: in 2.1, make these not overlap differently with\n   !!! FIXME:  SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */\nenum\n{\n    SDL_ARRAYORDER_NONE,\n    SDL_ARRAYORDER_RGB,\n    SDL_ARRAYORDER_RGBA,\n    SDL_ARRAYORDER_ARGB,\n    SDL_ARRAYORDER_BGR,\n    SDL_ARRAYORDER_BGRA,\n    SDL_ARRAYORDER_ABGR\n};\n\n/** Packed component layout. */\nenum\n{\n    SDL_PACKEDLAYOUT_NONE,\n    SDL_PACKEDLAYOUT_332,\n    SDL_PACKEDLAYOUT_4444,\n    SDL_PACKEDLAYOUT_1555,\n    SDL_PACKEDLAYOUT_5551,\n    SDL_PACKEDLAYOUT_565,\n    SDL_PACKEDLAYOUT_8888,\n    SDL_PACKEDLAYOUT_2101010,\n    SDL_PACKEDLAYOUT_1010102\n};\n\n#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)\n\n#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \\\n    ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \\\n     ((bits) << 8) | ((bytes) << 0))\n\n#define SDL_PIXELFLAG(X)    (((X) >> 28) & 0x0F)\n#define SDL_PIXELTYPE(X)    (((X) >> 24) & 0x0F)\n#define SDL_PIXELORDER(X)   (((X) >> 20) & 0x0F)\n#define SDL_PIXELLAYOUT(X)  (((X) >> 16) & 0x0F)\n#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)\n#define SDL_BYTESPERPIXEL(X) \\\n    (SDL_ISPIXELFORMAT_FOURCC(X) ? \\\n        ((((X) == SDL_PIXELFORMAT_YUY2) || \\\n          ((X) == SDL_PIXELFORMAT_UYVY) || \\\n          ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))\n\n#define SDL_ISPIXELFORMAT_INDEXED(format)   \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))\n\n#define SDL_ISPIXELFORMAT_PACKED(format) \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))\n\n#define SDL_ISPIXELFORMAT_ARRAY(format) \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))\n\n#define SDL_ISPIXELFORMAT_ALPHA(format)   \\\n    ((SDL_ISPIXELFORMAT_PACKED(format) && \\\n     ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \\\n    (SDL_ISPIXELFORMAT_ARRAY(format) && \\\n     ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))\n\n/* The flag is set to 1 because 0x1? is not in the printable ASCII range */\n#define SDL_ISPIXELFORMAT_FOURCC(format)    \\\n    ((format) && (SDL_PIXELFLAG(format) != 1))\n\n/* Note: If you modify this list, update SDL_GetPixelFormatName() */\ntypedef enum\n{\n    SDL_PIXELFORMAT_UNKNOWN,\n    SDL_PIXELFORMAT_INDEX1LSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,\n                               1, 0),\n    SDL_PIXELFORMAT_INDEX1MSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,\n                               1, 0),\n    SDL_PIXELFORMAT_INDEX4LSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,\n                               4, 0),\n    SDL_PIXELFORMAT_INDEX4MSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,\n                               4, 0),\n    SDL_PIXELFORMAT_INDEX8 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),\n    SDL_PIXELFORMAT_RGB332 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_332, 8, 1),\n    SDL_PIXELFORMAT_RGB444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_4444, 12, 2),\n    SDL_PIXELFORMAT_RGB555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_1555, 15, 2),\n    SDL_PIXELFORMAT_BGR555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_1555, 15, 2),\n    SDL_PIXELFORMAT_ARGB4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_RGBA4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_ABGR4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_BGRA4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_ARGB1555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_1555, 16, 2),\n    SDL_PIXELFORMAT_RGBA5551 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_5551, 16, 2),\n    SDL_PIXELFORMAT_ABGR1555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_1555, 16, 2),\n    SDL_PIXELFORMAT_BGRA5551 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_5551, 16, 2),\n    SDL_PIXELFORMAT_RGB565 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_565, 16, 2),\n    SDL_PIXELFORMAT_BGR565 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_565, 16, 2),\n    SDL_PIXELFORMAT_RGB24 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,\n                               24, 3),\n    SDL_PIXELFORMAT_BGR24 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,\n                               24, 3),\n    SDL_PIXELFORMAT_RGB888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_RGBX8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_BGR888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_BGRX8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_ARGB8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_RGBA8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_ABGR8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_BGRA8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_ARGB2101010 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_2101010, 32, 4),\n\n    /* Aliases for RGBA byte arrays of color data, for the current platform */\n#if SDL_BYTEORDER == SDL_BIG_ENDIAN\n    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,\n    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,\n    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,\n    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,\n#else\n    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,\n    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,\n    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,\n    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,\n#endif\n\n    SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),\n    SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */\n        SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),\n    SDL_PIXELFORMAT_YUY2 =      /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),\n    SDL_PIXELFORMAT_UYVY =      /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),\n    SDL_PIXELFORMAT_YVYU =      /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),\n    SDL_PIXELFORMAT_NV12 =      /**< Planar mode: Y + U/V interleaved  (2 planes) */\n        SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),\n    SDL_PIXELFORMAT_NV21 =      /**< Planar mode: Y + V/U interleaved  (2 planes) */\n        SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),\n    SDL_PIXELFORMAT_EXTERNAL_OES =      /**< Android video texture format */\n        SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')\n} SDL_PixelFormatEnum;\n\ntypedef struct SDL_Color\n{\n    Uint8 r;\n    Uint8 g;\n    Uint8 b;\n    Uint8 a;\n} SDL_Color;\n#define SDL_Colour SDL_Color\n\ntypedef struct SDL_Palette\n{\n    int ncolors;\n    SDL_Color *colors;\n    Uint32 version;\n    int refcount;\n} SDL_Palette;\n\n/**\n *  \\note Everything in the pixel format structure is read-only.\n */\ntypedef struct SDL_PixelFormat\n{\n    Uint32 format;\n    SDL_Palette *palette;\n    Uint8 BitsPerPixel;\n    Uint8 BytesPerPixel;\n    Uint8 padding[2];\n    Uint32 Rmask;\n    Uint32 Gmask;\n    Uint32 Bmask;\n    Uint32 Amask;\n    Uint8 Rloss;\n    Uint8 Gloss;\n    Uint8 Bloss;\n    Uint8 Aloss;\n    Uint8 Rshift;\n    Uint8 Gshift;\n    Uint8 Bshift;\n    Uint8 Ashift;\n    int refcount;\n    struct SDL_PixelFormat *next;\n} SDL_PixelFormat;\n\n/**\n * \\brief Get the human readable name of a pixel format\n */\nextern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);\n\n/**\n *  \\brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.\n *\n *  \\return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.\n *\n *  \\sa SDL_MasksToPixelFormatEnum()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,\n                                                            int *bpp,\n                                                            Uint32 * Rmask,\n                                                            Uint32 * Gmask,\n                                                            Uint32 * Bmask,\n                                                            Uint32 * Amask);\n\n/**\n *  \\brief Convert a bpp and RGBA masks to an enumerated pixel format.\n *\n *  \\return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion\n *          wasn't possible.\n *\n *  \\sa SDL_PixelFormatEnumToMasks()\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,\n                                                          Uint32 Rmask,\n                                                          Uint32 Gmask,\n                                                          Uint32 Bmask,\n                                                          Uint32 Amask);\n\n/**\n *  \\brief Create an SDL_PixelFormat structure from a pixel format enum.\n */\nextern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);\n\n/**\n *  \\brief Free an SDL_PixelFormat structure.\n */\nextern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);\n\n/**\n *  \\brief Create a palette structure with the specified number of color\n *         entries.\n *\n *  \\return A new palette, or NULL if there wasn't enough memory.\n *\n *  \\note The palette entries are initialized to white.\n *\n *  \\sa SDL_FreePalette()\n */\nextern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);\n\n/**\n *  \\brief Set the palette for a pixel format structure.\n */\nextern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,\n                                                      SDL_Palette *palette);\n\n/**\n *  \\brief Set a range of colors in a palette.\n *\n *  \\param palette    The palette to modify.\n *  \\param colors     An array of colors to copy into the palette.\n *  \\param firstcolor The index of the first palette entry to modify.\n *  \\param ncolors    The number of entries to modify.\n *\n *  \\return 0 on success, or -1 if not all of the colors could be set.\n */\nextern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,\n                                                 const SDL_Color * colors,\n                                                 int firstcolor, int ncolors);\n\n/**\n *  \\brief Free a palette created with SDL_AllocPalette().\n *\n *  \\sa SDL_AllocPalette()\n */\nextern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);\n\n/**\n *  \\brief Maps an RGB triple to an opaque pixel value for a given pixel format.\n *\n *  \\sa SDL_MapRGBA\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,\n                                          Uint8 r, Uint8 g, Uint8 b);\n\n/**\n *  \\brief Maps an RGBA quadruple to a pixel value for a given pixel format.\n *\n *  \\sa SDL_MapRGB\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,\n                                           Uint8 r, Uint8 g, Uint8 b,\n                                           Uint8 a);\n\n/**\n *  \\brief Get the RGB components from a pixel of the specified format.\n *\n *  \\sa SDL_GetRGBA\n */\nextern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,\n                                        const SDL_PixelFormat * format,\n                                        Uint8 * r, Uint8 * g, Uint8 * b);\n\n/**\n *  \\brief Get the RGBA components from a pixel of the specified format.\n *\n *  \\sa SDL_GetRGB\n */\nextern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,\n                                         const SDL_PixelFormat * format,\n                                         Uint8 * r, Uint8 * g, Uint8 * b,\n                                         Uint8 * a);\n\n/**\n *  \\brief Calculate a 256 entry gamma ramp for a gamma value.\n */\nextern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_pixels_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_platform.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_platform.h\n *\n *  Try to get a standard set of platform defines.\n */\n\n#ifndef SDL_platform_h_\n#define SDL_platform_h_\n\n#if defined(_AIX)\n#undef __AIX__\n#define __AIX__     1\n#endif\n#if defined(__HAIKU__)\n#undef __HAIKU__\n#define __HAIKU__   1\n#endif\n#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)\n#undef __BSDI__\n#define __BSDI__    1\n#endif\n#if defined(_arch_dreamcast)\n#undef __DREAMCAST__\n#define __DREAMCAST__   1\n#endif\n#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)\n#undef __FREEBSD__\n#define __FREEBSD__ 1\n#endif\n#if defined(hpux) || defined(__hpux) || defined(__hpux__)\n#undef __HPUX__\n#define __HPUX__    1\n#endif\n#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)\n#undef __IRIX__\n#define __IRIX__    1\n#endif\n#if (defined(linux) || defined(__linux) || defined(__linux__))\n#undef __LINUX__\n#define __LINUX__   1\n#endif\n#if defined(ANDROID) || defined(__ANDROID__)\n#undef __ANDROID__\n#undef __LINUX__ /* do we need to do this? */\n#define __ANDROID__ 1\n#endif\n\n#if defined(__APPLE__)\n/* lets us know what version of Mac OS X we're compiling on */\n#include \"AvailabilityMacros.h\"\n#include \"TargetConditionals.h\"\n#if TARGET_OS_TV\n#undef __TVOS__\n#define __TVOS__ 1\n#endif\n#if TARGET_OS_IPHONE\n/* if compiling for iOS */\n#undef __IPHONEOS__\n#define __IPHONEOS__ 1\n#undef __MACOSX__\n#else\n/* if not compiling for iOS */\n#undef __MACOSX__\n#define __MACOSX__  1\n#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060\n# error SDL for Mac OS X only supports deploying on 10.6 and above.\n#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */\n#endif /* TARGET_OS_IPHONE */\n#endif /* defined(__APPLE__) */\n\n#if defined(__NetBSD__)\n#undef __NETBSD__\n#define __NETBSD__  1\n#endif\n#if defined(__OpenBSD__)\n#undef __OPENBSD__\n#define __OPENBSD__ 1\n#endif\n#if defined(__OS2__) || defined(__EMX__)\n#undef __OS2__\n#define __OS2__     1\n#endif\n#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)\n#undef __OSF__\n#define __OSF__     1\n#endif\n#if defined(__QNXNTO__)\n#undef __QNXNTO__\n#define __QNXNTO__  1\n#endif\n#if defined(riscos) || defined(__riscos) || defined(__riscos__)\n#undef __RISCOS__\n#define __RISCOS__  1\n#endif\n#if defined(__sun) && defined(__SVR4)\n#undef __SOLARIS__\n#define __SOLARIS__ 1\n#endif\n\n#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)\n/* Try to find out if we're compiling for WinRT or non-WinRT */\n#if defined(_MSC_VER) && defined(__has_include)\n#if __has_include(<winapifamily.h>)\n#define HAVE_WINAPIFAMILY_H 1\n#else\n#define HAVE_WINAPIFAMILY_H 0\n#endif\n\n/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */\n#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_)    /* _MSC_VER == 1700 for Visual Studio 2012 */\n#define HAVE_WINAPIFAMILY_H 1\n#else\n#define HAVE_WINAPIFAMILY_H 0\n#endif\n\n#if HAVE_WINAPIFAMILY_H\n#include <winapifamily.h>\n#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))\n#else\n#define WINAPI_FAMILY_WINRT 0\n#endif /* HAVE_WINAPIFAMILY_H */\n\n#if WINAPI_FAMILY_WINRT\n#undef __WINRT__\n#define __WINRT__ 1\n#else\n#undef __WINDOWS__\n#define __WINDOWS__ 1\n#endif\n#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */\n\n#if defined(__WINDOWS__)\n#undef __WIN32__\n#define __WIN32__ 1\n#endif\n#if defined(__PSP__)\n#undef __PSP__\n#define __PSP__ 1\n#endif\n\n/* The NACL compiler defines __native_client__ and __pnacl__\n * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi\n */\n#if defined(__native_client__)\n#undef __LINUX__\n#undef __NACL__\n#define __NACL__ 1\n#endif\n#if defined(__pnacl__)\n#undef __LINUX__\n#undef __PNACL__\n#define __PNACL__ 1\n/* PNACL with newlib supports static linking only */\n#define __SDL_NOGETPROCADDR__\n#endif\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Gets the name of the platform.\n */\nextern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_platform_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_power.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_power_h_\n#define SDL_power_h_\n\n/**\n *  \\file SDL_power.h\n *\n *  Header for the SDL power management routines.\n */\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The basic state for the system's power supply.\n */\ntypedef enum\n{\n    SDL_POWERSTATE_UNKNOWN,      /**< cannot determine power status */\n    SDL_POWERSTATE_ON_BATTERY,   /**< Not plugged in, running on the battery */\n    SDL_POWERSTATE_NO_BATTERY,   /**< Plugged in, no battery available */\n    SDL_POWERSTATE_CHARGING,     /**< Plugged in, charging battery */\n    SDL_POWERSTATE_CHARGED       /**< Plugged in, battery charged */\n} SDL_PowerState;\n\n\n/**\n *  \\brief Get the current power supply details.\n *\n *  \\param secs Seconds of battery life left. You can pass a NULL here if\n *              you don't care. Will return -1 if we can't determine a\n *              value, or we're not running on a battery.\n *\n *  \\param pct Percentage of battery life left, between 0 and 100. You can\n *             pass a NULL here if you don't care. Will return -1 if we\n *             can't determine a value, or we're not running on a battery.\n *\n *  \\return The state of the battery (if any).\n */\nextern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_power_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_quit.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_quit.h\n *\n *  Include file for SDL quit event handling.\n */\n\n#ifndef SDL_quit_h_\n#define SDL_quit_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n/**\n *  \\file SDL_quit.h\n *\n *  An ::SDL_QUIT event is generated when the user tries to close the application\n *  window.  If it is ignored or filtered out, the window will remain open.\n *  If it is not ignored or filtered, it is queued normally and the window\n *  is allowed to close.  When the window is closed, screen updates will\n *  complete, but have no effect.\n *\n *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)\n *  and SIGTERM (system termination request), if handlers do not already\n *  exist, that generate ::SDL_QUIT events as well.  There is no way\n *  to determine the cause of an ::SDL_QUIT event, but setting a signal\n *  handler in your application will override the default generation of\n *  quit events for that signal.\n *\n *  \\sa SDL_Quit()\n */\n\n/* There are no functions directly affecting the quit event */\n\n#define SDL_QuitRequested() \\\n        (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))\n\n#endif /* SDL_quit_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_rect.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_rect.h\n *\n *  Header file for SDL_rect definition and management functions.\n */\n\n#ifndef SDL_rect_h_\n#define SDL_rect_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  The structure that defines a point (integer)\n *\n *  \\sa SDL_EnclosePoints\n *  \\sa SDL_PointInRect\n */\ntypedef struct SDL_Point\n{\n    int x;\n    int y;\n} SDL_Point;\n\n/**\n *  \\brief  The structure that defines a point (floating point)\n *\n *  \\sa SDL_EnclosePoints\n *  \\sa SDL_PointInRect\n */\ntypedef struct SDL_FPoint\n{\n    float x;\n    float y;\n} SDL_FPoint;\n\n\n/**\n *  \\brief A rectangle, with the origin at the upper left (integer).\n *\n *  \\sa SDL_RectEmpty\n *  \\sa SDL_RectEquals\n *  \\sa SDL_HasIntersection\n *  \\sa SDL_IntersectRect\n *  \\sa SDL_UnionRect\n *  \\sa SDL_EnclosePoints\n */\ntypedef struct SDL_Rect\n{\n    int x, y;\n    int w, h;\n} SDL_Rect;\n\n\n/**\n *  \\brief A rectangle, with the origin at the upper left (floating point).\n */\ntypedef struct SDL_FRect\n{\n    float x;\n    float y;\n    float w;\n    float h;\n} SDL_FRect;\n\n\n/**\n *  \\brief Returns true if point resides inside a rectangle.\n */\nSDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)\n{\n    return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&\n             (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Returns true if the rectangle has no area.\n */\nSDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)\n{\n    return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Returns true if the two rectangles are equal.\n */\nSDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)\n{\n    return (a && b && (a->x == b->x) && (a->y == b->y) &&\n            (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Determine whether two rectangles intersect.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,\n                                                     const SDL_Rect * B);\n\n/**\n *  \\brief Calculate the intersection of two rectangles.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,\n                                                   const SDL_Rect * B,\n                                                   SDL_Rect * result);\n\n/**\n *  \\brief Calculate the union of two rectangles.\n */\nextern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,\n                                           const SDL_Rect * B,\n                                           SDL_Rect * result);\n\n/**\n *  \\brief Calculate a minimal rectangle enclosing a set of points\n *\n *  \\return SDL_TRUE if any points were within the clipping rect\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,\n                                                   int count,\n                                                   const SDL_Rect * clip,\n                                                   SDL_Rect * result);\n\n/**\n *  \\brief Calculate the intersection of a rectangle and line segment.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *\n                                                          rect, int *X1,\n                                                          int *Y1, int *X2,\n                                                          int *Y2);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_rect_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_render.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_render.h\n *\n *  Header file for SDL 2D rendering functions.\n *\n *  This API supports the following features:\n *      * single pixel points\n *      * single pixel lines\n *      * filled rectangles\n *      * texture images\n *\n *  The primitives may be drawn in opaque, blended, or additive modes.\n *\n *  The texture images may be drawn in opaque, blended, or additive modes.\n *  They can have an additional color tint or alpha modulation applied to\n *  them, and may also be stretched with linear interpolation.\n *\n *  This API is designed to accelerate simple 2D operations. You may\n *  want more functionality such as polygons and particle effects and\n *  in that case you should use SDL's OpenGL/Direct3D support or one\n *  of the many good 3D engines.\n *\n *  These functions must be called from the main thread.\n *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995\n */\n\n#ifndef SDL_render_h_\n#define SDL_render_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Flags used when creating a rendering context\n */\ntypedef enum\n{\n    SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */\n    SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware\n                                                     acceleration */\n    SDL_RENDERER_PRESENTVSYNC = 0x00000004,     /**< Present is synchronized\n                                                     with the refresh rate */\n    SDL_RENDERER_TARGETTEXTURE = 0x00000008     /**< The renderer supports\n                                                     rendering to texture */\n} SDL_RendererFlags;\n\n/**\n *  \\brief Information on the capabilities of a render driver or context.\n */\ntypedef struct SDL_RendererInfo\n{\n    const char *name;           /**< The name of the renderer */\n    Uint32 flags;               /**< Supported ::SDL_RendererFlags */\n    Uint32 num_texture_formats; /**< The number of available texture formats */\n    Uint32 texture_formats[16]; /**< The available texture formats */\n    int max_texture_width;      /**< The maximum texture width */\n    int max_texture_height;     /**< The maximum texture height */\n} SDL_RendererInfo;\n\n/**\n *  \\brief The access pattern allowed for a texture.\n */\ntypedef enum\n{\n    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */\n    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */\n    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */\n} SDL_TextureAccess;\n\n/**\n *  \\brief The texture channel modulation used in SDL_RenderCopy().\n */\ntypedef enum\n{\n    SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */\n    SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */\n    SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */\n} SDL_TextureModulate;\n\n/**\n *  \\brief Flip constants for SDL_RenderCopyEx\n */\ntypedef enum\n{\n    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */\n    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */\n    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */\n} SDL_RendererFlip;\n\n/**\n *  \\brief A structure representing rendering state\n */\nstruct SDL_Renderer;\ntypedef struct SDL_Renderer SDL_Renderer;\n\n/**\n *  \\brief An efficient driver-specific representation of pixel data\n */\nstruct SDL_Texture;\ntypedef struct SDL_Texture SDL_Texture;\n\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of 2D rendering drivers available for the current\n *         display.\n *\n *  A render driver is a set of code that handles rendering and texture\n *  management on a particular display.  Normally there is only one, but\n *  some drivers may have several available with different capabilities.\n *\n *  \\sa SDL_GetRenderDriverInfo()\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);\n\n/**\n *  \\brief Get information about a specific 2D rendering driver for the current\n *         display.\n *\n *  \\param index The index of the driver to query information about.\n *  \\param info  A pointer to an SDL_RendererInfo struct to be filled with\n *               information on the rendering driver.\n *\n *  \\return 0 on success, -1 if the index was out of range.\n *\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,\n                                                    SDL_RendererInfo * info);\n\n/**\n *  \\brief Create a window and default renderer\n *\n *  \\param width    The width of the window\n *  \\param height   The height of the window\n *  \\param window_flags The flags used to create the window\n *  \\param window   A pointer filled with the window, or NULL on error\n *  \\param renderer A pointer filled with the renderer, or NULL on error\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(\n                                int width, int height, Uint32 window_flags,\n                                SDL_Window **window, SDL_Renderer **renderer);\n\n\n/**\n *  \\brief Create a 2D rendering context for a window.\n *\n *  \\param window The window where rendering is displayed.\n *  \\param index    The index of the rendering driver to initialize, or -1 to\n *                  initialize the first one supporting the requested flags.\n *  \\param flags    ::SDL_RendererFlags.\n *\n *  \\return A valid rendering context or NULL if there was an error.\n *\n *  \\sa SDL_CreateSoftwareRenderer()\n *  \\sa SDL_GetRendererInfo()\n *  \\sa SDL_DestroyRenderer()\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,\n                                               int index, Uint32 flags);\n\n/**\n *  \\brief Create a 2D software rendering context for a surface.\n *\n *  \\param surface The surface where rendering is done.\n *\n *  \\return A valid rendering context or NULL if there was an error.\n *\n *  \\sa SDL_CreateRenderer()\n *  \\sa SDL_DestroyRenderer()\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);\n\n/**\n *  \\brief Get the renderer associated with a window.\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);\n\n/**\n *  \\brief Get information about a rendering context.\n */\nextern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,\n                                                SDL_RendererInfo * info);\n\n/**\n *  \\brief Get the output size in pixels of a rendering context.\n */\nextern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Create a texture for a rendering context.\n *\n *  \\param renderer The renderer.\n *  \\param format The format of the texture.\n *  \\param access One of the enumerated values in ::SDL_TextureAccess.\n *  \\param w      The width of the texture in pixels.\n *  \\param h      The height of the texture in pixels.\n *\n *  \\return The created texture is returned, or NULL if no rendering context was\n *          active,  the format was unsupported, or the width or height were out\n *          of range.\n *\n *  \\note The contents of the texture are not defined at creation.\n *\n *  \\sa SDL_QueryTexture()\n *  \\sa SDL_UpdateTexture()\n *  \\sa SDL_DestroyTexture()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,\n                                                        Uint32 format,\n                                                        int access, int w,\n                                                        int h);\n\n/**\n *  \\brief Create a texture from an existing surface.\n *\n *  \\param renderer The renderer.\n *  \\param surface The surface containing pixel data used to fill the texture.\n *\n *  \\return The created texture is returned, or NULL on error.\n *\n *  \\note The surface is not modified or freed by this function.\n *\n *  \\sa SDL_QueryTexture()\n *  \\sa SDL_DestroyTexture()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);\n\n/**\n *  \\brief Query the attributes of a texture\n *\n *  \\param texture A texture to be queried.\n *  \\param format  A pointer filled in with the raw format of the texture.  The\n *                 actual format may differ, but pixel transfers will use this\n *                 format.\n *  \\param access  A pointer filled in with the actual access to the texture.\n *  \\param w       A pointer filled in with the width of the texture in pixels.\n *  \\param h       A pointer filled in with the height of the texture in pixels.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n */\nextern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,\n                                             Uint32 * format, int *access,\n                                             int *w, int *h);\n\n/**\n *  \\brief Set an additional color value used in render copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param r       The red color value multiplied into copy operations.\n *  \\param g       The green color value multiplied into copy operations.\n *  \\param b       The blue color value multiplied into copy operations.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or color modulation\n *          is not supported.\n *\n *  \\sa SDL_GetTextureColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,\n                                                   Uint8 r, Uint8 g, Uint8 b);\n\n\n/**\n *  \\brief Get the additional color value used in render copy operations.\n *\n *  \\param texture The texture to query.\n *  \\param r         A pointer filled in with the current red color value.\n *  \\param g         A pointer filled in with the current green color value.\n *  \\param b         A pointer filled in with the current blue color value.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,\n                                                   Uint8 * r, Uint8 * g,\n                                                   Uint8 * b);\n\n/**\n *  \\brief Set an additional alpha value used in render copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param alpha     The alpha value multiplied into copy operations.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or alpha modulation\n *          is not supported.\n *\n *  \\sa SDL_GetTextureAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,\n                                                   Uint8 alpha);\n\n/**\n *  \\brief Get the additional alpha value used in render copy operations.\n *\n *  \\param texture The texture to query.\n *  \\param alpha     A pointer filled in with the current alpha value.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,\n                                                   Uint8 * alpha);\n\n/**\n *  \\brief Set the blend mode used for texture copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param blendMode ::SDL_BlendMode to use for texture blending.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or the blend mode is\n *          not supported.\n *\n *  \\note If the blend mode is not supported, the closest supported mode is\n *        chosen.\n *\n *  \\sa SDL_GetTextureBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,\n                                                    SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for texture copy operations.\n *\n *  \\param texture   The texture to query.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,\n                                                    SDL_BlendMode *blendMode);\n\n/**\n *  \\brief Update the given texture rectangle with new pixel data.\n *\n *  \\param texture   The texture to update\n *  \\param rect      A pointer to the rectangle of pixels to update, or NULL to\n *                   update the entire texture.\n *  \\param pixels    The raw pixel data in the format of the texture.\n *  \\param pitch     The number of bytes in a row of pixel data, including padding between lines.\n *\n *  The pixel data must be in the format of the texture. The pixel format can be\n *  queried with SDL_QueryTexture.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\note This is a fairly slow function.\n */\nextern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,\n                                              const SDL_Rect * rect,\n                                              const void *pixels, int pitch);\n\n/**\n *  \\brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.\n *\n *  \\param texture   The texture to update\n *  \\param rect      A pointer to the rectangle of pixels to update, or NULL to\n *                   update the entire texture.\n *  \\param Yplane    The raw pixel data for the Y plane.\n *  \\param Ypitch    The number of bytes between rows of pixel data for the Y plane.\n *  \\param Uplane    The raw pixel data for the U plane.\n *  \\param Upitch    The number of bytes between rows of pixel data for the U plane.\n *  \\param Vplane    The raw pixel data for the V plane.\n *  \\param Vpitch    The number of bytes between rows of pixel data for the V plane.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\note You can use SDL_UpdateTexture() as long as your pixel data is\n *        a contiguous block of Y and U/V planes in the proper order, but\n *        this function is available if your pixel data is not contiguous.\n */\nextern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,\n                                                 const SDL_Rect * rect,\n                                                 const Uint8 *Yplane, int Ypitch,\n                                                 const Uint8 *Uplane, int Upitch,\n                                                 const Uint8 *Vplane, int Vpitch);\n\n/**\n *  \\brief Lock a portion of the texture for write-only pixel access.\n *\n *  \\param texture   The texture to lock for access, which was created with\n *                   ::SDL_TEXTUREACCESS_STREAMING.\n *  \\param rect      A pointer to the rectangle to lock for access. If the rect\n *                   is NULL, the entire texture will be locked.\n *  \\param pixels    This is filled in with a pointer to the locked pixels,\n *                   appropriately offset by the locked area.\n *  \\param pitch     This is filled in with the pitch of the locked pixels.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.\n *\n *  \\sa SDL_UnlockTexture()\n */\nextern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,\n                                            const SDL_Rect * rect,\n                                            void **pixels, int *pitch);\n\n/**\n *  \\brief Unlock a texture, uploading the changes to video memory, if needed.\n *\n *  \\sa SDL_LockTexture()\n */\nextern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);\n\n/**\n * \\brief Determines whether a window supports the use of render targets\n *\n * \\param renderer The renderer that will be checked\n *\n * \\return SDL_TRUE if supported, SDL_FALSE if not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);\n\n/**\n * \\brief Set a texture as the current rendering target.\n *\n * \\param renderer The renderer.\n * \\param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target\n *\n * \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_GetRenderTarget()\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,\n                                                SDL_Texture *texture);\n\n/**\n * \\brief Get the current render target or NULL for the default render target.\n *\n * \\return The current render target\n *\n *  \\sa SDL_SetRenderTarget()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);\n\n/**\n *  \\brief Set device independent resolution for rendering\n *\n *  \\param renderer The renderer for which resolution should be set.\n *  \\param w      The width of the logical resolution\n *  \\param h      The height of the logical resolution\n *\n *  This function uses the viewport and scaling functionality to allow a fixed logical\n *  resolution for rendering, regardless of the actual output resolution.  If the actual\n *  output resolution doesn't have the same aspect ratio the output rendering will be\n *  centered within the output display.\n *\n *  If the output display is a window, mouse events in the window will be filtered\n *  and scaled so they seem to arrive within the logical resolution.\n *\n *  \\note If this function results in scaling or subpixel drawing by the\n *        rendering backend, it will be handled using the appropriate\n *        quality hints.\n *\n *  \\sa SDL_RenderGetLogicalSize()\n *  \\sa SDL_RenderSetScale()\n *  \\sa SDL_RenderSetViewport()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);\n\n/**\n *  \\brief Get device independent resolution for rendering\n *\n *  \\param renderer The renderer from which resolution should be queried.\n *  \\param w      A pointer filled with the width of the logical resolution\n *  \\param h      A pointer filled with the height of the logical resolution\n *\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);\n\n/**\n *  \\brief Set whether to force integer scales for resolution-independent rendering\n *\n *  \\param renderer The renderer for which integer scaling should be set.\n *  \\param enable   Enable or disable integer scaling\n *\n *  This function restricts the logical viewport to integer values - that is, when\n *  a resolution is between two multiples of a logical size, the viewport size is\n *  rounded down to the lower multiple.\n *\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,\n                                                      SDL_bool enable);\n\n/**\n *  \\brief Get whether integer scales are forced for resolution-independent rendering\n *\n *  \\param renderer The renderer from which integer scaling should be queried.\n *\n *  \\sa SDL_RenderSetIntegerScale()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);\n\n/**\n *  \\brief Set the drawing area for rendering on the current target.\n *\n *  \\param renderer The renderer for which the drawing area should be set.\n *  \\param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.\n *\n *  The x,y of the viewport rect represents the origin for rendering.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\note If the window associated with the renderer is resized, the viewport is automatically reset.\n *\n *  \\sa SDL_RenderGetViewport()\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,\n                                                  const SDL_Rect * rect);\n\n/**\n *  \\brief Get the drawing area for the current target.\n *\n *  \\sa SDL_RenderSetViewport()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,\n                                                   SDL_Rect * rect);\n\n/**\n *  \\brief Set the clip rectangle for the current target.\n *\n *  \\param renderer The renderer for which clip rectangle should be set.\n *  \\param rect   A pointer to the rectangle to set as the clip rectangle, or\n *                NULL to disable clipping.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_RenderGetClipRect()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,\n                                                  const SDL_Rect * rect);\n\n/**\n *  \\brief Get the clip rectangle for the current target.\n *\n *  \\param renderer The renderer from which clip rectangle should be queried.\n *  \\param rect   A pointer filled in with the current clip rectangle, or\n *                an empty rectangle if clipping is disabled.\n *\n *  \\sa SDL_RenderSetClipRect()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,\n                                                   SDL_Rect * rect);\n\n/**\n *  \\brief Get whether clipping is enabled on the given renderer.\n *\n *  \\param renderer The renderer from which clip state should be queried.\n *\n *  \\sa SDL_RenderGetClipRect()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);\n\n\n/**\n *  \\brief Set the drawing scale for rendering on the current target.\n *\n *  \\param renderer The renderer for which the drawing scale should be set.\n *  \\param scaleX The horizontal scaling factor\n *  \\param scaleY The vertical scaling factor\n *\n *  The drawing coordinates are scaled by the x/y scaling factors\n *  before they are used by the renderer.  This allows resolution\n *  independent drawing with a single coordinate system.\n *\n *  \\note If this results in scaling or subpixel drawing by the\n *        rendering backend, it will be handled using the appropriate\n *        quality hints.  For best results use integer scaling factors.\n *\n *  \\sa SDL_RenderGetScale()\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,\n                                               float scaleX, float scaleY);\n\n/**\n *  \\brief Get the drawing scale for the current target.\n *\n *  \\param renderer The renderer from which drawing scale should be queried.\n *  \\param scaleX A pointer filled in with the horizontal scaling factor\n *  \\param scaleY A pointer filled in with the vertical scaling factor\n *\n *  \\sa SDL_RenderSetScale()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,\n                                               float *scaleX, float *scaleY);\n\n/**\n *  \\brief Set the color used for drawing operations (Rect, Line and Clear).\n *\n *  \\param renderer The renderer for which drawing color should be set.\n *  \\param r The red value used to draw on the rendering target.\n *  \\param g The green value used to draw on the rendering target.\n *  \\param b The blue value used to draw on the rendering target.\n *  \\param a The alpha value used to draw on the rendering target, usually\n *           ::SDL_ALPHA_OPAQUE (255).\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,\n                                           Uint8 r, Uint8 g, Uint8 b,\n                                           Uint8 a);\n\n/**\n *  \\brief Get the color used for drawing operations (Rect, Line and Clear).\n *\n *  \\param renderer The renderer from which drawing color should be queried.\n *  \\param r A pointer to the red value used to draw on the rendering target.\n *  \\param g A pointer to the green value used to draw on the rendering target.\n *  \\param b A pointer to the blue value used to draw on the rendering target.\n *  \\param a A pointer to the alpha value used to draw on the rendering target,\n *           usually ::SDL_ALPHA_OPAQUE (255).\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,\n                                           Uint8 * r, Uint8 * g, Uint8 * b,\n                                           Uint8 * a);\n\n/**\n *  \\brief Set the blend mode used for drawing operations (Fill and Line).\n *\n *  \\param renderer The renderer for which blend mode should be set.\n *  \\param blendMode ::SDL_BlendMode to use for blending.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\note If the blend mode is not supported, the closest supported mode is\n *        chosen.\n *\n *  \\sa SDL_GetRenderDrawBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,\n                                                       SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for drawing operations.\n *\n *  \\param renderer The renderer from which blend mode should be queried.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_SetRenderDrawBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,\n                                                       SDL_BlendMode *blendMode);\n\n/**\n *  \\brief Clear the current rendering target with the drawing color\n *\n *  This function clears the entire rendering target, ignoring the viewport and\n *  the clip rectangle.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);\n\n/**\n *  \\brief Draw a point on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a point.\n *  \\param x The x coordinate of the point.\n *  \\param y The y coordinate of the point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,\n                                                int x, int y);\n\n/**\n *  \\brief Draw multiple points on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple points.\n *  \\param points The points to draw\n *  \\param count The number of points to draw\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,\n                                                 const SDL_Point * points,\n                                                 int count);\n\n/**\n *  \\brief Draw a line on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a line.\n *  \\param x1 The x coordinate of the start point.\n *  \\param y1 The y coordinate of the start point.\n *  \\param x2 The x coordinate of the end point.\n *  \\param y2 The y coordinate of the end point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,\n                                               int x1, int y1, int x2, int y2);\n\n/**\n *  \\brief Draw a series of connected lines on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple lines.\n *  \\param points The points along the lines\n *  \\param count The number of points, drawing count-1 lines\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,\n                                                const SDL_Point * points,\n                                                int count);\n\n/**\n *  \\brief Draw a rectangle on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,\n                                               const SDL_Rect * rect);\n\n/**\n *  \\brief Draw some number of rectangles on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,\n                                                const SDL_Rect * rects,\n                                                int count);\n\n/**\n *  \\brief Fill a rectangle on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL for the entire\n *              rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,\n                                               const SDL_Rect * rect);\n\n/**\n *  \\brief Fill some number of rectangles on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,\n                                                const SDL_Rect * rects,\n                                                int count);\n\n/**\n *  \\brief Copy a portion of the texture to the current rendering target.\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,\n                                           SDL_Texture * texture,\n                                           const SDL_Rect * srcrect,\n                                           const SDL_Rect * dstrect);\n\n/**\n *  \\brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *  \\param angle    An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction\n *  \\param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).\n *  \\param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,\n                                           SDL_Texture * texture,\n                                           const SDL_Rect * srcrect,\n                                           const SDL_Rect * dstrect,\n                                           const double angle,\n                                           const SDL_Point *center,\n                                           const SDL_RendererFlip flip);\n\n\n/**\n *  \\brief Draw a point on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a point.\n *  \\param x The x coordinate of the point.\n *  \\param y The y coordinate of the point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,\n                                                 float x, float y);\n\n/**\n *  \\brief Draw multiple points on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple points.\n *  \\param points The points to draw\n *  \\param count The number of points to draw\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,\n                                                  const SDL_FPoint * points,\n                                                  int count);\n\n/**\n *  \\brief Draw a line on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a line.\n *  \\param x1 The x coordinate of the start point.\n *  \\param y1 The y coordinate of the start point.\n *  \\param x2 The x coordinate of the end point.\n *  \\param y2 The y coordinate of the end point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,\n                                                float x1, float y1, float x2, float y2);\n\n/**\n *  \\brief Draw a series of connected lines on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple lines.\n *  \\param points The points along the lines\n *  \\param count The number of points, drawing count-1 lines\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,\n                                                const SDL_FPoint * points,\n                                                int count);\n\n/**\n *  \\brief Draw a rectangle on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,\n                                               const SDL_FRect * rect);\n\n/**\n *  \\brief Draw some number of rectangles on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,\n                                                 const SDL_FRect * rects,\n                                                 int count);\n\n/**\n *  \\brief Fill a rectangle on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL for the entire\n *              rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,\n                                                const SDL_FRect * rect);\n\n/**\n *  \\brief Fill some number of rectangles on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,\n                                                 const SDL_FRect * rects,\n                                                 int count);\n\n/**\n *  \\brief Copy a portion of the texture to the current rendering target.\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,\n                                            SDL_Texture * texture,\n                                            const SDL_Rect * srcrect,\n                                            const SDL_FRect * dstrect);\n\n/**\n *  \\brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *  \\param angle    An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction\n *  \\param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).\n *  \\param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,\n                                            SDL_Texture * texture,\n                                            const SDL_Rect * srcrect,\n                                            const SDL_FRect * dstrect,\n                                            const double angle,\n                                            const SDL_FPoint *center,\n                                            const SDL_RendererFlip flip);\n\n/**\n *  \\brief Read pixels from the current rendering target.\n *\n *  \\param renderer The renderer from which pixels should be read.\n *  \\param rect   A pointer to the rectangle to read, or NULL for the entire\n *                render target.\n *  \\param format The desired format of the pixel data, or 0 to use the format\n *                of the rendering target\n *  \\param pixels A pointer to be filled in with the pixel data\n *  \\param pitch  The pitch of the pixels parameter.\n *\n *  \\return 0 on success, or -1 if pixel reading is not supported.\n *\n *  \\warning This is a very slow operation, and should not be used frequently.\n */\nextern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,\n                                                 const SDL_Rect * rect,\n                                                 Uint32 format,\n                                                 void *pixels, int pitch);\n\n/**\n *  \\brief Update the screen with rendering performed.\n */\nextern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);\n\n/**\n *  \\brief Destroy the specified texture.\n *\n *  \\sa SDL_CreateTexture()\n *  \\sa SDL_CreateTextureFromSurface()\n */\nextern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);\n\n/**\n *  \\brief Destroy the rendering context for a window and free associated\n *         textures.\n *\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);\n\n/**\n *  \\brief Force the rendering context to flush any pending commands to the\n *         underlying rendering API.\n *\n *  You do not need to (and in fact, shouldn't) call this function unless\n *  you are planning to call into OpenGL/Direct3D/Metal/whatever directly\n *  in addition to using an SDL_Renderer.\n *\n *  This is for a very-specific case: if you are using SDL's render API,\n *  you asked for a specific renderer backend (OpenGL, Direct3D, etc),\n *  you set SDL_HINT_RENDER_BATCHING to \"1\", and you plan to make\n *  OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of\n *  this applies, you should call SDL_RenderFlush() between calls to SDL's\n *  render API and the low-level API you're using in cooperation.\n *\n *  In all other cases, you can ignore this function. This is only here to\n *  get maximum performance out of a specific situation. In all other cases,\n *  SDL will do the right thing, perhaps at a performance loss.\n *\n *  This function is first available in SDL 2.0.10, and is not needed in\n *  2.0.9 and earlier, as earlier versions did not queue rendering commands\n *  at all, instead flushing them to the OS immediately.\n */\nextern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);\n\n\n/**\n *  \\brief Bind the texture to the current OpenGL/ES/ES2 context for use with\n *         OpenGL instructions.\n *\n *  \\param texture  The SDL texture to bind\n *  \\param texw     A pointer to a float that will be filled with the texture width\n *  \\param texh     A pointer to a float that will be filled with the texture height\n *\n *  \\return 0 on success, or -1 if the operation is not supported\n */\nextern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);\n\n/**\n *  \\brief Unbind a texture from the current OpenGL/ES/ES2 context.\n *\n *  \\param texture  The SDL texture to unbind\n *\n *  \\return 0 on success, or -1 if the operation is not supported\n */\nextern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);\n\n/**\n *  \\brief Get the CAMetalLayer associated with the given Metal renderer\n *\n *  \\param renderer The renderer to query\n *\n *  \\return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer\n *\n *  \\sa SDL_RenderGetMetalCommandEncoder()\n */\nextern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);\n\n/**\n *  \\brief Get the Metal command encoder for the current frame\n *\n *  \\param renderer The renderer to query\n *\n *  \\return id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer\n *\n *  \\sa SDL_RenderGetMetalLayer()\n */\nextern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_render_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_revision.h",
    "content": "#define SDL_REVISION \"hg-12952:bc90ce38f1e2\"\n#define SDL_REVISION_NUMBER 12952\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_rwops.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_rwops.h\n *\n *  This file provides a general interface for SDL to read and write\n *  data streams.  It can easily be extended to files, memory, etc.\n */\n\n#ifndef SDL_rwops_h_\n#define SDL_rwops_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* RWops Types */\n#define SDL_RWOPS_UNKNOWN   0U  /**< Unknown stream type */\n#define SDL_RWOPS_WINFILE   1U  /**< Win32 file */\n#define SDL_RWOPS_STDFILE   2U  /**< Stdio file */\n#define SDL_RWOPS_JNIFILE   3U  /**< Android asset */\n#define SDL_RWOPS_MEMORY    4U  /**< Memory stream */\n#define SDL_RWOPS_MEMORY_RO 5U  /**< Read-Only memory stream */\n\n/**\n * This is the read/write operation structure -- very basic.\n */\ntypedef struct SDL_RWops\n{\n    /**\n     *  Return the size of the file in this rwops, or -1 if unknown\n     */\n    Sint64 (SDLCALL * size) (struct SDL_RWops * context);\n\n    /**\n     *  Seek to \\c offset relative to \\c whence, one of stdio's whence values:\n     *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END\n     *\n     *  \\return the final offset in the data stream, or -1 on error.\n     */\n    Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,\n                             int whence);\n\n    /**\n     *  Read up to \\c maxnum objects each of size \\c size from the data\n     *  stream to the area pointed at by \\c ptr.\n     *\n     *  \\return the number of objects read, or 0 at error or end of file.\n     */\n    size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,\n                             size_t size, size_t maxnum);\n\n    /**\n     *  Write exactly \\c num objects each of size \\c size from the area\n     *  pointed at by \\c ptr to data stream.\n     *\n     *  \\return the number of objects written, or 0 at error or end of file.\n     */\n    size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,\n                              size_t size, size_t num);\n\n    /**\n     *  Close and free an allocated SDL_RWops structure.\n     *\n     *  \\return 0 if successful or -1 on write error when flushing data.\n     */\n    int (SDLCALL * close) (struct SDL_RWops * context);\n\n    Uint32 type;\n    union\n    {\n#if defined(__ANDROID__)\n        struct\n        {\n            void *fileNameRef;\n            void *inputStreamRef;\n            void *readableByteChannelRef;\n            void *readMethod;\n            void *assetFileDescriptorRef;\n            long position;\n            long size;\n            long offset;\n            int fd;\n        } androidio;\n#elif defined(__WIN32__)\n        struct\n        {\n            SDL_bool append;\n            void *h;\n            struct\n            {\n                void *data;\n                size_t size;\n                size_t left;\n            } buffer;\n        } windowsio;\n#endif\n\n#ifdef HAVE_STDIO_H\n        struct\n        {\n            SDL_bool autoclose;\n            FILE *fp;\n        } stdio;\n#endif\n        struct\n        {\n            Uint8 *base;\n            Uint8 *here;\n            Uint8 *stop;\n        } mem;\n        struct\n        {\n            void *data1;\n            void *data2;\n        } unknown;\n    } hidden;\n\n} SDL_RWops;\n\n\n/**\n *  \\name RWFrom functions\n *\n *  Functions to create SDL_RWops structures from various data streams.\n */\n/* @{ */\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,\n                                                  const char *mode);\n\n#ifdef HAVE_STDIO_H\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,\n                                                SDL_bool autoclose);\n#else\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,\n                                                SDL_bool autoclose);\n#endif\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,\n                                                      int size);\n\n/* @} *//* RWFrom functions */\n\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);\nextern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);\n\n#define RW_SEEK_SET 0       /**< Seek from the beginning of data */\n#define RW_SEEK_CUR 1       /**< Seek relative to current read point */\n#define RW_SEEK_END 2       /**< Seek relative to the end of data */\n\n/**\n *  Return the size of the file in this rwops, or -1 if unknown\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);\n\n/**\n *  Seek to \\c offset relative to \\c whence, one of stdio's whence values:\n *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END\n *\n *  \\return the final offset in the data stream, or -1 on error.\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,\n                                          Sint64 offset, int whence);\n\n/**\n *  Return the current offset in the data stream, or -1 on error.\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);\n\n/**\n *  Read up to \\c maxnum objects each of size \\c size from the data\n *  stream to the area pointed at by \\c ptr.\n *\n *  \\return the number of objects read, or 0 at error or end of file.\n */\nextern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,\n                                          void *ptr, size_t size, size_t maxnum);\n\n/**\n *  Write exactly \\c num objects each of size \\c size from the area\n *  pointed at by \\c ptr to data stream.\n *\n *  \\return the number of objects written, or 0 at error or end of file.\n */\nextern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,\n                                           const void *ptr, size_t size, size_t num);\n\n/**\n *  Close and free an allocated SDL_RWops structure.\n *\n *  \\return 0 if successful or -1 on write error when flushing data.\n */\nextern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);\n\n/**\n *  Load all the data from an SDL data stream.\n *\n *  The data is allocated with a zero byte at the end (null terminated)\n *\n *  If \\c datasize is not NULL, it is filled with the size of the data read.\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The data should be freed with SDL_free().\n *\n *  \\return the data, or NULL if there was an error.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,\n                                                    int freesrc);\n\n/**\n *  Load an entire file.\n *\n *  The data is allocated with a zero byte at the end (null terminated)\n *\n *  If \\c datasize is not NULL, it is filled with the size of the data read.\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The data should be freed with SDL_free().\n *\n *  \\return the data, or NULL if there was an error.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);\n\n/**\n *  \\name Read endian functions\n *\n *  Read an item of the specified endianness and return in native format.\n */\n/* @{ */\nextern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);\nextern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);\nextern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);\nextern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);\nextern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);\nextern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);\nextern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);\n/* @} *//* Read endian functions */\n\n/**\n *  \\name Write endian functions\n *\n *  Write an item of native format to the specified endianness.\n */\n/* @{ */\nextern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);\n/* @} *//* Write endian functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_rwops_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_scancode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_scancode.h\n *\n *  Defines keyboard scancodes.\n */\n\n#ifndef SDL_scancode_h_\n#define SDL_scancode_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\brief The SDL keyboard scancode representation.\n *\n *  Values of this type are used to represent keyboard keys, among other places\n *  in the \\link SDL_Keysym::scancode key.keysym.scancode \\endlink field of the\n *  SDL_Event structure.\n *\n *  The values in this enumeration are based on the USB usage page standard:\n *  https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf\n */\ntypedef enum\n{\n    SDL_SCANCODE_UNKNOWN = 0,\n\n    /**\n     *  \\name Usage page 0x07\n     *\n     *  These values are from usage page 0x07 (USB keyboard page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_A = 4,\n    SDL_SCANCODE_B = 5,\n    SDL_SCANCODE_C = 6,\n    SDL_SCANCODE_D = 7,\n    SDL_SCANCODE_E = 8,\n    SDL_SCANCODE_F = 9,\n    SDL_SCANCODE_G = 10,\n    SDL_SCANCODE_H = 11,\n    SDL_SCANCODE_I = 12,\n    SDL_SCANCODE_J = 13,\n    SDL_SCANCODE_K = 14,\n    SDL_SCANCODE_L = 15,\n    SDL_SCANCODE_M = 16,\n    SDL_SCANCODE_N = 17,\n    SDL_SCANCODE_O = 18,\n    SDL_SCANCODE_P = 19,\n    SDL_SCANCODE_Q = 20,\n    SDL_SCANCODE_R = 21,\n    SDL_SCANCODE_S = 22,\n    SDL_SCANCODE_T = 23,\n    SDL_SCANCODE_U = 24,\n    SDL_SCANCODE_V = 25,\n    SDL_SCANCODE_W = 26,\n    SDL_SCANCODE_X = 27,\n    SDL_SCANCODE_Y = 28,\n    SDL_SCANCODE_Z = 29,\n\n    SDL_SCANCODE_1 = 30,\n    SDL_SCANCODE_2 = 31,\n    SDL_SCANCODE_3 = 32,\n    SDL_SCANCODE_4 = 33,\n    SDL_SCANCODE_5 = 34,\n    SDL_SCANCODE_6 = 35,\n    SDL_SCANCODE_7 = 36,\n    SDL_SCANCODE_8 = 37,\n    SDL_SCANCODE_9 = 38,\n    SDL_SCANCODE_0 = 39,\n\n    SDL_SCANCODE_RETURN = 40,\n    SDL_SCANCODE_ESCAPE = 41,\n    SDL_SCANCODE_BACKSPACE = 42,\n    SDL_SCANCODE_TAB = 43,\n    SDL_SCANCODE_SPACE = 44,\n\n    SDL_SCANCODE_MINUS = 45,\n    SDL_SCANCODE_EQUALS = 46,\n    SDL_SCANCODE_LEFTBRACKET = 47,\n    SDL_SCANCODE_RIGHTBRACKET = 48,\n    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return\n                                  *   key on ISO keyboards and at the right end\n                                  *   of the QWERTY row on ANSI keyboards.\n                                  *   Produces REVERSE SOLIDUS (backslash) and\n                                  *   VERTICAL LINE in a US layout, REVERSE\n                                  *   SOLIDUS and VERTICAL LINE in a UK Mac\n                                  *   layout, NUMBER SIGN and TILDE in a UK\n                                  *   Windows layout, DOLLAR SIGN and POUND SIGN\n                                  *   in a Swiss German layout, NUMBER SIGN and\n                                  *   APOSTROPHE in a German layout, GRAVE\n                                  *   ACCENT and POUND SIGN in a French Mac\n                                  *   layout, and ASTERISK and MICRO SIGN in a\n                                  *   French Windows layout.\n                                  */\n    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code\n                                  *   instead of 49 for the same key, but all\n                                  *   OSes I've seen treat the two codes\n                                  *   identically. So, as an implementor, unless\n                                  *   your keyboard generates both of those\n                                  *   codes and your OS treats them differently,\n                                  *   you should generate SDL_SCANCODE_BACKSLASH\n                                  *   instead of this code. As a user, you\n                                  *   should not rely on this code because SDL\n                                  *   will never generate it with most (all?)\n                                  *   keyboards.\n                                  */\n    SDL_SCANCODE_SEMICOLON = 51,\n    SDL_SCANCODE_APOSTROPHE = 52,\n    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI\n                              *   and ISO keyboards). Produces GRAVE ACCENT and\n                              *   TILDE in a US Windows layout and in US and UK\n                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT\n                              *   and NOT SIGN in a UK Windows layout, SECTION\n                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac\n                              *   layouts on ISO keyboards, SECTION SIGN and\n                              *   DEGREE SIGN in a Swiss German layout (Mac:\n                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and\n                              *   DEGREE SIGN in a German layout (Mac: only on\n                              *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a\n                              *   French Windows layout, COMMERCIAL AT and\n                              *   NUMBER SIGN in a French Mac layout on ISO\n                              *   keyboards, and LESS-THAN SIGN and GREATER-THAN\n                              *   SIGN in a Swiss German, German, or French Mac\n                              *   layout on ANSI keyboards.\n                              */\n    SDL_SCANCODE_COMMA = 54,\n    SDL_SCANCODE_PERIOD = 55,\n    SDL_SCANCODE_SLASH = 56,\n\n    SDL_SCANCODE_CAPSLOCK = 57,\n\n    SDL_SCANCODE_F1 = 58,\n    SDL_SCANCODE_F2 = 59,\n    SDL_SCANCODE_F3 = 60,\n    SDL_SCANCODE_F4 = 61,\n    SDL_SCANCODE_F5 = 62,\n    SDL_SCANCODE_F6 = 63,\n    SDL_SCANCODE_F7 = 64,\n    SDL_SCANCODE_F8 = 65,\n    SDL_SCANCODE_F9 = 66,\n    SDL_SCANCODE_F10 = 67,\n    SDL_SCANCODE_F11 = 68,\n    SDL_SCANCODE_F12 = 69,\n\n    SDL_SCANCODE_PRINTSCREEN = 70,\n    SDL_SCANCODE_SCROLLLOCK = 71,\n    SDL_SCANCODE_PAUSE = 72,\n    SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but\n                                   does send code 73, not 117) */\n    SDL_SCANCODE_HOME = 74,\n    SDL_SCANCODE_PAGEUP = 75,\n    SDL_SCANCODE_DELETE = 76,\n    SDL_SCANCODE_END = 77,\n    SDL_SCANCODE_PAGEDOWN = 78,\n    SDL_SCANCODE_RIGHT = 79,\n    SDL_SCANCODE_LEFT = 80,\n    SDL_SCANCODE_DOWN = 81,\n    SDL_SCANCODE_UP = 82,\n\n    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards\n                                     */\n    SDL_SCANCODE_KP_DIVIDE = 84,\n    SDL_SCANCODE_KP_MULTIPLY = 85,\n    SDL_SCANCODE_KP_MINUS = 86,\n    SDL_SCANCODE_KP_PLUS = 87,\n    SDL_SCANCODE_KP_ENTER = 88,\n    SDL_SCANCODE_KP_1 = 89,\n    SDL_SCANCODE_KP_2 = 90,\n    SDL_SCANCODE_KP_3 = 91,\n    SDL_SCANCODE_KP_4 = 92,\n    SDL_SCANCODE_KP_5 = 93,\n    SDL_SCANCODE_KP_6 = 94,\n    SDL_SCANCODE_KP_7 = 95,\n    SDL_SCANCODE_KP_8 = 96,\n    SDL_SCANCODE_KP_9 = 97,\n    SDL_SCANCODE_KP_0 = 98,\n    SDL_SCANCODE_KP_PERIOD = 99,\n\n    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO\n                                        *   keyboards have over ANSI ones,\n                                        *   located between left shift and Y.\n                                        *   Produces GRAVE ACCENT and TILDE in a\n                                        *   US or UK Mac layout, REVERSE SOLIDUS\n                                        *   (backslash) and VERTICAL LINE in a\n                                        *   US or UK Windows layout, and\n                                        *   LESS-THAN SIGN and GREATER-THAN SIGN\n                                        *   in a Swiss German, German, or French\n                                        *   layout. */\n    SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */\n    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,\n                               *   not a physical key - but some Mac keyboards\n                               *   do have a power key. */\n    SDL_SCANCODE_KP_EQUALS = 103,\n    SDL_SCANCODE_F13 = 104,\n    SDL_SCANCODE_F14 = 105,\n    SDL_SCANCODE_F15 = 106,\n    SDL_SCANCODE_F16 = 107,\n    SDL_SCANCODE_F17 = 108,\n    SDL_SCANCODE_F18 = 109,\n    SDL_SCANCODE_F19 = 110,\n    SDL_SCANCODE_F20 = 111,\n    SDL_SCANCODE_F21 = 112,\n    SDL_SCANCODE_F22 = 113,\n    SDL_SCANCODE_F23 = 114,\n    SDL_SCANCODE_F24 = 115,\n    SDL_SCANCODE_EXECUTE = 116,\n    SDL_SCANCODE_HELP = 117,\n    SDL_SCANCODE_MENU = 118,\n    SDL_SCANCODE_SELECT = 119,\n    SDL_SCANCODE_STOP = 120,\n    SDL_SCANCODE_AGAIN = 121,   /**< redo */\n    SDL_SCANCODE_UNDO = 122,\n    SDL_SCANCODE_CUT = 123,\n    SDL_SCANCODE_COPY = 124,\n    SDL_SCANCODE_PASTE = 125,\n    SDL_SCANCODE_FIND = 126,\n    SDL_SCANCODE_MUTE = 127,\n    SDL_SCANCODE_VOLUMEUP = 128,\n    SDL_SCANCODE_VOLUMEDOWN = 129,\n/* not sure whether there's a reason to enable these */\n/*     SDL_SCANCODE_LOCKINGCAPSLOCK = 130,  */\n/*     SDL_SCANCODE_LOCKINGNUMLOCK = 131, */\n/*     SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */\n    SDL_SCANCODE_KP_COMMA = 133,\n    SDL_SCANCODE_KP_EQUALSAS400 = 134,\n\n    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see\n                                            footnotes in USB doc */\n    SDL_SCANCODE_INTERNATIONAL2 = 136,\n    SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */\n    SDL_SCANCODE_INTERNATIONAL4 = 138,\n    SDL_SCANCODE_INTERNATIONAL5 = 139,\n    SDL_SCANCODE_INTERNATIONAL6 = 140,\n    SDL_SCANCODE_INTERNATIONAL7 = 141,\n    SDL_SCANCODE_INTERNATIONAL8 = 142,\n    SDL_SCANCODE_INTERNATIONAL9 = 143,\n    SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */\n    SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */\n    SDL_SCANCODE_LANG3 = 146, /**< Katakana */\n    SDL_SCANCODE_LANG4 = 147, /**< Hiragana */\n    SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */\n    SDL_SCANCODE_LANG6 = 149, /**< reserved */\n    SDL_SCANCODE_LANG7 = 150, /**< reserved */\n    SDL_SCANCODE_LANG8 = 151, /**< reserved */\n    SDL_SCANCODE_LANG9 = 152, /**< reserved */\n\n    SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */\n    SDL_SCANCODE_SYSREQ = 154,\n    SDL_SCANCODE_CANCEL = 155,\n    SDL_SCANCODE_CLEAR = 156,\n    SDL_SCANCODE_PRIOR = 157,\n    SDL_SCANCODE_RETURN2 = 158,\n    SDL_SCANCODE_SEPARATOR = 159,\n    SDL_SCANCODE_OUT = 160,\n    SDL_SCANCODE_OPER = 161,\n    SDL_SCANCODE_CLEARAGAIN = 162,\n    SDL_SCANCODE_CRSEL = 163,\n    SDL_SCANCODE_EXSEL = 164,\n\n    SDL_SCANCODE_KP_00 = 176,\n    SDL_SCANCODE_KP_000 = 177,\n    SDL_SCANCODE_THOUSANDSSEPARATOR = 178,\n    SDL_SCANCODE_DECIMALSEPARATOR = 179,\n    SDL_SCANCODE_CURRENCYUNIT = 180,\n    SDL_SCANCODE_CURRENCYSUBUNIT = 181,\n    SDL_SCANCODE_KP_LEFTPAREN = 182,\n    SDL_SCANCODE_KP_RIGHTPAREN = 183,\n    SDL_SCANCODE_KP_LEFTBRACE = 184,\n    SDL_SCANCODE_KP_RIGHTBRACE = 185,\n    SDL_SCANCODE_KP_TAB = 186,\n    SDL_SCANCODE_KP_BACKSPACE = 187,\n    SDL_SCANCODE_KP_A = 188,\n    SDL_SCANCODE_KP_B = 189,\n    SDL_SCANCODE_KP_C = 190,\n    SDL_SCANCODE_KP_D = 191,\n    SDL_SCANCODE_KP_E = 192,\n    SDL_SCANCODE_KP_F = 193,\n    SDL_SCANCODE_KP_XOR = 194,\n    SDL_SCANCODE_KP_POWER = 195,\n    SDL_SCANCODE_KP_PERCENT = 196,\n    SDL_SCANCODE_KP_LESS = 197,\n    SDL_SCANCODE_KP_GREATER = 198,\n    SDL_SCANCODE_KP_AMPERSAND = 199,\n    SDL_SCANCODE_KP_DBLAMPERSAND = 200,\n    SDL_SCANCODE_KP_VERTICALBAR = 201,\n    SDL_SCANCODE_KP_DBLVERTICALBAR = 202,\n    SDL_SCANCODE_KP_COLON = 203,\n    SDL_SCANCODE_KP_HASH = 204,\n    SDL_SCANCODE_KP_SPACE = 205,\n    SDL_SCANCODE_KP_AT = 206,\n    SDL_SCANCODE_KP_EXCLAM = 207,\n    SDL_SCANCODE_KP_MEMSTORE = 208,\n    SDL_SCANCODE_KP_MEMRECALL = 209,\n    SDL_SCANCODE_KP_MEMCLEAR = 210,\n    SDL_SCANCODE_KP_MEMADD = 211,\n    SDL_SCANCODE_KP_MEMSUBTRACT = 212,\n    SDL_SCANCODE_KP_MEMMULTIPLY = 213,\n    SDL_SCANCODE_KP_MEMDIVIDE = 214,\n    SDL_SCANCODE_KP_PLUSMINUS = 215,\n    SDL_SCANCODE_KP_CLEAR = 216,\n    SDL_SCANCODE_KP_CLEARENTRY = 217,\n    SDL_SCANCODE_KP_BINARY = 218,\n    SDL_SCANCODE_KP_OCTAL = 219,\n    SDL_SCANCODE_KP_DECIMAL = 220,\n    SDL_SCANCODE_KP_HEXADECIMAL = 221,\n\n    SDL_SCANCODE_LCTRL = 224,\n    SDL_SCANCODE_LSHIFT = 225,\n    SDL_SCANCODE_LALT = 226, /**< alt, option */\n    SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */\n    SDL_SCANCODE_RCTRL = 228,\n    SDL_SCANCODE_RSHIFT = 229,\n    SDL_SCANCODE_RALT = 230, /**< alt gr, option */\n    SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */\n\n    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered\n                                 *   by any of the above, but since there's a\n                                 *   special KMOD_MODE for it I'm adding it here\n                                 */\n\n    /* @} *//* Usage page 0x07 */\n\n    /**\n     *  \\name Usage page 0x0C\n     *\n     *  These values are mapped from usage page 0x0C (USB consumer page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_AUDIONEXT = 258,\n    SDL_SCANCODE_AUDIOPREV = 259,\n    SDL_SCANCODE_AUDIOSTOP = 260,\n    SDL_SCANCODE_AUDIOPLAY = 261,\n    SDL_SCANCODE_AUDIOMUTE = 262,\n    SDL_SCANCODE_MEDIASELECT = 263,\n    SDL_SCANCODE_WWW = 264,\n    SDL_SCANCODE_MAIL = 265,\n    SDL_SCANCODE_CALCULATOR = 266,\n    SDL_SCANCODE_COMPUTER = 267,\n    SDL_SCANCODE_AC_SEARCH = 268,\n    SDL_SCANCODE_AC_HOME = 269,\n    SDL_SCANCODE_AC_BACK = 270,\n    SDL_SCANCODE_AC_FORWARD = 271,\n    SDL_SCANCODE_AC_STOP = 272,\n    SDL_SCANCODE_AC_REFRESH = 273,\n    SDL_SCANCODE_AC_BOOKMARKS = 274,\n\n    /* @} *//* Usage page 0x0C */\n\n    /**\n     *  \\name Walther keys\n     *\n     *  These are values that Christian Walther added (for mac keyboard?).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_BRIGHTNESSDOWN = 275,\n    SDL_SCANCODE_BRIGHTNESSUP = 276,\n    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display\n                                           switch, video mode switch */\n    SDL_SCANCODE_KBDILLUMTOGGLE = 278,\n    SDL_SCANCODE_KBDILLUMDOWN = 279,\n    SDL_SCANCODE_KBDILLUMUP = 280,\n    SDL_SCANCODE_EJECT = 281,\n    SDL_SCANCODE_SLEEP = 282,\n\n    SDL_SCANCODE_APP1 = 283,\n    SDL_SCANCODE_APP2 = 284,\n\n    /* @} *//* Walther keys */\n\n    /**\n     *  \\name Usage page 0x0C (additional media keys)\n     *\n     *  These values are mapped from usage page 0x0C (USB consumer page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_AUDIOREWIND = 285,\n    SDL_SCANCODE_AUDIOFASTFORWARD = 286,\n\n    /* @} *//* Usage page 0x0C (additional media keys) */\n\n    /* Add any other keys here. */\n\n    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes\n                                 for array bounds */\n} SDL_Scancode;\n\n#endif /* SDL_scancode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_sensor.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_sensor.h\n *\n *  Include file for SDL sensor event handling\n *\n */\n\n#ifndef SDL_sensor_h_\n#define SDL_sensor_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\n/* *INDENT-OFF* */\nextern \"C\" {\n/* *INDENT-ON* */\n#endif\n\n/**\n *  \\brief SDL_sensor.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_SENSOR flag.  This causes SDL to scan the system\n *  for sensors, and load appropriate drivers.\n */\n\nstruct _SDL_Sensor;\ntypedef struct _SDL_Sensor SDL_Sensor;\n\n/**\n * This is a unique ID for a sensor for the time it is connected to the system,\n * and is never reused for the lifetime of the application.\n *\n * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.\n */\ntypedef Sint32 SDL_SensorID;\n\n/* The different sensors defined by SDL\n *\n * Additional sensors may be available, using platform dependent semantics.\n *\n * Hare are the additional Android sensors:\n * https://developer.android.com/reference/android/hardware/SensorEvent.html#values\n */\ntypedef enum\n{\n    SDL_SENSOR_INVALID = -1,    /**< Returned for an invalid sensor */\n    SDL_SENSOR_UNKNOWN,         /**< Unknown sensor type */\n    SDL_SENSOR_ACCEL,           /**< Accelerometer */\n    SDL_SENSOR_GYRO             /**< Gyroscope */\n} SDL_SensorType;\n\n/**\n * Accelerometer sensor\n *\n * The accelerometer returns the current acceleration in SI meters per\n * second squared. This includes gravity, so a device at rest will have\n * an acceleration of SDL_STANDARD_GRAVITY straight down.\n *\n * values[0]: Acceleration on the x axis\n * values[1]: Acceleration on the y axis\n * values[2]: Acceleration on the z axis\n *\n * For phones held in portrait mode, the axes are defined as follows:\n * -X ... +X : left ... right\n * -Y ... +Y : bottom ... top\n * -Z ... +Z : farther ... closer\n * \n * The axis data is not changed when the phone is rotated.\n *\n * \\sa SDL_GetDisplayOrientation()\n */\n#define SDL_STANDARD_GRAVITY    9.80665f\n\n/**\n * Gyroscope sensor\n *\n * The gyroscope returns the current rate of rotation in radians per second.\n * The rotation is positive in the counter-clockwise direction. That is,\n * an observer looking from a positive location on one of the axes would\n * see positive rotation on that axis when it appeared to be rotating\n * counter-clockwise.\n *\n * values[0]: Angular speed around the x axis\n * values[1]: Angular speed around the y axis\n * values[2]: Angular speed around the z axis\n *\n * For phones held in portrait mode, the axes are defined as follows:\n * -X ... +X : left ... right\n * -Y ... +Y : bottom ... top\n * -Z ... +Z : farther ... closer\n * \n * The axis data is not changed when the phone is rotated.\n *\n * \\sa SDL_GetDisplayOrientation()\n */\n\n/* Function prototypes */\n\n/**\n *  \\brief Count the number of sensors attached to the system right now\n */\nextern DECLSPEC int SDLCALL SDL_NumSensors(void);\n\n/**\n *  \\brief Get the implementation dependent name of a sensor.\n *\n *  This can be called before any sensors are opened.\n * \n *  \\return The sensor name, or NULL if device_index is out of range.\n */\nextern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);\n\n/**\n *  \\brief Get the type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.\n */\nextern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);\n\n/**\n *  \\brief Get the platform dependent type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor platform dependent type, or -1 if device_index is out of range.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);\n\n/**\n *  \\brief Get the instance ID of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor instance ID, or -1 if device_index is out of range.\n */\nextern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);\n\n/**\n *  \\brief Open a sensor for use.\n *\n *  The index passed as an argument refers to the N'th sensor on the system.\n *\n *  \\return A sensor identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);\n\n/**\n * Return the SDL_Sensor associated with an instance id.\n */\nextern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);\n\n/**\n *  \\brief Get the implementation dependent name of a sensor.\n *\n *  \\return The sensor name, or NULL if the sensor is NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.\n */\nextern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the platform dependent type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor platform dependent type, or -1 if the sensor is NULL.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the instance ID of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor instance ID, or -1 if the sensor is NULL.\n */\nextern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);\n\n/**\n *  Get the current state of an opened sensor.\n *\n *  The number of values and interpretation of the data is sensor dependent.\n *\n *  \\param sensor The sensor to query\n *  \\param data A pointer filled with the current sensor state\n *  \\param num_values The number of values to write to data\n *\n *  \\return 0 or -1 if an error occurred.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);\n\n/**\n *  Close a sensor previously opened with SDL_SensorOpen()\n */\nextern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);\n\n/**\n *  Update the current state of the open sensors.\n *\n *  This is called automatically by the event loop if sensor events are enabled.\n *\n *  This needs to be called from the thread that initialized the sensor subsystem.\n */\nextern DECLSPEC void SDLCALL SDL_SensorUpdate(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n/* *INDENT-OFF* */\n}\n/* *INDENT-ON* */\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_sensor_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_shape.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_shape_h_\n#define SDL_shape_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_surface.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \\file SDL_shape.h\n *\n * Header file for the shaped window API.\n */\n\n#define SDL_NONSHAPEABLE_WINDOW -1\n#define SDL_INVALID_SHAPE_ARGUMENT -2\n#define SDL_WINDOW_LACKS_SHAPE -3\n\n/**\n *  \\brief Create a window that can be shaped with the specified position, dimensions, and flags.\n *\n *  \\param title The title of the window, in UTF-8 encoding.\n *  \\param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param w     The width of the window.\n *  \\param h     The height of the window.\n *  \\param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following:\n *               ::SDL_WINDOW_OPENGL,     ::SDL_WINDOW_INPUT_GRABBED,\n *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_RESIZABLE,\n *               ::SDL_WINDOW_MAXIMIZED,  ::SDL_WINDOW_MINIMIZED,\n *       ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset.\n *\n *  \\return The window created, or NULL if window creation failed.\n *\n *  \\sa SDL_DestroyWindow()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);\n\n/**\n * \\brief Return whether the given window is a shaped window.\n *\n * \\param window The window to query for being shaped.\n *\n * \\return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.\n *\n * \\sa SDL_CreateShapedWindow\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);\n\n/** \\brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */\ntypedef enum {\n    /** \\brief The default mode, a binarized alpha cutoff of 1. */\n    ShapeModeDefault,\n    /** \\brief A binarized alpha cutoff with a given integer value. */\n    ShapeModeBinarizeAlpha,\n    /** \\brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */\n    ShapeModeReverseBinarizeAlpha,\n    /** \\brief A color key is applied. */\n    ShapeModeColorKey\n} WindowShapeMode;\n\n#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)\n\n/** \\brief A union containing parameters for shaped windows. */\ntypedef union {\n    /** \\brief A cutoff alpha value for binarization of the window shape's alpha channel. */\n    Uint8 binarizationCutoff;\n    SDL_Color colorKey;\n} SDL_WindowShapeParams;\n\n/** \\brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */\ntypedef struct SDL_WindowShapeMode {\n    /** \\brief The mode of these window-shape parameters. */\n    WindowShapeMode mode;\n    /** \\brief Window-shape parameters. */\n    SDL_WindowShapeParams parameters;\n} SDL_WindowShapeMode;\n\n/**\n * \\brief Set the shape and parameters of a shaped window.\n *\n * \\param window The shaped window whose parameters should be set.\n * \\param shape A surface encoding the desired shape for the window.\n * \\param shape_mode The parameters to set for the shaped window.\n *\n * \\return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW\n *           if the SDL_Window given does not reference a valid shaped window.\n *\n * \\sa SDL_WindowShapeMode\n * \\sa SDL_GetShapedWindowMode.\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);\n\n/**\n * \\brief Get the shape parameters of a shaped window.\n *\n * \\param window The shaped window whose parameters should be retrieved.\n * \\param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape.\n *\n * \\return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode\n *           data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if\n *           the SDL_Window given is a shapeable window currently lacking a shape.\n *\n * \\sa SDL_WindowShapeMode\n * \\sa SDL_SetWindowShape\n */\nextern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_shape_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_stdinc.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_stdinc.h\n *\n *  This is a general header that includes C language support.\n */\n\n#ifndef SDL_stdinc_h_\n#define SDL_stdinc_h_\n\n#include \"SDL_config.h\"\n\n#ifdef HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#ifdef HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if defined(STDC_HEADERS)\n# include <stdlib.h>\n# include <stddef.h>\n# include <stdarg.h>\n#else\n# if defined(HAVE_STDLIB_H)\n#  include <stdlib.h>\n# elif defined(HAVE_MALLOC_H)\n#  include <malloc.h>\n# endif\n# if defined(HAVE_STDDEF_H)\n#  include <stddef.h>\n# endif\n# if defined(HAVE_STDARG_H)\n#  include <stdarg.h>\n# endif\n#endif\n#ifdef HAVE_STRING_H\n# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#ifdef HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#ifdef HAVE_WCHAR_H\n# include <wchar.h>\n#endif\n#if defined(HAVE_INTTYPES_H)\n# include <inttypes.h>\n#elif defined(HAVE_STDINT_H)\n# include <stdint.h>\n#endif\n#ifdef HAVE_CTYPE_H\n# include <ctype.h>\n#endif\n#ifdef HAVE_MATH_H\n# if defined(__WINRT__)\n/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on\n   WinRT.  See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx\n   for more information.\n*/\n#  define _USE_MATH_DEFINES\n# endif\n# include <math.h>\n#endif\n#ifdef HAVE_FLOAT_H\n# include <float.h>\n#endif\n#if defined(HAVE_ALLOCA) && !defined(alloca)\n# if defined(HAVE_ALLOCA_H)\n#  include <alloca.h>\n# elif defined(__GNUC__)\n#  define alloca __builtin_alloca\n# elif defined(_MSC_VER)\n#  include <malloc.h>\n#  define alloca _alloca\n# elif defined(__WATCOMC__)\n#  include <malloc.h>\n# elif defined(__BORLANDC__)\n#  include <malloc.h>\n# elif defined(__DMC__)\n#  include <stdlib.h>\n# elif defined(__AIX__)\n#pragma alloca\n# elif defined(__MRC__)\nvoid *alloca(unsigned);\n# else\nchar *alloca();\n# endif\n#endif\n\n/**\n *  The number of elements in an array.\n */\n#define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))\n#define SDL_TABLESIZE(table)    SDL_arraysize(table)\n\n/**\n *  Macro useful for building other macros with strings in them\n *\n *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) \": \" X \"\\n\")\n */\n#define SDL_STRINGIFY_ARG(arg)  #arg\n\n/**\n *  \\name Cast operators\n *\n *  Use proper C++ casts when compiled as C++ to be compatible with the option\n *  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).\n */\n/* @{ */\n#ifdef __cplusplus\n#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)\n#define SDL_static_cast(type, expression) static_cast<type>(expression)\n#define SDL_const_cast(type, expression) const_cast<type>(expression)\n#else\n#define SDL_reinterpret_cast(type, expression) ((type)(expression))\n#define SDL_static_cast(type, expression) ((type)(expression))\n#define SDL_const_cast(type, expression) ((type)(expression))\n#endif\n/* @} *//* Cast operators */\n\n/* Define a four character code as a Uint32 */\n#define SDL_FOURCC(A, B, C, D) \\\n    ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))\n\n/**\n *  \\name Basic data types\n */\n/* @{ */\n\n#ifdef __CC_ARM\n/* ARM's compiler throws warnings if we use an enum: like \"SDL_bool x = a < b;\" */\n#define SDL_FALSE 0\n#define SDL_TRUE 1\ntypedef int SDL_bool;\n#else\ntypedef enum\n{\n    SDL_FALSE = 0,\n    SDL_TRUE = 1\n} SDL_bool;\n#endif\n\n/**\n * \\brief A signed 8-bit integer type.\n */\n#define SDL_MAX_SINT8   ((Sint8)0x7F)           /* 127 */\n#define SDL_MIN_SINT8   ((Sint8)(~0x7F))        /* -128 */\ntypedef int8_t Sint8;\n/**\n * \\brief An unsigned 8-bit integer type.\n */\n#define SDL_MAX_UINT8   ((Uint8)0xFF)           /* 255 */\n#define SDL_MIN_UINT8   ((Uint8)0x00)           /* 0 */\ntypedef uint8_t Uint8;\n/**\n * \\brief A signed 16-bit integer type.\n */\n#define SDL_MAX_SINT16  ((Sint16)0x7FFF)        /* 32767 */\n#define SDL_MIN_SINT16  ((Sint16)(~0x7FFF))     /* -32768 */\ntypedef int16_t Sint16;\n/**\n * \\brief An unsigned 16-bit integer type.\n */\n#define SDL_MAX_UINT16  ((Uint16)0xFFFF)        /* 65535 */\n#define SDL_MIN_UINT16  ((Uint16)0x0000)        /* 0 */\ntypedef uint16_t Uint16;\n/**\n * \\brief A signed 32-bit integer type.\n */\n#define SDL_MAX_SINT32  ((Sint32)0x7FFFFFFF)    /* 2147483647 */\n#define SDL_MIN_SINT32  ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */\ntypedef int32_t Sint32;\n/**\n * \\brief An unsigned 32-bit integer type.\n */\n#define SDL_MAX_UINT32  ((Uint32)0xFFFFFFFFu)   /* 4294967295 */\n#define SDL_MIN_UINT32  ((Uint32)0x00000000)    /* 0 */\ntypedef uint32_t Uint32;\n\n/**\n * \\brief A signed 64-bit integer type.\n */\n#define SDL_MAX_SINT64  ((Sint64)0x7FFFFFFFFFFFFFFFll)      /* 9223372036854775807 */\n#define SDL_MIN_SINT64  ((Sint64)(~0x7FFFFFFFFFFFFFFFll))   /* -9223372036854775808 */\ntypedef int64_t Sint64;\n/**\n * \\brief An unsigned 64-bit integer type.\n */\n#define SDL_MAX_UINT64  ((Uint64)0xFFFFFFFFFFFFFFFFull)     /* 18446744073709551615 */\n#define SDL_MIN_UINT64  ((Uint64)(0x0000000000000000ull))   /* 0 */\ntypedef uint64_t Uint64;\n\n/* @} *//* Basic data types */\n\n/* Make sure we have macros for printing 64 bit values.\n * <stdint.h> should define these but this is not true all platforms.\n * (for example win32) */\n#ifndef SDL_PRIs64\n#ifdef PRIs64\n#define SDL_PRIs64 PRIs64\n#elif defined(__WIN32__)\n#define SDL_PRIs64 \"I64d\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIs64 \"ld\"\n#else\n#define SDL_PRIs64 \"lld\"\n#endif\n#endif\n#ifndef SDL_PRIu64\n#ifdef PRIu64\n#define SDL_PRIu64 PRIu64\n#elif defined(__WIN32__)\n#define SDL_PRIu64 \"I64u\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIu64 \"lu\"\n#else\n#define SDL_PRIu64 \"llu\"\n#endif\n#endif\n#ifndef SDL_PRIx64\n#ifdef PRIx64\n#define SDL_PRIx64 PRIx64\n#elif defined(__WIN32__)\n#define SDL_PRIx64 \"I64x\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIx64 \"lx\"\n#else\n#define SDL_PRIx64 \"llx\"\n#endif\n#endif\n#ifndef SDL_PRIX64\n#ifdef PRIX64\n#define SDL_PRIX64 PRIX64\n#elif defined(__WIN32__)\n#define SDL_PRIX64 \"I64X\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIX64 \"lX\"\n#else\n#define SDL_PRIX64 \"llX\"\n#endif\n#endif\n\n/* Annotations to help code analysis tools */\n#ifdef SDL_DISABLE_ANALYZE_MACROS\n#define SDL_IN_BYTECAP(x)\n#define SDL_INOUT_Z_CAP(x)\n#define SDL_OUT_Z_CAP(x)\n#define SDL_OUT_CAP(x)\n#define SDL_OUT_BYTECAP(x)\n#define SDL_OUT_Z_BYTECAP(x)\n#define SDL_PRINTF_FORMAT_STRING\n#define SDL_SCANF_FORMAT_STRING\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber )\n#else\n#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */\n#include <sal.h>\n\n#define SDL_IN_BYTECAP(x) _In_bytecount_(x)\n#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)\n#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)\n#define SDL_OUT_CAP(x) _Out_cap_(x)\n#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)\n#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)\n\n#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_\n#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_\n#else\n#define SDL_IN_BYTECAP(x)\n#define SDL_INOUT_Z_CAP(x)\n#define SDL_OUT_Z_CAP(x)\n#define SDL_OUT_CAP(x)\n#define SDL_OUT_BYTECAP(x)\n#define SDL_OUT_Z_BYTECAP(x)\n#define SDL_PRINTF_FORMAT_STRING\n#define SDL_SCANF_FORMAT_STRING\n#endif\n#if defined(__GNUC__)\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))\n#else\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber )\n#endif\n#endif /* SDL_DISABLE_ANALYZE_MACROS */\n\n#define SDL_COMPILE_TIME_ASSERT(name, x)               \\\n       typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]\n/** \\cond */\n#ifndef DOXYGEN_SHOULD_IGNORE_THIS\nSDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);\nSDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);\nSDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);\nSDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);\nSDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);\nSDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);\nSDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);\nSDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);\n#endif /* DOXYGEN_SHOULD_IGNORE_THIS */\n/** \\endcond */\n\n/* Check to make sure enums are the size of ints, for structure packing.\n   For both Watcom C/C++ and Borland C/C++ the compiler option that makes\n   enums having the size of an int must be enabled.\n   This is \"-b\" for Borland C/C++ and \"-ei\" for Watcom C/C++ (v11).\n*/\n\n/** \\cond */\n#ifndef DOXYGEN_SHOULD_IGNORE_THIS\n#if !defined(__ANDROID__)\n   /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */\ntypedef enum\n{\n    DUMMY_ENUM_VALUE\n} SDL_DUMMY_ENUM;\n\nSDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));\n#endif\n#endif /* DOXYGEN_SHOULD_IGNORE_THIS */\n/** \\endcond */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef HAVE_ALLOCA\n#define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*(count))\n#define SDL_stack_free(data)\n#else\n#define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*(count))\n#define SDL_stack_free(data)            SDL_free(data)\n#endif\n\nextern DECLSPEC void *SDLCALL SDL_malloc(size_t size);\nextern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);\nextern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);\nextern DECLSPEC void SDLCALL SDL_free(void *mem);\n\ntypedef void *(SDLCALL *SDL_malloc_func)(size_t size);\ntypedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);\ntypedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);\ntypedef void (SDLCALL *SDL_free_func)(void *mem);\n\n/**\n *  \\brief Get the current set of SDL memory functions\n */\nextern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,\n                                                    SDL_calloc_func *calloc_func,\n                                                    SDL_realloc_func *realloc_func,\n                                                    SDL_free_func *free_func);\n\n/**\n *  \\brief Replace SDL's memory allocation functions with a custom set\n *\n *  \\note If you are replacing SDL's memory functions, you should call\n *        SDL_GetNumAllocations() and be very careful if it returns non-zero.\n *        That means that your free function will be called with memory\n *        allocated by the previous memory allocation functions.\n */\nextern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,\n                                                   SDL_calloc_func calloc_func,\n                                                   SDL_realloc_func realloc_func,\n                                                   SDL_free_func free_func);\n\n/**\n *  \\brief Get the number of outstanding (unfreed) allocations\n */\nextern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);\n\nextern DECLSPEC char *SDLCALL SDL_getenv(const char *name);\nextern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);\n\nextern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));\n\nextern DECLSPEC int SDLCALL SDL_abs(int x);\n\n/* !!! FIXME: these have side effects. You probably shouldn't use them. */\n/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */\n#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))\n#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))\n\nextern DECLSPEC int SDLCALL SDL_isdigit(int x);\nextern DECLSPEC int SDLCALL SDL_isspace(int x);\nextern DECLSPEC int SDLCALL SDL_toupper(int x);\nextern DECLSPEC int SDLCALL SDL_tolower(int x);\n\nextern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);\n\n#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))\n#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))\n\n/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */\nSDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)\n{\n#if defined(__GNUC__) && defined(i386)\n    int u0, u1, u2;\n    __asm__ __volatile__ (\n        \"cld \\n\\t\"\n        \"rep ; stosl \\n\\t\"\n        : \"=&D\" (u0), \"=&a\" (u1), \"=&c\" (u2)\n        : \"0\" (dst), \"1\" (val), \"2\" (SDL_static_cast(Uint32, dwords))\n        : \"memory\"\n    );\n#else\n    size_t _n = (dwords + 3) / 4;\n    Uint32 *_p = SDL_static_cast(Uint32 *, dst);\n    Uint32 _val = (val);\n    if (dwords == 0)\n        return;\n    switch (dwords % 4)\n    {\n        case 0: do {    *_p++ = _val;   /* fallthrough */\n        case 3:         *_p++ = _val;   /* fallthrough */\n        case 2:         *_p++ = _val;   /* fallthrough */\n        case 1:         *_p++ = _val;   /* fallthrough */\n        } while ( --_n );\n    }\n#endif\n}\n\nextern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);\n\nextern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);\nextern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);\n\nextern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);\nextern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);\nextern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);\nextern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);\nextern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);\n\nextern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);\nextern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);\nextern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);\nextern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);\nextern DECLSPEC char *SDLCALL SDL_strdup(const char *str);\nextern DECLSPEC char *SDLCALL SDL_strrev(char *str);\nextern DECLSPEC char *SDLCALL SDL_strupr(char *str);\nextern DECLSPEC char *SDLCALL SDL_strlwr(char *str);\nextern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);\nextern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);\nextern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);\nextern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);\n\nextern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);\n\nextern DECLSPEC int SDLCALL SDL_atoi(const char *str);\nextern DECLSPEC double SDLCALL SDL_atof(const char *str);\nextern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);\nextern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);\nextern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);\nextern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);\nextern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);\n\nextern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);\nextern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);\nextern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);\nextern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);\n\nextern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);\nextern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);\nextern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);\nextern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);\n\n#ifndef HAVE_M_PI\n#ifndef M_PI\n#define M_PI    3.14159265358979323846264338327950288   /**< pi */\n#endif\n#endif\n\nextern DECLSPEC double SDLCALL SDL_acos(double x);\nextern DECLSPEC float SDLCALL SDL_acosf(float x);\nextern DECLSPEC double SDLCALL SDL_asin(double x);\nextern DECLSPEC float SDLCALL SDL_asinf(float x);\nextern DECLSPEC double SDLCALL SDL_atan(double x);\nextern DECLSPEC float SDLCALL SDL_atanf(float x);\nextern DECLSPEC double SDLCALL SDL_atan2(double x, double y);\nextern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);\nextern DECLSPEC double SDLCALL SDL_ceil(double x);\nextern DECLSPEC float SDLCALL SDL_ceilf(float x);\nextern DECLSPEC double SDLCALL SDL_copysign(double x, double y);\nextern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_cos(double x);\nextern DECLSPEC float SDLCALL SDL_cosf(float x);\nextern DECLSPEC double SDLCALL SDL_exp(double x);\nextern DECLSPEC float SDLCALL SDL_expf(float x);\nextern DECLSPEC double SDLCALL SDL_fabs(double x);\nextern DECLSPEC float SDLCALL SDL_fabsf(float x);\nextern DECLSPEC double SDLCALL SDL_floor(double x);\nextern DECLSPEC float SDLCALL SDL_floorf(float x);\nextern DECLSPEC double SDLCALL SDL_fmod(double x, double y);\nextern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_log(double x);\nextern DECLSPEC float SDLCALL SDL_logf(float x);\nextern DECLSPEC double SDLCALL SDL_log10(double x);\nextern DECLSPEC float SDLCALL SDL_log10f(float x);\nextern DECLSPEC double SDLCALL SDL_pow(double x, double y);\nextern DECLSPEC float SDLCALL SDL_powf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);\nextern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);\nextern DECLSPEC double SDLCALL SDL_sin(double x);\nextern DECLSPEC float SDLCALL SDL_sinf(float x);\nextern DECLSPEC double SDLCALL SDL_sqrt(double x);\nextern DECLSPEC float SDLCALL SDL_sqrtf(float x);\nextern DECLSPEC double SDLCALL SDL_tan(double x);\nextern DECLSPEC float SDLCALL SDL_tanf(float x);\n\n/* The SDL implementation of iconv() returns these error codes */\n#define SDL_ICONV_ERROR     (size_t)-1\n#define SDL_ICONV_E2BIG     (size_t)-2\n#define SDL_ICONV_EILSEQ    (size_t)-3\n#define SDL_ICONV_EINVAL    (size_t)-4\n\n/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */\ntypedef struct _SDL_iconv_t *SDL_iconv_t;\nextern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,\n                                                   const char *fromcode);\nextern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);\nextern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,\n                                         size_t * inbytesleft, char **outbuf,\n                                         size_t * outbytesleft);\n/**\n *  This function converts a string between encodings in one pass, returning a\n *  string that must be freed with SDL_free() or NULL on error.\n */\nextern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,\n                                               const char *fromcode,\n                                               const char *inbuf,\n                                               size_t inbytesleft);\n#define SDL_iconv_utf8_locale(S)    SDL_iconv_string(\"\", \"UTF-8\", S, SDL_strlen(S)+1)\n#define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string(\"UCS-2-INTERNAL\", \"UTF-8\", S, SDL_strlen(S)+1)\n#define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string(\"UCS-4-INTERNAL\", \"UTF-8\", S, SDL_strlen(S)+1)\n\n/* force builds using Clang's static analysis tools to use literal C runtime\n   here, since there are possibly tests that are ineffective otherwise. */\n#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)\n#define SDL_malloc malloc\n#define SDL_calloc calloc\n#define SDL_realloc realloc\n#define SDL_free free\n#define SDL_memset memset\n#define SDL_memcpy memcpy\n#define SDL_memmove memmove\n#define SDL_memcmp memcmp\n#define SDL_strlen strlen\n#define SDL_strlcpy strlcpy\n#define SDL_strlcat strlcat\n#define SDL_strdup strdup\n#define SDL_strchr strchr\n#define SDL_strrchr strrchr\n#define SDL_strstr strstr\n#define SDL_strcmp strcmp\n#define SDL_strncmp strncmp\n#define SDL_strcasecmp strcasecmp\n#define SDL_strncasecmp strncasecmp\n#define SDL_sscanf sscanf\n#define SDL_vsscanf vsscanf\n#define SDL_snprintf snprintf\n#define SDL_vsnprintf vsnprintf\n#endif\n\nSDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)\n{\n    return SDL_memcpy(dst, src, dwords * 4);\n}\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_stdinc_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_surface.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_surface.h\n *\n *  Header file for ::SDL_Surface definition and management functions.\n */\n\n#ifndef SDL_surface_h_\n#define SDL_surface_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_blendmode.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\name Surface flags\n *\n *  These are the currently supported flags for the ::SDL_Surface.\n *\n *  \\internal\n *  Used internally (read-only).\n */\n/* @{ */\n#define SDL_SWSURFACE       0           /**< Just here for compatibility */\n#define SDL_PREALLOC        0x00000001  /**< Surface uses preallocated memory */\n#define SDL_RLEACCEL        0x00000002  /**< Surface is RLE encoded */\n#define SDL_DONTFREE        0x00000004  /**< Surface is referenced internally */\n#define SDL_SIMD_ALIGNED    0x00000008  /**< Surface uses aligned memory */\n/* @} *//* Surface flags */\n\n/**\n *  Evaluates to true if the surface needs to be locked before access.\n */\n#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)\n\n/**\n * \\brief A collection of pixels used in software blitting.\n *\n * \\note  This structure should be treated as read-only, except for \\c pixels,\n *        which, if not NULL, contains the raw pixel data for the surface.\n */\ntypedef struct SDL_Surface\n{\n    Uint32 flags;               /**< Read-only */\n    SDL_PixelFormat *format;    /**< Read-only */\n    int w, h;                   /**< Read-only */\n    int pitch;                  /**< Read-only */\n    void *pixels;               /**< Read-write */\n\n    /** Application data associated with the surface */\n    void *userdata;             /**< Read-write */\n\n    /** information needed for surfaces requiring locks */\n    int locked;                 /**< Read-only */\n    void *lock_data;            /**< Read-only */\n\n    /** clipping information */\n    SDL_Rect clip_rect;         /**< Read-only */\n\n    /** info for fast blit mapping to other surfaces */\n    struct SDL_BlitMap *map;    /**< Private */\n\n    /** Reference count -- used when freeing surface */\n    int refcount;               /**< Read-mostly */\n} SDL_Surface;\n\n/**\n * \\brief The type of function used for surface blitting functions.\n */\ntypedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,\n                                 struct SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n * \\brief The formula used for converting between YUV and RGB\n */\ntypedef enum\n{\n    SDL_YUV_CONVERSION_JPEG,        /**< Full range JPEG */\n    SDL_YUV_CONVERSION_BT601,       /**< BT.601 (the default) */\n    SDL_YUV_CONVERSION_BT709,       /**< BT.709 */\n    SDL_YUV_CONVERSION_AUTOMATIC    /**< BT.601 for SD content, BT.709 for HD content */\n} SDL_YUV_CONVERSION_MODE;\n\n/**\n *  Allocate and free an RGB surface.\n *\n *  If the depth is 4 or 8 bits, an empty palette is allocated for the surface.\n *  If the depth is greater than 8 bits, the pixel format is set using the\n *  flags '[RGB]mask'.\n *\n *  If the function runs out of memory, it will return NULL.\n *\n *  \\param flags The \\c flags are obsolete and should be set to 0.\n *  \\param width The width in pixels of the surface to create.\n *  \\param height The height in pixels of the surface to create.\n *  \\param depth The depth in bits of the surface to create.\n *  \\param Rmask The red mask of the surface to create.\n *  \\param Gmask The green mask of the surface to create.\n *  \\param Bmask The blue mask of the surface to create.\n *  \\param Amask The alpha mask of the surface to create.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface\n    (Uint32 flags, int width, int height, int depth,\n     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);\n\n/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat\n    (Uint32 flags, int width, int height, int depth, Uint32 format);\n\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,\n                                                              int width,\n                                                              int height,\n                                                              int depth,\n                                                              int pitch,\n                                                              Uint32 Rmask,\n                                                              Uint32 Gmask,\n                                                              Uint32 Bmask,\n                                                              Uint32 Amask);\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom\n    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);\nextern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);\n\n/**\n *  \\brief Set the palette used by a surface.\n *\n *  \\return 0, or -1 if the surface format doesn't use a palette.\n *\n *  \\note A single palette can be shared with many surfaces.\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,\n                                                  SDL_Palette * palette);\n\n/**\n *  \\brief Sets up a surface for directly accessing the pixels.\n *\n *  Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write\n *  to and read from \\c surface->pixels, using the pixel format stored in\n *  \\c surface->format.  Once you are done accessing the surface, you should\n *  use SDL_UnlockSurface() to release it.\n *\n *  Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates\n *  to 0, then you can read and write to the surface at any time, and the\n *  pixel format of the surface will not change.\n *\n *  No operating system or library calls should be made between lock/unlock\n *  pairs, as critical system locks may be held during this time.\n *\n *  SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.\n *\n *  \\sa SDL_UnlockSurface()\n */\nextern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);\n/** \\sa SDL_LockSurface() */\nextern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);\n\n/**\n *  Load a surface from a seekable SDL data stream (memory or file).\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The new surface should be freed with SDL_FreeSurface().\n *\n *  \\return the new surface, or NULL if there was an error.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,\n                                                    int freesrc);\n\n/**\n *  Load a surface from a file.\n *\n *  Convenience macro.\n */\n#define SDL_LoadBMP(file)   SDL_LoadBMP_RW(SDL_RWFromFile(file, \"rb\"), 1)\n\n/**\n *  Save a surface to a seekable SDL data stream (memory or file).\n *\n *  Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the\n *  BMP directly. Other RGB formats with 8-bit or higher get converted to a\n *  24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit\n *  surface before they are saved. YUV and paletted 1-bit and 4-bit formats are\n *  not supported.\n *\n *  If \\c freedst is non-zero, the stream will be closed after being written.\n *\n *  \\return 0 if successful or -1 if there was an error.\n */\nextern DECLSPEC int SDLCALL SDL_SaveBMP_RW\n    (SDL_Surface * surface, SDL_RWops * dst, int freedst);\n\n/**\n *  Save a surface to a file.\n *\n *  Convenience macro.\n */\n#define SDL_SaveBMP(surface, file) \\\n        SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, \"wb\"), 1)\n\n/**\n *  \\brief Sets the RLE acceleration hint for a surface.\n *\n *  \\return 0 on success, or -1 if the surface is not valid\n *\n *  \\note If RLE is enabled, colorkey and alpha blending blits are much faster,\n *        but the surface must be locked before directly accessing the pixels.\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,\n                                              int flag);\n\n/**\n *  \\brief Sets the color key (transparent pixel) in a blittable surface.\n *\n *  \\param surface The surface to update\n *  \\param flag Non-zero to enable colorkey and 0 to disable colorkey\n *  \\param key The transparent pixel in the native surface format\n *\n *  \\return 0 on success, or -1 if the surface is not valid\n *\n *  You can pass SDL_RLEACCEL to enable RLE accelerated blits.\n */\nextern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,\n                                            int flag, Uint32 key);\n\n/**\n *  \\brief Returns whether the surface has a color key\n *\n *  \\return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);\n\n/**\n *  \\brief Gets the color key (transparent pixel) in a blittable surface.\n *\n *  \\param surface The surface to update\n *  \\param key A pointer filled in with the transparent pixel in the native\n *             surface format\n *\n *  \\return 0 on success, or -1 if the surface is not valid or colorkey is not\n *          enabled.\n */\nextern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,\n                                            Uint32 * key);\n\n/**\n *  \\brief Set an additional color value used in blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param r The red color value multiplied into blit operations.\n *  \\param g The green color value multiplied into blit operations.\n *  \\param b The blue color value multiplied into blit operations.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_GetSurfaceColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,\n                                                   Uint8 r, Uint8 g, Uint8 b);\n\n\n/**\n *  \\brief Get the additional color value used in blit operations.\n *\n *  \\param surface The surface to query.\n *  \\param r A pointer filled in with the current red color value.\n *  \\param g A pointer filled in with the current green color value.\n *  \\param b A pointer filled in with the current blue color value.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,\n                                                   Uint8 * r, Uint8 * g,\n                                                   Uint8 * b);\n\n/**\n *  \\brief Set an additional alpha value used in blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param alpha The alpha value multiplied into blit operations.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_GetSurfaceAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,\n                                                   Uint8 alpha);\n\n/**\n *  \\brief Get the additional alpha value used in blit operations.\n *\n *  \\param surface The surface to query.\n *  \\param alpha A pointer filled in with the current alpha value.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,\n                                                   Uint8 * alpha);\n\n/**\n *  \\brief Set the blend mode used for blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param blendMode ::SDL_BlendMode to use for blit blending.\n *\n *  \\return 0 on success, or -1 if the parameters are not valid.\n *\n *  \\sa SDL_GetSurfaceBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,\n                                                    SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for blit operations.\n *\n *  \\param surface   The surface to query.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,\n                                                    SDL_BlendMode *blendMode);\n\n/**\n *  Sets the clipping rectangle for the destination surface in a blit.\n *\n *  If the clip rectangle is NULL, clipping will be disabled.\n *\n *  If the clip rectangle doesn't intersect the surface, the function will\n *  return SDL_FALSE and blits will be completely clipped.  Otherwise the\n *  function returns SDL_TRUE and blits to the surface will be clipped to\n *  the intersection of the surface area and the clipping rectangle.\n *\n *  Note that blits are automatically clipped to the edges of the source\n *  and destination surfaces.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,\n                                                 const SDL_Rect * rect);\n\n/**\n *  Gets the clipping rectangle for the destination surface in a blit.\n *\n *  \\c rect must be a pointer to a valid rectangle which will be filled\n *  with the correct values.\n */\nextern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,\n                                             SDL_Rect * rect);\n\n/*\n * Creates a new surface identical to the existing surface\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);\n\n/**\n *  Creates a new surface of the specified format, and then copies and maps\n *  the given surface to it so the blit of the converted surface will be as\n *  fast as possible.  If this function fails, it returns NULL.\n *\n *  The \\c flags parameter is passed to SDL_CreateRGBSurface() and has those\n *  semantics.  You can also pass ::SDL_RLEACCEL in the flags parameter and\n *  SDL will try to RLE accelerate colorkey and alpha blits in the resulting\n *  surface.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface\n    (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);\nextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat\n    (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);\n\n/**\n * \\brief Copy a block of pixels of one format to another format\n *\n *  \\return 0 on success, or -1 if there was an error\n */\nextern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,\n                                              Uint32 src_format,\n                                              const void * src, int src_pitch,\n                                              Uint32 dst_format,\n                                              void * dst, int dst_pitch);\n\n/**\n *  Performs a fast fill of the given rectangle with \\c color.\n *\n *  If \\c rect is NULL, the whole surface will be filled with \\c color.\n *\n *  The color should be a pixel of the format used by the surface, and\n *  can be generated by the SDL_MapRGB() function.\n *\n *  \\return 0 on success, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_FillRect\n    (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);\nextern DECLSPEC int SDLCALL SDL_FillRects\n    (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);\n\n/**\n *  Performs a fast blit from the source surface to the destination surface.\n *\n *  This assumes that the source and destination rectangles are\n *  the same size.  If either \\c srcrect or \\c dstrect are NULL, the entire\n *  surface (\\c src or \\c dst) is copied.  The final blit rectangles are saved\n *  in \\c srcrect and \\c dstrect after all clipping is performed.\n *\n *  \\return If the blit is successful, it returns 0, otherwise it returns -1.\n *\n *  The blit function should not be called on a locked surface.\n *\n *  The blit semantics for surfaces with and without blending and colorkey\n *  are defined as follows:\n *  \\verbatim\n    RGBA->RGB:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source alpha-channel and per-surface alpha)\n        SDL_SRCCOLORKEY ignored.\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB.\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        RGB values of the source color key, ignoring alpha in the\n        comparison.\n\n    RGB->RGBA:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source per-surface alpha)\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB, set destination alpha to source per-surface alpha value.\n      both:\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        source color key.\n\n    RGBA->RGBA:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source alpha-channel and per-surface alpha)\n        SDL_SRCCOLORKEY ignored.\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy all of RGBA to the destination.\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        RGB values of the source color key, ignoring alpha in the\n        comparison.\n\n    RGB->RGB:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source per-surface alpha)\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB.\n      both:\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        source color key.\n    \\endverbatim\n *\n *  You should call SDL_BlitSurface() unless you know exactly how SDL\n *  blitting works internally and how to use the other blit functions.\n */\n#define SDL_BlitSurface SDL_UpperBlit\n\n/**\n *  This is the public blit function, SDL_BlitSurface(), and it performs\n *  rectangle validation and clipping before passing it to SDL_LowerBlit()\n */\nextern DECLSPEC int SDLCALL SDL_UpperBlit\n    (SDL_Surface * src, const SDL_Rect * srcrect,\n     SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  This is a semi-private blit function and it performs low-level surface\n *  blitting only.\n */\nextern DECLSPEC int SDLCALL SDL_LowerBlit\n    (SDL_Surface * src, SDL_Rect * srcrect,\n     SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  \\brief Perform a fast, low quality, stretch blit between two surfaces of the\n *         same pixel format.\n *\n *  \\note This function uses a static buffer, and is not thread-safe.\n */\nextern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,\n                                            const SDL_Rect * srcrect,\n                                            SDL_Surface * dst,\n                                            const SDL_Rect * dstrect);\n\n#define SDL_BlitScaled SDL_UpperBlitScaled\n\n/**\n *  This is the public scaled blit function, SDL_BlitScaled(), and it performs\n *  rectangle validation and clipping before passing it to SDL_LowerBlitScaled()\n */\nextern DECLSPEC int SDLCALL SDL_UpperBlitScaled\n    (SDL_Surface * src, const SDL_Rect * srcrect,\n    SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  This is a semi-private blit function and it performs low-level surface\n *  scaled blitting only.\n */\nextern DECLSPEC int SDLCALL SDL_LowerBlitScaled\n    (SDL_Surface * src, SDL_Rect * srcrect,\n    SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  \\brief Set the YUV conversion mode\n */\nextern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);\n\n/**\n *  \\brief Get the YUV conversion mode\n */\nextern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);\n\n/**\n *  \\brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC\n */\nextern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_surface_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_system.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_system.h\n *\n *  Include file for platform specific SDL API functions\n */\n\n#ifndef SDL_system_h_\n#define SDL_system_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_keyboard.h\"\n#include \"SDL_render.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* Platform specific functions for Windows */\n#ifdef __WIN32__\n\t\n/**\n   \\brief Set a function that is called for every windows message, before TranslateMessage()\n*/\ntypedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);\nextern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);\n\n/**\n   \\brief Returns the D3D9 adapter index that matches the specified display index.\n\n   This adapter index can be passed to IDirect3D9::CreateDevice and controls\n   on which monitor a full screen application will appear.\n*/\nextern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );\n\ntypedef struct IDirect3DDevice9 IDirect3DDevice9;\n/**\n   \\brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.\n\n   Once you are done using the device, you should release it to avoid a resource leak.\n */\nextern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);\n\n/**\n   \\brief Returns the DXGI Adapter and Output indices for the specified display index.\n\n   These can be passed to EnumAdapters and EnumOutputs respectively to get the objects\n   required to create a DX10 or DX11 device and swap chain.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );\n\n#endif /* __WIN32__ */\n\n\n/* Platform specific functions for Linux */\n#ifdef __LINUX__\n\n/**\n   \\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.\n\n   \\return 0 on success, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);\n \n#endif /* __LINUX__ */\n\t\n/* Platform specific functions for iOS */\n#if defined(__IPHONEOS__) && __IPHONEOS__\n\n#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)\nextern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);\n\n#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)\nextern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);\n\n#endif /* __IPHONEOS__ */\n\n\n/* Platform specific functions for Android */\n#if defined(__ANDROID__) && __ANDROID__\n\n/**\n   \\brief Get the JNI environment for the current thread\n\n   This returns JNIEnv*, but the prototype is void* so we don't need jni.h\n */\nextern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);\n\n/**\n   \\brief Get the SDL Activity object for the application\n\n   This returns jobject, but the prototype is void* so we don't need jni.h\n   The jobject returned by SDL_AndroidGetActivity is a local reference.\n   It is the caller's responsibility to properly release it\n   (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)\n */\nextern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);\n\n/**\n   \\brief Return true if the application is running on Android TV\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);\n\n/**\n   \\brief Return true if the application is running on a Chromebook\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);\n\n/**\n  \\brief Return true is the application is running on a Samsung DeX docking station\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);\n\n/**\n \\brief Trigger the Android system back button behavior.\n */\nextern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);\n\n/**\n   See the official Android developer guide for more information:\n   http://developer.android.com/guide/topics/data/data-storage.html\n*/\n#define SDL_ANDROID_EXTERNAL_STORAGE_READ   0x01\n#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE  0x02\n\n/**\n   \\brief Get the path used for internal storage for this application.\n\n   This path is unique to your application and cannot be written to\n   by other applications.\n */\nextern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);\n\n/**\n   \\brief Get the current state of external storage, a bitmask of these values:\n    SDL_ANDROID_EXTERNAL_STORAGE_READ\n    SDL_ANDROID_EXTERNAL_STORAGE_WRITE\n\n   If external storage is currently unavailable, this will return 0.\n*/\nextern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);\n\n/**\n   \\brief Get the path used for external storage for this application.\n\n   This path is unique to your application, but is public and can be\n   written to by other applications.\n */\nextern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);\n\n#endif /* __ANDROID__ */\n\n/* Platform specific functions for WinRT */\n#if defined(__WINRT__) && __WINRT__\n\n/**\n *  \\brief WinRT / Windows Phone path types\n */\ntypedef enum\n{\n    /** \\brief The installed app's root directory.\n        Files here are likely to be read-only. */\n    SDL_WINRT_PATH_INSTALLED_LOCATION,\n\n    /** \\brief The app's local data store.  Files may be written here */\n    SDL_WINRT_PATH_LOCAL_FOLDER,\n\n    /** \\brief The app's roaming data store.  Unsupported on Windows Phone.\n        Files written here may be copied to other machines via a network\n        connection.\n    */\n    SDL_WINRT_PATH_ROAMING_FOLDER,\n\n    /** \\brief The app's temporary data store.  Unsupported on Windows Phone.\n        Files written here may be deleted at any time. */\n    SDL_WINRT_PATH_TEMP_FOLDER\n} SDL_WinRT_Path;\n\n\n/**\n *  \\brief WinRT Device Family\n */\ntypedef enum\n{\n    /** \\brief Unknown family  */\n    SDL_WINRT_DEVICEFAMILY_UNKNOWN,\n\n    /** \\brief Desktop family*/\n    SDL_WINRT_DEVICEFAMILY_DESKTOP,\n\n    /** \\brief Mobile family (for example smartphone) */\n    SDL_WINRT_DEVICEFAMILY_MOBILE,\n\n    /** \\brief XBox family */\n    SDL_WINRT_DEVICEFAMILY_XBOX,\n} SDL_WinRT_DeviceFamily;\n\n\n/**\n *  \\brief Retrieves a WinRT defined path on the local file system\n *\n *  \\note Documentation on most app-specific path types on WinRT\n *      can be found on MSDN, at the URL:\n *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx\n *\n *  \\param pathType The type of path to retrieve.\n *  \\return A UCS-2 string (16-bit, wide-char) containing the path, or NULL\n *      if the path is not available for any reason.  Not all paths are\n *      available on all versions of Windows.  This is especially true on\n *      Windows Phone.  Check the documentation for the given\n *      SDL_WinRT_Path for more information on which path types are\n *      supported where.\n */\nextern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);\n\n/**\n *  \\brief Retrieves a WinRT defined path on the local file system\n *\n *  \\note Documentation on most app-specific path types on WinRT\n *      can be found on MSDN, at the URL:\n *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx\n *\n *  \\param pathType The type of path to retrieve.\n *  \\return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL\n *      if the path is not available for any reason.  Not all paths are\n *      available on all versions of Windows.  This is especially true on\n *      Windows Phone.  Check the documentation for the given\n *      SDL_WinRT_Path for more information on which path types are\n *      supported where.\n */\nextern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);\n\n/**\n *  \\brief Detects the device family of WinRT plattform on runtime\n *\n *  \\return Device family\n */\nextern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();\n\n#endif /* __WINRT__ */\n\n/**\n \\brief Return true if the current device is a tablet.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_system_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_syswm.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_syswm.h\n *\n *  Include file for SDL custom system window manager hooks.\n */\n\n#ifndef SDL_syswm_h_\n#define SDL_syswm_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n#include \"SDL_version.h\"\n\n/**\n *  \\brief SDL_syswm.h\n *\n *  Your application has access to a special type of event ::SDL_SYSWMEVENT,\n *  which contains window-manager specific information and arrives whenever\n *  an unhandled window event occurs.  This event is ignored by default, but\n *  you can enable it with SDL_EventState().\n */\nstruct SDL_SysWMinfo;\n\n#if !defined(SDL_PROTOTYPES_ONLY)\n\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#include <windows.h>\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_WINRT)\n#include <Inspectable.h>\n#endif\n\n/* This is the structure for custom window manager events */\n#if defined(SDL_VIDEO_DRIVER_X11)\n#if defined(__APPLE__) && defined(__MACH__)\n/* conflicts with Quickdraw.h */\n#define Cursor X11Cursor\n#endif\n\n#include <X11/Xlib.h>\n#include <X11/Xatom.h>\n\n#if defined(__APPLE__) && defined(__MACH__)\n/* matches the re-define above */\n#undef Cursor\n#endif\n\n#endif /* defined(SDL_VIDEO_DRIVER_X11) */\n\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n#include <directfb.h>\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n#ifdef __OBJC__\n@class NSWindow;\n#else\ntypedef struct _NSWindow NSWindow;\n#endif\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n#ifdef __OBJC__\n#include <UIKit/UIKit.h>\n#else\ntypedef struct _UIWindow UIWindow;\ntypedef struct _UIViewController UIViewController;\n#endif\ntypedef Uint32 GLuint;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_ANDROID)\ntypedef struct ANativeWindow ANativeWindow;\ntypedef void *EGLSurface;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n#include \"SDL_egl.h\"\n#endif\n#endif /* SDL_PROTOTYPES_ONLY */\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if !defined(SDL_PROTOTYPES_ONLY)\n/**\n *  These are the various supported windowing subsystems\n */\ntypedef enum\n{\n    SDL_SYSWM_UNKNOWN,\n    SDL_SYSWM_WINDOWS,\n    SDL_SYSWM_X11,\n    SDL_SYSWM_DIRECTFB,\n    SDL_SYSWM_COCOA,\n    SDL_SYSWM_UIKIT,\n    SDL_SYSWM_WAYLAND,\n    SDL_SYSWM_MIR,  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */\n    SDL_SYSWM_WINRT,\n    SDL_SYSWM_ANDROID,\n    SDL_SYSWM_VIVANTE,\n    SDL_SYSWM_OS2\n} SDL_SYSWM_TYPE;\n\n/**\n *  The custom event structure.\n */\nstruct SDL_SysWMmsg\n{\n    SDL_version version;\n    SDL_SYSWM_TYPE subsystem;\n    union\n    {\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n        struct {\n            HWND hwnd;                  /**< The window for the message */\n            UINT msg;                   /**< The type of message */\n            WPARAM wParam;              /**< WORD message parameter */\n            LPARAM lParam;              /**< LONG message parameter */\n        } win;\n#endif\n#if defined(SDL_VIDEO_DRIVER_X11)\n        struct {\n            XEvent event;\n        } x11;\n#endif\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n        struct {\n            DFBEvent event;\n        } dfb;\n#endif\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n        struct\n        {\n            /* Latest version of Xcode clang complains about empty structs in C v. C++:\n                 error: empty struct has size 0 in C, size 1 in C++\n             */\n            int dummy;\n            /* No Cocoa window events yet */\n        } cocoa;\n#endif\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n        struct\n        {\n            int dummy;\n            /* No UIKit window events yet */\n        } uikit;\n#endif\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n        struct\n        {\n            int dummy;\n            /* No Vivante window events yet */\n        } vivante;\n#endif\n        /* Can't have an empty union */\n        int dummy;\n    } msg;\n};\n\n/**\n *  The custom window manager information structure.\n *\n *  When this structure is returned, it holds information about which\n *  low level system it is using, and will be one of SDL_SYSWM_TYPE.\n */\nstruct SDL_SysWMinfo\n{\n    SDL_version version;\n    SDL_SYSWM_TYPE subsystem;\n    union\n    {\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n        struct\n        {\n            HWND window;                /**< The window handle */\n            HDC hdc;                    /**< The window device context */\n            HINSTANCE hinstance;        /**< The instance handle */\n        } win;\n#endif\n#if defined(SDL_VIDEO_DRIVER_WINRT)\n        struct\n        {\n            IInspectable * window;      /**< The WinRT CoreWindow */\n        } winrt;\n#endif\n#if defined(SDL_VIDEO_DRIVER_X11)\n        struct\n        {\n            Display *display;           /**< The X11 display */\n            Window window;              /**< The X11 window */\n        } x11;\n#endif\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n        struct\n        {\n            IDirectFB *dfb;             /**< The directfb main interface */\n            IDirectFBWindow *window;    /**< The directfb window handle */\n            IDirectFBSurface *surface;  /**< The directfb client surface */\n        } dfb;\n#endif\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n        struct\n        {\n#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)\n            NSWindow __unsafe_unretained *window; /**< The Cocoa window */\n#else\n            NSWindow *window;                     /**< The Cocoa window */\n#endif\n        } cocoa;\n#endif\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n        struct\n        {\n#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)\n            UIWindow __unsafe_unretained *window; /**< The UIKit window */\n#else\n            UIWindow *window;                     /**< The UIKit window */\n#endif\n            GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */\n            GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */\n            GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */\n        } uikit;\n#endif\n#if defined(SDL_VIDEO_DRIVER_WAYLAND)\n        struct\n        {\n            struct wl_display *display;            /**< Wayland display */\n            struct wl_surface *surface;            /**< Wayland surface */\n            struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */\n        } wl;\n#endif\n#if defined(SDL_VIDEO_DRIVER_MIR)  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */\n        struct\n        {\n            void *connection;  /**< Mir display server connection */\n            void *surface;  /**< Mir surface */\n        } mir;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_ANDROID)\n        struct\n        {\n            ANativeWindow *window;\n            EGLSurface surface;\n        } android;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n        struct\n        {\n            EGLNativeDisplayType display;\n            EGLNativeWindowType window;\n        } vivante;\n#endif\n\n        /* Make sure this union is always 64 bytes (8 64-bit pointers). */\n        /* Be careful not to overflow this if you add a new target! */\n        Uint8 dummy[64];\n    } info;\n};\n\n#endif /* SDL_PROTOTYPES_ONLY */\n\ntypedef struct SDL_SysWMinfo SDL_SysWMinfo;\n\n/* Function prototypes */\n/**\n *  \\brief This function allows access to driver-dependent window information.\n *\n *  \\param window The window about which information is being requested\n *  \\param info This structure must be initialized with the SDL version, and is\n *              then filled in with information about the given window.\n *\n *  \\return SDL_TRUE if the function is implemented and the version member of\n *          the \\c info struct is valid, SDL_FALSE otherwise.\n *\n *  You typically use this function like this:\n *  \\code\n *  SDL_SysWMinfo info;\n *  SDL_VERSION(&info.version);\n *  if ( SDL_GetWindowWMInfo(window, &info) ) { ... }\n *  \\endcode\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,\n                                                     SDL_SysWMinfo * info);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_syswm_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_h_\n#define SDL_test_h_\n\n#include \"SDL.h\"\n#include \"SDL_test_assert.h\"\n#include \"SDL_test_common.h\"\n#include \"SDL_test_compare.h\"\n#include \"SDL_test_crc32.h\"\n#include \"SDL_test_font.h\"\n#include \"SDL_test_fuzzer.h\"\n#include \"SDL_test_harness.h\"\n#include \"SDL_test_images.h\"\n#include \"SDL_test_log.h\"\n#include \"SDL_test_md5.h\"\n#include \"SDL_test_memory.h\"\n#include \"SDL_test_random.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Global definitions */\n\n/*\n * Note: Maximum size of SDLTest log message is less than SDL's limit\n * to ensure we can fit additional information such as the timestamp.\n */\n#define SDLTEST_MAX_LOGMESSAGE_LENGTH   3584\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_assert.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_assert.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n *\n * Assert API for test code and test cases\n *\n */\n\n#ifndef SDL_test_assert_h_\n#define SDL_test_assert_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Fails the assert.\n */\n#define ASSERT_FAIL     0\n\n/**\n * \\brief Passes the assert.\n */\n#define ASSERT_PASS     1\n\n/**\n * \\brief Assert that logs and break execution flow on failures.\n *\n * \\param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).\n * \\param assertDescription Message to log with the assert describing it.\n */\nvoid SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n * \\brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.\n *\n * \\param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).\n * \\param assertDescription Message to log with the assert describing it.\n *\n * \\returns Returns the assertCondition so it can be used to externally to break execution flow if desired.\n */\nint SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n * \\brief Explicitly pass without checking an assertion condition. Updates assertion counter.\n *\n * \\param assertDescription Message to log with the assert describing it.\n */\nvoid SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n * \\brief Resets the assert summary counters to zero.\n */\nvoid SDLTest_ResetAssertSummary(void);\n\n/**\n * \\brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.\n */\nvoid SDLTest_LogAssertSummary(void);\n\n\n/**\n * \\brief Converts the current assert summary state to a test result.\n *\n * \\returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT\n */\nint SDLTest_AssertSummaryToTestResult(void);\n\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_assert_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_common.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_common.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/* Ported from original test\\common.h file. */\n\n#ifndef SDL_test_common_h_\n#define SDL_test_common_h_\n\n#include \"SDL.h\"\n\n#if defined(__PSP__)\n#define DEFAULT_WINDOW_WIDTH  480\n#define DEFAULT_WINDOW_HEIGHT 272\n#else\n#define DEFAULT_WINDOW_WIDTH  640\n#define DEFAULT_WINDOW_HEIGHT 480\n#endif\n\n#define VERBOSE_VIDEO   0x00000001\n#define VERBOSE_MODES   0x00000002\n#define VERBOSE_RENDER  0x00000004\n#define VERBOSE_EVENT   0x00000008\n#define VERBOSE_AUDIO   0x00000010\n\ntypedef struct\n{\n    /* SDL init flags */\n    char **argv;\n    Uint32 flags;\n    Uint32 verbose;\n\n    /* Video info */\n    const char *videodriver;\n    int display;\n    const char *window_title;\n    const char *window_icon;\n    Uint32 window_flags;\n    int window_x;\n    int window_y;\n    int window_w;\n    int window_h;\n    int window_minW;\n    int window_minH;\n    int window_maxW;\n    int window_maxH;\n    int logical_w;\n    int logical_h;\n    float scale;\n    int depth;\n    int refresh_rate;\n    int num_windows;\n    SDL_Window **windows;\n\n    /* Renderer info */\n    const char *renderdriver;\n    Uint32 render_flags;\n    SDL_bool skip_renderer;\n    SDL_Renderer **renderers;\n    SDL_Texture **targets;\n\n    /* Audio info */\n    const char *audiodriver;\n    SDL_AudioSpec audiospec;\n\n    /* GL settings */\n    int gl_red_size;\n    int gl_green_size;\n    int gl_blue_size;\n    int gl_alpha_size;\n    int gl_buffer_size;\n    int gl_depth_size;\n    int gl_stencil_size;\n    int gl_double_buffer;\n    int gl_accum_red_size;\n    int gl_accum_green_size;\n    int gl_accum_blue_size;\n    int gl_accum_alpha_size;\n    int gl_stereo;\n    int gl_multisamplebuffers;\n    int gl_multisamplesamples;\n    int gl_retained_backing;\n    int gl_accelerated;\n    int gl_major_version;\n    int gl_minor_version;\n    int gl_debug;\n    int gl_profile_mask;\n} SDLTest_CommonState;\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n/**\n * \\brief Parse command line parameters and create common state.\n *\n * \\param argv Array of command line parameters\n * \\param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)\n *\n * \\returns Returns a newly allocated common state object.\n */\nSDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);\n\n/**\n * \\brief Process one common argument.\n *\n * \\param state The common state describing the test window to create.\n * \\param index The index of the argument to process in argv[].\n *\n * \\returns The number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.\n */\nint SDLTest_CommonArg(SDLTest_CommonState * state, int index);\n\n\n/**\n * \\brief Logs command line usage info.\n *\n * This logs the appropriate command line options for the subsystems in use\n *  plus other common options, and then any application-specific options.\n *  This uses the SDL_Log() function and splits up output to be friendly to\n *  80-character-wide terminals.\n *\n * \\param state The common state describing the test window for the app.\n * \\param argv0 argv[0], as passed to main/SDL_main.\n * \\param options an array of strings for application specific options. The last element of the array should be NULL.\n */\nvoid SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);\n\n/**\n * \\brief Open test window.\n *\n * \\param state The common state describing the test window to create.\n *\n * \\returns True if initialization succeeded, false otherwise\n */\nSDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);\n\n/**\n * \\brief Easy argument handling when test app doesn't need any custom args.\n *\n * \\param state The common state describing the test window to create.\n * \\param argc argc, as supplied to SDL_main\n * \\param argv argv, as supplied to SDL_main\n *\n * \\returns False if app should quit, true otherwise.\n */\nSDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);\n\n/**\n * \\brief Common event handler for test windows.\n *\n * \\param state The common state used to create test window.\n * \\param event The event to handle.\n * \\param done Flag indicating we are done.\n *\n */\nvoid SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done);\n\n/**\n * \\brief Close test window.\n *\n * \\param state The common state used to create test window.\n *\n */\nvoid SDLTest_CommonQuit(SDLTest_CommonState * state);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_common_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_compare.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_compare.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Defines comparison functions (i.e. for surfaces).\n\n*/\n\n#ifndef SDL_test_compare_h_\n#define SDL_test_compare_h_\n\n#include \"SDL.h\"\n\n#include \"SDL_test_images.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Compares a surface and with reference image data for equality\n *\n * \\param surface Surface used in comparison\n * \\param referenceSurface Test Surface used in comparison\n * \\param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.\n *\n * \\returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.\n */\nint SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_compare_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_crc32.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_crc32.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Implements CRC32 calculations (default output is Perl String::CRC32 compatible).\n\n*/\n\n#ifndef SDL_test_crc32_h_\n#define SDL_test_crc32_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* ------------ Definitions --------- */\n\n/* Definition shared by all CRC routines */\n\n#ifndef CrcUint32\n #define CrcUint32  unsigned int\n#endif\n#ifndef CrcUint8\n #define CrcUint8   unsigned char\n#endif\n\n#ifdef ORIGINAL_METHOD\n #define CRC32_POLY 0x04c11db7   /* AUTODIN II, Ethernet, & FDDI */\n#else\n #define CRC32_POLY 0xEDB88320   /* Perl String::CRC32 compatible */\n#endif\n\n/**\n * Data structure for CRC32 (checksum) computation\n */\n  typedef struct {\n    CrcUint32    crc32_table[256]; /* CRC table */\n  } SDLTest_Crc32Context;\n\n/* ---------- Function Prototypes ------------- */\n\n/**\n * \\brief Initialize the CRC context\n *\n * Note: The function initializes the crc table required for all crc calculations.\n *\n * \\param crcContext        pointer to context variable\n *\n * \\returns 0 for OK, -1 on error\n *\n */\n int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);\n\n\n/**\n * \\brief calculate a crc32 from a data block\n *\n * \\param crcContext         pointer to context variable\n * \\param inBuf              input buffer to checksum\n * \\param inLen              length of input buffer\n * \\param crc32              pointer to Uint32 to store the final CRC into\n *\n * \\returns 0 for OK, -1 on error\n *\n */\nint SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);\n\n/* Same routine broken down into three steps */\nint SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);\nint SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);\nint SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);\n\n\n/**\n * \\brief clean up CRC context\n *\n * \\param crcContext        pointer to context variable\n *\n * \\returns 0 for OK, -1 on error\n *\n*/\n\nint SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_crc32_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_font.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_font.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_font_h_\n#define SDL_test_font_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n#define FONT_CHARACTER_SIZE  8\n\n/**\n *  \\brief Draw a string in the currently set font.\n *\n *  \\param renderer The renderer to draw on.\n *  \\param x The X coordinate of the upper left corner of the character.\n *  \\param y The Y coordinate of the upper left corner of the character.\n *  \\param c The character to draw.\n *\n *  \\returns Returns 0 on success, -1 on failure.\n */\nint SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c);\n\n/**\n *  \\brief Draw a string in the currently set font.\n *\n *  \\param renderer The renderer to draw on.\n *  \\param x The X coordinate of the upper left corner of the string.\n *  \\param y The Y coordinate of the upper left corner of the string.\n *  \\param s The string to draw.\n *\n *  \\returns Returns 0 on success, -1 on failure.\n */\nint SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s);\n\n\n/**\n *  \\brief Cleanup textures used by font drawing functions.\n */\nvoid SDLTest_CleanupTextDrawing(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_font_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_fuzzer.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_fuzzer.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n  Data generators for fuzzing test data in a reproducible way.\n\n*/\n\n#ifndef SDL_test_fuzzer_h_\n#define SDL_test_fuzzer_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*\n  Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>\n*/\n\n\n/**\n * \\file\n * Note: The fuzzer implementation uses a static instance of random context\n * internally which makes it thread-UNsafe.\n */\n\n/**\n * Initializes the fuzzer for a test\n *\n * \\param execKey Execution \"Key\" that initializes the random number generator uniquely for the test.\n *\n */\nvoid SDLTest_FuzzerInit(Uint64 execKey);\n\n\n/**\n * Returns a random Uint8\n *\n * \\returns Generated integer\n */\nUint8 SDLTest_RandomUint8(void);\n\n/**\n * Returns a random Sint8\n *\n * \\returns Generated signed integer\n */\nSint8 SDLTest_RandomSint8(void);\n\n\n/**\n * Returns a random Uint16\n *\n * \\returns Generated integer\n */\nUint16 SDLTest_RandomUint16(void);\n\n/**\n * Returns a random Sint16\n *\n * \\returns Generated signed integer\n */\nSint16 SDLTest_RandomSint16(void);\n\n\n/**\n * Returns a random integer\n *\n * \\returns Generated integer\n */\nSint32 SDLTest_RandomSint32(void);\n\n\n/**\n * Returns a random positive integer\n *\n * \\returns Generated integer\n */\nUint32 SDLTest_RandomUint32(void);\n\n/**\n * Returns random Uint64.\n *\n * \\returns Generated integer\n */\nUint64 SDLTest_RandomUint64(void);\n\n\n/**\n * Returns random Sint64.\n *\n * \\returns Generated signed integer\n */\nSint64 SDLTest_RandomSint64(void);\n\n/**\n * \\returns random float in range [0.0 - 1.0[\n */\nfloat SDLTest_RandomUnitFloat(void);\n\n/**\n * \\returns random double in range [0.0 - 1.0[\n */\ndouble SDLTest_RandomUnitDouble(void);\n\n/**\n * \\returns random float.\n *\n */\nfloat SDLTest_RandomFloat(void);\n\n/**\n * \\returns random double.\n *\n */\ndouble SDLTest_RandomDouble(void);\n\n/**\n * Returns a random boundary value for Uint8 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint16 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint32 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint64 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint8 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100\n * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT8_MIN with error set\n */\nSint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain);\n\n\n/**\n * Returns a random boundary value for Sint16 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100\n * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT16_MIN with error set\n */\nSint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint32 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100\n * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT32_MIN with error set\n */\nSint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint64 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100\n * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT64_MIN with error set\n */\nSint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain);\n\n\n/**\n * Returns integer in range [min, max] (inclusive).\n * Min and max values can be negative values.\n * If Max in smaller than min, then the values are swapped.\n * Min and max are the same value, that value will be returned.\n *\n * \\param min Minimum inclusive value of returned random number\n * \\param max Maximum inclusive value of returned random number\n *\n * \\returns Generated random integer in range\n */\nSint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);\n\n\n/**\n * Generates random null-terminated string. The minimum length for\n * the string is 1 character, maximum length for the string is 255\n * characters and it can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\returns Newly allocated random string; or NULL if length was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiString(void);\n\n\n/**\n * Generates random null-terminated string. The maximum length for\n * the string is defined by the maxLength parameter.\n * String can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\param maxLength The maximum length of the generated string.\n *\n * \\returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);\n\n\n/**\n * Generates random null-terminated string. The length for\n * the string is defined by the size parameter.\n * String can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\param size The length of the generated string\n *\n * \\returns Newly allocated random string; or NULL if size was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiStringOfSize(int size);\n\n/**\n * Returns the invocation count for the fuzzer since last ...FuzzerInit.\n */\nint SDLTest_GetFuzzerInvocationCount(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_fuzzer_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_harness.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_harness.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n  Defines types for test case definitions and the test execution harness API.\n\n  Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>\n*/\n\n#ifndef SDL_test_h_arness_h\n#define SDL_test_h_arness_h\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* ! Definitions for test case structures */\n#define TEST_ENABLED  1\n#define TEST_DISABLED 0\n\n/* ! Definition of all the possible test return values of the test case method */\n#define TEST_ABORTED        -1\n#define TEST_STARTED         0\n#define TEST_COMPLETED       1\n#define TEST_SKIPPED         2\n\n/* ! Definition of all the possible test results for the harness */\n#define TEST_RESULT_PASSED              0\n#define TEST_RESULT_FAILED              1\n#define TEST_RESULT_NO_ASSERT           2\n#define TEST_RESULT_SKIPPED             3\n#define TEST_RESULT_SETUP_FAILURE       4\n\n/* !< Function pointer to a test case setup function (run before every test) */\ntypedef void (*SDLTest_TestCaseSetUpFp)(void *arg);\n\n/* !< Function pointer to a test case function */\ntypedef int (*SDLTest_TestCaseFp)(void *arg);\n\n/* !< Function pointer to a test case teardown function (run after every test) */\ntypedef void  (*SDLTest_TestCaseTearDownFp)(void *arg);\n\n/**\n * Holds information about a single test case.\n */\ntypedef struct SDLTest_TestCaseReference {\n    /* !< Func2Stress */\n    SDLTest_TestCaseFp testCase;\n    /* !< Short name (or function name) \"Func2Stress\" */\n    char *name;\n    /* !< Long name or full description \"This test pushes func2() to the limit.\" */\n    char *description;\n    /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */\n    int enabled;\n} SDLTest_TestCaseReference;\n\n/**\n * Holds information about a test suite (multiple test cases).\n */\ntypedef struct SDLTest_TestSuiteReference {\n    /* !< \"PlatformSuite\" */\n    char *name;\n    /* !< The function that is run before each test. NULL skips. */\n    SDLTest_TestCaseSetUpFp testSetUp;\n    /* !< The test cases that are run as part of the suite. Last item should be NULL. */\n    const SDLTest_TestCaseReference **testCases;\n    /* !< The function that is run after each test. NULL skips. */\n    SDLTest_TestCaseTearDownFp testTearDown;\n} SDLTest_TestSuiteReference;\n\n\n/**\n * \\brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z).\n *\n * Note: The returned string needs to be deallocated by the caller.\n *\n * \\param length The length of the seed string to generate\n *\n * \\returns The generated seed string\n */\nchar *SDLTest_GenerateRunSeed(const int length);\n\n/**\n * \\brief Execute a test suite using the given run seed and execution key.\n *\n * \\param testSuites Suites containing the test case.\n * \\param userRunSeed Custom run seed provided by user, or NULL to autogenerate one.\n * \\param userExecKey Custom execution key provided by user, or 0 to autogenerate one.\n * \\param filter Filter specification. NULL disables. Case sensitive.\n * \\param testIterations Number of iterations to run each test case.\n *\n * \\returns Test run result; 0 when all tests passed, 1 if any tests failed.\n */\nint SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_h_arness_h */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_images.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_images.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Defines some images for tests.\n\n*/\n\n#ifndef SDL_test_images_h_\n#define SDL_test_images_h_\n\n#include \"SDL.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *Type for test images.\n */\ntypedef struct SDLTest_SurfaceImage_s {\n  int width;\n  int height;\n  unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */\n  const char *pixel_data;\n} SDLTest_SurfaceImage_t;\n\n/* Test images */\nSDL_Surface *SDLTest_ImageBlit(void);\nSDL_Surface *SDLTest_ImageBlitColor(void);\nSDL_Surface *SDLTest_ImageBlitAlpha(void);\nSDL_Surface *SDLTest_ImageBlitBlendAdd(void);\nSDL_Surface *SDLTest_ImageBlitBlend(void);\nSDL_Surface *SDLTest_ImageBlitBlendMod(void);\nSDL_Surface *SDLTest_ImageBlitBlendNone(void);\nSDL_Surface *SDLTest_ImageBlitBlendAll(void);\nSDL_Surface *SDLTest_ImageFace(void);\nSDL_Surface *SDLTest_ImagePrimitives(void);\nSDL_Surface *SDLTest_ImagePrimitivesBlend(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_images_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_log.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_log.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n *\n *  Wrapper to log in the TEST category\n *\n */\n\n#ifndef SDL_test_log_h_\n#define SDL_test_log_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Prints given message with a timestamp in the TEST category and INFO priority.\n *\n * \\param fmt Message to be logged\n */\nvoid SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n * \\brief Prints given message with a timestamp in the TEST category and the ERROR priority.\n *\n * \\param fmt Message to be logged\n */\nvoid SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_log_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_md5.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_md5.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n ***********************************************************************\n ** Header file for implementation of MD5                             **\n ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **\n ** Created: 2/17/90 RLR                                              **\n ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **\n ** Revised (for MD5): RLR 4/27/91                                    **\n **   -- G modified to have y&~z instead of y&z                       **\n **   -- FF, GG, HH modified to add in last register done             **\n **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **\n **   -- distinct additive constant for each step                     **\n **   -- round 4 added, working mod 7                                 **\n ***********************************************************************\n*/\n\n/*\n ***********************************************************************\n **  Message-digest routines:                                         **\n **  To form the message digest for a message M                       **\n **    (1) Initialize a context buffer mdContext using MD5Init        **\n **    (2) Call MD5Update on mdContext and M                          **\n **    (3) Call MD5Final on mdContext                                 **\n **  The message digest is now in mdContext->digest[0...15]           **\n ***********************************************************************\n*/\n\n#ifndef SDL_test_md5_h_\n#define SDL_test_md5_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* ------------ Definitions --------- */\n\n/* typedef a 32-bit type */\n  typedef unsigned long int MD5UINT4;\n\n/* Data structure for MD5 (Message-Digest) computation */\n  typedef struct {\n    MD5UINT4  i[2];     /* number of _bits_ handled mod 2^64 */\n    MD5UINT4  buf[4];       /* scratch buffer */\n    unsigned char in[64];   /* input buffer */\n    unsigned char digest[16];   /* actual digest after Md5Final call */\n  } SDLTest_Md5Context;\n\n/* ---------- Function Prototypes ------------- */\n\n/**\n * \\brief initialize the context\n *\n * \\param  mdContext        pointer to context variable\n *\n * Note: The function initializes the message-digest context\n *       mdContext. Call before each new use of the context -\n *       all fields are set to zero.\n */\n void SDLTest_Md5Init(SDLTest_Md5Context * mdContext);\n\n\n/**\n * \\brief update digest from variable length data\n *\n * \\param  mdContext       pointer to context variable\n * \\param  inBuf           pointer to data array/string\n * \\param  inLen           length of data array/string\n *\n * Note: The function updates the message-digest context to account\n *       for the presence of each of the characters inBuf[0..inLen-1]\n *       in the message whose digest is being computed.\n*/\n\n void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf,\n                 unsigned int inLen);\n\n\n/**\n * \\brief complete digest computation\n *\n * \\param mdContext     pointer to context variable\n *\n * Note: The function terminates the message-digest computation and\n *       ends with the desired message digest in mdContext.digest[0..15].\n *       Always call before using the digest[] variable.\n*/\n\n void SDLTest_Md5Final(SDLTest_Md5Context * mdContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_md5_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_memory.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_memory.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_memory_h_\n#define SDL_test_memory_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/**\n * \\brief Start tracking SDL memory allocations\n * \n * \\note This should be called before any other SDL functions for complete tracking coverage\n */\nint SDLTest_TrackAllocations(void);\n\n/**\n * \\brief Print a log of any outstanding allocations\n *\n * \\note This can be called after SDL_Quit()\n */\nvoid SDLTest_LogAllocations(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_memory_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_test_random.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_random.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n A \"32-bit Multiply with carry random number generator. Very fast.\n Includes a list of recommended multipliers.\n\n multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32.\n period: (a*2^31)-1\n\n*/\n\n#ifndef SDL_test_random_h_\n#define SDL_test_random_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* --- Definitions */\n\n/*\n * Macros that return a random number in a specific format.\n */\n#define SDLTest_RandomInt(c)        ((int)SDLTest_Random(c))\n\n/*\n * Context structure for the random number generator state.\n */\n  typedef struct {\n    unsigned int a;\n    unsigned int x;\n    unsigned int c;\n    unsigned int ah;\n    unsigned int al;\n  } SDLTest_RandomContext;\n\n\n/* --- Function prototypes */\n\n/**\n *  \\brief Initialize random number generator with two integers.\n *\n *  Note: The random sequence of numbers returned by ...Random() is the\n *  same for the same two integers and has a period of 2^31.\n *\n *  \\param rndContext     pointer to context structure\n *  \\param xi         integer that defines the random sequence\n *  \\param ci         integer that defines the random sequence\n *\n */\n void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi,\n                  unsigned int ci);\n\n/**\n *  \\brief Initialize random number generator based on current system time.\n *\n *  \\param rndContext     pointer to context structure\n *\n */\n void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext);\n\n\n/**\n *  \\brief Initialize random number generator based on current system time.\n *\n *  Note: ...RandomInit() or ...RandomInitTime() must have been called\n *  before using this function.\n *\n *  \\param rndContext     pointer to context structure\n *\n *  \\returns A random number (32bit unsigned integer)\n *\n */\n unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_random_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_thread.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_thread_h_\n#define SDL_thread_h_\n\n/**\n *  \\file SDL_thread.h\n *\n *  Header for the SDL thread management routines.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n/* Thread synchronization primitives */\n#include \"SDL_atomic.h\"\n#include \"SDL_mutex.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* The SDL thread structure, defined in SDL_thread.c */\nstruct SDL_Thread;\ntypedef struct SDL_Thread SDL_Thread;\n\n/* The SDL thread ID */\ntypedef unsigned long SDL_threadID;\n\n/* Thread local storage ID, 0 is the invalid ID */\ntypedef unsigned int SDL_TLSID;\n\n/**\n *  The SDL thread priority.\n *\n *  \\note On many systems you require special privileges to set high or time critical priority.\n */\ntypedef enum {\n    SDL_THREAD_PRIORITY_LOW,\n    SDL_THREAD_PRIORITY_NORMAL,\n    SDL_THREAD_PRIORITY_HIGH,\n    SDL_THREAD_PRIORITY_TIME_CRITICAL\n} SDL_ThreadPriority;\n\n/**\n *  The function passed to SDL_CreateThread().\n *  It is passed a void* user context parameter and returns an int.\n */\ntypedef int (SDLCALL * SDL_ThreadFunction) (void *data);\n\n#if defined(__WIN32__) && !defined(HAVE_LIBC)\n/**\n *  \\file SDL_thread.h\n *\n *  We compile SDL into a DLL. This means, that it's the DLL which\n *  creates a new thread for the calling process with the SDL_CreateThread()\n *  API. There is a problem with this, that only the RTL of the SDL2.DLL will\n *  be initialized for those threads, and not the RTL of the calling\n *  application!\n *\n *  To solve this, we make a little hack here.\n *\n *  We'll always use the caller's _beginthread() and _endthread() APIs to\n *  start a new thread. This way, if it's the SDL2.DLL which uses this API,\n *  then the RTL of SDL2.DLL will be used to create the new thread, and if it's\n *  the application, then the RTL of the application will be used.\n *\n *  So, in short:\n *  Always use the _beginthread() and _endthread() of the calling runtime\n *  library!\n */\n#define SDL_PASSED_BEGINTHREAD_ENDTHREAD\n#include <process.h> /* _beginthreadex() and _endthreadex() */\n\ntypedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)\n                   (void *, unsigned, unsigned (__stdcall *func)(void *),\n                    void * /*arg*/, unsigned, unsigned * /* threadID */);\ntypedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);\n\n/**\n *  Create a thread.\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),\n                 const char *name, const size_t stacksize, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n\n\n/**\n *  Create a thread.\n */\n#if defined(SDL_CreateThread) && SDL_DYNAMIC_API\n#undef SDL_CreateThread\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#undef SDL_CreateThreadWithStackSize\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#else\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#endif\n\n#elif defined(__OS2__)\n/*\n * just like the windows case above:  We compile SDL2\n * into a dll with Watcom's runtime statically linked.\n */\n#define SDL_PASSED_BEGINTHREAD_ENDTHREAD\n#ifndef __EMX__\n#include <process.h>\n#else\n#include <stdlib.h>\n#endif\ntypedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);\ntypedef void (*pfnSDL_CurrentEndThread)(void);\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n#if defined(SDL_CreateThread) && SDL_DYNAMIC_API\n#undef SDL_CreateThread\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#undef SDL_CreateThreadWithStackSize\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#else\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#endif\n\n#else\n\n/**\n *  Create a thread with a default stack size.\n *\n *  This is equivalent to calling:\n *  SDL_CreateThreadWithStackSize(fn, name, 0, data);\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);\n\n/**\n *  Create a thread.\n *\n *   Thread naming is a little complicated: Most systems have very small\n *    limits for the string length (Haiku has 32 bytes, Linux currently has 16,\n *    Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll\n *    have to see what happens with your system's debugger. The name should be\n *    UTF-8 (but using the naming limits of C identifiers is a better bet).\n *   There are no requirements for thread naming conventions, so long as the\n *    string is null-terminated UTF-8, but these guidelines are helpful in\n *    choosing a name:\n *\n *    http://stackoverflow.com/questions/149932/naming-conventions-for-threads\n *\n *   If a system imposes requirements, SDL will try to munge the string for\n *    it (truncate, etc), but the original string contents will be available\n *    from SDL_GetThreadName().\n *\n *   The size (in bytes) of the new stack can be specified. Zero means \"use\n *    the system default\" which might be wildly different between platforms\n *    (x86 Linux generally defaults to eight megabytes, an embedded device\n *    might be a few kilobytes instead).\n *\n *   In SDL 2.1, stacksize will be folded into the original SDL_CreateThread\n *    function.\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);\n\n#endif\n\n/**\n * Get the thread name, as it was specified in SDL_CreateThread().\n *  This function returns a pointer to a UTF-8 string that names the\n *  specified thread, or NULL if it doesn't have a name. This is internal\n *  memory, not to be free()'d by the caller, and remains valid until the\n *  specified thread is cleaned up by SDL_WaitThread().\n */\nextern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);\n\n/**\n *  Get the thread identifier for the current thread.\n */\nextern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);\n\n/**\n *  Get the thread identifier for the specified thread.\n *\n *  Equivalent to SDL_ThreadID() if the specified thread is NULL.\n */\nextern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);\n\n/**\n *  Set the priority for the current thread\n */\nextern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);\n\n/**\n *  Wait for a thread to finish. Threads that haven't been detached will\n *  remain (as a \"zombie\") until this function cleans them up. Not doing so\n *  is a resource leak.\n *\n *  Once a thread has been cleaned up through this function, the SDL_Thread\n *  that references it becomes invalid and should not be referenced again.\n *  As such, only one thread may call SDL_WaitThread() on another.\n *\n *  The return code for the thread function is placed in the area\n *  pointed to by \\c status, if \\c status is not NULL.\n *\n *  You may not wait on a thread that has been used in a call to\n *  SDL_DetachThread(). Use either that function or this one, but not\n *  both, or behavior is undefined.\n *\n *  It is safe to pass NULL to this function; it is a no-op.\n */\nextern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);\n\n/**\n *  A thread may be \"detached\" to signify that it should not remain until\n *  another thread has called SDL_WaitThread() on it. Detaching a thread\n *  is useful for long-running threads that nothing needs to synchronize\n *  with or further manage. When a detached thread is done, it simply\n *  goes away.\n *\n *  There is no way to recover the return code of a detached thread. If you\n *  need this, don't detach the thread and instead use SDL_WaitThread().\n *\n *  Once a thread is detached, you should usually assume the SDL_Thread isn't\n *  safe to reference again, as it will become invalid immediately upon\n *  the detached thread's exit, instead of remaining until someone has called\n *  SDL_WaitThread() to finally clean it up. As such, don't detach the same\n *  thread more than once.\n *\n *  If a thread has already exited when passed to SDL_DetachThread(), it will\n *  stop waiting for a call to SDL_WaitThread() and clean up immediately.\n *  It is not safe to detach a thread that might be used with SDL_WaitThread().\n *\n *  You may not call SDL_WaitThread() on a thread that has been detached.\n *  Use either that function or this one, but not both, or behavior is\n *  undefined.\n *\n *  It is safe to pass NULL to this function; it is a no-op.\n */\nextern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);\n\n/**\n *  \\brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.\n *\n *  \\return The newly created thread local storage identifier, or 0 on error\n *\n *  \\code\n *  static SDL_SpinLock tls_lock;\n *  static SDL_TLSID thread_local_storage;\n * \n *  void SetMyThreadData(void *value)\n *  {\n *      if (!thread_local_storage) {\n *          SDL_AtomicLock(&tls_lock);\n *          if (!thread_local_storage) {\n *              thread_local_storage = SDL_TLSCreate();\n *          }\n *          SDL_AtomicUnlock(&tls_lock);\n *      }\n *      SDL_TLSSet(thread_local_storage, value, 0);\n *  }\n *  \n *  void *GetMyThreadData(void)\n *  {\n *      return SDL_TLSGet(thread_local_storage);\n *  }\n *  \\endcode\n *\n *  \\sa SDL_TLSGet()\n *  \\sa SDL_TLSSet()\n */\nextern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);\n\n/**\n *  \\brief Get the value associated with a thread local storage ID for the current thread.\n *\n *  \\param id The thread local storage ID\n *\n *  \\return The value associated with the ID for the current thread, or NULL if no value has been set.\n *\n *  \\sa SDL_TLSCreate()\n *  \\sa SDL_TLSSet()\n */\nextern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);\n\n/**\n *  \\brief Set the value associated with a thread local storage ID for the current thread.\n *\n *  \\param id The thread local storage ID\n *  \\param value The value to associate with the ID for the current thread\n *  \\param destructor A function called when the thread exits, to free the value.\n *\n *  \\return 0 on success, -1 on error\n *\n *  \\sa SDL_TLSCreate()\n *  \\sa SDL_TLSGet()\n */\nextern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_thread_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_timer.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_timer_h_\n#define SDL_timer_h_\n\n/**\n *  \\file SDL_timer.h\n *\n *  Header for the SDL time management routines.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Get the number of milliseconds since the SDL library initialization.\n *\n * \\note This value wraps if the program runs for more than ~49 days.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);\n\n/**\n * \\brief Compare SDL ticks values, and return true if A has passed B\n *\n * e.g. if you want to wait 100 ms, you could do this:\n *  Uint32 timeout = SDL_GetTicks() + 100;\n *  while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {\n *      ... do work until timeout has elapsed\n *  }\n */\n#define SDL_TICKS_PASSED(A, B)  ((Sint32)((B) - (A)) <= 0)\n\n/**\n * \\brief Get the current value of the high resolution counter\n */\nextern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);\n\n/**\n * \\brief Get the count per second of the high resolution counter\n */\nextern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);\n\n/**\n * \\brief Wait a specified number of milliseconds before returning.\n */\nextern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);\n\n/**\n *  Function prototype for the timer callback function.\n *\n *  The callback function is passed the current timer interval and returns\n *  the next timer interval.  If the returned value is the same as the one\n *  passed in, the periodic alarm continues, otherwise a new alarm is\n *  scheduled.  If the callback returns 0, the periodic alarm is cancelled.\n */\ntypedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);\n\n/**\n * Definition of the timer ID type.\n */\ntypedef int SDL_TimerID;\n\n/**\n * \\brief Add a new timer to the pool of timers already running.\n *\n * \\return A timer ID, or 0 when an error occurs.\n */\nextern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,\n                                                 SDL_TimerCallback callback,\n                                                 void *param);\n\n/**\n * \\brief Remove a timer knowing its ID.\n *\n * \\return A boolean value indicating success or failure.\n *\n * \\warning It is not safe to remove a timer multiple times.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_timer_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_touch.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_touch.h\n *\n *  Include file for SDL touch event handling.\n */\n\n#ifndef SDL_touch_h_\n#define SDL_touch_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef Sint64 SDL_TouchID;\ntypedef Sint64 SDL_FingerID;\n\ntypedef enum\n{\n    SDL_TOUCH_DEVICE_INVALID = -1,\n    SDL_TOUCH_DEVICE_DIRECT,            /* touch screen with window-relative coordinates */\n    SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */\n    SDL_TOUCH_DEVICE_INDIRECT_RELATIVE  /* trackpad with screen cursor-relative coordinates */\n} SDL_TouchDeviceType;\n\ntypedef struct SDL_Finger\n{\n    SDL_FingerID id;\n    float x;\n    float y;\n    float pressure;\n} SDL_Finger;\n\n/* Used as the device ID for mouse events simulated with touch input */\n#define SDL_TOUCH_MOUSEID ((Uint32)-1)\n\n/* Used as the SDL_TouchID for touch events simulated with mouse input */\n#define SDL_MOUSE_TOUCHID ((Sint64)-1)\n\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of registered touch devices.\n */\nextern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);\n\n/**\n *  \\brief Get the touch ID with the given index, or 0 if the index is invalid.\n */\nextern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);\n\n/**\n * \\brief Get the type of the given touch device.\n */\nextern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);\n\n/**\n *  \\brief Get the number of active fingers for a given touch device.\n */\nextern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);\n\n/**\n *  \\brief Get the finger object of the given touch, with the given index.\n */\nextern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_touch_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_types.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_types.h\n *\n *  \\deprecated\n */\n\n/* DEPRECATED */\n#include \"SDL_stdinc.h\"\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_version.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_version.h\n *\n *  This header defines the current SDL version.\n */\n\n#ifndef SDL_version_h_\n#define SDL_version_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Information the version of SDL in use.\n *\n *  Represents the library's version as three levels: major revision\n *  (increments with massive changes, additions, and enhancements),\n *  minor revision (increments with backwards-compatible changes to the\n *  major revision), and patchlevel (increments with fixes to the minor\n *  revision).\n *\n *  \\sa SDL_VERSION\n *  \\sa SDL_GetVersion\n */\ntypedef struct SDL_version\n{\n    Uint8 major;        /**< major version */\n    Uint8 minor;        /**< minor version */\n    Uint8 patch;        /**< update version */\n} SDL_version;\n\n/* Printable format: \"%d.%d.%d\", MAJOR, MINOR, PATCHLEVEL\n*/\n#define SDL_MAJOR_VERSION   2\n#define SDL_MINOR_VERSION   0\n#define SDL_PATCHLEVEL      10\n\n/**\n *  \\brief Macro to determine SDL version program was compiled against.\n *\n *  This macro fills in a SDL_version structure with the version of the\n *  library you compiled against. This is determined by what header the\n *  compiler uses. Note that if you dynamically linked the library, you might\n *  have a slightly newer or older version at runtime. That version can be\n *  determined with SDL_GetVersion(), which, unlike SDL_VERSION(),\n *  is not a macro.\n *\n *  \\param x A pointer to a SDL_version struct to initialize.\n *\n *  \\sa SDL_version\n *  \\sa SDL_GetVersion\n */\n#define SDL_VERSION(x)                          \\\n{                                   \\\n    (x)->major = SDL_MAJOR_VERSION;                 \\\n    (x)->minor = SDL_MINOR_VERSION;                 \\\n    (x)->patch = SDL_PATCHLEVEL;                    \\\n}\n\n/**\n *  This macro turns the version numbers into a numeric value:\n *  \\verbatim\n    (1,2,3) -> (1203)\n    \\endverbatim\n *\n *  This assumes that there will never be more than 100 patchlevels.\n */\n#define SDL_VERSIONNUM(X, Y, Z)                     \\\n    ((X)*1000 + (Y)*100 + (Z))\n\n/**\n *  This is the version number macro for the current SDL version.\n */\n#define SDL_COMPILEDVERSION \\\n    SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)\n\n/**\n *  This macro will evaluate to true if compiled with SDL at least X.Y.Z.\n */\n#define SDL_VERSION_ATLEAST(X, Y, Z) \\\n    (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))\n\n/**\n *  \\brief Get the version of SDL that is linked against your program.\n *\n *  If you are linking to SDL dynamically, then it is possible that the\n *  current version will be different than the version you compiled against.\n *  This function returns the current version, while SDL_VERSION() is a\n *  macro that tells you what version you compiled with.\n *\n *  \\code\n *  SDL_version compiled;\n *  SDL_version linked;\n *\n *  SDL_VERSION(&compiled);\n *  SDL_GetVersion(&linked);\n *  printf(\"We compiled against SDL version %d.%d.%d ...\\n\",\n *         compiled.major, compiled.minor, compiled.patch);\n *  printf(\"But we linked against SDL version %d.%d.%d.\\n\",\n *         linked.major, linked.minor, linked.patch);\n *  \\endcode\n *\n *  This function may be called safely at any time, even before SDL_Init().\n *\n *  \\sa SDL_VERSION\n */\nextern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);\n\n/**\n *  \\brief Get the code revision of SDL that is linked against your program.\n *\n *  Returns an arbitrary string (a hash value) uniquely identifying the\n *  exact revision of the SDL library in use, and is only useful in comparing\n *  against other revisions. It is NOT an incrementing number.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetRevision(void);\n\n/**\n *  \\brief Get the revision number of SDL that is linked against your program.\n *\n *  Returns a number uniquely identifying the exact revision of the SDL\n *  library in use. It is an incrementing number based on commits to\n *  hg.libsdl.org.\n */\nextern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_version_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_video.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_video.h\n *\n *  Header file for SDL video functions.\n */\n\n#ifndef SDL_video_h_\n#define SDL_video_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_surface.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  The structure that defines a display mode\n *\n *  \\sa SDL_GetNumDisplayModes()\n *  \\sa SDL_GetDisplayMode()\n *  \\sa SDL_GetDesktopDisplayMode()\n *  \\sa SDL_GetCurrentDisplayMode()\n *  \\sa SDL_GetClosestDisplayMode()\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_GetWindowDisplayMode()\n */\ntypedef struct\n{\n    Uint32 format;              /**< pixel format */\n    int w;                      /**< width, in screen coordinates */\n    int h;                      /**< height, in screen coordinates */\n    int refresh_rate;           /**< refresh rate (or zero for unspecified) */\n    void *driverdata;           /**< driver-specific data, initialize to 0 */\n} SDL_DisplayMode;\n\n/**\n *  \\brief The type used to identify a window\n *\n *  \\sa SDL_CreateWindow()\n *  \\sa SDL_CreateWindowFrom()\n *  \\sa SDL_DestroyWindow()\n *  \\sa SDL_GetWindowData()\n *  \\sa SDL_GetWindowFlags()\n *  \\sa SDL_GetWindowGrab()\n *  \\sa SDL_GetWindowPosition()\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_GetWindowTitle()\n *  \\sa SDL_HideWindow()\n *  \\sa SDL_MaximizeWindow()\n *  \\sa SDL_MinimizeWindow()\n *  \\sa SDL_RaiseWindow()\n *  \\sa SDL_RestoreWindow()\n *  \\sa SDL_SetWindowData()\n *  \\sa SDL_SetWindowFullscreen()\n *  \\sa SDL_SetWindowGrab()\n *  \\sa SDL_SetWindowIcon()\n *  \\sa SDL_SetWindowPosition()\n *  \\sa SDL_SetWindowSize()\n *  \\sa SDL_SetWindowBordered()\n *  \\sa SDL_SetWindowResizable()\n *  \\sa SDL_SetWindowTitle()\n *  \\sa SDL_ShowWindow()\n */\ntypedef struct SDL_Window SDL_Window;\n\n/**\n *  \\brief The flags on a window\n *\n *  \\sa SDL_GetWindowFlags()\n */\ntypedef enum\n{\n    /* !!! FIXME: change this to name = (1<<x). */\n    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */\n    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */\n    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */\n    SDL_WINDOW_HIDDEN = 0x00000008,             /**< window is not visible */\n    SDL_WINDOW_BORDERLESS = 0x00000010,         /**< no window decoration */\n    SDL_WINDOW_RESIZABLE = 0x00000020,          /**< window can be resized */\n    SDL_WINDOW_MINIMIZED = 0x00000040,          /**< window is minimized */\n    SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */\n    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */\n    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */\n    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */\n    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),\n    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */\n    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported.\n                                                     On macOS NSHighResolutionCapable must be set true in the\n                                                     application's Info.plist for this to have any effect. */\n    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */\n    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */\n    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */\n    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */\n    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */\n    SDL_WINDOW_POPUP_MENU    = 0x00080000,      /**< window should be treated as a popup menu */\n    SDL_WINDOW_VULKAN        = 0x10000000       /**< window usable for Vulkan surface */\n} SDL_WindowFlags;\n\n/**\n *  \\brief Used to indicate that you don't care what the window position is.\n */\n#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u\n#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))\n#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)\n#define SDL_WINDOWPOS_ISUNDEFINED(X)    \\\n            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)\n\n/**\n *  \\brief Used to indicate that the window position should be centered.\n */\n#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u\n#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))\n#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)\n#define SDL_WINDOWPOS_ISCENTERED(X)    \\\n            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)\n\n/**\n *  \\brief Event subtype for window events\n */\ntypedef enum\n{\n    SDL_WINDOWEVENT_NONE,           /**< Never used */\n    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */\n    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */\n    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be\n                                         redrawn */\n    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2\n                                     */\n    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */\n    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as\n                                         a result of an API call or through the\n                                         system or user changing the window size. */\n    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */\n    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */\n    SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size\n                                         and position */\n    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */\n    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */\n    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */\n    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */\n    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */\n    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */\n    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */\n} SDL_WindowEventID;\n\n/**\n *  \\brief Event subtype for display events\n */\ntypedef enum\n{\n    SDL_DISPLAYEVENT_NONE,          /**< Never used */\n    SDL_DISPLAYEVENT_ORIENTATION    /**< Display orientation has changed to data1 */\n} SDL_DisplayEventID;\n\ntypedef enum\n{\n    SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */\n    SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */\n    SDL_ORIENTATION_LANDSCAPE_FLIPPED,  /**< The display is in landscape mode, with the left side up, relative to portrait mode */\n    SDL_ORIENTATION_PORTRAIT,           /**< The display is in portrait mode */\n    SDL_ORIENTATION_PORTRAIT_FLIPPED    /**< The display is in portrait mode, upside down */\n} SDL_DisplayOrientation;\n\n/**\n *  \\brief An opaque handle to an OpenGL context.\n */\ntypedef void *SDL_GLContext;\n\n/**\n *  \\brief OpenGL configuration attributes\n */\ntypedef enum\n{\n    SDL_GL_RED_SIZE,\n    SDL_GL_GREEN_SIZE,\n    SDL_GL_BLUE_SIZE,\n    SDL_GL_ALPHA_SIZE,\n    SDL_GL_BUFFER_SIZE,\n    SDL_GL_DOUBLEBUFFER,\n    SDL_GL_DEPTH_SIZE,\n    SDL_GL_STENCIL_SIZE,\n    SDL_GL_ACCUM_RED_SIZE,\n    SDL_GL_ACCUM_GREEN_SIZE,\n    SDL_GL_ACCUM_BLUE_SIZE,\n    SDL_GL_ACCUM_ALPHA_SIZE,\n    SDL_GL_STEREO,\n    SDL_GL_MULTISAMPLEBUFFERS,\n    SDL_GL_MULTISAMPLESAMPLES,\n    SDL_GL_ACCELERATED_VISUAL,\n    SDL_GL_RETAINED_BACKING,\n    SDL_GL_CONTEXT_MAJOR_VERSION,\n    SDL_GL_CONTEXT_MINOR_VERSION,\n    SDL_GL_CONTEXT_EGL,\n    SDL_GL_CONTEXT_FLAGS,\n    SDL_GL_CONTEXT_PROFILE_MASK,\n    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,\n    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR,\n    SDL_GL_CONTEXT_RESET_NOTIFICATION,\n    SDL_GL_CONTEXT_NO_ERROR\n} SDL_GLattr;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,\n    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,\n    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */\n} SDL_GLprofile;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,\n    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,\n    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,\n    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008\n} SDL_GLcontextFlag;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE   = 0x0000,\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH  = 0x0001\n} SDL_GLcontextReleaseFlag;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,\n    SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001\n} SDL_GLContextResetNotification;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of video drivers compiled into SDL\n *\n *  \\sa SDL_GetVideoDriver()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);\n\n/**\n *  \\brief Get the name of a built in video driver.\n *\n *  \\note The video drivers are presented in the order in which they are\n *        normally checked during initialization.\n *\n *  \\sa SDL_GetNumVideoDrivers()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);\n\n/**\n *  \\brief Initialize the video subsystem, optionally specifying a video driver.\n *\n *  \\param driver_name Initialize a specific driver by name, or NULL for the\n *                     default video driver.\n *\n *  \\return 0 on success, -1 on error\n *\n *  This function initializes the video subsystem; setting up a connection\n *  to the window manager, etc, and determines the available display modes\n *  and pixel formats, but does not initialize a window or graphics mode.\n *\n *  \\sa SDL_VideoQuit()\n */\nextern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);\n\n/**\n *  \\brief Shuts down the video subsystem.\n *\n *  This function closes all windows, and restores the original video mode.\n *\n *  \\sa SDL_VideoInit()\n */\nextern DECLSPEC void SDLCALL SDL_VideoQuit(void);\n\n/**\n *  \\brief Returns the name of the currently initialized video driver.\n *\n *  \\return The name of the current video driver or NULL if no driver\n *          has been initialized\n *\n *  \\sa SDL_GetNumVideoDrivers()\n *  \\sa SDL_GetVideoDriver()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);\n\n/**\n *  \\brief Returns the number of available video displays.\n *\n *  \\sa SDL_GetDisplayBounds()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);\n\n/**\n *  \\brief Get the name of a display in UTF-8 encoding\n *\n *  \\return The name of a display, or NULL for an invalid display index.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);\n\n/**\n *  \\brief Get the desktop area represented by a display, with the primary\n *         display located at 0,0\n *\n *  \\return 0 on success, or -1 if the index is out of range.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);\n\n/**\n *  \\brief Get the usable desktop area represented by a display, with the\n *         primary display located at 0,0\n *\n *  This is the same area as SDL_GetDisplayBounds() reports, but with portions\n *  reserved by the system removed. For example, on Mac OS X, this subtracts\n *  the area occupied by the menu bar and dock.\n *\n *  Setting a window to be fullscreen generally bypasses these unusable areas,\n *  so these are good guidelines for the maximum space available to a\n *  non-fullscreen window.\n *\n *  \\return 0 on success, or -1 if the index is out of range.\n *\n *  \\sa SDL_GetDisplayBounds()\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);\n\n/**\n *  \\brief Get the dots/pixels-per-inch for a display\n *\n *  \\note Diagonal, horizontal and vertical DPI can all be optionally\n *        returned if the parameter is non-NULL.\n *\n *  \\return 0 on success, or -1 if no DPI information is available or the index is out of range.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);\n\n/**\n *  \\brief Get the orientation of a display\n *\n *  \\return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);\n\n/**\n *  \\brief Returns the number of available display modes.\n *\n *  \\sa SDL_GetDisplayMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);\n\n/**\n *  \\brief Fill in information about a specific display mode.\n *\n *  \\note The display modes are sorted in this priority:\n *        \\li bits per pixel -> more colors to fewer colors\n *        \\li width -> largest to smallest\n *        \\li height -> largest to smallest\n *        \\li refresh rate -> highest to lowest\n *\n *  \\sa SDL_GetNumDisplayModes()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,\n                                               SDL_DisplayMode * mode);\n\n/**\n *  \\brief Fill in information about the desktop display mode.\n */\nextern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);\n\n/**\n *  \\brief Fill in information about the current display mode.\n */\nextern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);\n\n\n/**\n *  \\brief Get the closest match to the requested display mode.\n *\n *  \\param displayIndex The index of display from which mode should be queried.\n *  \\param mode The desired display mode\n *  \\param closest A pointer to a display mode to be filled in with the closest\n *                 match of the available display modes.\n *\n *  \\return The passed in value \\c closest, or NULL if no matching video mode\n *          was available.\n *\n *  The available display modes are scanned, and \\c closest is filled in with the\n *  closest mode matching the requested mode and returned.  The mode format and\n *  refresh_rate default to the desktop mode if they are 0.  The modes are\n *  scanned with size being first priority, format being second priority, and\n *  finally checking the refresh_rate.  If all the available modes are too\n *  small, then NULL is returned.\n *\n *  \\sa SDL_GetNumDisplayModes()\n *  \\sa SDL_GetDisplayMode()\n */\nextern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);\n\n/**\n *  \\brief Get the display index associated with a window.\n *\n *  \\return the display index of the display containing the center of the\n *          window, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);\n\n/**\n *  \\brief Set the display mode used when a fullscreen window is visible.\n *\n *  By default the window's dimensions and the desktop format and refresh rate\n *  are used.\n *\n *  \\param window The window for which the display mode should be set.\n *  \\param mode The mode to use, or NULL for the default mode.\n *\n *  \\return 0 on success, or -1 if setting the display mode failed.\n *\n *  \\sa SDL_GetWindowDisplayMode()\n *  \\sa SDL_SetWindowFullscreen()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,\n                                                     const SDL_DisplayMode\n                                                         * mode);\n\n/**\n *  \\brief Fill in information about the display mode used when a fullscreen\n *         window is visible.\n *\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_SetWindowFullscreen()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,\n                                                     SDL_DisplayMode * mode);\n\n/**\n *  \\brief Get the pixel format associated with the window.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);\n\n/**\n *  \\brief Create a window with the specified position, dimensions, and flags.\n *\n *  \\param title The title of the window, in UTF-8 encoding.\n *  \\param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param w     The width of the window, in screen coordinates.\n *  \\param h     The height of the window, in screen coordinates.\n *  \\param flags The flags for the window, a mask of any of the following:\n *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,\n *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,\n *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,\n *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,\n *               ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN.\n *\n *  \\return The created window, or NULL if window creation failed.\n *\n *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size\n *  in pixels may differ from its size in screen coordinates on platforms with\n *  high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query\n *  the client area's size in screen coordinates, and SDL_GL_GetDrawableSize(),\n *  SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to query the\n *  drawable size in pixels.\n *\n *  If the window is created with any of the SDL_WINDOW_OPENGL or\n *  SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function\n *  (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the\n *  corresponding UnloadLibrary function is called by SDL_DestroyWindow().\n *\n *  If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,\n *  SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.\n *\n *  \\note On non-Apple devices, SDL requires you to either not link to the\n *        Vulkan loader or link to a dynamic library version. This limitation\n *        may be removed in a future version of SDL.\n *\n *  \\sa SDL_DestroyWindow()\n *  \\sa SDL_GL_LoadLibrary()\n *  \\sa SDL_Vulkan_LoadLibrary()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,\n                                                      int x, int y, int w,\n                                                      int h, Uint32 flags);\n\n/**\n *  \\brief Create an SDL window from an existing native window.\n *\n *  \\param data A pointer to driver-dependent window creation data\n *\n *  \\return The created window, or NULL if window creation failed.\n *\n *  \\sa SDL_DestroyWindow()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);\n\n/**\n *  \\brief Get the numeric ID of a window, for logging purposes.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);\n\n/**\n *  \\brief Get a window from a stored ID, or NULL if it doesn't exist.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);\n\n/**\n *  \\brief Get the window flags.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);\n\n/**\n *  \\brief Set the title of a window, in UTF-8 format.\n *\n *  \\sa SDL_GetWindowTitle()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,\n                                                const char *title);\n\n/**\n *  \\brief Get the title of a window, in UTF-8 format.\n *\n *  \\sa SDL_SetWindowTitle()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);\n\n/**\n *  \\brief Set the icon for a window.\n *\n *  \\param window The window for which the icon should be set.\n *  \\param icon The icon for the window.\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,\n                                               SDL_Surface * icon);\n\n/**\n *  \\brief Associate an arbitrary named pointer with a window.\n *\n *  \\param window   The window to associate with the pointer.\n *  \\param name     The name of the pointer.\n *  \\param userdata The associated pointer.\n *\n *  \\return The previous value associated with 'name'\n *\n *  \\note The name is case-sensitive.\n *\n *  \\sa SDL_GetWindowData()\n */\nextern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,\n                                                const char *name,\n                                                void *userdata);\n\n/**\n *  \\brief Retrieve the data pointer associated with a window.\n *\n *  \\param window   The window to query.\n *  \\param name     The name of the pointer.\n *\n *  \\return The value associated with 'name'\n *\n *  \\sa SDL_SetWindowData()\n */\nextern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,\n                                                const char *name);\n\n/**\n *  \\brief Set the position of a window.\n *\n *  \\param window   The window to reposition.\n *  \\param x        The x coordinate of the window in screen coordinates, or\n *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y        The y coordinate of the window in screen coordinates, or\n *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.\n *\n *  \\note The window coordinate origin is the upper left of the display.\n *\n *  \\sa SDL_GetWindowPosition()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,\n                                                   int x, int y);\n\n/**\n *  \\brief Get the position of a window.\n *\n *  \\param window   The window to query.\n *  \\param x        Pointer to variable for storing the x position, in screen\n *                  coordinates. May be NULL.\n *  \\param y        Pointer to variable for storing the y position, in screen\n *                  coordinates. May be NULL.\n *\n *  \\sa SDL_SetWindowPosition()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,\n                                                   int *x, int *y);\n\n/**\n *  \\brief Set the size of a window's client area.\n *\n *  \\param window   The window to resize.\n *  \\param w        The width of the window, in screen coordinates. Must be >0.\n *  \\param h        The height of the window, in screen coordinates. Must be >0.\n *\n *  \\note Fullscreen windows automatically match the size of the display mode,\n *        and you should use SDL_SetWindowDisplayMode() to change their size.\n *\n *  The window size in screen coordinates may differ from the size in pixels, if\n *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with\n *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or\n *  SDL_GetRendererOutputSize() to get the real client area size in pixels.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_SetWindowDisplayMode()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,\n                                               int h);\n\n/**\n *  \\brief Get the size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the width, in screen\n *                  coordinates. May be NULL.\n *  \\param h        Pointer to variable for storing the height, in screen\n *                  coordinates. May be NULL.\n *\n *  The window size in screen coordinates may differ from the size in pixels, if\n *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with\n *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or\n *  SDL_GetRendererOutputSize() to get the real client area size in pixels.\n *\n *  \\sa SDL_SetWindowSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,\n                                               int *h);\n\n/**\n *  \\brief Get the size of a window's borders (decorations) around the client area.\n *\n *  \\param window The window to query.\n *  \\param top Pointer to variable for storing the size of the top border. NULL is permitted.\n *  \\param left Pointer to variable for storing the size of the left border. NULL is permitted.\n *  \\param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.\n *  \\param right Pointer to variable for storing the size of the right border. NULL is permitted.\n *\n *  \\return 0 on success, or -1 if getting this information is not supported.\n *\n *  \\note if this function fails (returns -1), the size values will be\n *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as\n *        if the window in question was borderless.\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,\n                                                     int *top, int *left,\n                                                     int *bottom, int *right);\n\n/**\n *  \\brief Set the minimum size of a window's client area.\n *\n *  \\param window    The window to set a new minimum size.\n *  \\param min_w     The minimum width of the window, must be >0\n *  \\param min_h     The minimum height of the window, must be >0\n *\n *  \\note You can't change the minimum size of a fullscreen window, it\n *        automatically matches the size of the display mode.\n *\n *  \\sa SDL_GetWindowMinimumSize()\n *  \\sa SDL_SetWindowMaximumSize()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,\n                                                      int min_w, int min_h);\n\n/**\n *  \\brief Get the minimum size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the minimum width, may be NULL\n *  \\param h        Pointer to variable for storing the minimum height, may be NULL\n *\n *  \\sa SDL_GetWindowMaximumSize()\n *  \\sa SDL_SetWindowMinimumSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Set the maximum size of a window's client area.\n *\n *  \\param window    The window to set a new maximum size.\n *  \\param max_w     The maximum width of the window, must be >0\n *  \\param max_h     The maximum height of the window, must be >0\n *\n *  \\note You can't change the maximum size of a fullscreen window, it\n *        automatically matches the size of the display mode.\n *\n *  \\sa SDL_GetWindowMaximumSize()\n *  \\sa SDL_SetWindowMinimumSize()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,\n                                                      int max_w, int max_h);\n\n/**\n *  \\brief Get the maximum size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the maximum width, may be NULL\n *  \\param h        Pointer to variable for storing the maximum height, may be NULL\n *\n *  \\sa SDL_GetWindowMinimumSize()\n *  \\sa SDL_SetWindowMaximumSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Set the border state of a window.\n *\n *  This will add or remove the window's SDL_WINDOW_BORDERLESS flag and\n *  add or remove the border from the actual window. This is a no-op if the\n *  window's border already matches the requested state.\n *\n *  \\param window The window of which to change the border state.\n *  \\param bordered SDL_FALSE to remove border, SDL_TRUE to add border.\n *\n *  \\note You can't change the border state of a fullscreen window.\n *\n *  \\sa SDL_GetWindowFlags()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,\n                                                   SDL_bool bordered);\n\n/**\n *  \\brief Set the user-resizable state of a window.\n *\n *  This will add or remove the window's SDL_WINDOW_RESIZABLE flag and\n *  allow/disallow user resizing of the window. This is a no-op if the\n *  window's resizable state already matches the requested state.\n *\n *  \\param window The window of which to change the resizable state.\n *  \\param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.\n *\n *  \\note You can't change the resizable state of a fullscreen window.\n *\n *  \\sa SDL_GetWindowFlags()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,\n                                                    SDL_bool resizable);\n\n/**\n *  \\brief Show a window.\n *\n *  \\sa SDL_HideWindow()\n */\nextern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);\n\n/**\n *  \\brief Hide a window.\n *\n *  \\sa SDL_ShowWindow()\n */\nextern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);\n\n/**\n *  \\brief Raise a window above other windows and set the input focus.\n */\nextern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);\n\n/**\n *  \\brief Make a window as large as possible.\n *\n *  \\sa SDL_RestoreWindow()\n */\nextern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);\n\n/**\n *  \\brief Minimize a window to an iconic representation.\n *\n *  \\sa SDL_RestoreWindow()\n */\nextern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);\n\n/**\n *  \\brief Restore the size and position of a minimized or maximized window.\n *\n *  \\sa SDL_MaximizeWindow()\n *  \\sa SDL_MinimizeWindow()\n */\nextern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);\n\n/**\n *  \\brief Set a window's fullscreen state.\n *\n *  \\return 0 on success, or -1 if setting the display mode failed.\n *\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_GetWindowDisplayMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,\n                                                    Uint32 flags);\n\n/**\n *  \\brief Get the SDL surface associated with the window.\n *\n *  \\return The window's framebuffer surface, or NULL on error.\n *\n *  A new surface will be created with the optimal format for the window,\n *  if necessary. This surface will be freed when the window is destroyed.\n *\n *  \\note You may not combine this with 3D or the rendering API on this window.\n *\n *  \\sa SDL_UpdateWindowSurface()\n *  \\sa SDL_UpdateWindowSurfaceRects()\n */\nextern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);\n\n/**\n *  \\brief Copy the window surface to the screen.\n *\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetWindowSurface()\n *  \\sa SDL_UpdateWindowSurfaceRects()\n */\nextern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);\n\n/**\n *  \\brief Copy a number of rectangles on the window surface to the screen.\n *\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetWindowSurface()\n *  \\sa SDL_UpdateWindowSurface()\n */\nextern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,\n                                                         const SDL_Rect * rects,\n                                                         int numrects);\n\n/**\n *  \\brief Set a window's input grab mode.\n *\n *  \\param window The window for which the input grab mode should be set.\n *  \\param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.\n *\n *  If the caller enables a grab while another window is currently grabbed,\n *  the other window loses its grab in favor of the caller's window.\n *\n *  \\sa SDL_GetWindowGrab()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,\n                                               SDL_bool grabbed);\n\n/**\n *  \\brief Get a window's input grab mode.\n *\n *  \\return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise.\n *\n *  \\sa SDL_SetWindowGrab()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);\n\n/**\n *  \\brief Get the window that currently has an input grab enabled.\n *\n *  \\return This returns the window if input is grabbed, and NULL otherwise.\n *\n *  \\sa SDL_SetWindowGrab()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);\n\n/**\n *  \\brief Set the brightness (gamma correction) for a window.\n *\n *  \\return 0 on success, or -1 if setting the brightness isn't supported.\n *\n *  \\sa SDL_GetWindowBrightness()\n *  \\sa SDL_SetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);\n\n/**\n *  \\brief Get the brightness (gamma correction) for a window.\n *\n *  \\return The last brightness value passed to SDL_SetWindowBrightness()\n *\n *  \\sa SDL_SetWindowBrightness()\n */\nextern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);\n\n/**\n *  \\brief Set the opacity for a window\n *\n *  \\param window The window which will be made transparent or opaque\n *  \\param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be\n *                 clamped internally between 0.0f and 1.0f.\n *\n *  \\return 0 on success, or -1 if setting the opacity isn't supported.\n *\n *  \\sa SDL_GetWindowOpacity()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);\n\n/**\n *  \\brief Get the opacity of a window.\n *\n *  If transparency isn't supported on this platform, opacity will be reported\n *  as 1.0f without error.\n *\n *  \\param window The window in question.\n *  \\param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)\n *\n *  \\return 0 on success, or -1 on error (invalid window, etc).\n *\n *  \\sa SDL_SetWindowOpacity()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);\n\n/**\n *  \\brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)\n *\n *  \\param modal_window The window that should be modal\n *  \\param parent_window The parent window\n *\n *  \\return 0 on success, or -1 otherwise.\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);\n\n/**\n *  \\brief Explicitly sets input focus to the window.\n *\n *  You almost certainly want SDL_RaiseWindow() instead of this function. Use\n *  this with caution, as you might give focus to a window that's completely\n *  obscured by other windows.\n *\n *  \\param window The window that should get the input focus\n *\n *  \\return 0 on success, or -1 otherwise.\n *  \\sa SDL_RaiseWindow()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);\n\n/**\n *  \\brief Set the gamma ramp for a window.\n *\n *  \\param window The window for which the gamma ramp should be set.\n *  \\param red The translation table for the red channel, or NULL.\n *  \\param green The translation table for the green channel, or NULL.\n *  \\param blue The translation table for the blue channel, or NULL.\n *\n *  \\return 0 on success, or -1 if gamma ramps are unsupported.\n *\n *  Set the gamma translation table for the red, green, and blue channels\n *  of the video hardware.  Each table is an array of 256 16-bit quantities,\n *  representing a mapping between the input and output for that channel.\n *  The input is the index into the array, and the output is the 16-bit\n *  gamma value at that index, scaled to the output color precision.\n *\n *  \\sa SDL_GetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,\n                                                   const Uint16 * red,\n                                                   const Uint16 * green,\n                                                   const Uint16 * blue);\n\n/**\n *  \\brief Get the gamma ramp for a window.\n *\n *  \\param window The window from which the gamma ramp should be queried.\n *  \\param red   A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the red channel, or NULL.\n *  \\param green A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the green channel, or NULL.\n *  \\param blue  A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the blue channel, or NULL.\n *\n *  \\return 0 on success, or -1 if gamma ramps are unsupported.\n *\n *  \\sa SDL_SetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,\n                                                   Uint16 * red,\n                                                   Uint16 * green,\n                                                   Uint16 * blue);\n\n/**\n *  \\brief Possible return values from the SDL_HitTest callback.\n *\n *  \\sa SDL_HitTest\n */\ntypedef enum\n{\n    SDL_HITTEST_NORMAL,  /**< Region is normal. No special properties. */\n    SDL_HITTEST_DRAGGABLE,  /**< Region can drag entire window. */\n    SDL_HITTEST_RESIZE_TOPLEFT,\n    SDL_HITTEST_RESIZE_TOP,\n    SDL_HITTEST_RESIZE_TOPRIGHT,\n    SDL_HITTEST_RESIZE_RIGHT,\n    SDL_HITTEST_RESIZE_BOTTOMRIGHT,\n    SDL_HITTEST_RESIZE_BOTTOM,\n    SDL_HITTEST_RESIZE_BOTTOMLEFT,\n    SDL_HITTEST_RESIZE_LEFT\n} SDL_HitTestResult;\n\n/**\n *  \\brief Callback used for hit-testing.\n *\n *  \\sa SDL_SetWindowHitTest\n */\ntypedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,\n                                                 const SDL_Point *area,\n                                                 void *data);\n\n/**\n *  \\brief Provide a callback that decides if a window region has special properties.\n *\n *  Normally windows are dragged and resized by decorations provided by the\n *  system window manager (a title bar, borders, etc), but for some apps, it\n *  makes sense to drag them from somewhere else inside the window itself; for\n *  example, one might have a borderless window that wants to be draggable\n *  from any part, or simulate its own title bar, etc.\n *\n *  This function lets the app provide a callback that designates pieces of\n *  a given window as special. This callback is run during event processing\n *  if we need to tell the OS to treat a region of the window specially; the\n *  use of this callback is known as \"hit testing.\"\n *\n *  Mouse input may not be delivered to your application if it is within\n *  a special area; the OS will often apply that input to moving the window or\n *  resizing the window and not deliver it to the application.\n *\n *  Specifying NULL for a callback disables hit-testing. Hit-testing is\n *  disabled by default.\n *\n *  Platforms that don't support this functionality will return -1\n *  unconditionally, even if you're attempting to disable hit-testing.\n *\n *  Your callback may fire at any time, and its firing does not indicate any\n *  specific behavior (for example, on Windows, this certainly might fire\n *  when the OS is deciding whether to drag your window, but it fires for lots\n *  of other reasons, too, some unrelated to anything you probably care about\n *  _and when the mouse isn't actually at the location it is testing_).\n *  Since this can fire at any time, you should try to keep your callback\n *  efficient, devoid of allocations, etc.\n *\n *  \\param window The window to set hit-testing on.\n *  \\param callback The callback to call when doing a hit-test.\n *  \\param callback_data An app-defined void pointer passed to the callback.\n *  \\return 0 on success, -1 on error (including unsupported).\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,\n                                                 SDL_HitTest callback,\n                                                 void *callback_data);\n\n/**\n *  \\brief Destroy a window.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);\n\n\n/**\n *  \\brief Returns whether the screensaver is currently enabled (default off).\n *\n *  \\sa SDL_EnableScreenSaver()\n *  \\sa SDL_DisableScreenSaver()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);\n\n/**\n *  \\brief Allow the screen to be blanked by a screensaver\n *\n *  \\sa SDL_IsScreenSaverEnabled()\n *  \\sa SDL_DisableScreenSaver()\n */\nextern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);\n\n/**\n *  \\brief Prevent the screen from being blanked by a screensaver\n *\n *  \\sa SDL_IsScreenSaverEnabled()\n *  \\sa SDL_EnableScreenSaver()\n */\nextern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);\n\n\n/**\n *  \\name OpenGL support functions\n */\n/* @{ */\n\n/**\n *  \\brief Dynamically load an OpenGL library.\n *\n *  \\param path The platform dependent OpenGL library name, or NULL to open the\n *              default OpenGL library.\n *\n *  \\return 0 on success, or -1 if the library couldn't be loaded.\n *\n *  This should be done after initializing the video driver, but before\n *  creating any OpenGL windows.  If no OpenGL library is loaded, the default\n *  library will be loaded upon creation of the first OpenGL window.\n *\n *  \\note If you do this, you need to retrieve all of the GL functions used in\n *        your program from the dynamic library using SDL_GL_GetProcAddress().\n *\n *  \\sa SDL_GL_GetProcAddress()\n *  \\sa SDL_GL_UnloadLibrary()\n */\nextern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);\n\n/**\n *  \\brief Get the address of an OpenGL function.\n */\nextern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);\n\n/**\n *  \\brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().\n *\n *  \\sa SDL_GL_LoadLibrary()\n */\nextern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);\n\n/**\n *  \\brief Return true if an OpenGL extension is supported for the current\n *         context.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char\n                                                           *extension);\n\n/**\n *  \\brief Reset all previously set OpenGL context attributes to their default values\n */\nextern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);\n\n/**\n *  \\brief Set an OpenGL window attribute before window creation.\n *\n *  \\return 0 on success, or -1 if the attribute could not be set.\n */\nextern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);\n\n/**\n *  \\brief Get the actual value for an attribute from the current context.\n *\n *  \\return 0 on success, or -1 if the attribute could not be retrieved.\n *          The integer at \\c value will be modified in either case.\n */\nextern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);\n\n/**\n *  \\brief Create an OpenGL context for use with an OpenGL window, and make it\n *         current.\n *\n *  \\sa SDL_GL_DeleteContext()\n */\nextern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *\n                                                           window);\n\n/**\n *  \\brief Set up an OpenGL context for rendering into an OpenGL window.\n *\n *  \\note The context must have been created with a compatible window.\n */\nextern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,\n                                               SDL_GLContext context);\n\n/**\n *  \\brief Get the currently active OpenGL window.\n */\nextern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);\n\n/**\n *  \\brief Get the currently active OpenGL context.\n */\nextern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);\n\n/**\n *  \\brief Get the size of a window's underlying drawable in pixels (for use\n *         with glViewport).\n *\n *  \\param window   Window from which the drawable size should be queried\n *  \\param w        Pointer to variable for storing the width in pixels, may be NULL\n *  \\param h        Pointer to variable for storing the height in pixels, may be NULL\n *\n * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI\n * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a\n * platform with high-DPI support (Apple calls this \"Retina\"), and not disabled\n * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_CreateWindow()\n */\nextern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,\n                                                    int *h);\n\n/**\n *  \\brief Set the swap interval for the current OpenGL context.\n *\n *  \\param interval 0 for immediate updates, 1 for updates synchronized with the\n *                  vertical retrace. If the system supports it, you may\n *                  specify -1 to allow late swaps to happen immediately\n *                  instead of waiting for the next retrace.\n *\n *  \\return 0 on success, or -1 if setting the swap interval is not supported.\n *\n *  \\sa SDL_GL_GetSwapInterval()\n */\nextern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);\n\n/**\n *  \\brief Get the swap interval for the current OpenGL context.\n *\n *  \\return 0 if there is no vertical retrace synchronization, 1 if the buffer\n *          swap is synchronized with the vertical retrace, and -1 if late\n *          swaps happen immediately instead of waiting for the next retrace.\n *          If the system can't determine the swap interval, or there isn't a\n *          valid current context, this will return 0 as a safe default.\n *\n *  \\sa SDL_GL_SetSwapInterval()\n */\nextern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);\n\n/**\n * \\brief Swap the OpenGL buffers for a window, if double-buffering is\n *        supported.\n */\nextern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);\n\n/**\n *  \\brief Delete an OpenGL context.\n *\n *  \\sa SDL_GL_CreateContext()\n */\nextern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);\n\n/* @} *//* OpenGL support functions */\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_video_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/SDL_vulkan.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 2017, Mark Callow\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_vulkan.h\n *\n *  Header file for functions to creating Vulkan surfaces on SDL windows.\n */\n\n#ifndef SDL_vulkan_h_\n#define SDL_vulkan_h_\n\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Avoid including vulkan.h, don't define VkInstance if it's already included */\n#ifdef VULKAN_H_\n#define NO_SDL_VULKAN_TYPEDEFS\n#endif\n#ifndef NO_SDL_VULKAN_TYPEDEFS\n#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;\n\n#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)\n#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;\n#else\n#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;\n#endif\n\nVK_DEFINE_HANDLE(VkInstance)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)\n\n#endif /* !NO_SDL_VULKAN_TYPEDEFS */\n\ntypedef VkInstance SDL_vulkanInstance;\ntypedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */\n\n/**\n *  \\name Vulkan support functions\n *\n *  \\note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API\n *        is compatable with Tizen's implementation of Vulkan in SDL.\n */\n/* @{ */\n\n/**\n *  \\brief Dynamically load a Vulkan loader library.\n *\n *  \\param [in] path The platform dependent Vulkan loader library name, or\n *              \\c NULL.\n *\n *  \\return \\c 0 on success, or \\c -1 if the library couldn't be loaded.\n *\n *  If \\a path is NULL SDL will use the value of the environment variable\n *  \\c SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan\n *  loader library.\n *\n *  This should be called after initializing the video driver, but before\n *  creating any Vulkan windows. If no Vulkan loader library is loaded, the\n *  default library will be loaded upon creation of the first Vulkan window.\n *\n *  \\note It is fairly common for Vulkan applications to link with \\a libvulkan\n *        instead of explicitly loading it at run time. This will work with\n *        SDL provided the application links to a dynamic library and both it\n *        and SDL use the same search path.\n *\n *  \\note If you specify a non-NULL \\c path, an application should retrieve all\n *        of the Vulkan functions it uses from the dynamic library using\n *        \\c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee\n *        \\c path points to the same vulkan loader library the application\n *        linked to.\n *\n *  \\note On Apple devices, if \\a path is NULL, SDL will attempt to find\n *        the vkGetInstanceProcAddr address within all the mach-o images of\n *        the current process. This is because it is fairly common for Vulkan\n *        applications to link with libvulkan (and historically MoltenVK was\n *        provided as a static library). If it is not found then, on macOS, SDL\n *        will attempt to load \\c vulkan.framework/vulkan, \\c libvulkan.1.dylib,\n *        followed by \\c libvulkan.dylib, in that order.\n *        On iOS SDL will attempt to load \\c libvulkan.dylib only. Applications\n *        using a dynamic framework or .dylib must ensure it is included in its\n *        application bundle.\n *\n *  \\note On non-Apple devices, application linking with a static libvulkan is\n *        not supported. Either do not link to the Vulkan loader or link to a\n *        dynamic library version.\n *\n *  \\note This function will fail if there are no working Vulkan drivers\n *        installed.\n *\n *  \\sa SDL_Vulkan_GetVkGetInstanceProcAddr()\n *  \\sa SDL_Vulkan_UnloadLibrary()\n */\nextern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);\n\n/**\n *  \\brief Get the address of the \\c vkGetInstanceProcAddr function.\n *\n *  \\note This should be called after either calling SDL_Vulkan_LoadLibrary\n *        or creating an SDL_Window with the SDL_WINDOW_VULKAN flag.\n */\nextern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);\n\n/**\n *  \\brief Unload the Vulkan loader library previously loaded by\n *         \\c SDL_Vulkan_LoadLibrary().\n *\n *  \\sa SDL_Vulkan_LoadLibrary()\n */\nextern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);\n\n/**\n *  \\brief Get the names of the Vulkan instance extensions needed to create\n *         a surface with \\c SDL_Vulkan_CreateSurface().\n *\n *  \\param [in]     \\c NULL or window Window for which the required Vulkan instance\n *                  extensions should be retrieved\n *  \\param [in,out] pCount pointer to an \\c unsigned related to the number of\n *                  required Vulkan instance extensions\n *  \\param [out]    pNames \\c NULL or a pointer to an array to be filled with the\n *                  required Vulkan instance extensions\n *\n *  \\return \\c SDL_TRUE on success, \\c SDL_FALSE on error.\n *\n *  If \\a pNames is \\c NULL, then the number of required Vulkan instance\n *  extensions is returned in pCount. Otherwise, \\a pCount must point to a\n *  variable set to the number of elements in the \\a pNames array, and on\n *  return the variable is overwritten with the number of names actually\n *  written to \\a pNames. If \\a pCount is less than the number of required\n *  extensions, at most \\a pCount structures will be written. If \\a pCount\n *  is smaller than the number of required extensions, \\c SDL_FALSE will be\n *  returned instead of \\c SDL_TRUE, to indicate that not all the required\n *  extensions were returned.\n *\n *  \\note If \\c window is not NULL, it will be checked against its creation\n *        flags to ensure that the Vulkan flag is present. This parameter\n *        will be removed in a future major release.\n *\n *  \\note The returned list of extensions will contain \\c VK_KHR_surface\n *        and zero or more platform specific extensions\n *\n *  \\note The extension names queried here must be enabled when calling\n *        VkCreateInstance, otherwise surface creation will fail.\n *\n *  \\note \\c window should have been created with the \\c SDL_WINDOW_VULKAN flag\n *        or be \\c NULL\n *\n *  \\code\n *  unsigned int count;\n *  // get count of required extensions\n *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))\n *      handle_error();\n *\n *  static const char *const additionalExtensions[] =\n *  {\n *      VK_EXT_DEBUG_REPORT_EXTENSION_NAME, // example additional extension\n *  };\n *  size_t additionalExtensionsCount = sizeof(additionalExtensions) / sizeof(additionalExtensions[0]);\n *  size_t extensionCount = count + additionalExtensionsCount;\n *  const char **names = malloc(sizeof(const char *) * extensionCount);\n *  if(!names)\n *      handle_error();\n *\n *  // get names of required extensions\n *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))\n *      handle_error();\n *\n *  // copy additional extensions after required extensions\n *  for(size_t i = 0; i < additionalExtensionsCount; i++)\n *      names[i + count] = additionalExtensions[i];\n *\n *  VkInstanceCreateInfo instanceCreateInfo = {};\n *  instanceCreateInfo.enabledExtensionCount = extensionCount;\n *  instanceCreateInfo.ppEnabledExtensionNames = names;\n *  // fill in rest of instanceCreateInfo\n *\n *  VkInstance instance;\n *  // create the Vulkan instance\n *  VkResult result = vkCreateInstance(&instanceCreateInfo, NULL, &instance);\n *  free(names);\n *  \\endcode\n *\n *  \\sa SDL_Vulkan_CreateSurface()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSDL_Window *window,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tunsigned int *pCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst char **pNames);\n\n/**\n *  \\brief Create a Vulkan rendering surface for a window.\n *\n *  \\param [in]  window   SDL_Window to which to attach the rendering surface.\n *  \\param [in]  instance handle to the Vulkan instance to use.\n *  \\param [out] surface  pointer to a VkSurfaceKHR handle to receive the\n *                        handle of the newly created surface.\n *\n *  \\return \\c SDL_TRUE on success, \\c SDL_FALSE on error.\n *\n *  \\code\n *  VkInstance instance;\n *  SDL_Window *window;\n *\n *  // create instance and window\n *\n *  // create the Vulkan surface\n *  VkSurfaceKHR surface;\n *  if(!SDL_Vulkan_CreateSurface(window, instance, &surface))\n *      handle_error();\n *  \\endcode\n *\n *  \\note \\a window should have been created with the \\c SDL_WINDOW_VULKAN flag.\n *\n *  \\note \\a instance should have been created with the extensions returned\n *        by \\c SDL_Vulkan_CreateSurface() enabled.\n *\n *  \\sa SDL_Vulkan_GetInstanceExtensions()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(\n\t\t\t\t\t\t\t\t\t\t\t\tSDL_Window *window,\n\t\t\t\t\t\t\t\t\t\t\t\tVkInstance instance,\n\t\t\t\t\t\t\t\t\t\t\t\tVkSurfaceKHR* surface);\n\n/**\n *  \\brief Get the size of a window's underlying drawable in pixels (for use\n *         with setting viewport, scissor & etc).\n *\n *  \\param window   SDL_Window from which the drawable size should be queried\n *  \\param w        Pointer to variable for storing the width in pixels,\n *                  may be NULL\n *  \\param h        Pointer to variable for storing the height in pixels,\n *                  may be NULL\n *\n * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI\n * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a\n * platform with high-DPI support (Apple calls this \"Retina\"), and not disabled\n * by the \\c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.\n *\n *  \\note On macOS high-DPI support must be enabled for an application by\n *        setting NSHighResolutionCapable to true in its Info.plist.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_CreateWindow()\n */\nextern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,\n                                                        int *w, int *h);\n\n/* @} *//* Vulkan support functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_vulkan_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/begin_code.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file begin_code.h\n *\n *  This file sets things up for C dynamic library function definitions,\n *  static inlined functions, and structures aligned at 4-byte alignment.\n *  If you don't like ugly C preprocessor code, don't look at this file. :)\n */\n\n/* This shouldn't be nested -- included it around code only. */\n#ifdef _begin_code_h\n#error Nested inclusion of begin_code.h\n#endif\n#define _begin_code_h\n\n#ifndef SDL_DEPRECATED\n#  if (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */\n#    define SDL_DEPRECATED __attribute__((deprecated))\n#  else\n#    define SDL_DEPRECATED\n#  endif\n#endif\n\n#ifndef SDL_UNUSED\n#  ifdef __GNUC__\n#    define SDL_UNUSED __attribute__((unused))\n#  else\n#    define SDL_UNUSED\n#  endif\n#endif\n\n/* Some compilers use a special export keyword */\n#ifndef DECLSPEC\n# if defined(__WIN32__) || defined(__WINRT__)\n#  ifdef __BORLANDC__\n#   ifdef BUILD_SDL\n#    define DECLSPEC\n#   else\n#    define DECLSPEC    __declspec(dllimport)\n#   endif\n#  else\n#   define DECLSPEC __declspec(dllexport)\n#  endif\n# elif defined(__OS2__)\n#   ifdef BUILD_SDL\n#    define DECLSPEC    __declspec(dllexport)\n#   else\n#    define DECLSPEC\n#   endif\n# else\n#  if defined(__GNUC__) && __GNUC__ >= 4\n#   define DECLSPEC __attribute__ ((visibility(\"default\")))\n#  else\n#   define DECLSPEC\n#  endif\n# endif\n#endif\n\n/* By default SDL uses the C calling convention */\n#ifndef SDLCALL\n#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)\n#define SDLCALL __cdecl\n#elif defined(__OS2__) || defined(__EMX__)\n#define SDLCALL _System\n# if defined (__GNUC__) && !defined(_System)\n#  define _System /* for old EMX/GCC compat.  */\n# endif\n#else\n#define SDLCALL\n#endif\n#endif /* SDLCALL */\n\n/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */\n#ifdef __SYMBIAN32__\n#undef DECLSPEC\n#define DECLSPEC\n#endif /* __SYMBIAN32__ */\n\n/* Force structure packing at 4 byte alignment.\n   This is necessary if the header is included in code which has structure\n   packing set to an alternate value, say for loading structures from disk.\n   The packing is reset to the previous value in close_code.h\n */\n#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)\n#ifdef _MSC_VER\n#pragma warning(disable: 4103)\n#endif\n#ifdef __clang__\n#pragma clang diagnostic ignored \"-Wpragma-pack\"\n#endif\n#ifdef __BORLANDC__\n#pragma nopackwarning\n#endif\n#ifdef _M_X64\n/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */\n#pragma pack(push,8)\n#else\n#pragma pack(push,4)\n#endif\n#endif /* Compiler needs structure packing set */\n\n#ifndef SDL_INLINE\n#if defined(__GNUC__)\n#define SDL_INLINE __inline__\n#elif defined(_MSC_VER) || defined(__BORLANDC__) || \\\n      defined(__DMC__) || defined(__SC__) || \\\n      defined(__WATCOMC__) || defined(__LCC__) || \\\n      defined(__DECC) || defined(__CC_ARM)\n#define SDL_INLINE __inline\n#ifndef __inline__\n#define __inline__ __inline\n#endif\n#else\n#define SDL_INLINE inline\n#ifndef __inline__\n#define __inline__ inline\n#endif\n#endif\n#endif /* SDL_INLINE not defined */\n\n#ifndef SDL_FORCE_INLINE\n#if defined(_MSC_VER)\n#define SDL_FORCE_INLINE __forceinline\n#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )\n#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__\n#else\n#define SDL_FORCE_INLINE static SDL_INLINE\n#endif\n#endif /* SDL_FORCE_INLINE not defined */\n\n#ifndef SDL_NORETURN\n#if defined(__GNUC__)\n#define SDL_NORETURN __attribute__((noreturn))\n#elif defined(_MSC_VER)\n#define SDL_NORETURN __declspec(noreturn)\n#else\n#define SDL_NORETURN\n#endif\n#endif /* SDL_NORETURN not defined */\n\n/* Apparently this is needed by several Windows compilers */\n#if !defined(__MACH__)\n#ifndef NULL\n#ifdef __cplusplus\n#define NULL 0\n#else\n#define NULL ((void *)0)\n#endif\n#endif /* NULL */\n#endif /* ! Mac OS X - breaks precompiled headers */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/include/SDL2/close_code.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file close_code.h\n *\n *  This file reverses the effects of begin_code.h and should be included\n *  after you finish any function and structure declarations in your headers\n */\n\n#ifndef _begin_code_h\n#error close_code.h included without matching begin_code.h\n#endif\n#undef _begin_code_h\n\n/* Reset structure packing at previous byte alignment */\n#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)\n#ifdef __BORLANDC__\n#pragma nopackwarning\n#endif\n#pragma pack(pop)\n#endif /* Compiler needs structure packing set */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake",
    "content": "# sdl2 cmake project-config input for ./configure scripts\n\nset(prefix \"/opt/local/i686-w64-mingw32\") \nset(exec_prefix \"${prefix}\")\nset(libdir \"${exec_prefix}/lib\")\nset(SDL2_PREFIX \"/opt/local/i686-w64-mingw32\")\nset(SDL2_EXEC_PREFIX \"/opt/local/i686-w64-mingw32\")\nset(SDL2_LIBDIR \"${exec_prefix}/lib\")\nset(SDL2_INCLUDE_DIRS \"${prefix}/include/SDL2\")\nset(SDL2_LIBRARIES \"-L${SDL2_LIBDIR}  -lmingw32 -lSDL2main -lSDL2 -mwindows\")\nstring(STRIP \"${SDL2_LIBRARIES}\" SDL2_LIBRARIES)\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/lib/libSDL2.la",
    "content": "# libSDL2.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname='../bin/SDL2.dll'\n\n# Names of this library.\nlibrary_names='libSDL2.dll.a'\n\n# The name of the static archive.\nold_library='libSDL2.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2.\ncurrent=10\nage=10\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/i686-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/lib/libSDL2_test.la",
    "content": "# libSDL2_test.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname=''\n\n# Names of this library.\nlibrary_names=''\n\n# The name of the static archive.\nold_library='libSDL2_test.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=''\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2_test.\ncurrent=0\nage=0\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/i686-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/lib/libSDL2main.la",
    "content": "# libSDL2main.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname=''\n\n# Names of this library.\nlibrary_names=''\n\n# The name of the static archive.\nold_library='libSDL2main.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=''\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2main.\ncurrent=0\nage=0\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/i686-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/lib/pkgconfig/sdl2.pc",
    "content": "# sdl pkg-config source file\n\nprefix=/opt/local/i686-w64-mingw32\nexec_prefix=${prefix}\nlibdir=${exec_prefix}/lib\nincludedir=${prefix}/include\n\nName: sdl2\nDescription: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.\nVersion: 2.0.10\nRequires:\nConflicts:\nLibs: -L${libdir}  -lmingw32 -lSDL2main -lSDL2 -mwindows\nLibs.private: -lmingw32 -lSDL2main -lSDL2 -mwindows  -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc\nCflags: -I${includedir}/SDL2  -Dmain=SDL_main\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/i686-w64-mingw32/share/aclocal/sdl2.m4",
    "content": "# Configure paths for SDL\n# Sam Lantinga 9/21/99\n# stolen from Manish Singh\n# stolen back from Frank Belew\n# stolen from Manish Singh\n# Shamelessly stolen from Owen Taylor\n#\n# Changelog:\n# * also look for SDL2.framework under Mac OS X\n\n# serial 1\n\ndnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])\ndnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS\ndnl\nAC_DEFUN([AM_PATH_SDL2],\n[dnl \ndnl Get the cflags and libraries from the sdl2-config script\ndnl\nAC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],\n            sdl_prefix=\"$withval\", sdl_prefix=\"\")\nAC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],\n            sdl_exec_prefix=\"$withval\", sdl_exec_prefix=\"\")\nAC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],\n\t\t    , enable_sdltest=yes)\nAC_ARG_ENABLE(sdlframework, [  --disable-sdlframework Do not search for SDL2.framework],\n        , search_sdl_framework=yes)\n\nAC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])\n\n  min_sdl_version=ifelse([$1], ,2.0.0,$1)\n\n  if test \"x$sdl_prefix$sdl_exec_prefix\" = x ; then\n    PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],\n           [sdl_pc=yes],\n           [sdl_pc=no])\n  else\n    sdl_pc=no\n    if test x$sdl_exec_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --exec-prefix=$sdl_exec_prefix\"\n      if test x${SDL2_CONFIG+set} != xset ; then\n        SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config\n      fi\n    fi\n    if test x$sdl_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --prefix=$sdl_prefix\"\n      if test x${SDL2_CONFIG+set} != xset ; then\n        SDL2_CONFIG=$sdl_prefix/bin/sdl2-config\n      fi\n    fi\n  fi\n\n  if test \"x$sdl_pc\" = xyes ; then\n    no_sdl=\"\"\n    SDL2_CONFIG=\"pkg-config sdl2\"\n  else\n    as_save_PATH=\"$PATH\"\n    if test \"x$prefix\" != xNONE && test \"$cross_compiling\" != yes; then\n      PATH=\"$prefix/bin:$prefix/usr/bin:$PATH\"\n    fi\n    AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])\n    PATH=\"$as_save_PATH\"\n    no_sdl=\"\"\n\n    if test \"$SDL2_CONFIG\" = \"no\" -a \"x$search_sdl_framework\" = \"xyes\"; then\n      AC_MSG_CHECKING(for SDL2.framework)\n      if test \"x$SDL2_FRAMEWORK\" != x; then\n        sdl_framework=$SDL2_FRAMEWORK\n      else\n        for d in / ~/ /System/; do\n          if test -d \"$dLibrary/Frameworks/SDL2.framework\"; then\n            sdl_framework=\"$dLibrary/Frameworks/SDL2.framework\"\n          fi\n        done\n      fi\n\n      if test x\"$sdl_framework\" != x && test -d \"$sdl_framework\"; then\n        AC_MSG_RESULT($sdl_framework)\n        sdl_framework_dir=`dirname $sdl_framework`\n        SDL_CFLAGS=\"-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include\"\n        SDL_LIBS=\"-F$sdl_framework_dir -Wl,-framework,SDL2\"\n      else\n        no_sdl=yes\n      fi\n    fi\n\n    if test \"$SDL2_CONFIG\" != \"no\"; then\n      if test \"x$sdl_pc\" = \"xno\"; then\n        AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)\n        SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`\n        SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`\n      fi\n\n      sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\1/'`\n      sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\2/'`\n      sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\3/'`\n      if test \"x$enable_sdltest\" = \"xyes\" ; then\n        ac_save_CFLAGS=\"$CFLAGS\"\n        ac_save_CXXFLAGS=\"$CXXFLAGS\"\n        ac_save_LIBS=\"$LIBS\"\n        CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n        CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n        LIBS=\"$LIBS $SDL_LIBS\"\ndnl\ndnl Now check if the installed SDL is sufficiently new. (Also sanity\ndnl checks the results of sdl2-config to some extent\ndnl\n      rm -f conf.sdltest\n      AC_TRY_RUN([\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"SDL.h\"\n\nchar*\nmy_strdup (char *str)\n{\n  char *new_str;\n  \n  if (str)\n    {\n      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));\n      strcpy (new_str, str);\n    }\n  else\n    new_str = NULL;\n  \n  return new_str;\n}\n\nint main (int argc, char *argv[])\n{\n  int major, minor, micro;\n  char *tmp_version;\n\n  /* This hangs on some systems (?)\n  system (\"touch conf.sdltest\");\n  */\n  { FILE *fp = fopen(\"conf.sdltest\", \"a\"); if ( fp ) fclose(fp); }\n\n  /* HP/UX 9 (%@#!) writes to sscanf strings */\n  tmp_version = my_strdup(\"$min_sdl_version\");\n  if (sscanf(tmp_version, \"%d.%d.%d\", &major, &minor, &micro) != 3) {\n     printf(\"%s, bad version string\\n\", \"$min_sdl_version\");\n     exit(1);\n   }\n\n   if (($sdl_major_version > major) ||\n      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||\n      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))\n    {\n      return 0;\n    }\n  else\n    {\n      printf(\"\\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\\n\", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);\n      printf(\"*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\\n\", major, minor, micro);\n      printf(\"*** best to upgrade to the required version.\\n\");\n      printf(\"*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\\n\");\n      printf(\"*** to point to the correct copy of sdl2-config, and remove the file\\n\");\n      printf(\"*** config.cache before re-running configure\\n\");\n      return 1;\n    }\n}\n\n],, no_sdl=yes,[echo $ac_n \"cross compiling; assumed OK... $ac_c\"])\n        CFLAGS=\"$ac_save_CFLAGS\"\n        CXXFLAGS=\"$ac_save_CXXFLAGS\"\n        LIBS=\"$ac_save_LIBS\"\n\n      fi\n      if test \"x$sdl_pc\" = \"xno\"; then\n        if test \"x$no_sdl\" = \"xyes\"; then\n          AC_MSG_RESULT(no)\n        else\n          AC_MSG_RESULT(yes)\n        fi\n      fi\n    fi\n  fi\n  if test \"x$no_sdl\" = x ; then\n     ifelse([$2], , :, [$2])\n  else\n     if test \"$SDL2_CONFIG\" = \"no\" ; then\n       echo \"*** The sdl2-config script installed by SDL could not be found\"\n       echo \"*** If SDL was installed in PREFIX, make sure PREFIX/bin is in\"\n       echo \"*** your path, or set the SDL2_CONFIG environment variable to the\"\n       echo \"*** full path to sdl2-config.\"\n     else\n       if test -f conf.sdltest ; then\n        :\n       else\n          echo \"*** Could not run SDL test program, checking why...\"\n          CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n          CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n          LIBS=\"$LIBS $SDL_LIBS\"\n          AC_TRY_LINK([\n#include <stdio.h>\n#include \"SDL.h\"\n\nint main(int argc, char *argv[])\n{ return 0; }\n#undef  main\n#define main K_and_R_C_main\n],      [ return 0; ],\n        [ echo \"*** The test program compiled, but did not run. This usually means\"\n          echo \"*** that the run-time linker is not finding SDL or finding the wrong\"\n          echo \"*** version of SDL. If it is not finding SDL, you'll need to set your\"\n          echo \"*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point\"\n          echo \"*** to the installed location  Also, make sure you have run ldconfig if that\"\n          echo \"*** is required on your system\"\n\t  echo \"***\"\n          echo \"*** If you have an old version installed, it is best to remove it, although\"\n          echo \"*** you may also be able to get things to work by modifying LD_LIBRARY_PATH\"],\n        [ echo \"*** The test program failed to compile or link. See the file config.log for the\"\n          echo \"*** exact error that occured. This usually means SDL was incorrectly installed\"\n          echo \"*** or that you have moved SDL since it was installed. In the latter case, you\"\n          echo \"*** may want to edit the sdl2-config script: $SDL2_CONFIG\" ])\n          CFLAGS=\"$ac_save_CFLAGS\"\n          CXXFLAGS=\"$ac_save_CXXFLAGS\"\n          LIBS=\"$ac_save_LIBS\"\n       fi\n     fi\n     SDL_CFLAGS=\"\"\n     SDL_LIBS=\"\"\n     ifelse([$3], , :, [$3])\n  fi\n  AC_SUBST(SDL_CFLAGS)\n  AC_SUBST(SDL_LIBS)\n  rm -f conf.sdltest\n])\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 2.8.11)\nproject(SDL2 C)\n\n# Global settings for all of the test targets\n# FIXME: is this wrong?\nremove_definitions(-DUSING_GENERATED_CONFIG_H)\nlink_libraries(SDL2_test SDL2-static)\n\n# FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,\n# but we need them for VS as well.\nif(WINDOWS)\n    link_libraries(SDL2main)\n    add_definitions(-Dmain=SDL_main)\nendif()\n\nadd_executable(checkkeys checkkeys.c)\nadd_executable(loopwave loopwave.c)\nadd_executable(loopwavequeue loopwavequeue.c)\nadd_executable(testresample testresample.c)\nadd_executable(testaudioinfo testaudioinfo.c)\n\nfile(GLOB TESTAUTOMATION_SOURCE_FILES testautomation*.c)\nadd_executable(testautomation ${TESTAUTOMATION_SOURCE_FILES})\n\nadd_executable(testmultiaudio testmultiaudio.c)\nadd_executable(testaudiohotplug testaudiohotplug.c)\nadd_executable(testaudiocapture testaudiocapture.c)\nadd_executable(testatomic testatomic.c)\nadd_executable(testintersections testintersections.c)\nadd_executable(testrelative testrelative.c)\nadd_executable(testhittesting testhittesting.c)\nadd_executable(testdraw2 testdraw2.c)\nadd_executable(testdrawchessboard testdrawchessboard.c)\nadd_executable(testdropfile testdropfile.c)\nadd_executable(testerror testerror.c)\nadd_executable(testfile testfile.c)\nadd_executable(testgamecontroller testgamecontroller.c)\nadd_executable(testgesture testgesture.c)\nadd_executable(testgl2 testgl2.c)\nadd_executable(testgles testgles.c)\nadd_executable(testgles2 testgles2.c)\nadd_executable(testhaptic testhaptic.c)\nadd_executable(testhotplug testhotplug.c)\nadd_executable(testrumble testrumble.c)\nadd_executable(testthread testthread.c)\nadd_executable(testiconv testiconv.c)\nadd_executable(testime testime.c)\nadd_executable(testjoystick testjoystick.c)\nadd_executable(testkeys testkeys.c)\nadd_executable(testloadso testloadso.c)\nadd_executable(testlock testlock.c)\n\nif(APPLE)\n    add_executable(testnative testnative.c\n                              testnativecocoa.m\n                              testnativex11.c)\nelseif(WINDOWS)\n    add_executable(testnative testnative.c testnativew32.c)\nelseif(UNIX)\n    add_executable(testnative testnative.c testnativex11.c)\nendif()\n\nadd_executable(testoverlay2 testoverlay2.c testyuv_cvt.c)\nadd_executable(testplatform testplatform.c)\nadd_executable(testpower testpower.c)\nadd_executable(testfilesystem testfilesystem.c)\nadd_executable(testrendertarget testrendertarget.c)\nadd_executable(testscale testscale.c)\nadd_executable(testsem testsem.c)\nadd_executable(testshader testshader.c)\nadd_executable(testshape testshape.c)\nadd_executable(testsprite2 testsprite2.c)\nadd_executable(testspriteminimal testspriteminimal.c)\nadd_executable(teststreaming teststreaming.c)\nadd_executable(testtimer testtimer.c)\nadd_executable(testver testver.c)\nadd_executable(testviewport testviewport.c)\nadd_executable(testwm2 testwm2.c)\nadd_executable(testyuv testyuv.c testyuv_cvt.c)\nadd_executable(torturethread torturethread.c)\nadd_executable(testrendercopyex testrendercopyex.c)\nadd_executable(testmessage testmessage.c)\nadd_executable(testdisplayinfo testdisplayinfo.c)\nadd_executable(testqsort testqsort.c)\nadd_executable(testbounds testbounds.c)\nadd_executable(testcustomcursor testcustomcursor.c)\nadd_executable(controllermap controllermap.c)\nadd_executable(testvulkan testvulkan.c)\n\n# HACK: Dummy target to cause the resource files to be copied to the build directory.\n# Need to make it an executable so we can use the TARGET_FILE_DIR generator expression.\n# This is needed so they get copied to the correct Debug/Release subdirectory in Xcode.\nfile(WRITE ${CMAKE_CURRENT_BINARY_DIR}/resources_dummy.c \"int main(int argc, const char **argv){ return 1; }\\n\")\nadd_executable(SDL2_test_resoureces ${CMAKE_CURRENT_BINARY_DIR}/resources_dummy.c)\n\nfile(GLOB RESOURCE_FILES *.bmp *.wav)\nforeach(RESOURCE_FILE ${RESOURCE_FILES})\n    add_custom_command(TARGET SDL2_test_resoureces POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:SDL2_test_resoureces>)\nendforeach(RESOURCE_FILE)\n\nfile(COPY ${RESOURCE_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})\n\n# TODO: Might be easier to make all targets depend on the resources...?\nadd_dependencies(testscale SDL2_test_resoureces)\nadd_dependencies(testrendercopyex SDL2_test_resoureces)\nadd_dependencies(controllermap SDL2_test_resoureces)\nadd_dependencies(testyuv SDL2_test_resoureces)\nadd_dependencies(testgamecontroller SDL2_test_resoureces)\nadd_dependencies(testshape SDL2_test_resoureces)\nadd_dependencies(testshader SDL2_test_resoureces)\nadd_dependencies(testnative SDL2_test_resoureces)\nadd_dependencies(testspriteminimal SDL2_test_resoureces)\nadd_dependencies(testautomation SDL2_test_resoureces)\nadd_dependencies(testcustomcursor SDL2_test_resoureces)\nadd_dependencies(testrendertarget SDL2_test_resoureces)\nadd_dependencies(testsprite2 SDL2_test_resoureces)\n\nadd_dependencies(loopwave SDL2_test_resoureces)\nadd_dependencies(loopwavequeue SDL2_test_resoureces)\nadd_dependencies(testresample SDL2_test_resoureces)\nadd_dependencies(testaudiohotplug SDL2_test_resoureces)\nadd_dependencies(testmultiaudio SDL2_test_resoureces)\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/COPYING",
    "content": "\nThe test programs in this directory tree are for demonstrating and\ntesting the functionality of the SDL library, and are placed in the\npublic domain.\n\nOctober 28, 1997\n--\n\tSam Lantinga\t\t\t\t(slouken@libsdl.org)\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/Makefile.in",
    "content": "# Makefile to build the SDL tests\n\nsrcdir  = @srcdir@\n\nCC      = @CC@\nEXE\t= @EXE@\nCFLAGS  = @CFLAGS@ -g\nLIBS\t= @LIBS@\n\nTARGETS = \\\n\tcheckkeys$(EXE) \\\n\tcontrollermap$(EXE) \\\n\tloopwave$(EXE) \\\n\tloopwavequeue$(EXE) \\\n\ttestatomic$(EXE) \\\n\ttestaudiocapture$(EXE) \\\n\ttestaudiohotplug$(EXE) \\\n\ttestaudioinfo$(EXE) \\\n\ttestautomation$(EXE) \\\n\ttestbounds$(EXE) \\\n\ttestcustomcursor$(EXE) \\\n\ttestdisplayinfo$(EXE) \\\n\ttestdraw2$(EXE) \\\n\ttestdrawchessboard$(EXE) \\\n\ttestdropfile$(EXE) \\\n\ttesterror$(EXE) \\\n\ttestfile$(EXE) \\\n\ttestfilesystem$(EXE) \\\n\ttestgamecontroller$(EXE) \\\n\ttestgesture$(EXE) \\\n\ttesthaptic$(EXE) \\\n\ttesthittesting$(EXE) \\\n\ttesthotplug$(EXE) \\\n\ttesticonv$(EXE) \\\n\ttestime$(EXE) \\\n\ttestintersections$(EXE) \\\n\ttestjoystick$(EXE) \\\n\ttestkeys$(EXE) \\\n\ttestloadso$(EXE) \\\n\ttestlock$(EXE) \\\n\ttestmessage$(EXE) \\\n\ttestmultiaudio$(EXE) \\\n\ttestnative$(EXE) \\\n\ttestoverlay2$(EXE) \\\n\ttestplatform$(EXE) \\\n\ttestpower$(EXE) \\\n\ttestqsort$(EXE) \\\n\ttestrelative$(EXE) \\\n\ttestrendercopyex$(EXE) \\\n\ttestrendertarget$(EXE) \\\n\ttestresample$(EXE) \\\n\ttestrumble$(EXE) \\\n\ttestscale$(EXE) \\\n\ttestsem$(EXE) \\\n\ttestsensor$(EXE) \\\n\ttestshape$(EXE) \\\n\ttestsprite2$(EXE) \\\n\ttestspriteminimal$(EXE) \\\n\tteststreaming$(EXE) \\\n\ttestthread$(EXE) \\\n\ttesttimer$(EXE) \\\n\ttestver$(EXE) \\\n\ttestviewport$(EXE) \\\n\ttestvulkan$(EXE) \\\n\ttestwm2$(EXE) \\\n\ttestyuv$(EXE) \\\n\ttorturethread$(EXE) \\\n\n\t\n@OPENGL_TARGETS@ += testgl2$(EXE) testshader$(EXE)\n@OPENGLES1_TARGETS@ += testgles$(EXE)\n@OPENGLES2_TARGETS@ += testgles2$(EXE)\n\n\nall: Makefile $(TARGETS) copydatafiles\n\nMakefile: $(srcdir)/Makefile.in\n\t$(SHELL) config.status $@\n\ncheckkeys$(EXE): $(srcdir)/checkkeys.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\nloopwave$(EXE): $(srcdir)/loopwave.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\nloopwavequeue$(EXE): $(srcdir)/loopwavequeue.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestresample$(EXE): $(srcdir)/testresample.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestaudioinfo$(EXE): $(srcdir)/testaudioinfo.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestautomation$(EXE): $(srcdir)/testautomation.c \\\n\t\t      $(srcdir)/testautomation_audio.c \\\n\t\t      $(srcdir)/testautomation_clipboard.c \\\n\t\t      $(srcdir)/testautomation_events.c \\\n\t\t      $(srcdir)/testautomation_keyboard.c \\\n\t\t      $(srcdir)/testautomation_main.c \\\n\t\t      $(srcdir)/testautomation_mouse.c \\\n\t\t      $(srcdir)/testautomation_pixels.c \\\n\t\t      $(srcdir)/testautomation_platform.c \\\n\t\t      $(srcdir)/testautomation_rect.c \\\n\t\t      $(srcdir)/testautomation_render.c \\\n\t\t      $(srcdir)/testautomation_rwops.c \\\n\t\t      $(srcdir)/testautomation_sdltest.c \\\n\t\t      $(srcdir)/testautomation_stdlib.c \\\n\t\t      $(srcdir)/testautomation_surface.c \\\n\t\t      $(srcdir)/testautomation_syswm.c \\\n\t\t      $(srcdir)/testautomation_timer.c \\\n\t\t      $(srcdir)/testautomation_video.c \\\n\t\t      $(srcdir)/testautomation_hints.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) \n\ntestmultiaudio$(EXE): $(srcdir)/testmultiaudio.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestaudiocapture$(EXE): $(srcdir)/testaudiocapture.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestatomic$(EXE): $(srcdir)/testatomic.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestintersections$(EXE): $(srcdir)/testintersections.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestrelative$(EXE): $(srcdir)/testrelative.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntesthittesting$(EXE): $(srcdir)/testhittesting.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestdraw2$(EXE): $(srcdir)/testdraw2.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestdropfile$(EXE): $(srcdir)/testdropfile.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntesterror$(EXE): $(srcdir)/testerror.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestfile$(EXE): $(srcdir)/testfile.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestgamecontroller$(EXE): $(srcdir)/testgamecontroller.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n \ntestgesture$(EXE): $(srcdir)/testgesture.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n \ntestgl2$(EXE): $(srcdir)/testgl2.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n\ntestgles$(EXE): $(srcdir)/testgles.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@\n\ntestgles2$(EXE): $(srcdir)/testgles2.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n\ntesthaptic$(EXE): $(srcdir)/testhaptic.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntesthotplug$(EXE): $(srcdir)/testhotplug.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestrumble$(EXE): $(srcdir)/testrumble.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestthread$(EXE): $(srcdir)/testthread.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntesticonv$(EXE): $(srcdir)/testiconv.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestime$(EXE): $(srcdir)/testime.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@\n\ntestjoystick$(EXE): $(srcdir)/testjoystick.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestkeys$(EXE): $(srcdir)/testkeys.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestloadso$(EXE): $(srcdir)/testloadso.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestlock$(EXE): $(srcdir)/testlock.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\nifeq (@ISMACOSX@,true)\ntestnative$(EXE): $(srcdir)/testnative.c \\\n\t\t\t$(srcdir)/testnativecocoa.m \\\n\t\t\t$(srcdir)/testnativex11.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@\nendif\n\nifeq (@ISWINDOWS@,true)\ntestnative$(EXE): $(srcdir)/testnative.c \\\n\t\t\t$(srcdir)/testnativew32.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\nendif\n\nifeq (@ISUNIX@,true)\ntestnative$(EXE): $(srcdir)/testnative.c \\\n\t\t\t$(srcdir)/testnativex11.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@\nendif\n\n#there's probably a better way of doing this\nifeq (@ISMACOSX@,false)\nifeq (@ISWINDOWS@,false)\nifeq (@ISUNIX@,false)\ntestnative$(EXE): ;\nendif\nendif\nendif\n\ntestoverlay2$(EXE): $(srcdir)/testoverlay2.c $(srcdir)/testyuv_cvt.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestplatform$(EXE): $(srcdir)/testplatform.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestpower$(EXE): $(srcdir)/testpower.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestfilesystem$(EXE): $(srcdir)/testfilesystem.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestrendertarget$(EXE): $(srcdir)/testrendertarget.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestscale$(EXE): $(srcdir)/testscale.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestsem$(EXE): $(srcdir)/testsem.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestsensor$(EXE): $(srcdir)/testsensor.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestshader$(EXE): $(srcdir)/testshader.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@\n\ntestshape$(EXE): $(srcdir)/testshape.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestsprite2$(EXE): $(srcdir)/testsprite2.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestspriteminimal$(EXE): $(srcdir)/testspriteminimal.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n\nteststreaming$(EXE): $(srcdir)/teststreaming.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n\ntesttimer$(EXE): $(srcdir)/testtimer.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestver$(EXE): $(srcdir)/testver.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestviewport$(EXE): $(srcdir)/testviewport.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestwm2$(EXE): $(srcdir)/testwm2.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestyuv$(EXE): $(srcdir)/testyuv.c $(srcdir)/testyuv_cvt.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntorturethread$(EXE): $(srcdir)/torturethread.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestrendercopyex$(EXE): $(srcdir)/testrendercopyex.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@\n\ntestmessage$(EXE): $(srcdir)/testmessage.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestqsort$(EXE): $(srcdir)/testqsort.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestbounds$(EXE): $(srcdir)/testbounds.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestcustomcursor$(EXE): $(srcdir)/testcustomcursor.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ncontrollermap$(EXE): $(srcdir)/controllermap.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\ntestvulkan$(EXE): $(srcdir)/testvulkan.c\n\t$(CC) -o $@ $^ $(CFLAGS) $(LIBS)\n\n\nclean:\n\trm -f $(TARGETS)\n\ndistclean: clean\n\trm -f Makefile\n\trm -f config.status config.cache config.log\n\trm -rf $(srcdir)/autom4te*\n\n\n%.bmp: $(srcdir)/%.bmp\n\tcp $< $@\n\n%.wav: $(srcdir)/%.wav\n\tcp $< $@\n\n%.dat: $(srcdir)/%.dat\n\tcp $< $@\n\ncopydatafiles: copybmpfiles copywavfiles copydatfiles\n.PHONY : copydatafiles\n\ncopybmpfiles: $(foreach bmp,$(wildcard $(srcdir)/*.bmp),$(notdir $(bmp)))\n.PHONY : copybmpfiles\n\ncopywavfiles: $(foreach wav,$(wildcard $(srcdir)/*.wav),$(notdir $(wav)))\n.PHONY : copywavfiles\n\ncopydatfiles: $(foreach dat,$(wildcard $(srcdir)/*.dat),$(notdir $(dat)))\n.PHONY : copydatfiles\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/Makefile.os2",
    "content": "BINPATH = .\n\nTARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &\n          testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &\n          testfilesystem.exe testgamecontroller.exe testgesture.exe &\n          testhittesting.exe testhotplug.exe testiconv.exe testime.exe &\n          testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &\n          testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &\n          testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &\n          testrendertarget.exe testrumble.exe testscale.exe testsem.exe &\n          testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &\n          teststreaming.exe testthread.exe testtimer.exe testver.exe &\n          testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &\n          controllermap.exe testhaptic.exe testqsort.exe testresample.exe &\n          testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &\n          testyuv.exe testgl2.exe testvulkan.exe testautomation.exe\n\n# SDL2test.lib sources (../src/test)\n\nCSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &\n        SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &\n        SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &\n        SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &\n        SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c\nTESTLIB = SDL2test.lib\n\n# testautomation sources\n\nTASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &\n         testautomation_events.c testautomation_hints.c &\n         testautomation_keyboard.c testautomation_main.c &\n         testautomation_mouse.c testautomation_pixels.c &\n         testautomation_platform.c testautomation_rect.c &\n         testautomation_render.c testautomation_rwops.c &\n         testautomation_sdltest.c testautomation_stdlib.c &\n         testautomation_surface.c testautomation_syswm.c &\n         testautomation_timer.c testautomation_video.c\n\nOBJS = $(TARGETS:.exe=.obj)\nCOBJS = $(CSRCS:.c=.obj)\nTAOBJS = $(TASRCS:.c=.obj)\n\nall: $(TARGETS)\n\nINCPATH = -I$(%WATCOM)/h/os2 -I$(%WATCOM)/h -I../include\n\nCFLAGS = $(INCPATH) -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei\n\nLIBPATH = ..\nLIBS    = SDL2.lib $(TESTLIB)\n\n#CFLAGS+= -DHAVE_SDL_TTF\n#LIBS_TTF = SDL2ttf.lib\n\n.c: ../src/test\n\n$(TESTLIB): $(COBJS)\n  wlib -q -b -n $@ $(COBJS)\n\n.obj.exe:\n  @%make $(TESTLIB)\n  wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@\n\n.c.obj:\n  wcc386 $(CFLAGS) -wcd=107 -fo=$^@ $<\n\n# specials\ntestautomation.exe: $(TAOBJS)\n  @%make $(TESTLIB)\n  wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@\n\ntestoverlay2.exe: testoverlay2.obj testyuv_cvt.obj\n  @%make $(TESTLIB)\n  wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@\n\ntestyuv.exe: testyuv.obj testyuv_cvt.obj\n  @%make $(TESTLIB)\n  wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@\n\ntestime.exe: testime.obj\n  @%make $(TESTLIB)\n  wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS) $(LIBS_TTF)} op q op el file {$<} name $@\n\nclean: .SYMBOLIC\n  @echo * Clean tests in $(BINPATH)\n  @if exist *.obj rm *.obj\n  @if exist *.err rm *.err\n\ndistclean: .SYMBOLIC clean\n  @if exist *.exe rm *.exe\n  @if exist $(TESTLIB) rm $(TESTLIB)\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/README",
    "content": "\nThese are test programs for the SDL library:\n\n\tcheckkeys\tWatch the key events to check the keyboard\n\tloopwave\tAudio test -- loop playing a WAV file\n\tloopwavequeue\tAudio test -- loop playing a WAV file with SDL_QueueAudio\n\ttestaudioinfo\tLists audio device capabilities\n\ttesterror\tTests multi-threaded error handling\n\ttestfile\tTests RWops layer\n\ttestgl2\t\tA very simple example of using OpenGL with SDL\n\ttesticonv\tTests international string conversion\n\ttestjoystick\tList joysticks and watch joystick events\n\ttestkeys\tList the available keyboard keys\n\ttestloadso\tTests the loadable library layer\n\ttestlock\tHacked up test of multi-threading and locking\n\ttestmultiaudio\tTests using several audio devices\n\ttestoverlay2\tTests the overlay flickering/scaling during playback.\n\ttestplatform\tTests types, endianness and cpu capabilities\n\ttestsem\t\tTests SDL's semaphore implementation\n\ttestshape\tTests shaped windows\n\ttestsprite2\tExample of fast sprite movement on the screen\n\ttestthread\tHacked up test of multi-threading\n\ttesttimer\tTest the timer facilities\n\ttestver\t\tCheck the version and dynamic loading and endianness\n\ttestwm2\t\tTest window manager -- title, icon, events\n\ttorturethread\tSimple test for thread creation/destruction\n\tcontrollermap   Useful to generate Game Controller API compatible maps\n\n\n\nThis directory contains sample.wav, which is a sample from Will Provost's\nsong, The Living Proof:\n\n     From the album The Living Proof\n     Publisher: 5 Guys Named Will\n     Copyright 1996 Will Provost\n\nYou can get a copy of the full song (and album!) from iTunes...\n\n    https://itunes.apple.com/us/album/the-living-proof/id4153978\n\nor Amazon...\n\n    http://www.amazon.com/The-Living-Proof-Will-Provost/dp/B00004R8RH\n\nThanks to Will for permitting us to distribute this sample with SDL!\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/acinclude.m4",
    "content": "# Configure paths for SDL\n# Sam Lantinga 9/21/99\n# stolen from Manish Singh\n# stolen back from Frank Belew\n# stolen from Manish Singh\n# Shamelessly stolen from Owen Taylor\n\n# serial 1\n\ndnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])\ndnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS\ndnl\nAC_DEFUN([AM_PATH_SDL2],\n[dnl \ndnl Get the cflags and libraries from the sdl2-config script\ndnl\nAC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],\n            sdl_prefix=\"$withval\", sdl_prefix=\"\")\nAC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],\n            sdl_exec_prefix=\"$withval\", sdl_exec_prefix=\"\")\nAC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],\n\t\t    , enable_sdltest=yes)\n\n  min_sdl_version=ifelse([$1], ,0.9.0,$1)\n\n  if test \"x$sdl_prefix$sdl_exec_prefix\" = x ; then\n    PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],\n           [sdl_pc=yes],\n           [sdl_pc=no])\n  else\n    sdl_pc=no\n    if test x$sdl_exec_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --exec-prefix=$sdl_exec_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config\n      fi\n    fi\n    if test x$sdl_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --prefix=$sdl_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_prefix/bin/sdl2-config\n      fi\n    fi\n  fi\n\n  if test \"x$sdl_pc\" = xyes ; then\n    no_sdl=\"\"\n    SDL_CONFIG=\"pkg-config sdl2\"\n  else\n    as_save_PATH=\"$PATH\"\n    if test \"x$prefix\" != xNONE && test \"$cross_compiling\" != yes; then\n      PATH=\"$prefix/bin:$prefix/usr/bin:$PATH\"\n    fi\n    AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])\n    PATH=\"$as_save_PATH\"\n    AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)\n    no_sdl=\"\"\n\n    if test \"$SDL_CONFIG\" = \"no\" ; then\n      no_sdl=yes\n    else\n      SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`\n      SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`\n\n      sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\1/'`\n      sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\2/'`\n      sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\3/'`\n      if test \"x$enable_sdltest\" = \"xyes\" ; then\n        ac_save_CFLAGS=\"$CFLAGS\"\n        ac_save_CXXFLAGS=\"$CXXFLAGS\"\n        ac_save_LIBS=\"$LIBS\"\n        CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n        CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n        LIBS=\"$LIBS $SDL_LIBS\"\ndnl\ndnl Now check if the installed SDL is sufficiently new. (Also sanity\ndnl checks the results of sdl2-config to some extent\ndnl\n      rm -f conf.sdltest\n      AC_TRY_RUN([\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"SDL.h\"\n\nchar*\nmy_strdup (char *str)\n{\n  char *new_str;\n  \n  if (str)\n    {\n      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));\n      strcpy (new_str, str);\n    }\n  else\n    new_str = NULL;\n  \n  return new_str;\n}\n\nint main (int argc, char *argv[])\n{\n  int major, minor, micro;\n  char *tmp_version;\n\n  /* This hangs on some systems (?)\n  system (\"touch conf.sdltest\");\n  */\n  { FILE *fp = fopen(\"conf.sdltest\", \"a\"); if ( fp ) fclose(fp); }\n\n  /* HP/UX 9 (%@#!) writes to sscanf strings */\n  tmp_version = my_strdup(\"$min_sdl_version\");\n  if (sscanf(tmp_version, \"%d.%d.%d\", &major, &minor, &micro) != 3) {\n     printf(\"%s, bad version string\\n\", \"$min_sdl_version\");\n     exit(1);\n   }\n\n   if (($sdl_major_version > major) ||\n      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||\n      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))\n    {\n      return 0;\n    }\n  else\n    {\n      printf(\"\\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\\n\", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);\n      printf(\"*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\\n\", major, minor, micro);\n      printf(\"*** best to upgrade to the required version.\\n\");\n      printf(\"*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\\n\");\n      printf(\"*** to point to the correct copy of sdl2-config, and remove the file\\n\");\n      printf(\"*** config.cache before re-running configure\\n\");\n      return 1;\n    }\n}\n\n],, no_sdl=yes,[echo $ac_n \"cross compiling; assumed OK... $ac_c\"])\n        CFLAGS=\"$ac_save_CFLAGS\"\n        CXXFLAGS=\"$ac_save_CXXFLAGS\"\n        LIBS=\"$ac_save_LIBS\"\n      fi\n    fi\n    if test \"x$no_sdl\" = x ; then\n      AC_MSG_RESULT(yes)\n    else\n      AC_MSG_RESULT(no)\n    fi\n  fi\n  if test \"x$no_sdl\" = x ; then\n     ifelse([$2], , :, [$2])\n  else\n     if test \"$SDL_CONFIG\" = \"no\" ; then\n       echo \"*** The sdl2-config script installed by SDL could not be found\"\n       echo \"*** If SDL was installed in PREFIX, make sure PREFIX/bin is in\"\n       echo \"*** your path, or set the SDL_CONFIG environment variable to the\"\n       echo \"*** full path to sdl2-config.\"\n     else\n       if test -f conf.sdltest ; then\n        :\n       else\n          echo \"*** Could not run SDL test program, checking why...\"\n          CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n          CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n          LIBS=\"$LIBS $SDL_LIBS\"\n          AC_TRY_LINK([\n#include <stdio.h>\n#include \"SDL.h\"\n\nint main(int argc, char *argv[])\n{ return 0; }\n#undef  main\n#define main K_and_R_C_main\n],      [ return 0; ],\n        [ echo \"*** The test program compiled, but did not run. This usually means\"\n          echo \"*** that the run-time linker is not finding SDL or finding the wrong\"\n          echo \"*** version of SDL. If it is not finding SDL, you'll need to set your\"\n          echo \"*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point\"\n          echo \"*** to the installed location  Also, make sure you have run ldconfig if that\"\n          echo \"*** is required on your system\"\n\t  echo \"***\"\n          echo \"*** If you have an old version installed, it is best to remove it, although\"\n          echo \"*** you may also be able to get things to work by modifying LD_LIBRARY_PATH\"],\n        [ echo \"*** The test program failed to compile or link. See the file config.log for the\"\n          echo \"*** exact error that occured. This usually means SDL was incorrectly installed\"\n          echo \"*** or that you have moved SDL since it was installed. In the latter case, you\"\n          echo \"*** may want to edit the sdl2-config script: $SDL_CONFIG\" ])\n          CFLAGS=\"$ac_save_CFLAGS\"\n          CXXFLAGS=\"$ac_save_CXXFLAGS\"\n          LIBS=\"$ac_save_LIBS\"\n       fi\n     fi\n     SDL_CFLAGS=\"\"\n     SDL_LIBS=\"\"\n     ifelse([$3], , :, [$3])\n  fi\n  AC_SUBST(SDL_CFLAGS)\n  AC_SUBST(SDL_LIBS)\n  rm -f conf.sdltest\n])\n# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-\n# serial 1 (pkg-config-0.24)\n# \n# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# PKG_PROG_PKG_CONFIG([MIN-VERSION])\n# ----------------------------------\nAC_DEFUN([PKG_PROG_PKG_CONFIG],\n[m4_pattern_forbid([^_?PKG_[A-Z_]+$])\nm4_pattern_allow([^PKG_CONFIG(_PATH)?$])\nAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])\nAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])\nAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])\n\nif test \"x$ac_cv_env_PKG_CONFIG_set\" != \"xset\"; then\n\tAC_PATH_TOOL([PKG_CONFIG], [pkg-config])\nfi\nif test -n \"$PKG_CONFIG\"; then\n\t_pkg_min_version=m4_default([$1], [0.9.0])\n\tAC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])\n\tif $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then\n\t\tAC_MSG_RESULT([yes])\n\telse\n\t\tAC_MSG_RESULT([no])\n\t\tPKG_CONFIG=\"\"\n\tfi\nfi[]dnl\n])# PKG_PROG_PKG_CONFIG\n\n# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])\n#\n# Check to see whether a particular set of modules exists.  Similar\n# to PKG_CHECK_MODULES(), but does not set variables or print errors.\n#\n# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])\n# only at the first occurence in configure.ac, so if the first place\n# it's called might be skipped (such as if it is within an \"if\", you\n# have to call PKG_CHECK_EXISTS manually\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_EXISTS],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nif test -n \"$PKG_CONFIG\" && \\\n    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors \"$1\"]); then\n  m4_default([$2], [:])\nm4_ifvaln([$3], [else\n  $3])dnl\nfi])\n\n# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])\n# ---------------------------------------------\nm4_define([_PKG_CONFIG],\n[if test -n \"$$1\"; then\n    pkg_cv_[]$1=\"$$1\"\n elif test -n \"$PKG_CONFIG\"; then\n    PKG_CHECK_EXISTS([$3],\n                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 \"$3\" 2>/dev/null`],\n\t\t     [pkg_failed=yes])\n else\n    pkg_failed=untried\nfi[]dnl\n])# _PKG_CONFIG\n\n# _PKG_SHORT_ERRORS_SUPPORTED\n# -----------------------------\nAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])\nif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then\n        _pkg_short_errors_supported=yes\nelse\n        _pkg_short_errors_supported=no\nfi[]dnl\n])# _PKG_SHORT_ERRORS_SUPPORTED\n\n\n# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],\n# [ACTION-IF-NOT-FOUND])\n#\n#\n# Note that if there is a possibility the first call to\n# PKG_CHECK_MODULES might not happen, you should be sure to include an\n# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac\n#\n#\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_MODULES],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl\nAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl\n\npkg_failed=no\nAC_MSG_CHECKING([for $1])\n\n_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])\n_PKG_CONFIG([$1][_LIBS], [libs], [$2])\n\nm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS\nand $1[]_LIBS to avoid the need to call pkg-config.\nSee the pkg-config man page for more details.])\n\nif test $pkg_failed = yes; then\n   \tAC_MSG_RESULT([no])\n        _PKG_SHORT_ERRORS_SUPPORTED\n        if test $_pkg_short_errors_supported = yes; then\n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors \"$2\" 2>&1`\n        else \n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors \"$2\" 2>&1`\n        fi\n\t# Put the nasty error message in config.log where it belongs\n\techo \"$$1[]_PKG_ERRORS\" >&AS_MESSAGE_LOG_FD\n\n\tm4_default([$4], [AC_MSG_ERROR(\n[Package requirements ($2) were not met:\n\n$$1_PKG_ERRORS\n\nConsider adjusting the PKG_CONFIG_PATH environment variable if you\ninstalled software in a non-standard prefix.\n\n_PKG_TEXT])dnl\n        ])\nelif test $pkg_failed = untried; then\n     \tAC_MSG_RESULT([no])\n\tm4_default([$4], [AC_MSG_FAILURE(\n[The pkg-config script could not be found or is too old.  Make sure it\nis in your PATH or set the PKG_CONFIG environment variable to the full\npath to pkg-config.\n\n_PKG_TEXT\n\nTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl\n        ])\nelse\n\t$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS\n\t$1[]_LIBS=$pkg_cv_[]$1[]_LIBS\n        AC_MSG_RESULT([yes])\n\t$3\nfi[]dnl\n])# PKG_CHECK_MODULES\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/aclocal.m4",
    "content": "# Configure paths for SDL\n# Sam Lantinga 9/21/99\n# stolen from Manish Singh\n# stolen back from Frank Belew\n# stolen from Manish Singh\n# Shamelessly stolen from Owen Taylor\n\n# serial 1\n\ndnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])\ndnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS\ndnl\nAC_DEFUN([AM_PATH_SDL2],\n[dnl \ndnl Get the cflags and libraries from the sdl2-config script\ndnl\nAC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],\n            sdl_prefix=\"$withval\", sdl_prefix=\"\")\nAC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],\n            sdl_exec_prefix=\"$withval\", sdl_exec_prefix=\"\")\nAC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],\n\t\t    , enable_sdltest=yes)\n\n  min_sdl_version=ifelse([$1], ,0.9.0,$1)\n\n  if test \"x$sdl_prefix$sdl_exec_prefix\" = x ; then\n    PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],\n           [sdl_pc=yes],\n           [sdl_pc=no])\n  else\n    sdl_pc=no\n    if test x$sdl_exec_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --exec-prefix=$sdl_exec_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config\n      fi\n    fi\n    if test x$sdl_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --prefix=$sdl_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_prefix/bin/sdl2-config\n      fi\n    fi\n  fi\n\n  if test \"x$sdl_pc\" = xyes ; then\n    no_sdl=\"\"\n    SDL_CONFIG=\"pkg-config sdl2\"\n  else\n    as_save_PATH=\"$PATH\"\n    if test \"x$prefix\" != xNONE && test \"$cross_compiling\" != yes; then\n      PATH=\"$prefix/bin:$prefix/usr/bin:$PATH\"\n    fi\n    AC_PATH_PROG(SDL_CONFIG, sdl2-config, no, [$PATH])\n    PATH=\"$as_save_PATH\"\n    AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)\n    no_sdl=\"\"\n\n    if test \"$SDL_CONFIG\" = \"no\" ; then\n      no_sdl=yes\n    else\n      SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`\n      SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`\n\n      sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\1/'`\n      sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\2/'`\n      sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\3/'`\n      if test \"x$enable_sdltest\" = \"xyes\" ; then\n        ac_save_CFLAGS=\"$CFLAGS\"\n        ac_save_CXXFLAGS=\"$CXXFLAGS\"\n        ac_save_LIBS=\"$LIBS\"\n        CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n        CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n        LIBS=\"$LIBS $SDL_LIBS\"\ndnl\ndnl Now check if the installed SDL is sufficiently new. (Also sanity\ndnl checks the results of sdl2-config to some extent\ndnl\n      rm -f conf.sdltest\n      AC_TRY_RUN([\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"SDL.h\"\n\nchar*\nmy_strdup (char *str)\n{\n  char *new_str;\n  \n  if (str)\n    {\n      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));\n      strcpy (new_str, str);\n    }\n  else\n    new_str = NULL;\n  \n  return new_str;\n}\n\nint main (int argc, char *argv[])\n{\n  int major, minor, micro;\n  char *tmp_version;\n\n  /* This hangs on some systems (?)\n  system (\"touch conf.sdltest\");\n  */\n  { FILE *fp = fopen(\"conf.sdltest\", \"a\"); if ( fp ) fclose(fp); }\n\n  /* HP/UX 9 (%@#!) writes to sscanf strings */\n  tmp_version = my_strdup(\"$min_sdl_version\");\n  if (sscanf(tmp_version, \"%d.%d.%d\", &major, &minor, &micro) != 3) {\n     printf(\"%s, bad version string\\n\", \"$min_sdl_version\");\n     exit(1);\n   }\n\n   if (($sdl_major_version > major) ||\n      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||\n      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))\n    {\n      return 0;\n    }\n  else\n    {\n      printf(\"\\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\\n\", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);\n      printf(\"*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\\n\", major, minor, micro);\n      printf(\"*** best to upgrade to the required version.\\n\");\n      printf(\"*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\\n\");\n      printf(\"*** to point to the correct copy of sdl2-config, and remove the file\\n\");\n      printf(\"*** config.cache before re-running configure\\n\");\n      return 1;\n    }\n}\n\n],, no_sdl=yes,[echo $ac_n \"cross compiling; assumed OK... $ac_c\"])\n        CFLAGS=\"$ac_save_CFLAGS\"\n        CXXFLAGS=\"$ac_save_CXXFLAGS\"\n        LIBS=\"$ac_save_LIBS\"\n      fi\n    fi\n    if test \"x$no_sdl\" = x ; then\n      AC_MSG_RESULT(yes)\n    else\n      AC_MSG_RESULT(no)\n    fi\n  fi\n  if test \"x$no_sdl\" = x ; then\n     ifelse([$2], , :, [$2])\n  else\n     if test \"$SDL_CONFIG\" = \"no\" ; then\n       echo \"*** The sdl2-config script installed by SDL could not be found\"\n       echo \"*** If SDL was installed in PREFIX, make sure PREFIX/bin is in\"\n       echo \"*** your path, or set the SDL_CONFIG environment variable to the\"\n       echo \"*** full path to sdl2-config.\"\n     else\n       if test -f conf.sdltest ; then\n        :\n       else\n          echo \"*** Could not run SDL test program, checking why...\"\n          CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n          CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n          LIBS=\"$LIBS $SDL_LIBS\"\n          AC_TRY_LINK([\n#include <stdio.h>\n#include \"SDL.h\"\n\nint main(int argc, char *argv[])\n{ return 0; }\n#undef  main\n#define main K_and_R_C_main\n],      [ return 0; ],\n        [ echo \"*** The test program compiled, but did not run. This usually means\"\n          echo \"*** that the run-time linker is not finding SDL or finding the wrong\"\n          echo \"*** version of SDL. If it is not finding SDL, you'll need to set your\"\n          echo \"*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point\"\n          echo \"*** to the installed location  Also, make sure you have run ldconfig if that\"\n          echo \"*** is required on your system\"\n\t  echo \"***\"\n          echo \"*** If you have an old version installed, it is best to remove it, although\"\n          echo \"*** you may also be able to get things to work by modifying LD_LIBRARY_PATH\"],\n        [ echo \"*** The test program failed to compile or link. See the file config.log for the\"\n          echo \"*** exact error that occured. This usually means SDL was incorrectly installed\"\n          echo \"*** or that you have moved SDL since it was installed. In the latter case, you\"\n          echo \"*** may want to edit the sdl2-config script: $SDL_CONFIG\" ])\n          CFLAGS=\"$ac_save_CFLAGS\"\n          CXXFLAGS=\"$ac_save_CXXFLAGS\"\n          LIBS=\"$ac_save_LIBS\"\n       fi\n     fi\n     SDL_CFLAGS=\"\"\n     SDL_LIBS=\"\"\n     ifelse([$3], , :, [$3])\n  fi\n  AC_SUBST(SDL_CFLAGS)\n  AC_SUBST(SDL_LIBS)\n  rm -f conf.sdltest\n])\n# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-\n# serial 1 (pkg-config-0.24)\n# \n# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful, but\n# WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n# General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n# As a special exception to the GNU General Public License, if you\n# distribute this file as part of a program that contains a\n# configuration script generated by Autoconf, you may include it under\n# the same distribution terms that you use for the rest of that program.\n\n# PKG_PROG_PKG_CONFIG([MIN-VERSION])\n# ----------------------------------\nAC_DEFUN([PKG_PROG_PKG_CONFIG],\n[m4_pattern_forbid([^_?PKG_[A-Z_]+$])\nm4_pattern_allow([^PKG_CONFIG(_PATH)?$])\nAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])\nAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])\nAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])\n\nif test \"x$ac_cv_env_PKG_CONFIG_set\" != \"xset\"; then\n\tAC_PATH_TOOL([PKG_CONFIG], [pkg-config])\nfi\nif test -n \"$PKG_CONFIG\"; then\n\t_pkg_min_version=m4_default([$1], [0.9.0])\n\tAC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])\n\tif $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then\n\t\tAC_MSG_RESULT([yes])\n\telse\n\t\tAC_MSG_RESULT([no])\n\t\tPKG_CONFIG=\"\"\n\tfi\nfi[]dnl\n])# PKG_PROG_PKG_CONFIG\n\n# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])\n#\n# Check to see whether a particular set of modules exists.  Similar\n# to PKG_CHECK_MODULES(), but does not set variables or print errors.\n#\n# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])\n# only at the first occurence in configure.ac, so if the first place\n# it's called might be skipped (such as if it is within an \"if\", you\n# have to call PKG_CHECK_EXISTS manually\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_EXISTS],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nif test -n \"$PKG_CONFIG\" && \\\n    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors \"$1\"]); then\n  m4_default([$2], [:])\nm4_ifvaln([$3], [else\n  $3])dnl\nfi])\n\n# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])\n# ---------------------------------------------\nm4_define([_PKG_CONFIG],\n[if test -n \"$$1\"; then\n    pkg_cv_[]$1=\"$$1\"\n elif test -n \"$PKG_CONFIG\"; then\n    PKG_CHECK_EXISTS([$3],\n                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 \"$3\" 2>/dev/null`],\n\t\t     [pkg_failed=yes])\n else\n    pkg_failed=untried\nfi[]dnl\n])# _PKG_CONFIG\n\n# _PKG_SHORT_ERRORS_SUPPORTED\n# -----------------------------\nAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])\nif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then\n        _pkg_short_errors_supported=yes\nelse\n        _pkg_short_errors_supported=no\nfi[]dnl\n])# _PKG_SHORT_ERRORS_SUPPORTED\n\n\n# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],\n# [ACTION-IF-NOT-FOUND])\n#\n#\n# Note that if there is a possibility the first call to\n# PKG_CHECK_MODULES might not happen, you should be sure to include an\n# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac\n#\n#\n# --------------------------------------------------------------\nAC_DEFUN([PKG_CHECK_MODULES],\n[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl\nAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl\nAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl\n\npkg_failed=no\nAC_MSG_CHECKING([for $1])\n\n_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])\n_PKG_CONFIG([$1][_LIBS], [libs], [$2])\n\nm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS\nand $1[]_LIBS to avoid the need to call pkg-config.\nSee the pkg-config man page for more details.])\n\nif test $pkg_failed = yes; then\n   \tAC_MSG_RESULT([no])\n        _PKG_SHORT_ERRORS_SUPPORTED\n        if test $_pkg_short_errors_supported = yes; then\n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors \"$2\" 2>&1`\n        else \n\t        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors \"$2\" 2>&1`\n        fi\n\t# Put the nasty error message in config.log where it belongs\n\techo \"$$1[]_PKG_ERRORS\" >&AS_MESSAGE_LOG_FD\n\n\tm4_default([$4], [AC_MSG_ERROR(\n[Package requirements ($2) were not met:\n\n$$1_PKG_ERRORS\n\nConsider adjusting the PKG_CONFIG_PATH environment variable if you\ninstalled software in a non-standard prefix.\n\n_PKG_TEXT])dnl\n        ])\nelif test $pkg_failed = untried; then\n     \tAC_MSG_RESULT([no])\n\tm4_default([$4], [AC_MSG_FAILURE(\n[The pkg-config script could not be found or is too old.  Make sure it\nis in your PATH or set the PKG_CONFIG environment variable to the full\npath to pkg-config.\n\n_PKG_TEXT\n\nTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl\n        ])\nelse\n\t$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS\n\t$1[]_LIBS=$pkg_cv_[]$1[]_LIBS\n        AC_MSG_RESULT([yes])\n\t$3\nfi[]dnl\n])# PKG_CHECK_MODULES\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/autogen.sh",
    "content": "#!/bin/sh\n#\n# Regenerate configuration files\ncp acinclude.m4 aclocal.m4\nfound=false\nfor autoconf in autoconf autoconf259 autoconf-2.59\ndo if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi\ndone\nif test x$found = xfalse; then\n    echo \"Couldn't find autoconf, aborting\"\n    exit 1\nfi\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/checkkeys.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program:  Loop, watching keystrokes\n   Note that you need to call SDL_PollEvent() or SDL_WaitEvent() to\n   pump the event loop and catch keystrokes.\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\nint done;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic void\nprint_string(char **text, size_t *maxlen, const char *fmt, ...)\n{\n    int len;\n    va_list ap;\n\n    va_start(ap, fmt);\n    len = SDL_vsnprintf(*text, *maxlen, fmt, ap);\n    if (len > 0) {\n        *text += len;\n        if ( ((size_t) len) < *maxlen ) {\n            *maxlen -= (size_t) len;\n        } else {\n            *maxlen = 0;\n        }\n    }\n    va_end(ap);\n}\n\nstatic void\nprint_modifiers(char **text, size_t *maxlen)\n{\n    int mod;\n    print_string(text, maxlen, \" modifiers:\");\n    mod = SDL_GetModState();\n    if (!mod) {\n        print_string(text, maxlen, \" (none)\");\n        return;\n    }\n    if (mod & KMOD_LSHIFT)\n        print_string(text, maxlen, \" LSHIFT\");\n    if (mod & KMOD_RSHIFT)\n        print_string(text, maxlen, \" RSHIFT\");\n    if (mod & KMOD_LCTRL)\n        print_string(text, maxlen, \" LCTRL\");\n    if (mod & KMOD_RCTRL)\n        print_string(text, maxlen, \" RCTRL\");\n    if (mod & KMOD_LALT)\n        print_string(text, maxlen, \" LALT\");\n    if (mod & KMOD_RALT)\n        print_string(text, maxlen, \" RALT\");\n    if (mod & KMOD_LGUI)\n        print_string(text, maxlen, \" LGUI\");\n    if (mod & KMOD_RGUI)\n        print_string(text, maxlen, \" RGUI\");\n    if (mod & KMOD_NUM)\n        print_string(text, maxlen, \" NUM\");\n    if (mod & KMOD_CAPS)\n        print_string(text, maxlen, \" CAPS\");\n    if (mod & KMOD_MODE)\n        print_string(text, maxlen, \" MODE\");\n}\n\nstatic void\nPrintModifierState()\n{\n    char message[512];\n    char *spot;\n    size_t left;\n\n    spot = message;\n    left = sizeof(message);\n\n    print_modifiers(&spot, &left);\n    SDL_Log(\"Initial state:%s\\n\", message);\n}\n\nstatic void\nPrintKey(SDL_Keysym * sym, SDL_bool pressed, SDL_bool repeat)\n{\n    char message[512];\n    char *spot;\n    size_t left;\n\n    spot = message;\n    left = sizeof(message);\n\n    /* Print the keycode, name and state */\n    if (sym->sym) {\n        print_string(&spot, &left,\n                \"Key %s:  scancode %d = %s, keycode 0x%08X = %s \",\n                pressed ? \"pressed \" : \"released\",\n                sym->scancode,\n                SDL_GetScancodeName(sym->scancode),\n                sym->sym, SDL_GetKeyName(sym->sym));\n    } else {\n        print_string(&spot, &left,\n                \"Unknown Key (scancode %d = %s) %s \",\n                sym->scancode,\n                SDL_GetScancodeName(sym->scancode),\n                pressed ? \"pressed \" : \"released\");\n    }\n    print_modifiers(&spot, &left);\n    if (repeat) {\n        print_string(&spot, &left, \" (repeat)\");\n    }\n    SDL_Log(\"%s\\n\", message);\n}\n\nstatic void\nPrintText(char *eventtype, char *text)\n{\n    char *spot, expanded[1024];\n\n    expanded[0] = '\\0';\n    for ( spot = text; *spot; ++spot )\n    {\n        size_t length = SDL_strlen(expanded);\n        SDL_snprintf(expanded + length, sizeof(expanded) - length, \"\\\\x%.2x\", (unsigned char)*spot);\n    }\n    SDL_Log(\"%s Text (%s): \\\"%s%s\\\"\\n\", eventtype, expanded, *text == '\"' ? \"\\\\\" : \"\", text);\n}\n\nvoid\nloop()\n{\n    SDL_Event event;\n    /* Check for events */\n    /*SDL_WaitEvent(&event); emscripten does not like waiting*/\n\n    while (SDL_PollEvent(&event)) {\n        switch (event.type) {\n        case SDL_KEYDOWN:\n        case SDL_KEYUP:\n            PrintKey(&event.key.keysym, (event.key.state == SDL_PRESSED) ? SDL_TRUE : SDL_FALSE, (event.key.repeat) ? SDL_TRUE : SDL_FALSE);\n            break;\n        case SDL_TEXTEDITING:\n            PrintText(\"EDIT\", event.text.text);\n            break;\n        case SDL_TEXTINPUT:\n            PrintText(\"INPUT\", event.text.text);\n            break;\n        case SDL_MOUSEBUTTONDOWN:\n            /* Left button quits the app, other buttons toggles text input */\n            if (event.button.button == SDL_BUTTON_LEFT) {\n                done = 1;\n            } else {\n                if (SDL_IsTextInputActive()) {\n                    SDL_Log(\"Stopping text input\\n\");\n                    SDL_StopTextInput();\n                } else {\n                    SDL_Log(\"Starting text input\\n\");\n                    SDL_StartTextInput();\n                }\n            }\n            break;\n        case SDL_QUIT:\n            done = 1;\n            break;\n        default:\n            break;\n        }\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Window *window;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL */\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    /* Set 640x480 video mode */\n    window = SDL_CreateWindow(\"CheckKeys Test\",\n                              SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,\n                              640, 480, 0);\n    if (!window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create 640x480 window: %s\\n\",\n                SDL_GetError());\n        quit(2);\n    }\n\n#if __IPHONEOS__\n    /* Creating the context creates the view, which we need to show keyboard */\n    SDL_GL_CreateContext(window);\n#endif\n\n    SDL_StartTextInput();\n\n    /* Print initial modifier state */\n    SDL_PumpEvents();\n    PrintModifierState();\n\n    /* Watch keystrokes */\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n\n    SDL_Quit();\n    return (0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/configure",
    "content": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.69.\n#\n#\n# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.\n#\n#\n# This configure script is free software; the Free Software Foundation\n# gives unlimited permission to copy, distribute and modify it.\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n# Use a proper internal environment variable to ensure we don't fall\n  # into an infinite loop, continuously re-executing ourselves.\n  if test x\"${_as_can_reexec}\" != xno && test \"x$CONFIG_SHELL\" != x; then\n    _as_can_reexec=no; export _as_can_reexec;\n    # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nas_fn_exit 255\n  fi\n  # We don't want this to propagate to other subprocesses.\n          { _as_can_reexec=; unset _as_can_reexec;}\nif test \"x$CONFIG_SHELL\" = x; then\n  as_bourne_compatible=\"if test -n \\\"\\${ZSH_VERSION+set}\\\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on \\${1+\\\"\\$@\\\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '\\${1+\\\"\\$@\\\"}'='\\\"\\$@\\\"'\n  setopt NO_GLOB_SUBST\nelse\n  case \\`(set -o) 2>/dev/null\\` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\"\n  as_required=\"as_fn_return () { (exit \\$1); }\nas_fn_success () { as_fn_return 0; }\nas_fn_failure () { as_fn_return 1; }\nas_fn_ret_success () { return 0; }\nas_fn_ret_failure () { return 1; }\n\nexitcode=0\nas_fn_success || { exitcode=1; echo as_fn_success failed.; }\nas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }\nas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }\nas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }\nif ( set x; as_fn_ret_success y && test x = \\\"\\$1\\\" ); then :\n\nelse\n  exitcode=1; echo positional parameters were not saved.\nfi\ntest x\\$exitcode = x0 || exit 1\ntest -x / || exit 1\"\n  as_suggested=\"  as_lineno_1=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_1a=\\$LINENO\n  as_lineno_2=\";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested\" as_lineno_2a=\\$LINENO\n  eval 'test \\\"x\\$as_lineno_1'\\$as_run'\\\" != \\\"x\\$as_lineno_2'\\$as_run'\\\" &&\n  test \\\"x\\`expr \\$as_lineno_1'\\$as_run' + 1\\`\\\" = \\\"x\\$as_lineno_2'\\$as_run'\\\"' || exit 1\"\n  if (eval \"$as_required\") 2>/dev/null; then :\n  as_have_required=yes\nelse\n  as_have_required=no\nfi\n  if test x$as_have_required = xyes && (eval \"$as_suggested\") 2>/dev/null; then :\n\nelse\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nas_found=false\nfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n  as_found=:\n  case $as_dir in #(\n\t /*)\n\t   for as_base in sh bash ksh sh5; do\n\t     # Try only shells that exist, to save several forks.\n\t     as_shell=$as_dir/$as_base\n\t     if { test -f \"$as_shell\" || test -f \"$as_shell.exe\"; } &&\n\t\t    { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$as_shell as_have_required=yes\n\t\t   if { $as_echo \"$as_bourne_compatible\"\"$as_suggested\" | as_run=a \"$as_shell\"; } 2>/dev/null; then :\n  break 2\nfi\nfi\n\t   done;;\n       esac\n  as_found=false\ndone\n$as_found || { if { test -f \"$SHELL\" || test -f \"$SHELL.exe\"; } &&\n\t      { $as_echo \"$as_bourne_compatible\"\"$as_required\" | as_run=a \"$SHELL\"; } 2>/dev/null; then :\n  CONFIG_SHELL=$SHELL as_have_required=yes\nfi; }\nIFS=$as_save_IFS\n\n\n      if test \"x$CONFIG_SHELL\" != x; then :\n  export CONFIG_SHELL\n             # We cannot yet assume a decent shell, so we have to provide a\n# neutralization value for shells without unset; and this also\n# works around shells that cannot unset nonexistent variables.\n# Preserve -v and -x to the replacement shell.\nBASH_ENV=/dev/null\nENV=/dev/null\n(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ncase $- in # ((((\n  *v*x* | *x*v* ) as_opts=-vx ;;\n  *v* ) as_opts=-v ;;\n  *x* ) as_opts=-x ;;\n  * ) as_opts= ;;\nesac\nexec $CONFIG_SHELL $as_opts \"$as_myself\" ${1+\"$@\"}\n# Admittedly, this is quite paranoid, since all the known shells bail\n# out after a failed `exec'.\n$as_echo \"$0: could not re-execute with $CONFIG_SHELL\" >&2\nexit 255\nfi\n\n    if test x$as_have_required = xno; then :\n  $as_echo \"$0: This script requires a shell more modern than all\"\n  $as_echo \"$0: the shells that I found on your system.\"\n  if test x${ZSH_VERSION+set} = xset ; then\n    $as_echo \"$0: In particular, zsh $ZSH_VERSION has bugs and should\"\n    $as_echo \"$0: be upgraded to zsh 4.3.4 or later.\"\n  else\n    $as_echo \"$0: Please tell bug-autoconf@gnu.org about your system,\n$0: including any error possibly output before this\n$0: message. Then install a modern shell, or manually run\n$0: the script under such a shell if you do have one.\"\n  fi\n  exit 1\nfi\nfi\nfi\nSHELL=${CONFIG_SHELL-/bin/sh}\nexport SHELL\n# Unset more variables known to interfere with behavior of common tools.\nCLICOLOR_FORCE= GREP_OPTIONS=\nunset CLICOLOR_FORCE GREP_OPTIONS\n\n## --------------------- ##\n## M4sh Shell Functions. ##\n## --------------------- ##\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\n\n  as_lineno_1=$LINENO as_lineno_1a=$LINENO\n  as_lineno_2=$LINENO as_lineno_2a=$LINENO\n  eval 'test \"x$as_lineno_1'$as_run'\" != \"x$as_lineno_2'$as_run'\" &&\n  test \"x`expr $as_lineno_1'$as_run' + 1`\" = \"x$as_lineno_2'$as_run'\"' || {\n  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)\n  sed -n '\n    p\n    /[$]LINENO/=\n  ' <$as_myself |\n    sed '\n      s/[$]LINENO.*/&-/\n      t lineno\n      b\n      :lineno\n      N\n      :loop\n      s/[$]LINENO\\([^'$as_cr_alnum'_].*\\n\\)\\(.*\\)/\\2\\1\\2/\n      t loop\n      s/-\\n.*//\n    ' >$as_me.lineno &&\n  chmod +x \"$as_me.lineno\" ||\n    { $as_echo \"$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell\" >&2; as_fn_exit 1; }\n\n  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have\n  # already done that, so ensure we don't try to do so again and fall\n  # in an infinite loop.  This has already happened in practice.\n  _as_can_reexec=no; export _as_can_reexec\n  # Don't try to exec as it changes $[0], causing all sort of problems\n  # (the dirname of $[0] is not the place where we might find the\n  # original and so on.  Autoconf is especially sensitive to this).\n  . \"./$as_me.lineno\"\n  # Exit status is that of the last command.\n  exit\n}\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\ntest -n \"$DJDIR\" || exec 7<&0 </dev/null\nexec 6>&1\n\n# Name of the host.\n# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,\n# so uname gets run too.\nac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`\n\n#\n# Initializations.\n#\nac_default_prefix=/usr/local\nac_clean_files=\nac_config_libobj_dir=.\nLIBOBJS=\ncross_compiling=no\nsubdirs=\nMFLAGS=\nMAKEFLAGS=\n\n# Identity of this package.\nPACKAGE_NAME=\nPACKAGE_TARNAME=\nPACKAGE_VERSION=\nPACKAGE_STRING=\nPACKAGE_BUGREPORT=\nPACKAGE_URL=\n\nac_unique_file=\"README\"\nac_subst_vars='LTLIBOBJS\nLIBOBJS\nSDL_TTF_LIB\nXLIB\nGLES2LIB\nGLESLIB\nGLLIB\nOPENGL_TARGETS\nOPENGLES2_TARGETS\nOPENGLES1_TARGETS\nCPP\nXMKMF\nSDL_CONFIG\nSDL_LIBS\nSDL_CFLAGS\nPKG_CONFIG_LIBDIR\nPKG_CONFIG_PATH\nPKG_CONFIG\nISUNIX\nISWINDOWS\nISMACOSX\nMATHLIB\nEXE\nOSMESA_CONFIG\nOBJEXT\nEXEEXT\nac_ct_CC\nCPPFLAGS\nLDFLAGS\nCFLAGS\nCC\nhost_os\nhost_vendor\nhost_cpu\nhost\nbuild_os\nbuild_vendor\nbuild_cpu\nbuild\ntarget_alias\nhost_alias\nbuild_alias\nLIBS\nECHO_T\nECHO_N\nECHO_C\nDEFS\nmandir\nlocaledir\nlibdir\npsdir\npdfdir\ndvidir\nhtmldir\ninfodir\ndocdir\noldincludedir\nincludedir\nlocalstatedir\nsharedstatedir\nsysconfdir\ndatadir\ndatarootdir\nlibexecdir\nsbindir\nbindir\nprogram_transform_name\nprefix\nexec_prefix\nPACKAGE_URL\nPACKAGE_BUGREPORT\nPACKAGE_STRING\nPACKAGE_VERSION\nPACKAGE_TARNAME\nPACKAGE_NAME\nPATH_SEPARATOR\nSHELL'\nac_subst_files=''\nac_user_opts='\nenable_option_checking\nwith_sdl_prefix\nwith_sdl_exec_prefix\nenable_sdltest\nwith_x\n'\n      ac_precious_vars='build_alias\nhost_alias\ntarget_alias\nCC\nCFLAGS\nLDFLAGS\nLIBS\nCPPFLAGS\nPKG_CONFIG\nPKG_CONFIG_PATH\nPKG_CONFIG_LIBDIR\nSDL_CFLAGS\nSDL_LIBS\nXMKMF\nCPP'\n\n\n# Initialize some variables set by options.\nac_init_help=\nac_init_version=false\nac_unrecognized_opts=\nac_unrecognized_sep=\n# The variables have the same names as the options, with\n# dashes changed to underlines.\ncache_file=/dev/null\nexec_prefix=NONE\nno_create=\nno_recursion=\nprefix=NONE\nprogram_prefix=NONE\nprogram_suffix=NONE\nprogram_transform_name=s,x,x,\nsilent=\nsite=\nsrcdir=\nverbose=\nx_includes=NONE\nx_libraries=NONE\n\n# Installation directory options.\n# These are left unexpanded so users can \"make install exec_prefix=/foo\"\n# and all the variables that are supposed to be based on exec_prefix\n# by default will actually change.\n# Use braces instead of parens because sh, perl, etc. also accept them.\n# (The list follows the same order as the GNU Coding Standards.)\nbindir='${exec_prefix}/bin'\nsbindir='${exec_prefix}/sbin'\nlibexecdir='${exec_prefix}/libexec'\ndatarootdir='${prefix}/share'\ndatadir='${datarootdir}'\nsysconfdir='${prefix}/etc'\nsharedstatedir='${prefix}/com'\nlocalstatedir='${prefix}/var'\nincludedir='${prefix}/include'\noldincludedir='/usr/include'\ndocdir='${datarootdir}/doc/${PACKAGE}'\ninfodir='${datarootdir}/info'\nhtmldir='${docdir}'\ndvidir='${docdir}'\npdfdir='${docdir}'\npsdir='${docdir}'\nlibdir='${exec_prefix}/lib'\nlocaledir='${datarootdir}/locale'\nmandir='${datarootdir}/man'\n\nac_prev=\nac_dashdash=\nfor ac_option\ndo\n  # If the previous option needs an argument, assign it.\n  if test -n \"$ac_prev\"; then\n    eval $ac_prev=\\$ac_option\n    ac_prev=\n    continue\n  fi\n\n  case $ac_option in\n  *=?*) ac_optarg=`expr \"X$ac_option\" : '[^=]*=\\(.*\\)'` ;;\n  *=)   ac_optarg= ;;\n  *)    ac_optarg=yes ;;\n  esac\n\n  # Accept the important Cygnus configure options, so we can diagnose typos.\n\n  case $ac_dashdash$ac_option in\n  --)\n    ac_dashdash=yes ;;\n\n  -bindir | --bindir | --bindi | --bind | --bin | --bi)\n    ac_prev=bindir ;;\n  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)\n    bindir=$ac_optarg ;;\n\n  -build | --build | --buil | --bui | --bu)\n    ac_prev=build_alias ;;\n  -build=* | --build=* | --buil=* | --bui=* | --bu=*)\n    build_alias=$ac_optarg ;;\n\n  -cache-file | --cache-file | --cache-fil | --cache-fi \\\n  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)\n    ac_prev=cache_file ;;\n  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \\\n  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)\n    cache_file=$ac_optarg ;;\n\n  --config-cache | -C)\n    cache_file=config.cache ;;\n\n  -datadir | --datadir | --datadi | --datad)\n    ac_prev=datadir ;;\n  -datadir=* | --datadir=* | --datadi=* | --datad=*)\n    datadir=$ac_optarg ;;\n\n  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \\\n  | --dataroo | --dataro | --datar)\n    ac_prev=datarootdir ;;\n  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \\\n  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)\n    datarootdir=$ac_optarg ;;\n\n  -disable-* | --disable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*disable-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=no ;;\n\n  -docdir | --docdir | --docdi | --doc | --do)\n    ac_prev=docdir ;;\n  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)\n    docdir=$ac_optarg ;;\n\n  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)\n    ac_prev=dvidir ;;\n  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)\n    dvidir=$ac_optarg ;;\n\n  -enable-* | --enable-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*enable-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid feature name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"enable_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval enable_$ac_useropt=\\$ac_optarg ;;\n\n  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \\\n  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \\\n  | --exec | --exe | --ex)\n    ac_prev=exec_prefix ;;\n  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \\\n  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \\\n  | --exec=* | --exe=* | --ex=*)\n    exec_prefix=$ac_optarg ;;\n\n  -gas | --gas | --ga | --g)\n    # Obsolete; use --with-gas.\n    with_gas=yes ;;\n\n  -help | --help | --hel | --he | -h)\n    ac_init_help=long ;;\n  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)\n    ac_init_help=recursive ;;\n  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)\n    ac_init_help=short ;;\n\n  -host | --host | --hos | --ho)\n    ac_prev=host_alias ;;\n  -host=* | --host=* | --hos=* | --ho=*)\n    host_alias=$ac_optarg ;;\n\n  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)\n    ac_prev=htmldir ;;\n  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \\\n  | --ht=*)\n    htmldir=$ac_optarg ;;\n\n  -includedir | --includedir | --includedi | --included | --include \\\n  | --includ | --inclu | --incl | --inc)\n    ac_prev=includedir ;;\n  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \\\n  | --includ=* | --inclu=* | --incl=* | --inc=*)\n    includedir=$ac_optarg ;;\n\n  -infodir | --infodir | --infodi | --infod | --info | --inf)\n    ac_prev=infodir ;;\n  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)\n    infodir=$ac_optarg ;;\n\n  -libdir | --libdir | --libdi | --libd)\n    ac_prev=libdir ;;\n  -libdir=* | --libdir=* | --libdi=* | --libd=*)\n    libdir=$ac_optarg ;;\n\n  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \\\n  | --libexe | --libex | --libe)\n    ac_prev=libexecdir ;;\n  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \\\n  | --libexe=* | --libex=* | --libe=*)\n    libexecdir=$ac_optarg ;;\n\n  -localedir | --localedir | --localedi | --localed | --locale)\n    ac_prev=localedir ;;\n  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)\n    localedir=$ac_optarg ;;\n\n  -localstatedir | --localstatedir | --localstatedi | --localstated \\\n  | --localstate | --localstat | --localsta | --localst | --locals)\n    ac_prev=localstatedir ;;\n  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \\\n  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)\n    localstatedir=$ac_optarg ;;\n\n  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)\n    ac_prev=mandir ;;\n  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)\n    mandir=$ac_optarg ;;\n\n  -nfp | --nfp | --nf)\n    # Obsolete; use --without-fp.\n    with_fp=no ;;\n\n  -no-create | --no-create | --no-creat | --no-crea | --no-cre \\\n  | --no-cr | --no-c | -n)\n    no_create=yes ;;\n\n  -no-recursion | --no-recursion | --no-recursio | --no-recursi \\\n  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)\n    no_recursion=yes ;;\n\n  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \\\n  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \\\n  | --oldin | --oldi | --old | --ol | --o)\n    ac_prev=oldincludedir ;;\n  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \\\n  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \\\n  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)\n    oldincludedir=$ac_optarg ;;\n\n  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)\n    ac_prev=prefix ;;\n  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)\n    prefix=$ac_optarg ;;\n\n  -program-prefix | --program-prefix | --program-prefi | --program-pref \\\n  | --program-pre | --program-pr | --program-p)\n    ac_prev=program_prefix ;;\n  -program-prefix=* | --program-prefix=* | --program-prefi=* \\\n  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)\n    program_prefix=$ac_optarg ;;\n\n  -program-suffix | --program-suffix | --program-suffi | --program-suff \\\n  | --program-suf | --program-su | --program-s)\n    ac_prev=program_suffix ;;\n  -program-suffix=* | --program-suffix=* | --program-suffi=* \\\n  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)\n    program_suffix=$ac_optarg ;;\n\n  -program-transform-name | --program-transform-name \\\n  | --program-transform-nam | --program-transform-na \\\n  | --program-transform-n | --program-transform- \\\n  | --program-transform | --program-transfor \\\n  | --program-transfo | --program-transf \\\n  | --program-trans | --program-tran \\\n  | --progr-tra | --program-tr | --program-t)\n    ac_prev=program_transform_name ;;\n  -program-transform-name=* | --program-transform-name=* \\\n  | --program-transform-nam=* | --program-transform-na=* \\\n  | --program-transform-n=* | --program-transform-=* \\\n  | --program-transform=* | --program-transfor=* \\\n  | --program-transfo=* | --program-transf=* \\\n  | --program-trans=* | --program-tran=* \\\n  | --progr-tra=* | --program-tr=* | --program-t=*)\n    program_transform_name=$ac_optarg ;;\n\n  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)\n    ac_prev=pdfdir ;;\n  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)\n    pdfdir=$ac_optarg ;;\n\n  -psdir | --psdir | --psdi | --psd | --ps)\n    ac_prev=psdir ;;\n  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)\n    psdir=$ac_optarg ;;\n\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil)\n    silent=yes ;;\n\n  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)\n    ac_prev=sbindir ;;\n  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \\\n  | --sbi=* | --sb=*)\n    sbindir=$ac_optarg ;;\n\n  -sharedstatedir | --sharedstatedir | --sharedstatedi \\\n  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \\\n  | --sharedst | --shareds | --shared | --share | --shar \\\n  | --sha | --sh)\n    ac_prev=sharedstatedir ;;\n  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \\\n  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \\\n  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \\\n  | --sha=* | --sh=*)\n    sharedstatedir=$ac_optarg ;;\n\n  -site | --site | --sit)\n    ac_prev=site ;;\n  -site=* | --site=* | --sit=*)\n    site=$ac_optarg ;;\n\n  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)\n    ac_prev=srcdir ;;\n  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)\n    srcdir=$ac_optarg ;;\n\n  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \\\n  | --syscon | --sysco | --sysc | --sys | --sy)\n    ac_prev=sysconfdir ;;\n  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \\\n  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)\n    sysconfdir=$ac_optarg ;;\n\n  -target | --target | --targe | --targ | --tar | --ta | --t)\n    ac_prev=target_alias ;;\n  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)\n    target_alias=$ac_optarg ;;\n\n  -v | -verbose | --verbose | --verbos | --verbo | --verb)\n    verbose=yes ;;\n\n  -version | --version | --versio | --versi | --vers | -V)\n    ac_init_version=: ;;\n\n  -with-* | --with-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*with-\\([^=]*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=\\$ac_optarg ;;\n\n  -without-* | --without-*)\n    ac_useropt=`expr \"x$ac_option\" : 'x-*without-\\(.*\\)'`\n    # Reject names that are not valid shell variable names.\n    expr \"x$ac_useropt\" : \".*[^-+._$as_cr_alnum]\" >/dev/null &&\n      as_fn_error $? \"invalid package name: $ac_useropt\"\n    ac_useropt_orig=$ac_useropt\n    ac_useropt=`$as_echo \"$ac_useropt\" | sed 's/[-+.]/_/g'`\n    case $ac_user_opts in\n      *\"\n\"with_$ac_useropt\"\n\"*) ;;\n      *) ac_unrecognized_opts=\"$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig\"\n\t ac_unrecognized_sep=', ';;\n    esac\n    eval with_$ac_useropt=no ;;\n\n  --x)\n    # Obsolete; use --with-x.\n    with_x=yes ;;\n\n  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \\\n  | --x-incl | --x-inc | --x-in | --x-i)\n    ac_prev=x_includes ;;\n  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \\\n  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)\n    x_includes=$ac_optarg ;;\n\n  -x-libraries | --x-libraries | --x-librarie | --x-librari \\\n  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)\n    ac_prev=x_libraries ;;\n  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \\\n  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)\n    x_libraries=$ac_optarg ;;\n\n  -*) as_fn_error $? \"unrecognized option: \\`$ac_option'\nTry \\`$0 --help' for more information\"\n    ;;\n\n  *=*)\n    ac_envvar=`expr \"x$ac_option\" : 'x\\([^=]*\\)='`\n    # Reject names that are not valid shell variable names.\n    case $ac_envvar in #(\n      '' | [0-9]* | *[!_$as_cr_alnum]* )\n      as_fn_error $? \"invalid variable name: \\`$ac_envvar'\" ;;\n    esac\n    eval $ac_envvar=\\$ac_optarg\n    export $ac_envvar ;;\n\n  *)\n    # FIXME: should be removed in autoconf 3.0.\n    $as_echo \"$as_me: WARNING: you should use --build, --host, --target\" >&2\n    expr \"x$ac_option\" : \".*[^-._$as_cr_alnum]\" >/dev/null &&\n      $as_echo \"$as_me: WARNING: invalid host type: $ac_option\" >&2\n    : \"${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}\"\n    ;;\n\n  esac\ndone\n\nif test -n \"$ac_prev\"; then\n  ac_option=--`echo $ac_prev | sed 's/_/-/g'`\n  as_fn_error $? \"missing argument to $ac_option\"\nfi\n\nif test -n \"$ac_unrecognized_opts\"; then\n  case $enable_option_checking in\n    no) ;;\n    fatal) as_fn_error $? \"unrecognized options: $ac_unrecognized_opts\" ;;\n    *)     $as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2 ;;\n  esac\nfi\n\n# Check all directory arguments for consistency.\nfor ac_var in\texec_prefix prefix bindir sbindir libexecdir datarootdir \\\n\t\tdatadir sysconfdir sharedstatedir localstatedir includedir \\\n\t\toldincludedir docdir infodir htmldir dvidir pdfdir psdir \\\n\t\tlibdir localedir mandir\ndo\n  eval ac_val=\\$$ac_var\n  # Remove trailing slashes.\n  case $ac_val in\n    */ )\n      ac_val=`expr \"X$ac_val\" : 'X\\(.*[^/]\\)' \\| \"X$ac_val\" : 'X\\(.*\\)'`\n      eval $ac_var=\\$ac_val;;\n  esac\n  # Be sure to have absolute directory names.\n  case $ac_val in\n    [\\\\/$]* | ?:[\\\\/]* )  continue;;\n    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;\n  esac\n  as_fn_error $? \"expected an absolute directory name for --$ac_var: $ac_val\"\ndone\n\n# There might be people who depend on the old broken behavior: `$host'\n# used to hold the argument of --host etc.\n# FIXME: To remove some day.\nbuild=$build_alias\nhost=$host_alias\ntarget=$target_alias\n\n# FIXME: To remove some day.\nif test \"x$host_alias\" != x; then\n  if test \"x$build_alias\" = x; then\n    cross_compiling=maybe\n  elif test \"x$build_alias\" != \"x$host_alias\"; then\n    cross_compiling=yes\n  fi\nfi\n\nac_tool_prefix=\ntest -n \"$host_alias\" && ac_tool_prefix=$host_alias-\n\ntest \"$silent\" = yes && exec 6>/dev/null\n\n\nac_pwd=`pwd` && test -n \"$ac_pwd\" &&\nac_ls_di=`ls -di .` &&\nac_pwd_ls_di=`cd \"$ac_pwd\" && ls -di .` ||\n  as_fn_error $? \"working directory cannot be determined\"\ntest \"X$ac_ls_di\" = \"X$ac_pwd_ls_di\" ||\n  as_fn_error $? \"pwd does not report name of working directory\"\n\n\n# Find the source files, if location was not specified.\nif test -z \"$srcdir\"; then\n  ac_srcdir_defaulted=yes\n  # Try the directory containing this script, then the parent directory.\n  ac_confdir=`$as_dirname -- \"$as_myself\" ||\n$as_expr X\"$as_myself\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_myself\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_myself\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_myself\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  srcdir=$ac_confdir\n  if test ! -r \"$srcdir/$ac_unique_file\"; then\n    srcdir=..\n  fi\nelse\n  ac_srcdir_defaulted=no\nfi\nif test ! -r \"$srcdir/$ac_unique_file\"; then\n  test \"$ac_srcdir_defaulted\" = yes && srcdir=\"$ac_confdir or ..\"\n  as_fn_error $? \"cannot find sources ($ac_unique_file) in $srcdir\"\nfi\nac_msg=\"sources are in $srcdir, but \\`cd $srcdir' does not work\"\nac_abs_confdir=`(\n\tcd \"$srcdir\" && test -r \"./$ac_unique_file\" || as_fn_error $? \"$ac_msg\"\n\tpwd)`\n# When building in place, set srcdir=.\nif test \"$ac_abs_confdir\" = \"$ac_pwd\"; then\n  srcdir=.\nfi\n# Remove unnecessary trailing slashes from srcdir.\n# Double slashes in file names in object file debugging info\n# mess up M-x gdb in Emacs.\ncase $srcdir in\n*/) srcdir=`expr \"X$srcdir\" : 'X\\(.*[^/]\\)' \\| \"X$srcdir\" : 'X\\(.*\\)'`;;\nesac\nfor ac_var in $ac_precious_vars; do\n  eval ac_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_env_${ac_var}_value=\\$${ac_var}\n  eval ac_cv_env_${ac_var}_set=\\${${ac_var}+set}\n  eval ac_cv_env_${ac_var}_value=\\$${ac_var}\ndone\n\n#\n# Report the --help message.\n#\nif test \"$ac_init_help\" = \"long\"; then\n  # Omit some internal or obsolete options to make the list less imposing.\n  # This message is too long to be a string in the A/UX 3.1 sh.\n  cat <<_ACEOF\n\\`configure' configures this package to adapt to many kinds of systems.\n\nUsage: $0 [OPTION]... [VAR=VALUE]...\n\nTo assign environment variables (e.g., CC, CFLAGS...), specify them as\nVAR=VALUE.  See below for descriptions of some of the useful variables.\n\nDefaults for the options are specified in brackets.\n\nConfiguration:\n  -h, --help              display this help and exit\n      --help=short        display options specific to this package\n      --help=recursive    display the short help of all the included packages\n  -V, --version           display version information and exit\n  -q, --quiet, --silent   do not print \\`checking ...' messages\n      --cache-file=FILE   cache test results in FILE [disabled]\n  -C, --config-cache      alias for \\`--cache-file=config.cache'\n  -n, --no-create         do not create output files\n      --srcdir=DIR        find the sources in DIR [configure dir or \\`..']\n\nInstallation directories:\n  --prefix=PREFIX         install architecture-independent files in PREFIX\n                          [$ac_default_prefix]\n  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX\n                          [PREFIX]\n\nBy default, \\`make install' will install all the files in\n\\`$ac_default_prefix/bin', \\`$ac_default_prefix/lib' etc.  You can specify\nan installation prefix other than \\`$ac_default_prefix' using \\`--prefix',\nfor instance \\`--prefix=\\$HOME'.\n\nFor better control, use the options below.\n\nFine tuning of the installation directories:\n  --bindir=DIR            user executables [EPREFIX/bin]\n  --sbindir=DIR           system admin executables [EPREFIX/sbin]\n  --libexecdir=DIR        program executables [EPREFIX/libexec]\n  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]\n  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]\n  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]\n  --libdir=DIR            object code libraries [EPREFIX/lib]\n  --includedir=DIR        C header files [PREFIX/include]\n  --oldincludedir=DIR     C header files for non-gcc [/usr/include]\n  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]\n  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]\n  --infodir=DIR           info documentation [DATAROOTDIR/info]\n  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]\n  --mandir=DIR            man documentation [DATAROOTDIR/man]\n  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]\n  --htmldir=DIR           html documentation [DOCDIR]\n  --dvidir=DIR            dvi documentation [DOCDIR]\n  --pdfdir=DIR            pdf documentation [DOCDIR]\n  --psdir=DIR             ps documentation [DOCDIR]\n_ACEOF\n\n  cat <<\\_ACEOF\n\nX features:\n  --x-includes=DIR    X include files are in DIR\n  --x-libraries=DIR   X library files are in DIR\n\nSystem types:\n  --build=BUILD     configure for building on BUILD [guessed]\n  --host=HOST       cross-compile to build programs to run on HOST [BUILD]\n_ACEOF\nfi\n\nif test -n \"$ac_init_help\"; then\n\n  cat <<\\_ACEOF\n\nOptional Features:\n  --disable-option-checking  ignore unrecognized --enable/--with options\n  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)\n  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]\n  --disable-sdltest       Do not try to compile and run a test SDL program\n\nOptional Packages:\n  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]\n  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)\n  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)\n  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)\n  --with-x                use the X Window System\n\nSome influential environment variables:\n  CC          C compiler command\n  CFLAGS      C compiler flags\n  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a\n              nonstandard directory <lib dir>\n  LIBS        libraries to pass to the linker, e.g. -l<library>\n  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if\n              you have headers in a nonstandard directory <include dir>\n  PKG_CONFIG  path to pkg-config utility\n  PKG_CONFIG_PATH\n              directories to add to pkg-config's search path\n  PKG_CONFIG_LIBDIR\n              path overriding pkg-config's built-in search path\n  SDL_CFLAGS  C compiler flags for SDL, overriding pkg-config\n  SDL_LIBS    linker flags for SDL, overriding pkg-config\n  XMKMF       Path to xmkmf, Makefile generator for X Window System\n  CPP         C preprocessor\n\nUse these variables to override the choices made by `configure' or to help\nit to find libraries and programs with nonstandard names/locations.\n\nReport bugs to the package provider.\n_ACEOF\nac_status=$?\nfi\n\nif test \"$ac_init_help\" = \"recursive\"; then\n  # If there are subdirs, report their specific --help.\n  for ac_dir in : $ac_subdirs_all; do test \"x$ac_dir\" = x: && continue\n    test -d \"$ac_dir\" ||\n      { cd \"$srcdir\" && ac_pwd=`pwd` && srcdir=. && test -d \"$ac_dir\"; } ||\n      continue\n    ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n    cd \"$ac_dir\" || { ac_status=$?; continue; }\n    # Check for guested configure.\n    if test -f \"$ac_srcdir/configure.gnu\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure.gnu\" --help=recursive\n    elif test -f \"$ac_srcdir/configure\"; then\n      echo &&\n      $SHELL \"$ac_srcdir/configure\" --help=recursive\n    else\n      $as_echo \"$as_me: WARNING: no configuration information is in $ac_dir\" >&2\n    fi || ac_status=$?\n    cd \"$ac_pwd\" || { ac_status=$?; break; }\n  done\nfi\n\ntest -n \"$ac_init_help\" && exit $ac_status\nif $ac_init_version; then\n  cat <<\\_ACEOF\nconfigure\ngenerated by GNU Autoconf 2.69\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis configure script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\n_ACEOF\n  exit\nfi\n\n## ------------------------ ##\n## Autoconf initialization. ##\n## ------------------------ ##\n\n# ac_fn_c_try_compile LINENO\n# --------------------------\n# Try to compile conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_compile ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext\n  if { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest.$ac_objext; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_compile\n\n# ac_fn_c_try_run LINENO\n# ----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes\n# that executables *can* be run.\nac_fn_c_try_run ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: program exited with status $ac_status\" >&5\n       $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n       ac_retval=$ac_status\nfi\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_run\n\n# ac_fn_c_try_link LINENO\n# -----------------------\n# Try to link conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_link ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  rm -f conftest.$ac_objext conftest$ac_exeext\n  if { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } && {\n\t test -z \"$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       } && test -s conftest$ac_exeext && {\n\t test \"$cross_compiling\" = yes ||\n\t test -x conftest$ac_exeext\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n\tac_retval=1\nfi\n  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information\n  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would\n  # interfere with the next link command; also delete a directory that is\n  # left behind by Apple's compiler.  We do this before executing the actions.\n  rm -rf conftest.dSYM conftest_ipa8_conftest.oo\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_link\n\n# ac_fn_c_try_cpp LINENO\n# ----------------------\n# Try to preprocess conftest.$ac_ext, and return whether this succeeded.\nac_fn_c_try_cpp ()\n{\n  as_lineno=${as_lineno-\"$1\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n  if { { ac_try=\"$ac_cpp conftest.$ac_ext\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_cpp conftest.$ac_ext\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    grep -v '^ *+' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n    mv -f conftest.er1 conftest.err\n  fi\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; } > conftest.i && {\n\t test -z \"$ac_c_preproc_warn_flag$ac_c_werror_flag\" ||\n\t test ! -s conftest.err\n       }; then :\n  ac_retval=0\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n    ac_retval=1\nfi\n  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno\n  as_fn_set_status $ac_retval\n\n} # ac_fn_c_try_cpp\ncat >config.log <<_ACEOF\nThis file contains any messages produced by compilers while\nrunning configure, to aid debugging if configure makes a mistake.\n\nIt was created by $as_me, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  $ $0 $@\n\n_ACEOF\nexec 5>>config.log\n{\ncat <<_ASUNAME\n## --------- ##\n## Platform. ##\n## --------- ##\n\nhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`\nuname -m = `(uname -m) 2>/dev/null || echo unknown`\nuname -r = `(uname -r) 2>/dev/null || echo unknown`\nuname -s = `(uname -s) 2>/dev/null || echo unknown`\nuname -v = `(uname -v) 2>/dev/null || echo unknown`\n\n/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`\n/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`\n\n/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`\n/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`\n/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`\n/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`\n/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`\n/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`\n/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`\n\n_ASUNAME\n\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    $as_echo \"PATH: $as_dir\"\n  done\nIFS=$as_save_IFS\n\n} >&5\n\ncat >&5 <<_ACEOF\n\n\n## ----------- ##\n## Core tests. ##\n## ----------- ##\n\n_ACEOF\n\n\n# Keep a trace of the command line.\n# Strip out --no-create and --no-recursion so they do not pile up.\n# Strip out --silent because we don't want to record it for future runs.\n# Also quote any args containing shell meta-characters.\n# Make two passes to allow for proper duplicate-argument suppression.\nac_configure_args=\nac_configure_args0=\nac_configure_args1=\nac_must_keep_next=false\nfor ac_pass in 1 2\ndo\n  for ac_arg\n  do\n    case $ac_arg in\n    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;\n    -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n    | -silent | --silent | --silen | --sile | --sil)\n      continue ;;\n    *\\'*)\n      ac_arg=`$as_echo \"$ac_arg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    esac\n    case $ac_pass in\n    1) as_fn_append ac_configure_args0 \" '$ac_arg'\" ;;\n    2)\n      as_fn_append ac_configure_args1 \" '$ac_arg'\"\n      if test $ac_must_keep_next = true; then\n\tac_must_keep_next=false # Got value, back to normal.\n      else\n\tcase $ac_arg in\n\t  *=* | --config-cache | -C | -disable-* | --disable-* \\\n\t  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \\\n\t  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \\\n\t  | -with-* | --with-* | -without-* | --without-* | --x)\n\t    case \"$ac_configure_args0 \" in\n\t      \"$ac_configure_args1\"*\" '$ac_arg' \"* ) continue ;;\n\t    esac\n\t    ;;\n\t  -* ) ac_must_keep_next=true ;;\n\tesac\n      fi\n      as_fn_append ac_configure_args \" '$ac_arg'\"\n      ;;\n    esac\n  done\ndone\n{ ac_configure_args0=; unset ac_configure_args0;}\n{ ac_configure_args1=; unset ac_configure_args1;}\n\n# When interrupted or exit'd, cleanup temporary files, and complete\n# config.log.  We remove comments because anyway the quotes in there\n# would cause problems or look ugly.\n# WARNING: Use '\\'' to represent an apostrophe within the trap.\n# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.\ntrap 'exit_status=$?\n  # Save into config.log some information that might help in debugging.\n  {\n    echo\n\n    $as_echo \"## ---------------- ##\n## Cache variables. ##\n## ---------------- ##\"\n    echo\n    # The following way of writing the cache mishandles newlines in values,\n(\n  for ac_var in `(set) 2>&1 | sed -n '\\''s/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'\\''`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n  (set) 2>&1 |\n    case $as_nl`(ac_space='\\'' '\\''; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      sed -n \\\n\t\"s/'\\''/'\\''\\\\\\\\'\\'''\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\''\\\\2'\\''/p\"\n      ;; #(\n    *)\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n)\n    echo\n\n    $as_echo \"## ----------------- ##\n## Output variables. ##\n## ----------------- ##\"\n    echo\n    for ac_var in $ac_subst_vars\n    do\n      eval ac_val=\\$$ac_var\n      case $ac_val in\n      *\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n      esac\n      $as_echo \"$ac_var='\\''$ac_val'\\''\"\n    done | sort\n    echo\n\n    if test -n \"$ac_subst_files\"; then\n      $as_echo \"## ------------------- ##\n## File substitutions. ##\n## ------------------- ##\"\n      echo\n      for ac_var in $ac_subst_files\n      do\n\teval ac_val=\\$$ac_var\n\tcase $ac_val in\n\t*\\'\\''*) ac_val=`$as_echo \"$ac_val\" | sed \"s/'\\''/'\\''\\\\\\\\\\\\\\\\'\\'''\\''/g\"`;;\n\tesac\n\t$as_echo \"$ac_var='\\''$ac_val'\\''\"\n      done | sort\n      echo\n    fi\n\n    if test -s confdefs.h; then\n      $as_echo \"## ----------- ##\n## confdefs.h. ##\n## ----------- ##\"\n      echo\n      cat confdefs.h\n      echo\n    fi\n    test \"$ac_signal\" != 0 &&\n      $as_echo \"$as_me: caught signal $ac_signal\"\n    $as_echo \"$as_me: exit $exit_status\"\n  } >&5\n  rm -f core *.core core.conftest.* &&\n    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&\n    exit $exit_status\n' 0\nfor ac_signal in 1 2 13 15; do\n  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal\ndone\nac_signal=0\n\n# confdefs.h avoids OS command line length limits that DEFS can exceed.\nrm -f -r conftest* confdefs.h\n\n$as_echo \"/* confdefs.h */\" > confdefs.h\n\n# Predefined preprocessor variables.\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_NAME \"$PACKAGE_NAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_VERSION \"$PACKAGE_VERSION\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_STRING \"$PACKAGE_STRING\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"\n_ACEOF\n\ncat >>confdefs.h <<_ACEOF\n#define PACKAGE_URL \"$PACKAGE_URL\"\n_ACEOF\n\n\n# Let the site file select an alternate cache file if it wants to.\n# Prefer an explicitly selected file to automatically selected ones.\nac_site_file1=NONE\nac_site_file2=NONE\nif test -n \"$CONFIG_SITE\"; then\n  # We do not want a PATH search for config.site.\n  case $CONFIG_SITE in #((\n    -*)  ac_site_file1=./$CONFIG_SITE;;\n    */*) ac_site_file1=$CONFIG_SITE;;\n    *)   ac_site_file1=./$CONFIG_SITE;;\n  esac\nelif test \"x$prefix\" != xNONE; then\n  ac_site_file1=$prefix/share/config.site\n  ac_site_file2=$prefix/etc/config.site\nelse\n  ac_site_file1=$ac_default_prefix/share/config.site\n  ac_site_file2=$ac_default_prefix/etc/config.site\nfi\nfor ac_site_file in \"$ac_site_file1\" \"$ac_site_file2\"\ndo\n  test \"x$ac_site_file\" = xNONE && continue\n  if test /dev/null != \"$ac_site_file\" && test -r \"$ac_site_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file\" >&5\n$as_echo \"$as_me: loading site script $ac_site_file\" >&6;}\n    sed 's/^/| /' \"$ac_site_file\" >&5\n    . \"$ac_site_file\" \\\n      || { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"failed to load site script $ac_site_file\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n  fi\ndone\n\nif test -r \"$cache_file\"; then\n  # Some versions of bash will fail to source /dev/null (special files\n  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.\n  if test /dev/null != \"$cache_file\" && test -f \"$cache_file\"; then\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: loading cache $cache_file\" >&5\n$as_echo \"$as_me: loading cache $cache_file\" >&6;}\n    case $cache_file in\n      [\\\\/]* | ?:[\\\\/]* ) . \"$cache_file\";;\n      *)                      . \"./$cache_file\";;\n    esac\n  fi\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: creating cache $cache_file\" >&5\n$as_echo \"$as_me: creating cache $cache_file\" >&6;}\n  >$cache_file\nfi\n\n# Check that the precious variables saved in the cache have kept the same\n# value.\nac_cache_corrupted=false\nfor ac_var in $ac_precious_vars; do\n  eval ac_old_set=\\$ac_cv_env_${ac_var}_set\n  eval ac_new_set=\\$ac_env_${ac_var}_set\n  eval ac_old_val=\\$ac_cv_env_${ac_var}_value\n  eval ac_new_val=\\$ac_env_${ac_var}_value\n  case $ac_old_set,$ac_new_set in\n    set,)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was set to \\`$ac_old_val' in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,set)\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' was not set in the previous run\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' was not set in the previous run\" >&2;}\n      ac_cache_corrupted=: ;;\n    ,);;\n    *)\n      if test \"x$ac_old_val\" != \"x$ac_new_val\"; then\n\t# differences in whitespace do not lead to failure.\n\tac_old_val_w=`echo x $ac_old_val`\n\tac_new_val_w=`echo x $ac_new_val`\n\tif test \"$ac_old_val_w\" != \"$ac_new_val_w\"; then\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: \\`$ac_var' has changed since the previous run:\" >&5\n$as_echo \"$as_me: error: \\`$ac_var' has changed since the previous run:\" >&2;}\n\t  ac_cache_corrupted=:\n\telse\n\t  { $as_echo \"$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&5\n$as_echo \"$as_me: warning: ignoring whitespace changes in \\`$ac_var' since the previous run:\" >&2;}\n\t  eval $ac_var=\\$ac_old_val\n\tfi\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   former value:  \\`$ac_old_val'\" >&5\n$as_echo \"$as_me:   former value:  \\`$ac_old_val'\" >&2;}\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}:   current value: \\`$ac_new_val'\" >&5\n$as_echo \"$as_me:   current value: \\`$ac_new_val'\" >&2;}\n      fi;;\n  esac\n  # Pass precious variables to config.status.\n  if test \"$ac_new_set\" = set; then\n    case $ac_new_val in\n    *\\'*) ac_arg=$ac_var=`$as_echo \"$ac_new_val\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    *) ac_arg=$ac_var=$ac_new_val ;;\n    esac\n    case \" $ac_configure_args \" in\n      *\" '$ac_arg' \"*) ;; # Avoid dups.  Use of quotes ensures accuracy.\n      *) as_fn_append ac_configure_args \" '$ac_arg'\" ;;\n    esac\n  fi\ndone\nif $ac_cache_corrupted; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build\" >&5\n$as_echo \"$as_me: error: changes in the environment can compromise the build\" >&2;}\n  as_fn_error $? \"run \\`make distclean' and/or \\`rm $cache_file' and start over\" \"$LINENO\" 5\nfi\n## -------------------- ##\n## Main body of script. ##\n## -------------------- ##\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\nac_aux_dir=\nfor ac_dir in $srcdir/../build-scripts; do\n  if test -f \"$ac_dir/install-sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install-sh -c\"\n    break\n  elif test -f \"$ac_dir/install.sh\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/install.sh -c\"\n    break\n  elif test -f \"$ac_dir/shtool\"; then\n    ac_aux_dir=$ac_dir\n    ac_install_sh=\"$ac_aux_dir/shtool install -c\"\n    break\n  fi\ndone\nif test -z \"$ac_aux_dir\"; then\n  as_fn_error $? \"cannot find install-sh, install.sh, or shtool in $srcdir/../build-scripts\" \"$LINENO\" 5\nfi\n\n# These three variables are undocumented and unsupported,\n# and are intended to be withdrawn in a future Autoconf release.\n# They can cause serious problems if a builder's source tree is in a directory\n# whose full name contains unusual characters.\nac_config_guess=\"$SHELL $ac_aux_dir/config.guess\"  # Please don't use this var.\nac_config_sub=\"$SHELL $ac_aux_dir/config.sub\"  # Please don't use this var.\nac_configure=\"$SHELL $ac_aux_dir/configure\"  # Please don't use this var.\n\n\n# Make sure we can run config.sub.\n$SHELL \"$ac_aux_dir/config.sub\" sun4 >/dev/null 2>&1 ||\n  as_fn_error $? \"cannot run $SHELL $ac_aux_dir/config.sub\" \"$LINENO\" 5\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking build system type\" >&5\n$as_echo_n \"checking build system type... \" >&6; }\nif ${ac_cv_build+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_build_alias=$build_alias\ntest \"x$ac_build_alias\" = x &&\n  ac_build_alias=`$SHELL \"$ac_aux_dir/config.guess\"`\ntest \"x$ac_build_alias\" = x &&\n  as_fn_error $? \"cannot guess build type; you must specify one\" \"$LINENO\" 5\nac_cv_build=`$SHELL \"$ac_aux_dir/config.sub\" $ac_build_alias` ||\n  as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $ac_build_alias failed\" \"$LINENO\" 5\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_build\" >&5\n$as_echo \"$ac_cv_build\" >&6; }\ncase $ac_cv_build in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical build\" \"$LINENO\" 5;;\nesac\nbuild=$ac_cv_build\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_build\nshift\nbuild_cpu=$1\nbuild_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nbuild_os=$*\nIFS=$ac_save_IFS\ncase $build_os in *\\ *) build_os=`echo \"$build_os\" | sed 's/ /-/g'`;; esac\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking host system type\" >&5\n$as_echo_n \"checking host system type... \" >&6; }\nif ${ac_cv_host+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test \"x$host_alias\" = x; then\n  ac_cv_host=$ac_cv_build\nelse\n  ac_cv_host=`$SHELL \"$ac_aux_dir/config.sub\" $host_alias` ||\n    as_fn_error $? \"$SHELL $ac_aux_dir/config.sub $host_alias failed\" \"$LINENO\" 5\nfi\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_host\" >&5\n$as_echo \"$ac_cv_host\" >&6; }\ncase $ac_cv_host in\n*-*-*) ;;\n*) as_fn_error $? \"invalid value of canonical host\" \"$LINENO\" 5;;\nesac\nhost=$ac_cv_host\nac_save_IFS=$IFS; IFS='-'\nset x $ac_cv_host\nshift\nhost_cpu=$1\nhost_vendor=$2\nshift; shift\n# Remember, the first character of IFS is used to create $*,\n# except with old shells:\nhost_os=$*\nIFS=$ac_save_IFS\ncase $host_os in *\\ *) host_os=`echo \"$host_os\" | sed 's/ /-/g'`;; esac\n\n\n\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\nif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}gcc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_prog_CC\"; then\n  ac_ct_CC=$CC\n  # Extract the first word of \"gcc\", so it can be a program name with args.\nset dummy gcc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"gcc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nelse\n  CC=\"$ac_cv_prog_CC\"\nfi\n\nif test -z \"$CC\"; then\n          if test -n \"$ac_tool_prefix\"; then\n    # Extract the first word of \"${ac_tool_prefix}cc\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"${ac_tool_prefix}cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  fi\nfi\nif test -z \"$CC\"; then\n  # Extract the first word of \"cc\", so it can be a program name with args.\nset dummy cc; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\n  ac_prog_rejected=no\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    if test \"$as_dir/$ac_word$ac_exec_ext\" = \"/usr/ucb/cc\"; then\n       ac_prog_rejected=yes\n       continue\n     fi\n    ac_cv_prog_CC=\"cc\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nif test $ac_prog_rejected = yes; then\n  # We found a bogon in the path, so make sure we never use it.\n  set dummy $ac_cv_prog_CC\n  shift\n  if test $# != 0; then\n    # We chose a different compiler from the bogus one.\n    # However, it has the same basename, so the bogon will be chosen\n    # first if we set CC to just the basename; use the full file name.\n    shift\n    ac_cv_prog_CC=\"$as_dir/$ac_word${1+' '}$@\"\n  fi\nfi\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$CC\"; then\n  if test -n \"$ac_tool_prefix\"; then\n  for ac_prog in cl.exe\n  do\n    # Extract the first word of \"$ac_tool_prefix$ac_prog\", so it can be a program name with args.\nset dummy $ac_tool_prefix$ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$CC\"; then\n  ac_cv_prog_CC=\"$CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_CC=\"$ac_tool_prefix$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nCC=$ac_cv_prog_CC\nif test -n \"$CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CC\" >&5\n$as_echo \"$CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    test -n \"$CC\" && break\n  done\nfi\nif test -z \"$CC\"; then\n  ac_ct_CC=$CC\n  for ac_prog in cl.exe\ndo\n  # Extract the first word of \"$ac_prog\", so it can be a program name with args.\nset dummy $ac_prog; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_prog_ac_ct_CC+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  if test -n \"$ac_ct_CC\"; then\n  ac_cv_prog_ac_ct_CC=\"$ac_ct_CC\" # Let the user override the test.\nelse\nas_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_prog_ac_ct_CC=\"$ac_prog\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\nfi\nfi\nac_ct_CC=$ac_cv_prog_ac_ct_CC\nif test -n \"$ac_ct_CC\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC\" >&5\n$as_echo \"$ac_ct_CC\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n  test -n \"$ac_ct_CC\" && break\ndone\n\n  if test \"x$ac_ct_CC\" = x; then\n    CC=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    CC=$ac_ct_CC\n  fi\nfi\n\nfi\n\n\ntest -z \"$CC\" && { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"no acceptable C compiler found in \\$PATH\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n\n# Provide some information about the compiler.\n$as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler version\" >&5\nset X $ac_compile\nac_compiler=$2\nfor ac_option in --version -v -V -qversion; do\n  { { ac_try=\"$ac_compiler $ac_option >&5\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compiler $ac_option >&5\") 2>conftest.err\n  ac_status=$?\n  if test -s conftest.err; then\n    sed '10a\\\n... rest of stderr output deleted ...\n         10q' conftest.err >conftest.er1\n    cat conftest.er1 >&5\n  fi\n  rm -f conftest.er1 conftest.err\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\ndone\n\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files a.out a.out.dSYM a.exe b.out\"\n# Try to create an executable without -o first, disregard a.out.\n# It will help us diagnose broken compilers, and finding out an intuition\n# of exeext.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether the C compiler works\" >&5\n$as_echo_n \"checking whether the C compiler works... \" >&6; }\nac_link_default=`$as_echo \"$ac_link\" | sed 's/ -o *conftest[^ ]*//'`\n\n# The possible output files:\nac_files=\"a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*\"\n\nac_rmfiles=\nfor ac_file in $ac_files\ndo\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    * ) ac_rmfiles=\"$ac_rmfiles $ac_file\";;\n  esac\ndone\nrm -f $ac_rmfiles\n\nif { { ac_try=\"$ac_link_default\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link_default\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.\n# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'\n# in a Makefile.  We should not override ac_cv_exeext if it was cached,\n# so that the user can short-circuit this test for compilers unknown to\n# Autoconf.\nfor ac_file in $ac_files ''\ndo\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )\n\t;;\n    [ab].out )\n\t# We found the default executable, but exeext='' is most\n\t# certainly right.\n\tbreak;;\n    *.* )\n\tif test \"${ac_cv_exeext+set}\" = set && test \"$ac_cv_exeext\" != no;\n\tthen :; else\n\t   ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\tfi\n\t# We set ac_cv_exeext here because the later test for it is not\n\t# safe: cross compilers may not add the suffix if given an `-o'\n\t# argument, so we may need to know it at that point already.\n\t# Even if this section looks crufty: it has the advantage of\n\t# actually working.\n\tbreak;;\n    * )\n\tbreak;;\n  esac\ndone\ntest \"$ac_cv_exeext\" = no && ac_cv_exeext=\n\nelse\n  ac_file=''\nfi\nif test -z \"$ac_file\"; then :\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n$as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error 77 \"C compiler cannot create executables\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name\" >&5\n$as_echo_n \"checking for C compiler default output file name... \" >&6; }\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_file\" >&5\n$as_echo \"$ac_file\" >&6; }\nac_exeext=$ac_cv_exeext\n\nrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of executables\" >&5\n$as_echo_n \"checking for suffix of executables... \" >&6; }\nif { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  # If both `conftest.exe' and `conftest' are `present' (well, observable)\n# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will\n# work properly (i.e., refer to `conftest.exe'), while it won't with\n# `rm'.\nfor ac_file in conftest.exe conftest conftest.*; do\n  test -f \"$ac_file\" || continue\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;\n    *.* ) ac_cv_exeext=`expr \"$ac_file\" : '[^.]*\\(\\..*\\)'`\n\t  break;;\n    * ) break;;\n  esac\ndone\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of executables: cannot compile and link\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest conftest$ac_cv_exeext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext\" >&5\n$as_echo \"$ac_cv_exeext\" >&6; }\n\nrm -f conftest.$ac_ext\nEXEEXT=$ac_cv_exeext\nac_exeext=$EXEEXT\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdio.h>\nint\nmain ()\n{\nFILE *f = fopen (\"conftest.out\", \"w\");\n return ferror (f) || fclose (f) != 0;\n\n  ;\n  return 0;\n}\n_ACEOF\nac_clean_files=\"$ac_clean_files conftest.out\"\n# Check that the compiler produces executables we can run.  If not, either\n# the compiler is broken, or we cross compile.\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling\" >&5\n$as_echo_n \"checking whether we are cross compiling... \" >&6; }\nif test \"$cross_compiling\" != yes; then\n  { { ac_try=\"$ac_link\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_link\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }\n  if { ac_try='./conftest$ac_cv_exeext'\n  { { case \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_try\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; }; then\n    cross_compiling=no\n  else\n    if test \"$cross_compiling\" = maybe; then\n\tcross_compiling=yes\n    else\n\t{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot run C compiled programs.\nIf you meant to cross compile, use \\`--host'.\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\n    fi\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $cross_compiling\" >&5\n$as_echo \"$cross_compiling\" >&6; }\n\nrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out\nac_clean_files=$ac_clean_files_save\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for suffix of object files\" >&5\n$as_echo_n \"checking for suffix of object files... \" >&6; }\nif ${ac_cv_objext+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nrm -f conftest.o conftest.obj\nif { { ac_try=\"$ac_compile\"\ncase \"(($ac_try\" in\n  *\\\"* | *\\`* | *\\\\*) ac_try_echo=\\$ac_try;;\n  *) ac_try_echo=$ac_try;;\nesac\neval ac_try_echo=\"\\\"\\$as_me:${as_lineno-$LINENO}: $ac_try_echo\\\"\"\n$as_echo \"$ac_try_echo\"; } >&5\n  (eval \"$ac_compile\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then :\n  for ac_file in conftest.o conftest.obj conftest.*; do\n  test -f \"$ac_file\" || continue;\n  case $ac_file in\n    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;\n    *) ac_cv_objext=`expr \"$ac_file\" : '.*\\.\\(.*\\)'`\n       break;;\n  esac\ndone\nelse\n  $as_echo \"$as_me: failed program was:\" >&5\nsed 's/^/| /' conftest.$ac_ext >&5\n\n{ { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"cannot compute suffix of object files: cannot compile\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\nrm -f conftest.$ac_cv_objext conftest.$ac_ext\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext\" >&5\n$as_echo \"$ac_cv_objext\" >&6; }\nOBJEXT=$ac_cv_objext\nac_objext=$OBJEXT\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler\" >&5\n$as_echo_n \"checking whether we are using the GNU C compiler... \" >&6; }\nif ${ac_cv_c_compiler_gnu+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n#ifndef __GNUC__\n       choke me\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_compiler_gnu=yes\nelse\n  ac_compiler_gnu=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nac_cv_c_compiler_gnu=$ac_compiler_gnu\n\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu\" >&5\n$as_echo \"$ac_cv_c_compiler_gnu\" >&6; }\nif test $ac_compiler_gnu = yes; then\n  GCC=yes\nelse\n  GCC=\nfi\nac_test_CFLAGS=${CFLAGS+set}\nac_save_CFLAGS=$CFLAGS\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g\" >&5\n$as_echo_n \"checking whether $CC accepts -g... \" >&6; }\nif ${ac_cv_prog_cc_g+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_save_c_werror_flag=$ac_c_werror_flag\n   ac_c_werror_flag=yes\n   ac_cv_prog_cc_g=no\n   CFLAGS=\"-g\"\n   cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nelse\n  CFLAGS=\"\"\n      cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nelse\n  ac_c_werror_flag=$ac_save_c_werror_flag\n\t CFLAGS=\"-g\"\n\t cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_g=yes\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n   ac_c_werror_flag=$ac_save_c_werror_flag\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g\" >&5\n$as_echo \"$ac_cv_prog_cc_g\" >&6; }\nif test \"$ac_test_CFLAGS\" = set; then\n  CFLAGS=$ac_save_CFLAGS\nelif test $ac_cv_prog_cc_g = yes; then\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-g -O2\"\n  else\n    CFLAGS=\"-g\"\n  fi\nelse\n  if test \"$GCC\" = yes; then\n    CFLAGS=\"-O2\"\n  else\n    CFLAGS=\n  fi\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89\" >&5\n$as_echo_n \"checking for $CC option to accept ISO C89... \" >&6; }\nif ${ac_cv_prog_cc_c89+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_cv_prog_cc_c89=no\nac_save_CC=$CC\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <stdarg.h>\n#include <stdio.h>\nstruct stat;\n/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */\nstruct buf { int x; };\nFILE * (*rcsopen) (struct buf *, struct stat *, int);\nstatic char *e (p, i)\n     char **p;\n     int i;\n{\n  return p[i];\n}\nstatic char *f (char * (*g) (char **, int), char **p, ...)\n{\n  char *s;\n  va_list v;\n  va_start (v,p);\n  s = g (p, va_arg (v,int));\n  va_end (v);\n  return s;\n}\n\n/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has\n   function prototypes and stuff, but not '\\xHH' hex character constants.\n   These don't provoke an error unfortunately, instead are silently treated\n   as 'x'.  The following induces an error, until -std is added to get\n   proper ANSI mode.  Curiously '\\x00'!='x' always comes out true, for an\n   array size at least.  It's necessary to write '\\x00'==0 to get something\n   that's true only with -std.  */\nint osf4_cc_array ['\\x00' == 0 ? 1 : -1];\n\n/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters\n   inside strings and character constants.  */\n#define FOO(x) 'x'\nint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];\n\nint test (int i, double x);\nstruct s1 {int (*f) (int a);};\nstruct s2 {int (*f) (double a);};\nint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);\nint argc;\nchar **argv;\nint\nmain ()\n{\nreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];\n  ;\n  return 0;\n}\n_ACEOF\nfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \\\n\t-Ae \"-Aa -D_HPUX_SOURCE\" \"-Xc -D__EXTENSIONS__\"\ndo\n  CC=\"$ac_save_CC $ac_arg\"\n  if ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_prog_cc_c89=$ac_arg\nfi\nrm -f core conftest.err conftest.$ac_objext\n  test \"x$ac_cv_prog_cc_c89\" != \"xno\" && break\ndone\nrm -f conftest.$ac_ext\nCC=$ac_save_CC\n\nfi\n# AC_CACHE_VAL\ncase \"x$ac_cv_prog_cc_c89\" in\n  x)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: none needed\" >&5\n$as_echo \"none needed\" >&6; } ;;\n  xno)\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: unsupported\" >&5\n$as_echo \"unsupported\" >&6; } ;;\n  *)\n    CC=\"$CC $ac_cv_prog_cc_c89\"\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89\" >&5\n$as_echo \"$ac_cv_prog_cc_c89\" >&6; } ;;\nesac\nif test \"x$ac_cv_prog_cc_c89\" != xno; then :\n\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const\" >&5\n$as_echo_n \"checking for an ANSI C-conforming const... \" >&6; }\nif ${ac_cv_c_const+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\nint\nmain ()\n{\n\n#ifndef __cplusplus\n  /* Ultrix mips cc rejects this sort of thing.  */\n  typedef int charset[2];\n  const charset cs = { 0, 0 };\n  /* SunOS 4.1.1 cc rejects this.  */\n  char const *const *pcpcc;\n  char **ppc;\n  /* NEC SVR4.0.2 mips cc rejects this.  */\n  struct point {int x, y;};\n  static struct point const zero = {0,0};\n  /* AIX XL C 1.02.0.0 rejects this.\n     It does not let you subtract one const X* pointer from another in\n     an arm of an if-expression whose if-part is not a constant\n     expression */\n  const char *g = \"string\";\n  pcpcc = &g + (g ? g-g : 0);\n  /* HPUX 7.0 cc rejects these. */\n  ++pcpcc;\n  ppc = (char**) pcpcc;\n  pcpcc = (char const *const *) ppc;\n  { /* SCO 3.2v4 cc rejects this sort of thing.  */\n    char tx;\n    char *t = &tx;\n    char const *s = 0 ? (char *) 0 : (char const *) 0;\n\n    *t++ = 0;\n    if (s) return 0;\n  }\n  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */\n    int x[] = {25, 17};\n    const int *foo = &x[0];\n    ++foo;\n  }\n  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */\n    typedef const int *iptr;\n    iptr p = 0;\n    ++p;\n  }\n  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying\n       \"k.c\", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */\n    struct s { int j; const int *ap[3]; } bx;\n    struct s *b = &bx; b->j = 5;\n  }\n  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */\n    const int foo = 10;\n    if (!foo) return 0;\n  }\n  return !cs[0] && !zero.x;\n#endif\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n  ac_cv_c_const=yes\nelse\n  ac_cv_c_const=no\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const\" >&5\n$as_echo \"$ac_cv_c_const\" >&6; }\nif test $ac_cv_c_const = no; then\n\n$as_echo \"#define const /**/\" >>confdefs.h\n\nfi\n\n\nISUNIX=\"false\"\nISWINDOWS=\"false\"\nISMACOSX=\"false\"\n\ncase \"$host\" in\n    *-*-cygwin* | *-*-mingw32*)\n        ISWINDOWS=\"true\"\n        EXE=\".exe\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lopengl32\"\n        ;;\n    *-*-haiku*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lGL\"\n        ;;\n    *-*-darwin* )\n        ISMACOSX=\"true\"\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-Wl,-framework,OpenGL\"\n        ;;\n    *-*-aix*)\n        ISUNIX=\"true\"\n        EXE=\"\"\n        if test x$ac_cv_c_compiler_gnu = xyes; then\n            CFLAGS=\"-mthreads\"\n        fi\n        SYS_GL_LIBS=\"\"\n        ;;\n    *-*-mint*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        # Extract the first word of \"osmesa-config\", so it can be a program name with args.\nset dummy osmesa-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_OSMESA_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $OSMESA_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_OSMESA_CONFIG=\"$OSMESA_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_OSMESA_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  test -z \"$ac_cv_path_OSMESA_CONFIG\" && ac_cv_path_OSMESA_CONFIG=\"no\"\n  ;;\nesac\nfi\nOSMESA_CONFIG=$ac_cv_path_OSMESA_CONFIG\nif test -n \"$OSMESA_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $OSMESA_CONFIG\" >&5\n$as_echo \"$OSMESA_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n        if test \"x$OSMESA_CONFIG\" = \"xyes\"; then\n            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`\n            OSMESA_LIBS=`$OSMESA_CONFIG --libs`\n            CFLAGS=\"$CFLAGS $OSMESA_CFLAGS\"\n            SYS_GL_LIBS=\"$OSMESA_LIBS\"\n        else\n            SYS_GL_LIBS=\"-lOSMesa\"\n        fi\n        ;;\n    *-*-qnx*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lGLES_CM\"\n        ;;\n    *-*-emscripten* )\n                EXE=\".bc\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"\"\n        ;;\n    *)\n                ISUNIX=\"true\"\n        EXE=\"\"\n        MATHLIB=\"-lm\"\n        SYS_GL_LIBS=\"-lGL\"\n        ;;\nesac\n\n\n\n\n\n\nSDL_VERSION=2.0.0\n\n\n\n\n\n\nif test \"x$ac_cv_env_PKG_CONFIG_set\" != \"xset\"; then\n\tif test -n \"$ac_tool_prefix\"; then\n  # Extract the first word of \"${ac_tool_prefix}pkg-config\", so it can be a program name with args.\nset dummy ${ac_tool_prefix}pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_PKG_CONFIG=\"$PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nPKG_CONFIG=$ac_cv_path_PKG_CONFIG\nif test -n \"$PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG\" >&5\n$as_echo \"$PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\nfi\nif test -z \"$ac_cv_path_PKG_CONFIG\"; then\n  ac_pt_PKG_CONFIG=$PKG_CONFIG\n  # Extract the first word of \"pkg-config\", so it can be a program name with args.\nset dummy pkg-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $ac_pt_PKG_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_ac_pt_PKG_CONFIG=\"$ac_pt_PKG_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_ac_pt_PKG_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  ;;\nesac\nfi\nac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG\nif test -n \"$ac_pt_PKG_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG\" >&5\n$as_echo \"$ac_pt_PKG_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n  if test \"x$ac_pt_PKG_CONFIG\" = x; then\n    PKG_CONFIG=\"\"\n  else\n    case $cross_compiling:$ac_tool_warned in\nyes:)\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet\" >&5\n$as_echo \"$as_me: WARNING: using cross tools not prefixed with host triplet\" >&2;}\nac_tool_warned=yes ;;\nesac\n    PKG_CONFIG=$ac_pt_PKG_CONFIG\n  fi\nelse\n  PKG_CONFIG=\"$ac_cv_path_PKG_CONFIG\"\nfi\n\nfi\nif test -n \"$PKG_CONFIG\"; then\n\t_pkg_min_version=0.9.0\n\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version\" >&5\n$as_echo_n \"checking pkg-config is at least version $_pkg_min_version... \" >&6; }\n\tif $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then\n\t\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\telse\n\t\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\t\tPKG_CONFIG=\"\"\n\tfi\nfi\n\n# Check whether --with-sdl-prefix was given.\nif test \"${with_sdl_prefix+set}\" = set; then :\n  withval=$with_sdl_prefix; sdl_prefix=\"$withval\"\nelse\n  sdl_prefix=\"\"\nfi\n\n\n# Check whether --with-sdl-exec-prefix was given.\nif test \"${with_sdl_exec_prefix+set}\" = set; then :\n  withval=$with_sdl_exec_prefix; sdl_exec_prefix=\"$withval\"\nelse\n  sdl_exec_prefix=\"\"\nfi\n\n# Check whether --enable-sdltest was given.\nif test \"${enable_sdltest+set}\" = set; then :\n  enableval=$enable_sdltest;\nelse\n  enable_sdltest=yes\nfi\n\n\n  min_sdl_version=$SDL_VERSION\n\n  if test \"x$sdl_prefix$sdl_exec_prefix\" = x ; then\n\npkg_failed=no\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for SDL\" >&5\n$as_echo_n \"checking for SDL... \" >&6; }\n\nif test -n \"$SDL_CFLAGS\"; then\n    pkg_cv_SDL_CFLAGS=\"$SDL_CFLAGS\"\n elif test -n \"$PKG_CONFIG\"; then\n    if test -n \"$PKG_CONFIG\" && \\\n    { { $as_echo \"$as_me:${as_lineno-$LINENO}: \\$PKG_CONFIG --exists --print-errors \\\"sdl2 >= \\$min_sdl_version\\\"\"; } >&5\n  ($PKG_CONFIG --exists --print-errors \"sdl2 >= $min_sdl_version\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags \"sdl2 >= $min_sdl_version\" 2>/dev/null`\nelse\n  pkg_failed=yes\nfi\n else\n    pkg_failed=untried\nfi\nif test -n \"$SDL_LIBS\"; then\n    pkg_cv_SDL_LIBS=\"$SDL_LIBS\"\n elif test -n \"$PKG_CONFIG\"; then\n    if test -n \"$PKG_CONFIG\" && \\\n    { { $as_echo \"$as_me:${as_lineno-$LINENO}: \\$PKG_CONFIG --exists --print-errors \\\"sdl2 >= \\$min_sdl_version\\\"\"; } >&5\n  ($PKG_CONFIG --exists --print-errors \"sdl2 >= $min_sdl_version\") 2>&5\n  ac_status=$?\n  $as_echo \"$as_me:${as_lineno-$LINENO}: \\$? = $ac_status\" >&5\n  test $ac_status = 0; }; then\n  pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs \"sdl2 >= $min_sdl_version\" 2>/dev/null`\nelse\n  pkg_failed=yes\nfi\n else\n    pkg_failed=untried\nfi\n\n\n\nif test $pkg_failed = yes; then\n   \t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\nif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then\n        _pkg_short_errors_supported=yes\nelse\n        _pkg_short_errors_supported=no\nfi\n        if test $_pkg_short_errors_supported = yes; then\n\t        SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors \"sdl2 >= $min_sdl_version\" 2>&1`\n        else\n\t        SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors \"sdl2 >= $min_sdl_version\" 2>&1`\n        fi\n\t# Put the nasty error message in config.log where it belongs\n\techo \"$SDL_PKG_ERRORS\" >&5\n\n\tsdl_pc=no\nelif test $pkg_failed = untried; then\n     \t{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n\tsdl_pc=no\nelse\n\tSDL_CFLAGS=$pkg_cv_SDL_CFLAGS\n\tSDL_LIBS=$pkg_cv_SDL_LIBS\n        { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n\tsdl_pc=yes\nfi\n  else\n    sdl_pc=no\n    if test x$sdl_exec_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --exec-prefix=$sdl_exec_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_exec_prefix/bin/sdl2-config\n      fi\n    fi\n    if test x$sdl_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --prefix=$sdl_prefix\"\n      if test x${SDL_CONFIG+set} != xset ; then\n        SDL_CONFIG=$sdl_prefix/bin/sdl2-config\n      fi\n    fi\n  fi\n\n  if test \"x$sdl_pc\" = xyes ; then\n    no_sdl=\"\"\n    SDL_CONFIG=\"pkg-config sdl2\"\n  else\n    as_save_PATH=\"$PATH\"\n    if test \"x$prefix\" != xNONE && test \"$cross_compiling\" != yes; then\n      PATH=\"$prefix/bin:$prefix/usr/bin:$PATH\"\n    fi\n    # Extract the first word of \"sdl2-config\", so it can be a program name with args.\nset dummy sdl2-config; ac_word=$2\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for $ac_word\" >&5\n$as_echo_n \"checking for $ac_word... \" >&6; }\nif ${ac_cv_path_SDL_CONFIG+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  case $SDL_CONFIG in\n  [\\\\/]* | ?:[\\\\/]*)\n  ac_cv_path_SDL_CONFIG=\"$SDL_CONFIG\" # Let the user override the test with a path.\n  ;;\n  *)\n  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    for ac_exec_ext in '' $ac_executable_extensions; do\n  if as_fn_executable_p \"$as_dir/$ac_word$ac_exec_ext\"; then\n    ac_cv_path_SDL_CONFIG=\"$as_dir/$ac_word$ac_exec_ext\"\n    $as_echo \"$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext\" >&5\n    break 2\n  fi\ndone\n  done\nIFS=$as_save_IFS\n\n  test -z \"$ac_cv_path_SDL_CONFIG\" && ac_cv_path_SDL_CONFIG=\"no\"\n  ;;\nesac\nfi\nSDL_CONFIG=$ac_cv_path_SDL_CONFIG\nif test -n \"$SDL_CONFIG\"; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG\" >&5\n$as_echo \"$SDL_CONFIG\" >&6; }\nelse\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\nfi\n\n\n    PATH=\"$as_save_PATH\"\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: checking for SDL - version >= $min_sdl_version\" >&5\n$as_echo_n \"checking for SDL - version >= $min_sdl_version... \" >&6; }\n    no_sdl=\"\"\n\n    if test \"$SDL_CONFIG\" = \"no\" ; then\n      no_sdl=yes\n    else\n      SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`\n      SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`\n\n      sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([0-9]*\\).\\([0-9]*\\).\\([0-9]*\\)/\\1/'`\n      sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([0-9]*\\).\\([0-9]*\\).\\([0-9]*\\)/\\2/'`\n      sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([0-9]*\\).\\([0-9]*\\).\\([0-9]*\\)/\\3/'`\n      if test \"x$enable_sdltest\" = \"xyes\" ; then\n        ac_save_CFLAGS=\"$CFLAGS\"\n        ac_save_CXXFLAGS=\"$CXXFLAGS\"\n        ac_save_LIBS=\"$LIBS\"\n        CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n        CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n        LIBS=\"$LIBS $SDL_LIBS\"\n      rm -f conf.sdltest\n      if test \"$cross_compiling\" = yes; then :\n  echo $ac_n \"cross compiling; assumed OK... $ac_c\"\nelse\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"SDL.h\"\n\nchar*\nmy_strdup (char *str)\n{\n  char *new_str;\n\n  if (str)\n    {\n      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));\n      strcpy (new_str, str);\n    }\n  else\n    new_str = NULL;\n\n  return new_str;\n}\n\nint main (int argc, char *argv[])\n{\n  int major, minor, micro;\n  char *tmp_version;\n\n  /* This hangs on some systems (?)\n  system (\"touch conf.sdltest\");\n  */\n  { FILE *fp = fopen(\"conf.sdltest\", \"a\"); if ( fp ) fclose(fp); }\n\n  /* HP/UX 9 (%@#!) writes to sscanf strings */\n  tmp_version = my_strdup(\"$min_sdl_version\");\n  if (sscanf(tmp_version, \"%d.%d.%d\", &major, &minor, &micro) != 3) {\n     printf(\"%s, bad version string\\n\", \"$min_sdl_version\");\n     exit(1);\n   }\n\n   if (($sdl_major_version > major) ||\n      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||\n      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))\n    {\n      return 0;\n    }\n  else\n    {\n      printf(\"\\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\\n\", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);\n      printf(\"*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\\n\", major, minor, micro);\n      printf(\"*** best to upgrade to the required version.\\n\");\n      printf(\"*** If sdl2-config was wrong, set the environment variable SDL_CONFIG\\n\");\n      printf(\"*** to point to the correct copy of sdl2-config, and remove the file\\n\");\n      printf(\"*** config.cache before re-running configure\\n\");\n      return 1;\n    }\n}\n\n\n_ACEOF\nif ac_fn_c_try_run \"$LINENO\"; then :\n\nelse\n  no_sdl=yes\nfi\nrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \\\n  conftest.$ac_objext conftest.beam conftest.$ac_ext\nfi\n\n        CFLAGS=\"$ac_save_CFLAGS\"\n        CXXFLAGS=\"$ac_save_CXXFLAGS\"\n        LIBS=\"$ac_save_LIBS\"\n      fi\n    fi\n    if test \"x$no_sdl\" = x ; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: yes\" >&5\n$as_echo \"yes\" >&6; }\n    else\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: result: no\" >&5\n$as_echo \"no\" >&6; }\n    fi\n  fi\n  if test \"x$no_sdl\" = x ; then\n     :\n  else\n     if test \"$SDL_CONFIG\" = \"no\" ; then\n       echo \"*** The sdl2-config script installed by SDL could not be found\"\n       echo \"*** If SDL was installed in PREFIX, make sure PREFIX/bin is in\"\n       echo \"*** your path, or set the SDL_CONFIG environment variable to the\"\n       echo \"*** full path to sdl2-config.\"\n     else\n       if test -f conf.sdltest ; then\n        :\n       else\n          echo \"*** Could not run SDL test program, checking why...\"\n          CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n          CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n          LIBS=\"$LIBS $SDL_LIBS\"\n          cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n#include <stdio.h>\n#include \"SDL.h\"\n\nint main(int argc, char *argv[])\n{ return 0; }\n#undef  main\n#define main K_and_R_C_main\n\nint\nmain ()\n{\n return 0;\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n   echo \"*** The test program compiled, but did not run. This usually means\"\n          echo \"*** that the run-time linker is not finding SDL or finding the wrong\"\n          echo \"*** version of SDL. If it is not finding SDL, you'll need to set your\"\n          echo \"*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point\"\n          echo \"*** to the installed location  Also, make sure you have run ldconfig if that\"\n          echo \"*** is required on your system\"\n\t  echo \"***\"\n          echo \"*** If you have an old version installed, it is best to remove it, although\"\n          echo \"*** you may also be able to get things to work by modifying LD_LIBRARY_PATH\"\nelse\n   echo \"*** The test program failed to compile or link. See the file config.log for the\"\n          echo \"*** exact error that occured. This usually means SDL was incorrectly installed\"\n          echo \"*** or that you have moved SDL since it was installed. In the latter case, you\"\n          echo \"*** may want to edit the sdl2-config script: $SDL_CONFIG\"\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\n          CFLAGS=\"$ac_save_CFLAGS\"\n          CXXFLAGS=\"$ac_save_CXXFLAGS\"\n          LIBS=\"$ac_save_LIBS\"\n       fi\n     fi\n     SDL_CFLAGS=\"\"\n     SDL_LIBS=\"\"\n     as_fn_error $? \"*** SDL version $SDL_VERSION not found!\" \"$LINENO\" 5\n\n  fi\n\n\n  rm -f conf.sdltest\n\nCFLAGS=\"$CFLAGS $SDL_CFLAGS\"\nLIBS=\"$LIBS -lSDL2_test $SDL_LIBS\"\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor\" >&5\n$as_echo_n \"checking how to run the C preprocessor... \" >&6; }\n# On Suns, sometimes $CPP names a directory.\nif test -n \"$CPP\" && test -d \"$CPP\"; then\n  CPP=\nfi\nif test -z \"$CPP\"; then\n  if ${ac_cv_prog_CPP+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n      # Double quotes because CPP needs to be expanded\n    for CPP in \"$CC -E\" \"$CC -E -traditional-cpp\" \"/lib/cpp\"\n    do\n      ac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n  break\nfi\n\n    done\n    ac_cv_prog_CPP=$CPP\n\nfi\n  CPP=$ac_cv_prog_CPP\nelse\n  ac_cv_prog_CPP=$CPP\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $CPP\" >&5\n$as_echo \"$CPP\" >&6; }\nac_preproc_ok=false\nfor ac_c_preproc_warn_flag in '' yes\ndo\n  # Use a header file that comes with gcc, so configuring glibc\n  # with a fresh cross-compiler works.\n  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since\n  # <limits.h> exists even on freestanding compilers.\n  # On the NeXT, cc -E runs the code through the compiler's parser,\n  # not just through cpp. \"Syntax error\" is here to catch this case.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#ifdef __STDC__\n# include <limits.h>\n#else\n# include <assert.h>\n#endif\n\t\t     Syntax error\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n\nelse\n  # Broken: fails on valid input.\ncontinue\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\n  # OK, works on sane cases.  Now check whether nonexistent headers\n  # can be detected and how.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <ac_nonexistent.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # Broken: success on invalid input.\ncontinue\nelse\n  # Passes both tests.\nac_preproc_ok=:\nbreak\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\n\ndone\n# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.\nrm -f conftest.i conftest.err conftest.$ac_ext\nif $ac_preproc_ok; then :\n\nelse\n  { { $as_echo \"$as_me:${as_lineno-$LINENO}: error: in \\`$ac_pwd':\" >&5\n$as_echo \"$as_me: error: in \\`$ac_pwd':\" >&2;}\nas_fn_error $? \"C preprocessor \\\"$CPP\\\" fails sanity check\nSee \\`config.log' for more details\" \"$LINENO\" 5; }\nfi\n\nac_ext=c\nac_cpp='$CPP $CPPFLAGS'\nac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'\nac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'\nac_compiler_gnu=$ac_cv_c_compiler_gnu\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for X\" >&5\n$as_echo_n \"checking for X... \" >&6; }\n\n\n# Check whether --with-x was given.\nif test \"${with_x+set}\" = set; then :\n  withval=$with_x;\nfi\n\n# $have_x is `yes', `no', `disabled', or empty when we do not yet know.\nif test \"x$with_x\" = xno; then\n  # The user explicitly disabled X.\n  have_x=disabled\nelse\n  case $x_includes,$x_libraries in #(\n    *\\'*) as_fn_error $? \"cannot use X directory names containing '\" \"$LINENO\" 5;; #(\n    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  # One or both of the vars are not set, and there is no cached value.\nac_x_includes=no ac_x_libraries=no\nrm -f -r conftest.dir\nif mkdir conftest.dir; then\n  cd conftest.dir\n  cat >Imakefile <<'_ACEOF'\nincroot:\n\t@echo incroot='${INCROOT}'\nusrlibdir:\n\t@echo usrlibdir='${USRLIBDIR}'\nlibdir:\n\t@echo libdir='${LIBDIR}'\n_ACEOF\n  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then\n    # GNU make sometimes prints \"make[1]: Entering ...\", which would confuse us.\n    for ac_var in incroot usrlibdir libdir; do\n      eval \"ac_im_$ac_var=\\`\\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\\`\"\n    done\n    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.\n    for ac_extension in a so sl dylib la dll; do\n      if test ! -f \"$ac_im_usrlibdir/libX11.$ac_extension\" &&\n\t test -f \"$ac_im_libdir/libX11.$ac_extension\"; then\n\tac_im_usrlibdir=$ac_im_libdir; break\n      fi\n    done\n    # Screen out bogus values from the imake configuration.  They are\n    # bogus both because they are the default anyway, and because\n    # using them would break gcc on systems where it needs fixed includes.\n    case $ac_im_incroot in\n\t/usr/include) ac_x_includes= ;;\n\t*) test -f \"$ac_im_incroot/X11/Xos.h\" && ac_x_includes=$ac_im_incroot;;\n    esac\n    case $ac_im_usrlibdir in\n\t/usr/lib | /usr/lib64 | /lib | /lib64) ;;\n\t*) test -d \"$ac_im_usrlibdir\" && ac_x_libraries=$ac_im_usrlibdir ;;\n    esac\n  fi\n  cd ..\n  rm -f -r conftest.dir\nfi\n\n# Standard set of common directories for X headers.\n# Check X11 before X11Rn because it is often a symlink to the current release.\nac_x_header_dirs='\n/usr/X11/include\n/usr/X11R7/include\n/usr/X11R6/include\n/usr/X11R5/include\n/usr/X11R4/include\n\n/usr/include/X11\n/usr/include/X11R7\n/usr/include/X11R6\n/usr/include/X11R5\n/usr/include/X11R4\n\n/usr/local/X11/include\n/usr/local/X11R7/include\n/usr/local/X11R6/include\n/usr/local/X11R5/include\n/usr/local/X11R4/include\n\n/usr/local/include/X11\n/usr/local/include/X11R7\n/usr/local/include/X11R6\n/usr/local/include/X11R5\n/usr/local/include/X11R4\n\n/usr/X386/include\n/usr/x386/include\n/usr/XFree86/include/X11\n\n/usr/include\n/usr/local/include\n/usr/unsupported/include\n/usr/athena/include\n/usr/local/x11r5/include\n/usr/lpp/Xamples/include\n\n/usr/openwin/include\n/usr/openwin/share/include'\n\nif test \"$ac_x_includes\" = no; then\n  # Guess where to find include files, by looking for Xlib.h.\n  # First, try using that file with no special directory specified.\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <X11/Xlib.h>\n_ACEOF\nif ac_fn_c_try_cpp \"$LINENO\"; then :\n  # We can compile using X headers with no special include directory.\nac_x_includes=\nelse\n  for ac_dir in $ac_x_header_dirs; do\n  if test -r \"$ac_dir/X11/Xlib.h\"; then\n    ac_x_includes=$ac_dir\n    break\n  fi\ndone\nfi\nrm -f conftest.err conftest.i conftest.$ac_ext\nfi # $ac_x_includes = no\n\nif test \"$ac_x_libraries\" = no; then\n  # Check for the libraries.\n  # See if we find them without any special options.\n  # Don't add to $LIBS permanently.\n  ac_save_LIBS=$LIBS\n  LIBS=\"-lX11 $LIBS\"\n  cat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n#include <X11/Xlib.h>\nint\nmain ()\n{\nXrmInitialize ()\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  LIBS=$ac_save_LIBS\n# We can link X programs with no special library path.\nac_x_libraries=\nelse\n  LIBS=$ac_save_LIBS\nfor ac_dir in `$as_echo \"$ac_x_includes $ac_x_header_dirs\" | sed s/include/lib/g`\ndo\n  # Don't even attempt the hair of trying to link an X program!\n  for ac_extension in a so sl dylib la dll; do\n    if test -r \"$ac_dir/libX11.$ac_extension\"; then\n      ac_x_libraries=$ac_dir\n      break 2\n    fi\n  done\ndone\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nfi # $ac_x_libraries = no\n\ncase $ac_x_includes,$ac_x_libraries in #(\n  no,* | *,no | *\\'*)\n    # Didn't find X, or a directory has \"'\" in its name.\n    ac_cv_have_x=\"have_x=no\";; #(\n  *)\n    # Record where we found X for the cache.\n    ac_cv_have_x=\"have_x=yes\\\n\tac_x_includes='$ac_x_includes'\\\n\tac_x_libraries='$ac_x_libraries'\"\nesac\nfi\n;; #(\n    *) have_x=yes;;\n  esac\n  eval \"$ac_cv_have_x\"\nfi # $with_x != no\n\nif test \"$have_x\" != yes; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_x\" >&5\n$as_echo \"$have_x\" >&6; }\n  no_x=yes\nelse\n  # If each of the values was on the command line, it overrides each guess.\n  test \"x$x_includes\" = xNONE && x_includes=$ac_x_includes\n  test \"x$x_libraries\" = xNONE && x_libraries=$ac_x_libraries\n  # Update the cache value to reflect the command line values.\n  ac_cv_have_x=\"have_x=yes\\\n\tac_x_includes='$x_includes'\\\n\tac_x_libraries='$x_libraries'\"\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes\" >&5\n$as_echo \"libraries $x_libraries, headers $x_includes\" >&6; }\nfi\n\nif test x$have_x = xyes; then\n    if test x$ac_x_includes = xno || test \"x$ac_x_includes\" = xNone || test \"x$ac_x_includes\" = x; then\n        :\n    else\n        CFLAGS=\"$CFLAGS -I$ac_x_includes\"\n    fi\n    if test x$ac_x_libraries = xno || test \"x$ac_x_libraries\" = xNone; then\n        :\n    else\n        if test \"x$ac_x_libraries\" = x; then\n            XPATH=\"\"\n            XLIB=\"-lX11\"\n        else\n            XPATH=\"-L$ac_x_libraries\"\n            XLIB=\"-L$ac_x_libraries -lX11\"\n        fi\n    fi\nfi\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for OpenGL support\" >&5\n$as_echo_n \"checking for OpenGL support... \" >&6; }\nhave_opengl=no\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n #include \"SDL_opengl.h\"\n\nint\nmain ()\n{\n\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nhave_opengl=yes\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_opengl\" >&5\n$as_echo \"$have_opengl\" >&6; }\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for OpenGL ES support\" >&5\n$as_echo_n \"checking for OpenGL ES support... \" >&6; }\nhave_opengles=no\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n #if defined (__IPHONEOS__)\n    #include <OpenGLES/ES1/gl.h>\n #else\n    #include <GLES/gl.h>\n #endif /* __QNXNTO__ */\n\nint\nmain ()\n{\n\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nhave_opengles=yes\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_opengles\" >&5\n$as_echo \"$have_opengles\" >&6; }\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for OpenGL ES2 support\" >&5\n$as_echo_n \"checking for OpenGL ES2 support... \" >&6; }\nhave_opengles2=no\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n #if defined (__IPHONEOS__)\n    #include <OpenGLES/ES2/gl.h>\n    #include <OpenGLES/ES2/glext.h>\n #else\n    #include <GLES2/gl2.h>\n    #include <GLES2/gl2ext.h>\n #endif\n\nint\nmain ()\n{\n\n\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_compile \"$LINENO\"; then :\n\nhave_opengles2=yes\n\nfi\nrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $have_opengles2\" >&5\n$as_echo \"$have_opengles2\" >&6; }\n\nGLLIB=\"\"\nGLESLIB=\"\"\nGLES2LIB=\"\"\nOPENGLES1_TARGETS=\"UNUSED\"\nOPENGLES2_TARGETS=\"UNUSED\"\nOPENGL_TARGETS=\"UNUSED\"\nif test x$have_opengles = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGLES\"\n    GLESLIB=\"$XPATH -lGLESv1_CM\"\n    OPENGLES1_TARGETS=\"TARGETS\"\nfi\nif test x$have_opengles2 = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGLES2\"\n    #GLES2LIB=\"$XPATH -lGLESv2\"\n    OPENGLES2_TARGETS=\"TARGETS\"\nfi\nif test x$have_opengl = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGL\"\n    GLLIB=\"$XPATH $SYS_GL_LIBS\"\n    OPENGL_TARGETS=\"TARGETS\"\nfi\n\n\n\n\n\n\n\n\n\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: checking for TTF_Init in -lSDL2_ttf\" >&5\n$as_echo_n \"checking for TTF_Init in -lSDL2_ttf... \" >&6; }\nif ${ac_cv_lib_SDL2_ttf_TTF_Init+:} false; then :\n  $as_echo_n \"(cached) \" >&6\nelse\n  ac_check_lib_save_LIBS=$LIBS\nLIBS=\"-lSDL2_ttf  $LIBS\"\ncat confdefs.h - <<_ACEOF >conftest.$ac_ext\n/* end confdefs.h.  */\n\n/* Override any GCC internal prototype to avoid an error.\n   Use char because int might match the return type of a GCC\n   builtin and then its argument prototype would still apply.  */\n#ifdef __cplusplus\nextern \"C\"\n#endif\nchar TTF_Init ();\nint\nmain ()\n{\nreturn TTF_Init ();\n  ;\n  return 0;\n}\n_ACEOF\nif ac_fn_c_try_link \"$LINENO\"; then :\n  ac_cv_lib_SDL2_ttf_TTF_Init=yes\nelse\n  ac_cv_lib_SDL2_ttf_TTF_Init=no\nfi\nrm -f core conftest.err conftest.$ac_objext \\\n    conftest$ac_exeext conftest.$ac_ext\nLIBS=$ac_check_lib_save_LIBS\nfi\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL2_ttf_TTF_Init\" >&5\n$as_echo \"$ac_cv_lib_SDL2_ttf_TTF_Init\" >&6; }\nif test \"x$ac_cv_lib_SDL2_ttf_TTF_Init\" = xyes; then :\n  have_SDL_ttf=yes\nfi\n\nif test x$have_SDL_ttf = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_SDL_TTF\"\n    SDL_TTF_LIB=\"-lSDL2_ttf\"\nfi\n\n\nac_config_files=\"$ac_config_files Makefile\"\n\ncat >confcache <<\\_ACEOF\n# This file is a shell script that caches the results of configure\n# tests run on this system so they can be shared between configure\n# scripts and configure runs, see configure's option --config-cache.\n# It is not useful on other systems.  If it contains results you don't\n# want to keep, you may remove or edit it.\n#\n# config.status only pays attention to the cache file if you give it\n# the --recheck option to rerun configure.\n#\n# `ac_cv_env_foo' variables (set or unset) will be overridden when\n# loading this file, other *unset* `ac_cv_foo' will be assigned the\n# following values.\n\n_ACEOF\n\n# The following way of writing the cache mishandles newlines in values,\n# but we know of no workaround that is simple, portable, and efficient.\n# So, we kill variables containing newlines.\n# Ultrix sh set writes to stderr and can't be redirected directly,\n# and sets the high bit in the cache file unless we assign to the vars.\n(\n  for ac_var in `(set) 2>&1 | sed -n 's/^\\([a-zA-Z_][a-zA-Z0-9_]*\\)=.*/\\1/p'`; do\n    eval ac_val=\\$$ac_var\n    case $ac_val in #(\n    *${as_nl}*)\n      case $ac_var in #(\n      *_cv_*) { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline\" >&5\n$as_echo \"$as_me: WARNING: cache variable $ac_var contains a newline\" >&2;} ;;\n      esac\n      case $ac_var in #(\n      _ | IFS | as_nl) ;; #(\n      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(\n      *) { eval $ac_var=; unset $ac_var;} ;;\n      esac ;;\n    esac\n  done\n\n  (set) 2>&1 |\n    case $as_nl`(ac_space=' '; set) 2>&1` in #(\n    *${as_nl}ac_space=\\ *)\n      # `set' does not quote correctly, so add quotes: double-quote\n      # substitution turns \\\\\\\\ into \\\\, and sed turns \\\\ into \\.\n      sed -n \\\n\t\"s/'/'\\\\\\\\''/g;\n\t  s/^\\\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\\\)=\\\\(.*\\\\)/\\\\1='\\\\2'/p\"\n      ;; #(\n    *)\n      # `set' quotes correctly as required by POSIX, so do not add quotes.\n      sed -n \"/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p\"\n      ;;\n    esac |\n    sort\n) |\n  sed '\n     /^ac_cv_env_/b end\n     t clear\n     :clear\n     s/^\\([^=]*\\)=\\(.*[{}].*\\)$/test \"${\\1+set}\" = set || &/\n     t end\n     s/^\\([^=]*\\)=\\(.*\\)$/\\1=${\\1=\\2}/\n     :end' >>confcache\nif diff \"$cache_file\" confcache >/dev/null 2>&1; then :; else\n  if test -w \"$cache_file\"; then\n    if test \"x$cache_file\" != \"x/dev/null\"; then\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: updating cache $cache_file\" >&5\n$as_echo \"$as_me: updating cache $cache_file\" >&6;}\n      if test ! -f \"$cache_file\" || test -h \"$cache_file\"; then\n\tcat confcache >\"$cache_file\"\n      else\n        case $cache_file in #(\n        */* | ?:*)\n\t  mv -f confcache \"$cache_file\"$$ &&\n\t  mv -f \"$cache_file\"$$ \"$cache_file\" ;; #(\n        *)\n\t  mv -f confcache \"$cache_file\" ;;\n\tesac\n      fi\n    fi\n  else\n    { $as_echo \"$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file\" >&5\n$as_echo \"$as_me: not updating unwritable cache $cache_file\" >&6;}\n  fi\nfi\nrm -f confcache\n\ntest \"x$prefix\" = xNONE && prefix=$ac_default_prefix\n# Let make expand exec_prefix.\ntest \"x$exec_prefix\" = xNONE && exec_prefix='${prefix}'\n\n# Transform confdefs.h into DEFS.\n# Protect against shell expansion while executing Makefile rules.\n# Protect against Makefile macro expansion.\n#\n# If the first sed substitution is executed (which looks for macros that\n# take arguments), then branch to the quote section.  Otherwise,\n# look for a macro that doesn't take arguments.\nac_script='\n:mline\n/\\\\$/{\n N\n s,\\\\\\n,,\n b mline\n}\nt clear\n:clear\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t (][^\t (]*([^)]*)\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\ns/^[\t ]*#[\t ]*define[\t ][\t ]*\\([^\t ][^\t ]*\\)[\t ]*\\(.*\\)/-D\\1=\\2/g\nt quote\nb any\n:quote\ns/[\t `~#$^&*(){}\\\\|;'\\''\"<>?]/\\\\&/g\ns/\\[/\\\\&/g\ns/\\]/\\\\&/g\ns/\\$/$$/g\nH\n:any\n${\n\tg\n\ts/^\\n//\n\ts/\\n/ /g\n\tp\n}\n'\nDEFS=`sed -n \"$ac_script\" confdefs.h`\n\n\nac_libobjs=\nac_ltlibobjs=\nU=\nfor ac_i in : $LIBOBJS; do test \"x$ac_i\" = x: && continue\n  # 1. Remove the extension, and $U if already installed.\n  ac_script='s/\\$U\\././;s/\\.o$//;s/\\.obj$//'\n  ac_i=`$as_echo \"$ac_i\" | sed \"$ac_script\"`\n  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR\n  #    will be set to the directory where LIBOBJS objects are built.\n  as_fn_append ac_libobjs \" \\${LIBOBJDIR}$ac_i\\$U.$ac_objext\"\n  as_fn_append ac_ltlibobjs \" \\${LIBOBJDIR}$ac_i\"'$U.lo'\ndone\nLIBOBJS=$ac_libobjs\n\nLTLIBOBJS=$ac_ltlibobjs\n\n\n\n: \"${CONFIG_STATUS=./config.status}\"\nac_write_fail=0\nac_clean_files_save=$ac_clean_files\nac_clean_files=\"$ac_clean_files $CONFIG_STATUS\"\n{ $as_echo \"$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS\" >&5\n$as_echo \"$as_me: creating $CONFIG_STATUS\" >&6;}\nas_write_fail=0\ncat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1\n#! $SHELL\n# Generated by $as_me.\n# Run this file to recreate the current configuration.\n# Compiler output produced by configure, useful for debugging\n# configure, is in config.log if it exists.\n\ndebug=false\nac_cs_recheck=false\nac_cs_silent=false\n\nSHELL=\\${CONFIG_SHELL-$SHELL}\nexport SHELL\n_ASEOF\ncat >>$CONFIG_STATUS <<\\_ASEOF || as_write_fail=1\n## -------------------- ##\n## M4sh Initialization. ##\n## -------------------- ##\n\n# Be more Bourne compatible\nDUALCASE=1; export DUALCASE # for MKS sh\nif test -n \"${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :\n  emulate sh\n  NULLCMD=:\n  # Pre-4.2 versions of Zsh do word splitting on ${1+\"$@\"}, which\n  # is contrary to our usage.  Disable this feature.\n  alias -g '${1+\"$@\"}'='\"$@\"'\n  setopt NO_GLOB_SUBST\nelse\n  case `(set -o) 2>/dev/null` in #(\n  *posix*) :\n    set -o posix ;; #(\n  *) :\n     ;;\nesac\nfi\n\n\nas_nl='\n'\nexport as_nl\n# Printing a long string crashes Solaris 7 /usr/bin/printf.\nas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\nas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\n# Prefer a ksh shell builtin over an external printf program on Solaris,\n# but without wasting forks for bash or zsh.\nif test -z \"$BASH_VERSION$ZSH_VERSION\" \\\n    && (test \"X`print -r -- $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='print -r --'\n  as_echo_n='print -rn --'\nelif (test \"X`printf %s $as_echo`\" = \"X$as_echo\") 2>/dev/null; then\n  as_echo='printf %s\\n'\n  as_echo_n='printf %s'\nelse\n  if test \"X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`\" = \"X-n $as_echo\"; then\n    as_echo_body='eval /usr/ucb/echo -n \"$1$as_nl\"'\n    as_echo_n='/usr/ucb/echo -n'\n  else\n    as_echo_body='eval expr \"X$1\" : \"X\\\\(.*\\\\)\"'\n    as_echo_n_body='eval\n      arg=$1;\n      case $arg in #(\n      *\"$as_nl\"*)\n\texpr \"X$arg\" : \"X\\\\(.*\\\\)$as_nl\";\n\targ=`expr \"X$arg\" : \".*$as_nl\\\\(.*\\\\)\"`;;\n      esac;\n      expr \"X$arg\" : \"X\\\\(.*\\\\)\" | tr -d \"$as_nl\"\n    '\n    export as_echo_n_body\n    as_echo_n='sh -c $as_echo_n_body as_echo'\n  fi\n  export as_echo_body\n  as_echo='sh -c $as_echo_body as_echo'\nfi\n\n# The user is always right.\nif test \"${PATH_SEPARATOR+set}\" != set; then\n  PATH_SEPARATOR=:\n  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {\n    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\n      PATH_SEPARATOR=';'\n  }\nfi\n\n\n# IFS\n# We need space, tab and new line, in precisely that order.  Quoting is\n# there to prevent editors from complaining about space-tab.\n# (If _AS_PATH_WALK were called with IFS unset, it would disable word\n# splitting by setting IFS to empty value.)\nIFS=\" \"\"\t$as_nl\"\n\n# Find who we are.  Look in the path if we contain no directory separator.\nas_myself=\ncase $0 in #((\n  *[\\\\/]* ) as_myself=$0 ;;\n  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\nfor as_dir in $PATH\ndo\n  IFS=$as_save_IFS\n  test -z \"$as_dir\" && as_dir=.\n    test -r \"$as_dir/$0\" && as_myself=$as_dir/$0 && break\n  done\nIFS=$as_save_IFS\n\n     ;;\nesac\n# We did not find ourselves, most probably we were run as `sh COMMAND'\n# in which case we are not to be found in the path.\nif test \"x$as_myself\" = x; then\n  as_myself=$0\nfi\nif test ! -f \"$as_myself\"; then\n  $as_echo \"$as_myself: error: cannot find myself; rerun with an absolute file name\" >&2\n  exit 1\nfi\n\n# Unset variables that we do not need and which cause bugs (e.g. in\n# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the \"|| exit 1\"\n# suppresses any \"Segmentation fault\" message there.  '((' could\n# trigger a bug in pdksh 5.2.14.\nfor as_var in BASH_ENV ENV MAIL MAILPATH\ndo eval test x\\${$as_var+set} = xset \\\n  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ndone\nPS1='$ '\nPS2='> '\nPS4='+ '\n\n# NLS nuisances.\nLC_ALL=C\nexport LC_ALL\nLANGUAGE=C\nexport LANGUAGE\n\n# CDPATH.\n(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\n\n\n# as_fn_error STATUS ERROR [LINENO LOG_FD]\n# ----------------------------------------\n# Output \"`basename $0`: error: ERROR\" to stderr. If LINENO and LOG_FD are\n# provided, also output the error to LOG_FD, referencing LINENO. Then exit the\n# script with STATUS, using 1 if that was 0.\nas_fn_error ()\n{\n  as_status=$1; test $as_status -eq 0 && as_status=1\n  if test \"$4\"; then\n    as_lineno=${as_lineno-\"$3\"} as_lineno_stack=as_lineno_stack=$as_lineno_stack\n    $as_echo \"$as_me:${as_lineno-$LINENO}: error: $2\" >&$4\n  fi\n  $as_echo \"$as_me: error: $2\" >&2\n  as_fn_exit $as_status\n} # as_fn_error\n\n\n# as_fn_set_status STATUS\n# -----------------------\n# Set $? to STATUS, without forking.\nas_fn_set_status ()\n{\n  return $1\n} # as_fn_set_status\n\n# as_fn_exit STATUS\n# -----------------\n# Exit the shell with STATUS, even in a \"trap 0\" or \"set -e\" context.\nas_fn_exit ()\n{\n  set +e\n  as_fn_set_status $1\n  exit $1\n} # as_fn_exit\n\n# as_fn_unset VAR\n# ---------------\n# Portably unset VAR.\nas_fn_unset ()\n{\n  { eval $1=; unset $1;}\n}\nas_unset=as_fn_unset\n# as_fn_append VAR VALUE\n# ----------------------\n# Append the text in VALUE to the end of the definition contained in VAR. Take\n# advantage of any shell optimizations that allow amortized linear growth over\n# repeated appends, instead of the typical quadratic growth present in naive\n# implementations.\nif (eval \"as_var=1; as_var+=2; test x\\$as_var = x12\") 2>/dev/null; then :\n  eval 'as_fn_append ()\n  {\n    eval $1+=\\$2\n  }'\nelse\n  as_fn_append ()\n  {\n    eval $1=\\$$1\\$2\n  }\nfi # as_fn_append\n\n# as_fn_arith ARG...\n# ------------------\n# Perform arithmetic evaluation on the ARGs, and store the result in the\n# global $as_val. Take advantage of shells that can avoid forks. The arguments\n# must be portable across $(()) and expr.\nif (eval \"test \\$(( 1 + 1 )) = 2\") 2>/dev/null; then :\n  eval 'as_fn_arith ()\n  {\n    as_val=$(( $* ))\n  }'\nelse\n  as_fn_arith ()\n  {\n    as_val=`expr \"$@\" || test $? -eq 1`\n  }\nfi # as_fn_arith\n\n\nif expr a : '\\(a\\)' >/dev/null 2>&1 &&\n   test \"X`expr 00001 : '.*\\(...\\)'`\" = X001; then\n  as_expr=expr\nelse\n  as_expr=false\nfi\n\nif (basename -- /) >/dev/null 2>&1 && test \"X`basename -- / 2>&1`\" = \"X/\"; then\n  as_basename=basename\nelse\n  as_basename=false\nfi\n\nif (as_dir=`dirname -- /` && test \"X$as_dir\" = X/) >/dev/null 2>&1; then\n  as_dirname=dirname\nelse\n  as_dirname=false\nfi\n\nas_me=`$as_basename -- \"$0\" ||\n$as_expr X/\"$0\" : '.*/\\([^/][^/]*\\)/*$' \\| \\\n\t X\"$0\" : 'X\\(//\\)$' \\| \\\n\t X\"$0\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X/\"$0\" |\n    sed '/^.*\\/\\([^/][^/]*\\)\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\/\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n\n# Avoid depending upon Character Ranges.\nas_cr_letters='abcdefghijklmnopqrstuvwxyz'\nas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nas_cr_Letters=$as_cr_letters$as_cr_LETTERS\nas_cr_digits='0123456789'\nas_cr_alnum=$as_cr_Letters$as_cr_digits\n\nECHO_C= ECHO_N= ECHO_T=\ncase `echo -n x` in #(((((\n-n*)\n  case `echo 'xy\\c'` in\n  *c*) ECHO_T='\t';;\t# ECHO_T is single tab character.\n  xy)  ECHO_C='\\c';;\n  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null\n       ECHO_T='\t';;\n  esac;;\n*)\n  ECHO_N='-n';;\nesac\n\nrm -f conf$$ conf$$.exe conf$$.file\nif test -d conf$$.dir; then\n  rm -f conf$$.dir/conf$$.file\nelse\n  rm -f conf$$.dir\n  mkdir conf$$.dir 2>/dev/null\nfi\nif (echo >conf$$.file) 2>/dev/null; then\n  if ln -s conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s='ln -s'\n    # ... but there are two gotchas:\n    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.\n    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.\n    # In both cases, we have to default to `cp -pR'.\n    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||\n      as_ln_s='cp -pR'\n  elif ln conf$$.file conf$$ 2>/dev/null; then\n    as_ln_s=ln\n  else\n    as_ln_s='cp -pR'\n  fi\nelse\n  as_ln_s='cp -pR'\nfi\nrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file\nrmdir conf$$.dir 2>/dev/null\n\n\n# as_fn_mkdir_p\n# -------------\n# Create \"$as_dir\" as a directory, including parents if necessary.\nas_fn_mkdir_p ()\n{\n\n  case $as_dir in #(\n  -*) as_dir=./$as_dir;;\n  esac\n  test -d \"$as_dir\" || eval $as_mkdir_p || {\n    as_dirs=\n    while :; do\n      case $as_dir in #(\n      *\\'*) as_qdir=`$as_echo \"$as_dir\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; #'(\n      *) as_qdir=$as_dir;;\n      esac\n      as_dirs=\"'$as_qdir' $as_dirs\"\n      as_dir=`$as_dirname -- \"$as_dir\" ||\n$as_expr X\"$as_dir\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$as_dir\" : 'X\\(//\\)$' \\| \\\n\t X\"$as_dir\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$as_dir\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n      test -d \"$as_dir\" && break\n    done\n    test -z \"$as_dirs\" || eval \"mkdir $as_dirs\"\n  } || test -d \"$as_dir\" || as_fn_error $? \"cannot create directory $as_dir\"\n\n\n} # as_fn_mkdir_p\nif mkdir -p . 2>/dev/null; then\n  as_mkdir_p='mkdir -p \"$as_dir\"'\nelse\n  test -d ./-p && rmdir ./-p\n  as_mkdir_p=false\nfi\n\n\n# as_fn_executable_p FILE\n# -----------------------\n# Test if FILE is an executable regular file.\nas_fn_executable_p ()\n{\n  test -f \"$1\" && test -x \"$1\"\n} # as_fn_executable_p\nas_test_x='test -x'\nas_executable_p=as_fn_executable_p\n\n# Sed expression to map a string onto a valid CPP name.\nas_tr_cpp=\"eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'\"\n\n# Sed expression to map a string onto a valid variable name.\nas_tr_sh=\"eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'\"\n\n\nexec 6>&1\n## ----------------------------------- ##\n## Main body of $CONFIG_STATUS script. ##\n## ----------------------------------- ##\n_ASEOF\ntest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# Save the log message, to keep $0 and so on meaningful, and to\n# report actual input values of CONFIG_FILES etc. instead of their\n# values after options handling.\nac_log=\"\nThis file was extended by $as_me, which was\ngenerated by GNU Autoconf 2.69.  Invocation command line was\n\n  CONFIG_FILES    = $CONFIG_FILES\n  CONFIG_HEADERS  = $CONFIG_HEADERS\n  CONFIG_LINKS    = $CONFIG_LINKS\n  CONFIG_COMMANDS = $CONFIG_COMMANDS\n  $ $0 $@\n\non `(hostname || uname -n) 2>/dev/null | sed 1q`\n\"\n\n_ACEOF\n\ncase $ac_config_files in *\"\n\"*) set x $ac_config_files; shift; ac_config_files=$*;;\nesac\n\n\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n# Files that config.status was made for.\nconfig_files=\"$ac_config_files\"\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nac_cs_usage=\"\\\n\\`$as_me' instantiates files and other configuration actions\nfrom templates according to the current configuration.  Unless the files\nand actions are specified as TAGs, all are instantiated by default.\n\nUsage: $0 [OPTION]... [TAG]...\n\n  -h, --help       print this help, then exit\n  -V, --version    print version number and configuration settings, then exit\n      --config     print configuration, then exit\n  -q, --quiet, --silent\n                   do not print progress messages\n  -d, --debug      don't remove temporary files\n      --recheck    update $as_me by reconfiguring in the same conditions\n      --file=FILE[:TEMPLATE]\n                   instantiate the configuration file FILE\n\nConfiguration files:\n$config_files\n\nReport bugs to the package provider.\"\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_cs_config=\"`$as_echo \"$ac_configure_args\" | sed 's/^ //; s/[\\\\\"\"\\`\\$]/\\\\\\\\&/g'`\"\nac_cs_version=\"\\\\\nconfig.status\nconfigured by $0, generated by GNU Autoconf 2.69,\n  with options \\\\\"\\$ac_cs_config\\\\\"\n\nCopyright (C) 2012 Free Software Foundation, Inc.\nThis config.status script is free software; the Free Software Foundation\ngives unlimited permission to copy, distribute and modify it.\"\n\nac_pwd='$ac_pwd'\nsrcdir='$srcdir'\ntest -n \"\\$AWK\" || AWK=awk\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# The default lists apply if the user does not specify any file.\nac_need_defaults=:\nwhile test $# != 0\ndo\n  case $1 in\n  --*=?*)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=`expr \"X$1\" : 'X[^=]*=\\(.*\\)'`\n    ac_shift=:\n    ;;\n  --*=)\n    ac_option=`expr \"X$1\" : 'X\\([^=]*\\)='`\n    ac_optarg=\n    ac_shift=:\n    ;;\n  *)\n    ac_option=$1\n    ac_optarg=$2\n    ac_shift=shift\n    ;;\n  esac\n\n  case $ac_option in\n  # Handling of the options.\n  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)\n    ac_cs_recheck=: ;;\n  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )\n    $as_echo \"$ac_cs_version\"; exit ;;\n  --config | --confi | --conf | --con | --co | --c )\n    $as_echo \"$ac_cs_config\"; exit ;;\n  --debug | --debu | --deb | --de | --d | -d )\n    debug=: ;;\n  --file | --fil | --fi | --f )\n    $ac_shift\n    case $ac_optarg in\n    *\\'*) ac_optarg=`$as_echo \"$ac_optarg\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"` ;;\n    '') as_fn_error $? \"missing file argument\" ;;\n    esac\n    as_fn_append CONFIG_FILES \" '$ac_optarg'\"\n    ac_need_defaults=false;;\n  --he | --h |  --help | --hel | -h )\n    $as_echo \"$ac_cs_usage\"; exit ;;\n  -q | -quiet | --quiet | --quie | --qui | --qu | --q \\\n  | -silent | --silent | --silen | --sile | --sil | --si | --s)\n    ac_cs_silent=: ;;\n\n  # This is an error.\n  -*) as_fn_error $? \"unrecognized option: \\`$1'\nTry \\`$0 --help' for more information.\" ;;\n\n  *) as_fn_append ac_config_targets \" $1\"\n     ac_need_defaults=false ;;\n\n  esac\n  shift\ndone\n\nac_configure_extra_args=\n\nif $ac_cs_silent; then\n  exec 6>/dev/null\n  ac_configure_extra_args=\"$ac_configure_extra_args --silent\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nif \\$ac_cs_recheck; then\n  set X $SHELL '$0' $ac_configure_args \\$ac_configure_extra_args --no-create --no-recursion\n  shift\n  \\$as_echo \"running CONFIG_SHELL=$SHELL \\$*\" >&6\n  CONFIG_SHELL='$SHELL'\n  export CONFIG_SHELL\n  exec \"\\$@\"\nfi\n\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nexec 5>>config.log\n{\n  echo\n  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX\n## Running $as_me. ##\n_ASBOX\n  $as_echo \"$ac_log\"\n} >&5\n\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n\n# Handling of arguments.\nfor ac_config_target in $ac_config_targets\ndo\n  case $ac_config_target in\n    \"Makefile\") CONFIG_FILES=\"$CONFIG_FILES Makefile\" ;;\n\n  *) as_fn_error $? \"invalid argument: \\`$ac_config_target'\" \"$LINENO\" 5;;\n  esac\ndone\n\n\n# If the user did not use the arguments to specify the items to instantiate,\n# then the envvar interface is used.  Set only those that are not.\n# We use the long form for the default assignment because of an extremely\n# bizarre bug on SunOS 4.1.3.\nif $ac_need_defaults; then\n  test \"${CONFIG_FILES+set}\" = set || CONFIG_FILES=$config_files\nfi\n\n# Have a temporary directory for convenience.  Make it in the build tree\n# simply because there is no reason against having it here, and in addition,\n# creating and moving files from /tmp can sometimes cause problems.\n# Hook for its removal unless debugging.\n# Note that there is a small window in which the directory will not be cleaned:\n# after its creation but before its name has been assigned to `$tmp'.\n$debug ||\n{\n  tmp= ac_tmp=\n  trap 'exit_status=$?\n  : \"${ac_tmp:=$tmp}\"\n  { test ! -d \"$ac_tmp\" || rm -fr \"$ac_tmp\"; } && exit $exit_status\n' 0\n  trap 'as_fn_exit 1' 1 2 13 15\n}\n# Create a (secure) tmp directory for tmp files.\n\n{\n  tmp=`(umask 077 && mktemp -d \"./confXXXXXX\") 2>/dev/null` &&\n  test -d \"$tmp\"\n}  ||\n{\n  tmp=./conf$$-$RANDOM\n  (umask 077 && mkdir \"$tmp\")\n} || as_fn_error $? \"cannot create a temporary directory in .\" \"$LINENO\" 5\nac_tmp=$tmp\n\n# Set up the scripts for CONFIG_FILES section.\n# No need to generate them if there are no CONFIG_FILES.\n# This happens for instance with `./config.status config.h'.\nif test -n \"$CONFIG_FILES\"; then\n\n\nac_cr=`echo X | tr X '\\015'`\n# On cygwin, bash can eat \\r inside `` if the user requested igncr.\n# But we know of no other shell where ac_cr would be empty at this\n# point, so we can use a bashism as a fallback.\nif test \"x$ac_cr\" = x; then\n  eval ac_cr=\\$\\'\\\\r\\'\nfi\nac_cs_awk_cr=`$AWK 'BEGIN { print \"a\\rb\" }' </dev/null 2>/dev/null`\nif test \"$ac_cs_awk_cr\" = \"a${ac_cr}b\"; then\n  ac_cs_awk_cr='\\\\r'\nelse\n  ac_cs_awk_cr=$ac_cr\nfi\n\necho 'BEGIN {' >\"$ac_tmp/subs1.awk\" &&\n_ACEOF\n\n\n{\n  echo \"cat >conf$$subs.awk <<_ACEOF\" &&\n  echo \"$ac_subst_vars\" | sed 's/.*/&!$&$ac_delim/' &&\n  echo \"_ACEOF\"\n} >conf$$subs.sh ||\n  as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\nac_delim_num=`echo \"$ac_subst_vars\" | grep -c '^'`\nac_delim='%!_!# '\nfor ac_last_try in false false false false false :; do\n  . ./conf$$subs.sh ||\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n\n  ac_delim_n=`sed -n \"s/.*$ac_delim\\$/X/p\" conf$$subs.awk | grep -c X`\n  if test $ac_delim_n = $ac_delim_num; then\n    break\n  elif $ac_last_try; then\n    as_fn_error $? \"could not make $CONFIG_STATUS\" \"$LINENO\" 5\n  else\n    ac_delim=\"$ac_delim!$ac_delim _$ac_delim!! \"\n  fi\ndone\nrm -f conf$$subs.sh\n\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\ncat >>\"\\$ac_tmp/subs1.awk\" <<\\\\_ACAWK &&\n_ACEOF\nsed -n '\nh\ns/^/S[\"/; s/!.*/\"]=/\np\ng\ns/^[^!]*!//\n:repl\nt repl\ns/'\"$ac_delim\"'$//\nt delim\n:nl\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\\\\n\"\\\\/\np\nn\nb repl\n:more1\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt nl\n:delim\nh\ns/\\(.\\{148\\}\\)..*/\\1/\nt more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"/\np\nb\n:more2\ns/[\"\\\\]/\\\\&/g; s/^/\"/; s/$/\"\\\\/\np\ng\ns/.\\{148\\}//\nt delim\n' <conf$$subs.awk | sed '\n/^[^\"\"]/{\n  N\n  s/\\n//\n}\n' >>$CONFIG_STATUS || ac_write_fail=1\nrm -f conf$$subs.awk\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n_ACAWK\ncat >>\"\\$ac_tmp/subs1.awk\" <<_ACAWK &&\n  for (key in S) S_is_set[key] = 1\n  FS = \"\u0007\"\n\n}\n{\n  line = $ 0\n  nfields = split(line, field, \"@\")\n  substed = 0\n  len = length(field[1])\n  for (i = 2; i < nfields; i++) {\n    key = field[i]\n    keylen = length(key)\n    if (S_is_set[key]) {\n      value = S[key]\n      line = substr(line, 1, len) \"\" value \"\" substr(line, len + keylen + 3)\n      len += length(value) + length(field[++i])\n      substed = 1\n    } else\n      len += 1 + keylen\n  }\n\n  print line\n}\n\n_ACAWK\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nif sed \"s/$ac_cr//\" < /dev/null > /dev/null 2>&1; then\n  sed \"s/$ac_cr\\$//; s/$ac_cr/$ac_cs_awk_cr/g\"\nelse\n  cat\nfi < \"$ac_tmp/subs1.awk\" > \"$ac_tmp/subs.awk\" \\\n  || as_fn_error $? \"could not setup config files machinery\" \"$LINENO\" 5\n_ACEOF\n\n# VPATH may cause trouble with some makes, so we remove sole $(srcdir),\n# ${srcdir} and @srcdir@ entries from VPATH if srcdir is \".\", strip leading and\n# trailing colons and then remove the whole line if VPATH becomes empty\n# (actually we leave an empty line to preserve line numbers).\nif test \"x$srcdir\" = x.; then\n  ac_vpsub='/^[\t ]*VPATH[\t ]*=[\t ]*/{\nh\ns///\ns/^/:/\ns/[\t ]*$/:/\ns/:\\$(srcdir):/:/g\ns/:\\${srcdir}:/:/g\ns/:@srcdir@:/:/g\ns/^:*//\ns/:*$//\nx\ns/\\(=[\t ]*\\).*/\\1/\nG\ns/\\n//\ns/^[^=]*=[\t ]*$//\n}'\nfi\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\nfi # test -n \"$CONFIG_FILES\"\n\n\neval set X \"  :F $CONFIG_FILES      \"\nshift\nfor ac_tag\ndo\n  case $ac_tag in\n  :[FHLC]) ac_mode=$ac_tag; continue;;\n  esac\n  case $ac_mode$ac_tag in\n  :[FHL]*:*);;\n  :L* | :C*:*) as_fn_error $? \"invalid tag \\`$ac_tag'\" \"$LINENO\" 5;;\n  :[FH]-) ac_tag=-:-;;\n  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;\n  esac\n  ac_save_IFS=$IFS\n  IFS=:\n  set x $ac_tag\n  IFS=$ac_save_IFS\n  shift\n  ac_file=$1\n  shift\n\n  case $ac_mode in\n  :L) ac_source=$1;;\n  :[FH])\n    ac_file_inputs=\n    for ac_f\n    do\n      case $ac_f in\n      -) ac_f=\"$ac_tmp/stdin\";;\n      *) # Look for the file first in the build tree, then in the source tree\n\t # (if the path is not absolute).  The absolute path cannot be DOS-style,\n\t # because $ac_f cannot contain `:'.\n\t test -f \"$ac_f\" ||\n\t   case $ac_f in\n\t   [\\\\/$]*) false;;\n\t   *) test -f \"$srcdir/$ac_f\" && ac_f=\"$srcdir/$ac_f\";;\n\t   esac ||\n\t   as_fn_error 1 \"cannot find input file: \\`$ac_f'\" \"$LINENO\" 5;;\n      esac\n      case $ac_f in *\\'*) ac_f=`$as_echo \"$ac_f\" | sed \"s/'/'\\\\\\\\\\\\\\\\''/g\"`;; esac\n      as_fn_append ac_file_inputs \" '$ac_f'\"\n    done\n\n    # Let's still pretend it is `configure' which instantiates (i.e., don't\n    # use $as_me), people would be surprised to read:\n    #    /* config.h.  Generated by config.status.  */\n    configure_input='Generated from '`\n\t  $as_echo \"$*\" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'\n\t`' by configure.'\n    if test x\"$ac_file\" != x-; then\n      configure_input=\"$ac_file.  $configure_input\"\n      { $as_echo \"$as_me:${as_lineno-$LINENO}: creating $ac_file\" >&5\n$as_echo \"$as_me: creating $ac_file\" >&6;}\n    fi\n    # Neutralize special characters interpreted by sed in replacement strings.\n    case $configure_input in #(\n    *\\&* | *\\|* | *\\\\* )\n       ac_sed_conf_input=`$as_echo \"$configure_input\" |\n       sed 's/[\\\\\\\\&|]/\\\\\\\\&/g'`;; #(\n    *) ac_sed_conf_input=$configure_input;;\n    esac\n\n    case $ac_tag in\n    *:-:* | *:-) cat >\"$ac_tmp/stdin\" \\\n      || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5 ;;\n    esac\n    ;;\n  esac\n\n  ac_dir=`$as_dirname -- \"$ac_file\" ||\n$as_expr X\"$ac_file\" : 'X\\(.*[^/]\\)//*[^/][^/]*/*$' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)[^/]' \\| \\\n\t X\"$ac_file\" : 'X\\(//\\)$' \\| \\\n\t X\"$ac_file\" : 'X\\(/\\)' \\| . 2>/dev/null ||\n$as_echo X\"$ac_file\" |\n    sed '/^X\\(.*[^/]\\)\\/\\/*[^/][^/]*\\/*$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)[^/].*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\/\\)$/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  /^X\\(\\/\\).*/{\n\t    s//\\1/\n\t    q\n\t  }\n\t  s/.*/./; q'`\n  as_dir=\"$ac_dir\"; as_fn_mkdir_p\n  ac_builddir=.\n\ncase \"$ac_dir\" in\n.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;\n*)\n  ac_dir_suffix=/`$as_echo \"$ac_dir\" | sed 's|^\\.[\\\\/]||'`\n  # A \"..\" for each directory in $ac_dir_suffix.\n  ac_top_builddir_sub=`$as_echo \"$ac_dir_suffix\" | sed 's|/[^\\\\/]*|/..|g;s|/||'`\n  case $ac_top_builddir_sub in\n  \"\") ac_top_builddir_sub=. ac_top_build_prefix= ;;\n  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;\n  esac ;;\nesac\nac_abs_top_builddir=$ac_pwd\nac_abs_builddir=$ac_pwd$ac_dir_suffix\n# for backward compatibility:\nac_top_builddir=$ac_top_build_prefix\n\ncase $srcdir in\n  .)  # We are building in place.\n    ac_srcdir=.\n    ac_top_srcdir=$ac_top_builddir_sub\n    ac_abs_top_srcdir=$ac_pwd ;;\n  [\\\\/]* | ?:[\\\\/]* )  # Absolute name.\n    ac_srcdir=$srcdir$ac_dir_suffix;\n    ac_top_srcdir=$srcdir\n    ac_abs_top_srcdir=$srcdir ;;\n  *) # Relative name.\n    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix\n    ac_top_srcdir=$ac_top_build_prefix$srcdir\n    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;\nesac\nac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix\n\n\n  case $ac_mode in\n  :F)\n  #\n  # CONFIG_FILE\n  #\n\n_ACEOF\n\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n# If the template does not know about datarootdir, expand it.\n# FIXME: This hack should be removed a few years after 2.60.\nac_datarootdir_hack=; ac_datarootdir_seen=\nac_sed_dataroot='\n/datarootdir/ {\n  p\n  q\n}\n/@datadir@/p\n/@docdir@/p\n/@infodir@/p\n/@localedir@/p\n/@mandir@/p'\ncase `eval \"sed -n \\\"\\$ac_sed_dataroot\\\" $ac_file_inputs\"` in\n*datarootdir*) ac_datarootdir_seen=yes;;\n*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&5\n$as_echo \"$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting\" >&2;}\n_ACEOF\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\n  ac_datarootdir_hack='\n  s&@datadir@&$datadir&g\n  s&@docdir@&$docdir&g\n  s&@infodir@&$infodir&g\n  s&@localedir@&$localedir&g\n  s&@mandir@&$mandir&g\n  s&\\\\\\${datarootdir}&$datarootdir&g' ;;\nesac\n_ACEOF\n\n# Neutralize VPATH when `$srcdir' = `.'.\n# Shell code in configure.ac might set extrasub.\n# FIXME: do we really want to maintain this feature?\ncat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1\nac_sed_extra=\"$ac_vpsub\n$extrasub\n_ACEOF\ncat >>$CONFIG_STATUS <<\\_ACEOF || ac_write_fail=1\n:t\n/@[a-zA-Z_][a-zA-Z_0-9]*@/!b\ns|@configure_input@|$ac_sed_conf_input|;t t\ns&@top_builddir@&$ac_top_builddir_sub&;t t\ns&@top_build_prefix@&$ac_top_build_prefix&;t t\ns&@srcdir@&$ac_srcdir&;t t\ns&@abs_srcdir@&$ac_abs_srcdir&;t t\ns&@top_srcdir@&$ac_top_srcdir&;t t\ns&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t\ns&@builddir@&$ac_builddir&;t t\ns&@abs_builddir@&$ac_abs_builddir&;t t\ns&@abs_top_builddir@&$ac_abs_top_builddir&;t t\n$ac_datarootdir_hack\n\"\neval sed \\\"\\$ac_sed_extra\\\" \"$ac_file_inputs\" | $AWK -f \"$ac_tmp/subs.awk\" \\\n  >$ac_tmp/out || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n\ntest -z \"$ac_datarootdir_hack$ac_datarootdir_seen\" &&\n  { ac_out=`sed -n '/\\${datarootdir}/p' \"$ac_tmp/out\"`; test -n \"$ac_out\"; } &&\n  { ac_out=`sed -n '/^[\t ]*datarootdir[\t ]*:*=/p' \\\n      \"$ac_tmp/out\"`; test -z \"$ac_out\"; } &&\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&5\n$as_echo \"$as_me: WARNING: $ac_file contains a reference to the variable \\`datarootdir'\nwhich seems to be undefined.  Please make sure it is defined\" >&2;}\n\n  rm -f \"$ac_tmp/stdin\"\n  case $ac_file in\n  -) cat \"$ac_tmp/out\" && rm -f \"$ac_tmp/out\";;\n  *) rm -f \"$ac_file\" && mv \"$ac_tmp/out\" \"$ac_file\";;\n  esac \\\n  || as_fn_error $? \"could not create $ac_file\" \"$LINENO\" 5\n ;;\n\n\n\n  esac\n\ndone # for ac_tag\n\n\nas_fn_exit 0\n_ACEOF\nac_clean_files=$ac_clean_files_save\n\ntest $ac_write_fail = 0 ||\n  as_fn_error $? \"write failure creating $CONFIG_STATUS\" \"$LINENO\" 5\n\n\n# configure is writing to config.log, and then calls config.status.\n# config.status does its own redirection, appending to config.log.\n# Unfortunately, on DOS this fails, as config.log is still kept open\n# by configure, so config.status won't be able to write to it; its\n# output is simply discarded.  So we exec the FD to /dev/null,\n# effectively closing config.log, so it can be properly (re)opened and\n# appended to by config.status.  When coming back to configure, we\n# need to make the FD available again.\nif test \"$no_create\" != yes; then\n  ac_cs_success=:\n  ac_config_status_args=\n  test \"$silent\" = yes &&\n    ac_config_status_args=\"$ac_config_status_args --quiet\"\n  exec 5>/dev/null\n  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false\n  exec 5>>config.log\n  # Use ||, not &&, to avoid exiting from the if with $? = 1, which\n  # would make configure fail if this is the last instruction.\n  $ac_cs_success || as_fn_exit 1\nfi\nif test -n \"$ac_unrecognized_opts\" && test \"$enable_option_checking\" != no; then\n  { $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts\" >&5\n$as_echo \"$as_me: WARNING: unrecognized options: $ac_unrecognized_opts\" >&2;}\nfi\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/configure.ac",
    "content": "dnl Process this file with autoconf to produce a configure script.\nAC_INIT(README)\n\ndnl Detect the canonical build and host environments\nAC_CONFIG_AUX_DIRS($srcdir/../build-scripts)\nAC_CANONICAL_HOST\n\ndnl Check for tools\n\nAC_PROG_CC\n\ndnl Check for compiler environment\n\nAC_C_CONST\n\ndnl We only care about this for building testnative at the moment, so these\ndnl  values shouldn't be considered absolute truth.\ndnl  (Haiku, for example, sets none of these.)\nISUNIX=\"false\"\nISWINDOWS=\"false\"\nISMACOSX=\"false\"\n\ndnl Figure out which math library to use\ncase \"$host\" in\n    *-*-cygwin* | *-*-mingw32*)\n        ISWINDOWS=\"true\"\n        EXE=\".exe\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lopengl32\"\n        ;;\n    *-*-haiku*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lGL\"\n        ;;\n    *-*-darwin* )\n        ISMACOSX=\"true\"\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-Wl,-framework,OpenGL\"\n        ;;\n    *-*-aix*)\n        ISUNIX=\"true\"\n        EXE=\"\"\n        if test x$ac_cv_prog_gcc = xyes; then\n            CFLAGS=\"-mthreads\"\n        fi\n        SYS_GL_LIBS=\"\"\n        ;;\n    *-*-mint*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)\n        if test \"x$OSMESA_CONFIG\" = \"xyes\"; then\n            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`\n            OSMESA_LIBS=`$OSMESA_CONFIG --libs`\n            CFLAGS=\"$CFLAGS $OSMESA_CFLAGS\"\n            SYS_GL_LIBS=\"$OSMESA_LIBS\"\n        else\n            SYS_GL_LIBS=\"-lOSMesa\"\n        fi\n        ;;\n    *-*-qnx*)\n        EXE=\"\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"-lGLES_CM\"\n        ;;\n    *-*-emscripten* )\n        dnl This should really be .js, but we need to specify extra flags when compiling to js\n        EXE=\".bc\"\n        MATHLIB=\"\"\n        SYS_GL_LIBS=\"\"\n        ;;\n    *)\n        dnl Oh well, call it Unix...\n        ISUNIX=\"true\"\n        EXE=\"\"\n        MATHLIB=\"-lm\"\n        SYS_GL_LIBS=\"-lGL\"\n        ;;\nesac\nAC_SUBST(EXE)\nAC_SUBST(MATHLIB)\nAC_SUBST(ISMACOSX)\nAC_SUBST(ISWINDOWS)\nAC_SUBST(ISUNIX)\n\ndnl Check for SDL\nSDL_VERSION=2.0.0\nAM_PATH_SDL2($SDL_VERSION,\n            :,\n\t    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])\n)\nCFLAGS=\"$CFLAGS $SDL_CFLAGS\"\nLIBS=\"$LIBS -lSDL2_test $SDL_LIBS\"\n\ndnl Check for X11 path, needed for OpenGL on some systems\nAC_PATH_X\nif test x$have_x = xyes; then\n    if test x$ac_x_includes = xno || test \"x$ac_x_includes\" = xNone || test \"x$ac_x_includes\" = x; then\n        :\n    else\n        CFLAGS=\"$CFLAGS -I$ac_x_includes\"\n    fi\n    if test x$ac_x_libraries = xno || test \"x$ac_x_libraries\" = xNone; then\n        :\n    else\n        if test \"x$ac_x_libraries\" = x; then\n            XPATH=\"\"\n            XLIB=\"-lX11\"\n        else\n            XPATH=\"-L$ac_x_libraries\"\n            XLIB=\"-L$ac_x_libraries -lX11\"\n        fi\n    fi\nfi\n\ndnl Check for OpenGL\nAC_MSG_CHECKING(for OpenGL support)\nhave_opengl=no\nAC_TRY_COMPILE([\n #include \"SDL_opengl.h\"\n],[\n],[\nhave_opengl=yes\n])\nAC_MSG_RESULT($have_opengl)\n\ndnl Check for OpenGL ES\nAC_MSG_CHECKING(for OpenGL ES support)\nhave_opengles=no\nAC_TRY_COMPILE([\n #if defined (__IPHONEOS__)\n    #include <OpenGLES/ES1/gl.h>\n #else\n    #include <GLES/gl.h>\n #endif /* __QNXNTO__ */\n],[\n],[\nhave_opengles=yes\n])\nAC_MSG_RESULT($have_opengles)\n\ndnl Check for OpenGL ES2\nAC_MSG_CHECKING(for OpenGL ES2 support)\nhave_opengles2=no\nAC_TRY_COMPILE([\n #if defined (__IPHONEOS__)\n    #include <OpenGLES/ES2/gl.h>\n    #include <OpenGLES/ES2/glext.h>\n #else\n    #include <GLES2/gl2.h>\n    #include <GLES2/gl2ext.h>\n #endif\n],[\n],[\nhave_opengles2=yes\n])\nAC_MSG_RESULT($have_opengles2)\n\nGLLIB=\"\"\nGLESLIB=\"\"\nGLES2LIB=\"\"\nOPENGLES1_TARGETS=\"UNUSED\"\nOPENGLES2_TARGETS=\"UNUSED\"\nOPENGL_TARGETS=\"UNUSED\"\nif test x$have_opengles = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGLES\"\n    GLESLIB=\"$XPATH -lGLESv1_CM\"\n    OPENGLES1_TARGETS=\"TARGETS\"\nfi\nif test x$have_opengles2 = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGLES2\"\n    #GLES2LIB=\"$XPATH -lGLESv2\"\n    OPENGLES2_TARGETS=\"TARGETS\"\nfi\nif test x$have_opengl = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_OPENGL\"\n    GLLIB=\"$XPATH $SYS_GL_LIBS\"\n    OPENGL_TARGETS=\"TARGETS\"\nfi\n\nAC_SUBST(OPENGLES1_TARGETS)\nAC_SUBST(OPENGLES2_TARGETS)\nAC_SUBST(OPENGL_TARGETS)\nAC_SUBST(GLLIB)\nAC_SUBST(GLESLIB)\nAC_SUBST(GLES2LIB)\nAC_SUBST(XLIB)\n\ndnl Check for SDL_ttf\nAC_CHECK_LIB(SDL2_ttf, TTF_Init, have_SDL_ttf=yes)\nif test x$have_SDL_ttf = xyes; then\n    CFLAGS=\"$CFLAGS -DHAVE_SDL_TTF\"\n    SDL_TTF_LIB=\"-lSDL2_ttf\"\nfi\nAC_SUBST(SDL_TTF_LIB)\n\ndnl Finally create all the generated files\nAC_OUTPUT([Makefile])\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/controllermap.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Game controller mapping generator */\n/* Gabriel Jacobo <gabomdq@gmail.com> */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\n#ifndef SDL_JOYSTICK_DISABLED\n\n#ifdef __IPHONEOS__\n#define SCREEN_WIDTH    320\n#define SCREEN_HEIGHT   480\n#else\n#define SCREEN_WIDTH    512\n#define SCREEN_HEIGHT   320\n#endif\n\n#define MARKER_BUTTON 1\n#define MARKER_AXIS 2\n\nenum\n{\n    SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE,\n    SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE,\n    SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE,\n    SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE,\n    SDL_CONTROLLER_BINDING_AXIS_RIGHTX_NEGATIVE,\n    SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE,\n    SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE,\n    SDL_CONTROLLER_BINDING_AXIS_RIGHTY_POSITIVE,\n    SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT,\n    SDL_CONTROLLER_BINDING_AXIS_TRIGGERRIGHT,\n    SDL_CONTROLLER_BINDING_AXIS_MAX,\n};\n\n#define BINDING_COUNT (SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_MAX)\n\nstatic struct \n{\n    int x, y;\n    double angle;\n    int marker;\n\n} s_arrBindingDisplay[BINDING_COUNT] = {\n    { 387, 167, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_A */\n    { 431, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_B */\n    { 342, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_X */\n    { 389, 101, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_Y */\n    { 174, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_BACK */\n    { 233, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_GUIDE */\n    { 289, 132, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_START */\n    {  75, 154, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSTICK */\n    { 305, 230, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_RIGHTSTICK */\n    {  77,  40, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_LEFTSHOULDER */\n    { 396,  36, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_RIGHTSHOULDER */\n    { 154, 188, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_UP */\n    { 154, 249, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_DOWN */\n    { 116, 217, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_LEFT */\n    { 186, 217, 0.0, MARKER_BUTTON }, /* SDL_CONTROLLER_BUTTON_DPAD_RIGHT */\n    {  74, 153, 270.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE */\n    {  74, 153, 90.0,  MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE */\n    {  74, 153, 0.0,   MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE */\n    {  74, 153, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE */\n    { 306, 231, 270.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTX_NEGATIVE */\n    { 306, 231, 90.0,  MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE */\n    { 306, 231, 0.0,   MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE */\n    { 306, 231, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_RIGHTY_POSITIVE */\n    {  91, -20, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT */\n    { 375, -20, 180.0, MARKER_AXIS }, /* SDL_CONTROLLER_BINDING_AXIS_TRIGGERRIGHT */\n};\n\nstatic int s_arrBindingOrder[BINDING_COUNT] = {\n    SDL_CONTROLLER_BUTTON_A,\n    SDL_CONTROLLER_BUTTON_B,\n    SDL_CONTROLLER_BUTTON_Y,\n    SDL_CONTROLLER_BUTTON_X,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE,\n    SDL_CONTROLLER_BUTTON_LEFTSTICK,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_RIGHTX_NEGATIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_RIGHTY_POSITIVE,\n    SDL_CONTROLLER_BUTTON_RIGHTSTICK,\n    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT,\n    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,\n    SDL_CONTROLLER_BUTTON_MAX + SDL_CONTROLLER_BINDING_AXIS_TRIGGERRIGHT,\n    SDL_CONTROLLER_BUTTON_DPAD_UP,\n    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,\n    SDL_CONTROLLER_BUTTON_DPAD_DOWN,\n    SDL_CONTROLLER_BUTTON_DPAD_LEFT,\n    SDL_CONTROLLER_BUTTON_BACK,\n    SDL_CONTROLLER_BUTTON_GUIDE,\n    SDL_CONTROLLER_BUTTON_START,\n};\n\ntypedef struct\n{\n    SDL_GameControllerBindType bindType;\n    union\n    {\n        int button;\n\n        struct {\n            int axis;\n            int axis_min;\n            int axis_max;\n        } axis;\n\n        struct {\n            int hat;\n            int hat_mask;\n        } hat;\n\n    } value;\n\n    SDL_bool committed;\n\n} SDL_GameControllerExtendedBind;\n\nstatic SDL_GameControllerExtendedBind s_arrBindings[BINDING_COUNT];\n\ntypedef struct\n{\n    SDL_bool m_bMoving;\n    int m_nStartingValue;\n    int m_nFarthestValue;\n} AxisState;\n\nstatic int s_nNumAxes;\nstatic AxisState *s_arrAxisState;\n    \nstatic int s_iCurrentBinding;\nstatic Uint32 s_unPendingAdvanceTime;\nstatic SDL_bool s_bBindingComplete;\n\nSDL_Texture *\nLoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)\n{\n    SDL_Surface *temp;\n    SDL_Texture *texture;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return NULL;\n    }\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (transparent) {\n        if (temp->format->palette) {\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels);\n        }\n    }\n\n    /* Create textures from the image */\n    texture = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!texture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return NULL;\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return texture;\n}\n\nstatic int\nStandardizeAxisValue(int nValue)\n{\n    if (nValue > SDL_JOYSTICK_AXIS_MAX/2) {\n        return SDL_JOYSTICK_AXIS_MAX;\n    } else if (nValue < SDL_JOYSTICK_AXIS_MIN/2) {\n        return SDL_JOYSTICK_AXIS_MIN;\n    } else {\n        return 0;\n    }\n}\n\nstatic void\nSetCurrentBinding(int iBinding)\n{\n    int iIndex;\n    SDL_GameControllerExtendedBind *pBinding;\n\n    if (iBinding < 0) {\n        return;\n    }\n\n    if (iBinding == BINDING_COUNT) {\n        s_bBindingComplete = SDL_TRUE;\n        return;\n    }\n\n    s_iCurrentBinding = iBinding;\n\n    pBinding = &s_arrBindings[s_arrBindingOrder[s_iCurrentBinding]];\n    SDL_zerop(pBinding);\n\n    for (iIndex = 0; iIndex < s_nNumAxes; ++iIndex) {\n        s_arrAxisState[iIndex].m_nFarthestValue = s_arrAxisState[iIndex].m_nStartingValue;\n    }\n\n    s_unPendingAdvanceTime = 0;\n}\n\nstatic SDL_bool\nBBindingContainsBinding(const SDL_GameControllerExtendedBind *pBindingA, const SDL_GameControllerExtendedBind *pBindingB)\n{\n    if (pBindingA->bindType != pBindingB->bindType)\n    {\n        return SDL_FALSE;\n    }\n    switch (pBindingA->bindType)\n    {\n    case SDL_CONTROLLER_BINDTYPE_AXIS:\n        if (pBindingA->value.axis.axis != pBindingB->value.axis.axis) {\n            return SDL_FALSE;\n        }\n        if (!pBindingA->committed) {\n            return SDL_FALSE;\n        }\n        {\n            int minA = SDL_min(pBindingA->value.axis.axis_min, pBindingA->value.axis.axis_max);\n            int maxA = SDL_max(pBindingA->value.axis.axis_min, pBindingA->value.axis.axis_max);\n            int minB = SDL_min(pBindingB->value.axis.axis_min, pBindingB->value.axis.axis_max);\n            int maxB = SDL_max(pBindingB->value.axis.axis_min, pBindingB->value.axis.axis_max);\n            return (minA <= minB && maxA >= maxB);\n        }\n        /* Not reached */\n    default:\n        return SDL_memcmp(pBindingA, pBindingB, sizeof(*pBindingA)) == 0;\n    }\n}\n\nstatic void\nConfigureBinding(const SDL_GameControllerExtendedBind *pBinding)\n{\n    SDL_GameControllerExtendedBind *pCurrent;\n    int iIndex;\n    int iCurrentElement = s_arrBindingOrder[s_iCurrentBinding];\n\n    /* Do we already have this binding? */\n    for (iIndex = 0; iIndex < SDL_arraysize(s_arrBindings); ++iIndex) {\n        pCurrent = &s_arrBindings[iIndex];\n        if (BBindingContainsBinding(pCurrent, pBinding)) {\n            if (iIndex == SDL_CONTROLLER_BUTTON_A && iCurrentElement != SDL_CONTROLLER_BUTTON_B) {\n                /* Skip to the next binding */\n                SetCurrentBinding(s_iCurrentBinding + 1);\n                return;\n            }\n\n            if (iIndex == SDL_CONTROLLER_BUTTON_B) {\n                /* Go back to the previous binding */\n                SetCurrentBinding(s_iCurrentBinding - 1);\n                return;\n            }\n\n            /* Already have this binding, ignore it */\n            return;\n        }\n    }\n\n#ifdef DEBUG_CONTROLLERMAP\n    switch ( pBinding->bindType )\n    {\n    case SDL_CONTROLLER_BINDTYPE_NONE:\n            break;\n    case SDL_CONTROLLER_BINDTYPE_BUTTON:\n            SDL_Log(\"Configuring button binding for button %d\\n\", pBinding->value.button);\n            break;\n    case SDL_CONTROLLER_BINDTYPE_AXIS:\n            SDL_Log(\"Configuring axis binding for axis %d %d/%d committed = %s\\n\", pBinding->value.axis.axis, pBinding->value.axis.axis_min, pBinding->value.axis.axis_max, pBinding->committed ? \"true\" : \"false\");\n            break;\n    case SDL_CONTROLLER_BINDTYPE_HAT:\n            SDL_Log(\"Configuring hat binding for hat %d %d\\n\", pBinding->value.hat.hat, pBinding->value.hat.hat_mask);\n            break;\n    }\n#endif /* DEBUG_CONTROLLERMAP */\n\n    /* Should the new binding override the existing one? */\n    pCurrent = &s_arrBindings[iCurrentElement];\n    if (pCurrent->bindType != SDL_CONTROLLER_BINDTYPE_NONE) {\n        SDL_bool bNativeDPad, bCurrentDPad;\n        SDL_bool bNativeAxis, bCurrentAxis;\n        \n        bNativeDPad = (iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_UP ||\n                       iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_DOWN ||\n                       iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_LEFT ||\n                       iCurrentElement == SDL_CONTROLLER_BUTTON_DPAD_RIGHT);\n        bCurrentDPad = (pCurrent->bindType == SDL_CONTROLLER_BINDTYPE_HAT);\n        if (bNativeDPad && bCurrentDPad) {\n            /* We already have a binding of the type we want, ignore the new one */\n            return;\n        }\n\n        bNativeAxis = (iCurrentElement >= SDL_CONTROLLER_BUTTON_MAX);\n        bCurrentAxis = (pCurrent->bindType == SDL_CONTROLLER_BINDTYPE_AXIS);\n        if (bNativeAxis == bCurrentAxis &&\n            (pBinding->bindType != SDL_CONTROLLER_BINDTYPE_AXIS ||\n             pBinding->value.axis.axis != pCurrent->value.axis.axis)) {\n            /* We already have a binding of the type we want, ignore the new one */\n            return;\n        }\n    }\n\n    *pCurrent = *pBinding;\n\n    if (pBinding->committed) {\n        s_unPendingAdvanceTime = SDL_GetTicks();\n    } else {\n        s_unPendingAdvanceTime = 0;\n    }\n}\n\nstatic SDL_bool\nBMergeAxisBindings(int iIndex)\n{\n    SDL_GameControllerExtendedBind *pBindingA = &s_arrBindings[iIndex];\n    SDL_GameControllerExtendedBind *pBindingB = &s_arrBindings[iIndex+1];\n    if (pBindingA->bindType == SDL_CONTROLLER_BINDTYPE_AXIS &&\n        pBindingB->bindType == SDL_CONTROLLER_BINDTYPE_AXIS &&\n        pBindingA->value.axis.axis == pBindingB->value.axis.axis) {\n        if (pBindingA->value.axis.axis_min == pBindingB->value.axis.axis_min) {\n            pBindingA->value.axis.axis_min = pBindingA->value.axis.axis_max;\n            pBindingA->value.axis.axis_max = pBindingB->value.axis.axis_max;\n            pBindingB->bindType = SDL_CONTROLLER_BINDTYPE_NONE;\n            return SDL_TRUE;\n        }\n    }\n    return SDL_FALSE;\n}\n\nstatic void\nWatchJoystick(SDL_Joystick * joystick)\n{\n    SDL_Window *window = NULL;\n    SDL_Renderer *screen = NULL;\n    SDL_Texture *background, *button, *axis, *marker;\n    const char *name = NULL;\n    SDL_bool done = SDL_FALSE;\n    SDL_Event event;\n    SDL_Rect dst;\n    Uint8 alpha=200, alpha_step = -1;\n    Uint32 alpha_ticks = 0;\n    SDL_JoystickID nJoystickID;\n    int iIndex;\n\n    /* Create a window to display joystick axis position */\n    window = SDL_CreateWindow(\"Game Controller Map\", SDL_WINDOWPOS_CENTERED,\n                              SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,\n                              SCREEN_HEIGHT, 0);\n    if (window == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create window: %s\\n\", SDL_GetError());\n        return;\n    }\n\n    screen = SDL_CreateRenderer(window, -1, 0);\n    if (screen == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create renderer: %s\\n\", SDL_GetError());\n        SDL_DestroyWindow(window);\n        return;\n    }\n    \n    background = LoadTexture(screen, \"controllermap.bmp\", SDL_FALSE);\n    button = LoadTexture(screen, \"button.bmp\", SDL_TRUE);\n    axis = LoadTexture(screen, \"axis.bmp\", SDL_TRUE);\n    SDL_RaiseWindow(window);\n\n    /* scale for platforms that don't give you the window size you asked for. */\n    SDL_RenderSetLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT);\n\n    /* Print info about the joystick we are watching */\n    name = SDL_JoystickName(joystick);\n    SDL_Log(\"Watching joystick %d: (%s)\\n\", SDL_JoystickInstanceID(joystick),\n           name ? name : \"Unknown Joystick\");\n    SDL_Log(\"Joystick has %d axes, %d hats, %d balls, and %d buttons\\n\",\n           SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick),\n           SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick));\n    \n    SDL_Log(\"\\n\\n\\\n    ====================================================================================\\n\\\n    Press the buttons on your controller when indicated\\n\\\n    (Your controller may look different than the picture)\\n\\\n    If you want to correct a mistake, press backspace or the back button on your device\\n\\\n    To skip a button, press SPACE or click/touch the screen\\n\\\n    To exit, press ESC\\n\\\n    ====================================================================================\\n\");\n\n    nJoystickID = SDL_JoystickInstanceID(joystick);\n\n    s_nNumAxes = SDL_JoystickNumAxes(joystick);\n    s_arrAxisState = (AxisState *)SDL_calloc(s_nNumAxes, sizeof(*s_arrAxisState));\n    for (iIndex = 0; iIndex < s_nNumAxes; ++iIndex) {\n        AxisState *pAxisState = &s_arrAxisState[iIndex];\n        Sint16 nInitialValue;\n        pAxisState->m_bMoving = SDL_JoystickGetAxisInitialState(joystick, iIndex, &nInitialValue);\n        pAxisState->m_nStartingValue = nInitialValue;\n        pAxisState->m_nFarthestValue = nInitialValue;\n    }\n\n    /* Loop, getting joystick events! */\n    while (!done && !s_bBindingComplete) {\n        int iElement = s_arrBindingOrder[s_iCurrentBinding];\n\n        switch (s_arrBindingDisplay[iElement].marker) {\n            case MARKER_AXIS:\n                marker = axis;\n                break;\n            case MARKER_BUTTON:\n                marker = button;\n                break;\n            default:\n                break;\n        }\n        \n        dst.x = s_arrBindingDisplay[iElement].x;\n        dst.y = s_arrBindingDisplay[iElement].y;\n        SDL_QueryTexture(marker, NULL, NULL, &dst.w, &dst.h);\n\n        if (SDL_GetTicks() - alpha_ticks > 5) {\n            alpha_ticks = SDL_GetTicks();\n            alpha += alpha_step;\n            if (alpha == 255) {\n                alpha_step = -1;\n            }\n            if (alpha < 128) {\n                alpha_step = 1;\n            }\n        }\n\n        SDL_SetRenderDrawColor(screen, 0xFF, 0xFF, 0xFF, SDL_ALPHA_OPAQUE);\n        SDL_RenderClear(screen);\n        SDL_RenderCopy(screen, background, NULL, NULL);\n        SDL_SetTextureAlphaMod(marker, alpha);\n        SDL_SetTextureColorMod(marker, 10, 255, 21);\n        SDL_RenderCopyEx(screen, marker, NULL, &dst, s_arrBindingDisplay[iElement].angle, NULL, SDL_FLIP_NONE);\n        SDL_RenderPresent(screen);\n            \n        while (SDL_PollEvent(&event) > 0) {\n            switch (event.type) {\n            case SDL_JOYDEVICEREMOVED:\n                if (event.jaxis.which == nJoystickID) {\n                    done = SDL_TRUE;\n                }\n                break;\n            case SDL_JOYAXISMOTION:\n                if (event.jaxis.which == nJoystickID) {\n                    AxisState *pAxisState = &s_arrAxisState[event.jaxis.axis];\n                    int nValue = event.jaxis.value;\n                    int nCurrentDistance, nFarthestDistance;\n                    if (!pAxisState->m_bMoving) {\n                        pAxisState->m_bMoving = SDL_TRUE;\n                        pAxisState->m_nStartingValue = nValue;\n                        pAxisState->m_nFarthestValue = nValue;\n                    }\n                    nCurrentDistance = SDL_abs(nValue - pAxisState->m_nStartingValue);\n                    nFarthestDistance = SDL_abs(pAxisState->m_nFarthestValue - pAxisState->m_nStartingValue);\n                    if (nCurrentDistance > nFarthestDistance) {\n                        pAxisState->m_nFarthestValue = nValue;\n                        nFarthestDistance = SDL_abs(pAxisState->m_nFarthestValue - pAxisState->m_nStartingValue);\n                    }\n\n#ifdef DEBUG_CONTROLLERMAP\n                    SDL_Log(\"AXIS %d nValue %d nCurrentDistance %d nFarthestDistance %d\\n\", event.jaxis.axis, nValue, nCurrentDistance, nFarthestDistance);\n#endif\n                    if (nFarthestDistance >= 16000) {\n                        /* If we've gone out far enough and started to come back, let's bind this axis */\n                        SDL_bool bCommitBinding = (nCurrentDistance <= 10000) ? SDL_TRUE : SDL_FALSE;\n                        SDL_GameControllerExtendedBind binding;\n                        SDL_zero(binding);\n                        binding.bindType = SDL_CONTROLLER_BINDTYPE_AXIS;\n                        binding.value.axis.axis = event.jaxis.axis;\n                        binding.value.axis.axis_min = StandardizeAxisValue(pAxisState->m_nStartingValue);\n                        binding.value.axis.axis_max = StandardizeAxisValue(pAxisState->m_nFarthestValue);\n                        binding.committed = bCommitBinding;\n                        ConfigureBinding(&binding);\n                    }\n                }\n                break;\n            case SDL_JOYHATMOTION:\n                if (event.jhat.which == nJoystickID) {\n                    if (event.jhat.value != SDL_HAT_CENTERED) {\n                        SDL_GameControllerExtendedBind binding;\n\n#ifdef DEBUG_CONTROLLERMAP\n                        SDL_Log(\"HAT %d %d\\n\", event.jhat.hat, event.jhat.value);\n#endif\n                        SDL_zero(binding);\n                        binding.bindType = SDL_CONTROLLER_BINDTYPE_HAT;\n                        binding.value.hat.hat = event.jhat.hat;\n                        binding.value.hat.hat_mask = event.jhat.value;\n                        binding.committed = SDL_TRUE;\n                        ConfigureBinding(&binding);\n                    }\n                }\n                break;\n            case SDL_JOYBALLMOTION:\n                break;\n            case SDL_JOYBUTTONDOWN:\n                if (event.jbutton.which == nJoystickID) {\n                    SDL_GameControllerExtendedBind binding;\n\n#ifdef DEBUG_CONTROLLERMAP\n                    SDL_Log(\"BUTTON %d\\n\", event.jbutton.button);\n#endif\n                    SDL_zero(binding);\n                    binding.bindType = SDL_CONTROLLER_BINDTYPE_BUTTON;\n                    binding.value.button = event.jbutton.button;\n                    binding.committed = SDL_TRUE;\n                    ConfigureBinding(&binding);\n                }\n                break;\n            case SDL_FINGERDOWN:\n            case SDL_MOUSEBUTTONDOWN:\n                /* Skip this step */\n                SetCurrentBinding(s_iCurrentBinding + 1);\n                break;\n            case SDL_KEYDOWN:\n                if (event.key.keysym.sym == SDLK_BACKSPACE || event.key.keysym.sym == SDLK_AC_BACK) {\n                    SetCurrentBinding(s_iCurrentBinding - 1);\n                    break;\n                }\n                if (event.key.keysym.sym == SDLK_SPACE) {\n                    SetCurrentBinding(s_iCurrentBinding + 1);\n                    break;\n                }\n\n                if ((event.key.keysym.sym != SDLK_ESCAPE)) {\n                    break;\n                }\n                /* Fall through to signal quit */\n            case SDL_QUIT:\n                done = SDL_TRUE;\n                break;\n            default:\n                break;\n            }\n        }\n\n        SDL_Delay(15);\n\n        /* Wait 100 ms for joystick events to stop coming in,\n           in case a controller sends multiple events for a single control (e.g. axis and button for trigger)\n        */\n        if (s_unPendingAdvanceTime && SDL_GetTicks() - s_unPendingAdvanceTime >= 100) {\n            SetCurrentBinding(s_iCurrentBinding + 1);\n        }\n    }\n\n    if (s_bBindingComplete) {\n        char mapping[1024];\n        char trimmed_name[128];\n        char *spot;\n        int iIndex;\n        char pszElement[12];\n\n        SDL_strlcpy(trimmed_name, name, SDL_arraysize(trimmed_name));\n        while (SDL_isspace(trimmed_name[0])) {\n            SDL_memmove(&trimmed_name[0], &trimmed_name[1], SDL_strlen(trimmed_name));\n        }\n        while (trimmed_name[0] && SDL_isspace(trimmed_name[SDL_strlen(trimmed_name) - 1])) {\n            trimmed_name[SDL_strlen(trimmed_name) - 1] = '\\0';\n        }\n        while ((spot = SDL_strchr(trimmed_name, ',')) != NULL) {\n            SDL_memmove(spot, spot + 1, SDL_strlen(spot));\n        }\n\n        /* Initialize mapping with GUID and name */\n        SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick), mapping, SDL_arraysize(mapping));\n        SDL_strlcat(mapping, \",\", SDL_arraysize(mapping));\n        SDL_strlcat(mapping, trimmed_name, SDL_arraysize(mapping));\n        SDL_strlcat(mapping, \",\", SDL_arraysize(mapping));\n        SDL_strlcat(mapping, \"platform:\", SDL_arraysize(mapping));\n        SDL_strlcat(mapping, SDL_GetPlatform(), SDL_arraysize(mapping));\n        SDL_strlcat(mapping, \",\", SDL_arraysize(mapping));\n\n        for (iIndex = 0; iIndex < SDL_arraysize(s_arrBindings); ++iIndex) {\n            SDL_GameControllerExtendedBind *pBinding = &s_arrBindings[iIndex];\n            if (pBinding->bindType == SDL_CONTROLLER_BINDTYPE_NONE) {\n                continue;\n            }\n\n            if (iIndex < SDL_CONTROLLER_BUTTON_MAX) {\n                SDL_GameControllerButton eButton = (SDL_GameControllerButton)iIndex;\n                SDL_strlcat(mapping, SDL_GameControllerGetStringForButton(eButton), SDL_arraysize(mapping));\n            } else {\n                const char *pszAxisName;\n                switch (iIndex - SDL_CONTROLLER_BUTTON_MAX) {\n                case SDL_CONTROLLER_BINDING_AXIS_LEFTX_NEGATIVE:\n                    if (!BMergeAxisBindings(iIndex)) {\n                        SDL_strlcat(mapping, \"-\", SDL_arraysize(mapping));\n                    }\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_LEFTX);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_LEFTX_POSITIVE:\n                    SDL_strlcat(mapping, \"+\", SDL_arraysize(mapping));\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_LEFTX);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_LEFTY_NEGATIVE:\n                    if (!BMergeAxisBindings(iIndex)) {\n                        SDL_strlcat(mapping, \"-\", SDL_arraysize(mapping));\n                    }\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_LEFTY);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_LEFTY_POSITIVE:\n                    SDL_strlcat(mapping, \"+\", SDL_arraysize(mapping));\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_LEFTY);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_RIGHTX_NEGATIVE:\n                    if (!BMergeAxisBindings(iIndex)) {\n                        SDL_strlcat(mapping, \"-\", SDL_arraysize(mapping));\n                    }\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_RIGHTX);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_RIGHTX_POSITIVE:\n                    SDL_strlcat(mapping, \"+\", SDL_arraysize(mapping));\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_RIGHTX);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_RIGHTY_NEGATIVE:\n                    if (!BMergeAxisBindings(iIndex)) {\n                        SDL_strlcat(mapping, \"-\", SDL_arraysize(mapping));\n                    }\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_RIGHTY);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_RIGHTY_POSITIVE:\n                    SDL_strlcat(mapping, \"+\", SDL_arraysize(mapping));\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_RIGHTY);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_TRIGGERLEFT:\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_TRIGGERLEFT);\n                    break;\n                case SDL_CONTROLLER_BINDING_AXIS_TRIGGERRIGHT:\n                    pszAxisName = SDL_GameControllerGetStringForAxis(SDL_CONTROLLER_AXIS_TRIGGERRIGHT);\n                    break;\n                }\n                SDL_strlcat(mapping, pszAxisName, SDL_arraysize(mapping));\n            }\n            SDL_strlcat(mapping, \":\", SDL_arraysize(mapping));\n\n            pszElement[0] = '\\0';\n            switch (pBinding->bindType) {\n            case SDL_CONTROLLER_BINDTYPE_BUTTON:\n                SDL_snprintf(pszElement, sizeof(pszElement), \"b%d\", pBinding->value.button);\n                break;\n            case SDL_CONTROLLER_BINDTYPE_AXIS:\n                if (pBinding->value.axis.axis_min == 0 && pBinding->value.axis.axis_max == SDL_JOYSTICK_AXIS_MIN) {\n                    /* The negative half axis */\n                    SDL_snprintf(pszElement, sizeof(pszElement), \"-a%d\", pBinding->value.axis.axis);\n                } else if (pBinding->value.axis.axis_min == 0 && pBinding->value.axis.axis_max == SDL_JOYSTICK_AXIS_MAX) {\n                    /* The positive half axis */\n                    SDL_snprintf(pszElement, sizeof(pszElement), \"+a%d\", pBinding->value.axis.axis);\n                } else {\n                    SDL_snprintf(pszElement, sizeof(pszElement), \"a%d\", pBinding->value.axis.axis);\n                    if (pBinding->value.axis.axis_min > pBinding->value.axis.axis_max) {\n                        /* Invert the axis */\n                        SDL_strlcat(pszElement, \"~\", SDL_arraysize(pszElement));\n                    }\n                }\n                break;\n            case SDL_CONTROLLER_BINDTYPE_HAT:\n                SDL_snprintf(pszElement, sizeof(pszElement), \"h%d.%d\", pBinding->value.hat.hat, pBinding->value.hat.hat_mask);\n                break;\n            default:\n                SDL_assert(!\"Unknown bind type\");\n                break;\n            }\n            SDL_strlcat(mapping, pszElement, SDL_arraysize(mapping));\n            SDL_strlcat(mapping, \",\", SDL_arraysize(mapping));\n        }\n\n        SDL_Log(\"Mapping:\\n\\n%s\\n\\n\", mapping);\n        /* Print to stdout as well so the user can cat the output somewhere */\n        printf(\"%s\\n\", mapping);\n    }\n\n    SDL_free(s_arrAxisState);\n    s_arrAxisState = NULL;\n    \n    SDL_DestroyRenderer(screen);\n    SDL_DestroyWindow(window);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    const char *name;\n    int i;\n    SDL_Joystick *joystick;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL (Note: video is required to start event loop) */\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n\n    /* Print information about the joysticks */\n    SDL_Log(\"There are %d joysticks attached\\n\", SDL_NumJoysticks());\n    for (i = 0; i < SDL_NumJoysticks(); ++i) {\n        name = SDL_JoystickNameForIndex(i);\n        SDL_Log(\"Joystick %d: %s\\n\", i, name ? name : \"Unknown Joystick\");\n        joystick = SDL_JoystickOpen(i);\n        if (joystick == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_JoystickOpen(%d) failed: %s\\n\", i,\n                    SDL_GetError());\n        } else {\n            char guid[64];\n            SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick),\n                                      guid, sizeof (guid));\n            SDL_Log(\"       axes: %d\\n\", SDL_JoystickNumAxes(joystick));\n            SDL_Log(\"      balls: %d\\n\", SDL_JoystickNumBalls(joystick));\n            SDL_Log(\"       hats: %d\\n\", SDL_JoystickNumHats(joystick));\n            SDL_Log(\"    buttons: %d\\n\", SDL_JoystickNumButtons(joystick));\n            SDL_Log(\"instance id: %d\\n\", SDL_JoystickInstanceID(joystick));\n            SDL_Log(\"       guid: %s\\n\", guid);\n            SDL_Log(\"    VID/PID: 0x%.4x/0x%.4x\\n\", SDL_JoystickGetVendor(joystick), SDL_JoystickGetProduct(joystick));\n            SDL_JoystickClose(joystick);\n        }\n    }\n\n#ifdef __ANDROID__\n    if (SDL_NumJoysticks() > 0) {\n#else\n    if (argv[1]) {\n#endif\n        int device;\n#ifdef __ANDROID__\n        device = 0;\n#else\n        device = atoi(argv[1]);\n#endif\n        joystick = SDL_JoystickOpen(device);\n        if (joystick == NULL) {\n            SDL_Log(\"Couldn't open joystick %d: %s\\n\", device, SDL_GetError());\n        } else {\n            WatchJoystick(joystick);\n            SDL_JoystickClose(joystick);\n        }\n    }\n    else {\n        SDL_Log(\"\\n\\nUsage: ./controllermap number\\nFor example: ./controllermap 0\\nOr: ./controllermap 0 >> gamecontrollerdb.txt\");\n    }\n    SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);\n\n    return 0;\n}\n\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Joystick support.\\n\");\n    exit(1);\n}\n\n#endif\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/emscripten/joystick-pre.js",
    "content": "Module['arguments'] = ['0'];\n//Gamepads don't appear until a button is pressed and the joystick/gamepad tests expect one to be connected\nModule['preRun'].push(function()\n{\n    Module['print'](\"Waiting for gamepad...\");\n    Module['addRunDependency'](\"gamepad\");\n    window.addEventListener('gamepadconnected', function()\n    {\n        //OK, got one\n        Module['removeRunDependency'](\"gamepad\");\n    }, false);\n\n    //chrome\n    if(!!navigator.webkitGetGamepads)\n    {\n        var timeout = function()\n        {\n            if(navigator.webkitGetGamepads()[0] !== undefined)\n                Module['removeRunDependency'](\"gamepad\");\n            else\n                setTimeout(timeout, 100);\n        }\n        setTimeout(timeout, 100);\n    }\n});\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/gcc-fat.sh",
    "content": "#!/bin/sh\n#\n# Build Universal binaries on Mac OS X, thanks Ryan!\n#\n# Usage: ./configure CC=\"sh gcc-fat.sh\" && make && rm -rf ppc x86\n\n# PowerPC compiler flags (10.2 runtime compatibility)\nGCC_COMPILE_PPC=\"gcc-3.3 -arch ppc \\\n-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \\\n-nostdinc \\\n-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \\\n-I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \\\n-isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include\"\n\nGCC_LINK_PPC=\"\\\n-L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \\\n-F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \\\n-Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk\"\n\n# Intel compiler flags (10.4 runtime compatibility)\nGCC_COMPILE_X86=\"gcc-4.0 -arch i386 -mmacosx-version-min=10.4 \\\n-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \\\n-nostdinc \\\n-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \\\n-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \\\n-isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include\"\n\nGCC_LINK_X86=\"\\\n-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0 \\\n-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk\"\n\n# Output both PowerPC and Intel object files\nargs=\"$*\"\ncompile=yes\nlink=yes\nwhile test x$1 != x; do\n    case $1 in\n        --version) exec gcc $1;;\n        -v) exec gcc $1;;\n        -V) exec gcc $1;;\n        -print-prog-name=*) exec gcc $1;;\n        -print-search-dirs) exec gcc $1;;\n        -E) GCC_COMPILE_PPC=\"$GCC_COMPILE_PPC -E\"\n            GCC_COMPILE_X86=\"$GCC_COMPILE_X86 -E\"\n            compile=no; link=no;;\n        -c) link=no;;\n        -o) output=$2;;\n        *.c|*.cc|*.cpp|*.S) source=$1;;\n    esac\n    shift\ndone\nif test x$link = xyes; then\n    GCC_COMPILE_PPC=\"$GCC_COMPILE_PPC $GCC_LINK_PPC\"\n    GCC_COMPILE_X86=\"$GCC_COMPILE_X86 $GCC_LINK_X86\"\nfi\nif test x\"$output\" = x; then\n    if test x$link = xyes; then\n        output=a.out\n    elif test x$compile = xyes; then\n        output=`echo $source | sed -e 's|.*/||' -e 's|\\(.*\\)\\.[^\\.]*|\\1|'`.o\n    fi\nfi\n\nif test x\"$output\" != x; then\n    dir=ppc/`dirname $output`\n    if test -d $dir; then\n        :\n    else\n        mkdir -p $dir\n    fi\nfi\nset -- $args\nwhile test x$1 != x; do\n    if test -f \"ppc/$1\" && test \"$1\" != \"$output\"; then\n        ppc_args=\"$ppc_args ppc/$1\"\n    else\n        ppc_args=\"$ppc_args $1\"\n    fi\n    shift\ndone\n$GCC_COMPILE_PPC $ppc_args || exit $?\nif test x\"$output\" != x; then\n    cp $output ppc/$output\nfi\n\nif test x\"$output\" != x; then\n    dir=x86/`dirname $output`\n    if test -d $dir; then\n        :\n    else\n        mkdir -p $dir\n    fi\nfi\nset -- $args\nwhile test x$1 != x; do\n    if test -f \"x86/$1\" && test \"$1\" != \"$output\"; then\n        x86_args=\"$x86_args x86/$1\"\n    else\n        x86_args=\"$x86_args $1\"\n    fi\n    shift\ndone\n$GCC_COMPILE_X86 $x86_args || exit $?\nif test x\"$output\" != x; then\n    cp $output x86/$output\nfi\n\nif test x\"$output\" != x; then\n    lipo -create -o $output ppc/$output x86/$output\nfi\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/loopwave.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Program to load a wave file and loop playing it using SDL audio */\n\n/* loopwaves.c is much more robust in handling WAVE files --\n    This is only for simple WAVEs\n*/\n#include \"SDL_config.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\nstatic struct\n{\n    SDL_AudioSpec spec;\n    Uint8 *sound;               /* Pointer to wave data */\n    Uint32 soundlen;            /* Length of wave data */\n    int soundpos;               /* Current play position */\n} wave;\n\nstatic SDL_AudioDeviceID device;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic void\nclose_audio()\n{\n    if (device != 0) {\n        SDL_CloseAudioDevice(device);\n        device = 0;\n    }\n}\n\nstatic void\nopen_audio()\n{\n    /* Initialize fillerup() variables */\n    device = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wave.spec, NULL, 0);\n    if (!device) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open audio: %s\\n\", SDL_GetError());\n        SDL_FreeWAV(wave.sound);\n        quit(2);\n    }\n\n\n    /* Let the audio run */\n    SDL_PauseAudioDevice(device, SDL_FALSE);\n}\n\nstatic void reopen_audio()\n{\n    close_audio();\n    open_audio();\n}\n\n\nvoid SDLCALL\nfillerup(void *unused, Uint8 * stream, int len)\n{\n    Uint8 *waveptr;\n    int waveleft;\n\n    /* Set up the pointers */\n    waveptr = wave.sound + wave.soundpos;\n    waveleft = wave.soundlen - wave.soundpos;\n\n    /* Go! */\n    while (waveleft <= len) {\n        SDL_memcpy(stream, waveptr, waveleft);\n        stream += waveleft;\n        len -= waveleft;\n        waveptr = wave.sound;\n        waveleft = wave.soundlen;\n        wave.soundpos = 0;\n    }\n    SDL_memcpy(stream, waveptr, len);\n    wave.soundpos += len;\n}\n\nstatic int done = 0;\n\n#ifdef __EMSCRIPTEN__\nvoid\nloop()\n{\n    if(done || (SDL_GetAudioDeviceStatus(device) != SDL_AUDIO_PLAYING))\n        emscripten_cancel_main_loop();\n}\n#endif\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    char filename[4096];\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_AUDIO|SDL_INIT_EVENTS) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    if (argc > 1) {\n        SDL_strlcpy(filename, argv[1], sizeof(filename));\n    } else {\n        SDL_strlcpy(filename, \"sample.wav\", sizeof(filename));\n    }\n    /* Load the wave file into memory */\n    if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", filename, SDL_GetError());\n        quit(1);\n    }\n\n    wave.spec.callback = fillerup;\n\n    /* Show the list of available drivers */\n    SDL_Log(\"Available audio drivers:\");\n    for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {\n        SDL_Log(\"%i: %s\", i, SDL_GetAudioDriver(i));\n    }\n\n    SDL_Log(\"Using audio driver: %s\\n\", SDL_GetCurrentAudioDriver());\n\n    open_audio();\n\n    SDL_FlushEvents(SDL_AUDIODEVICEADDED, SDL_AUDIODEVICEREMOVED);\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        SDL_Event event;\n\n        while (SDL_PollEvent(&event) > 0) {\n            if (event.type == SDL_QUIT) {\n                done = 1;\n            }\n            if ((event.type == SDL_AUDIODEVICEADDED && !event.adevice.iscapture) ||\n                (event.type == SDL_AUDIODEVICEREMOVED && !event.adevice.iscapture && event.adevice.which == device)) {\n                reopen_audio();\n            }\n        }\n        SDL_Delay(100);\n    }\n#endif\n\n    /* Clean up on signal */\n    close_audio();\n    SDL_FreeWAV(wave.sound);\n    SDL_Quit();\n    return (0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/loopwavequeue.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Program to load a wave file and loop playing it using SDL sound queueing */\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\n#if HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n\nstatic struct\n{\n    SDL_AudioSpec spec;\n    Uint8 *sound;               /* Pointer to wave data */\n    Uint32 soundlen;            /* Length of wave data */\n} wave;\n\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic int done = 0;\nvoid\npoked(int sig)\n{\n    done = 1;\n}\n\nvoid\nloop()\n{\n#ifdef __EMSCRIPTEN__\n    if (done || (SDL_GetAudioStatus() != SDL_AUDIO_PLAYING)) {\n        emscripten_cancel_main_loop();\n    }\n    else\n#endif\n    {\n        /* The device from SDL_OpenAudio() is always device #1. */\n        const Uint32 queued = SDL_GetQueuedAudioSize(1);\n        SDL_Log(\"Device has %u bytes queued.\\n\", (unsigned int) queued);\n        if (queued <= 8192) {  /* time to requeue the whole thing? */\n            if (SDL_QueueAudio(1, wave.sound, wave.soundlen) == 0) {\n                SDL_Log(\"Device queued %u more bytes.\\n\", (unsigned int) wave.soundlen);\n            } else {\n                SDL_Log(\"Device FAILED to queue %u more bytes: %s\\n\", (unsigned int) wave.soundlen, SDL_GetError());\n            }\n        }\n    }\n}\n\nint\nmain(int argc, char *argv[])\n{\n    char filename[4096];\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_AUDIO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    if (argc > 1) {\n        SDL_strlcpy(filename, argv[1], sizeof(filename));\n    } else {\n        SDL_strlcpy(filename, \"sample.wav\", sizeof(filename));\n    }\n    /* Load the wave file into memory */\n    if (SDL_LoadWAV(filename, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", filename, SDL_GetError());\n        quit(1);\n    }\n\n    wave.spec.callback = NULL;  /* we'll push audio. */\n\n#if HAVE_SIGNAL_H\n    /* Set the signals */\n#ifdef SIGHUP\n    signal(SIGHUP, poked);\n#endif\n    signal(SIGINT, poked);\n#ifdef SIGQUIT\n    signal(SIGQUIT, poked);\n#endif\n    signal(SIGTERM, poked);\n#endif /* HAVE_SIGNAL_H */\n\n    /* Initialize fillerup() variables */\n    if (SDL_OpenAudio(&wave.spec, NULL) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open audio: %s\\n\", SDL_GetError());\n        SDL_FreeWAV(wave.sound);\n        quit(2);\n    }\n\n    /*static x[99999]; SDL_QueueAudio(1, x, sizeof (x));*/\n\n    /* Let the audio run */\n    SDL_PauseAudio(0);\n\n    done = 0;\n\n    /* Note that we stuff the entire audio buffer into the queue in one\n       shot. Most apps would want to feed it a little at a time, as it\n       plays, but we're going for simplicity here. */\n    \n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done && (SDL_GetAudioStatus() == SDL_AUDIO_PLAYING))\n    {\n        loop();\n\n        SDL_Delay(100);  /* let it play for awhile. */\n    }\n#endif\n\n    /* Clean up on signal */\n    SDL_CloseAudio();\n    SDL_FreeWAV(wave.sound);\n    SDL_Quit();\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/nacl/Makefile",
    "content": "# Copyright (c) 2013 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\n# GNU Makefile based on shared rules provided by the Native Client SDK.\n# See README.Makefiles for more details.\n\nVALID_TOOLCHAINS := pnacl\n\n# NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../../..)\ninclude $(NACL_SDK_ROOT)/tools/common.mk\n\n\nTARGET = sdl_app\nDEPS = ppapi_simple nacl_io\n# ppapi_simple and SDL2 end up being listed twice due to dependency solving issues -- Gabriel\nLIBS = SDL2_test SDL2 ppapi_simple SDL2main SDL2 $(DEPS) ppapi_gles2 ppapi_cpp ppapi pthread \n\nCFLAGS := -Wall\nSOURCES ?= testgles2.c\n\n# Build rules generated by macros from common.mk:\n# Overriden macro from NACL SDK to be able to customize the library search path -- Gabriel\n# Specific Link Macro \n#\n# $1 = Target Name\n# $2 = List of inputs\n# $3 = List of libs\n# $4 = List of deps\n# $5 = List of lib dirs\n# $6 = Other Linker Args\n#\n# For debugging, we translate the pre-finalized .bc file.\n#\ndefine LINKER_RULE\nall: $(1).pexe \n$(1)_x86_32.nexe : $(1).bc\n\t$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch x86-32 $$^ -o $$@)\n\n$(1)_x86_64.nexe : $(1).bc\n\t$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch x86-64 $$^ -o $$@)\n\n$(1)_arm.nexe : $(1).bc\n\t$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch arm $$^ -o $$@)\n\n$(1).pexe: $(1).bc\n\t$(call LOG,FINALIZE,$$@,$(PNACL_FINALIZE) -o $$@ $$^)\n\n$(1).bc: $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)\n\t$(call LOG,LINK,$$@,$(PNACL_LINK) -o $$@ $(2) $(PNACL_LDFLAGS) $(foreach path,$(5),-L$(path)/pnacl/$(CONFIG)) -L./lib $(foreach lib,$(3),-l$(lib)) $(6))\nendef\n\n$(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep))))\n$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))\n\nifeq ($(CONFIG),Release)\n$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))\n$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))\nelse\n$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))\nendif\n\n$(eval $(call NMF_RULE,$(TARGET),))\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/nacl/background.js",
    "content": "// Copyright (c) 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nfunction makeURL(toolchain, config) {\n  return 'index.html?tc=' + toolchain + '&config=' + config;\n}\n\nfunction createWindow(url) {\n  console.log('loading ' + url);\n  chrome.app.window.create(url, {\n    width: 1024,\n    height: 800,\n    frame: 'none'\n  });\n}\n\nfunction onLaunched(launchData) {\n  // Send and XHR to get the URL to load from a configuration file.\n  // Normally you won't need to do this; just call:\n  //\n  // chrome.app.window.create('<your url>', {...});\n  //\n  // In the SDK we want to be able to load different URLs (for different\n  // toolchain/config combinations) from the commandline, so we to read\n  // this information from the file \"run_package_config\".\n  var xhr = new XMLHttpRequest();\n  xhr.open('GET', 'run_package_config', true);\n  xhr.onload = function() {\n    var toolchain_config = this.responseText.split(' ');\n    createWindow(makeURL.apply(null, toolchain_config));\n  };\n  xhr.onerror = function() {\n    // Can't find the config file, just load the default.\n    createWindow('index.html');\n  };\n  xhr.send();\n}\n\nchrome.app.runtime.onLaunched.addListener(onLaunched);\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/nacl/common.js",
    "content": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Set to true when the Document is loaded IFF \"test=true\" is in the query\n// string.\nvar isTest = false;\n\n// Set to true when loading a \"Release\" NaCl module, false when loading a\n// \"Debug\" NaCl module.\nvar isRelease = true;\n\n// Javascript module pattern:\n//   see http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Namespaces\n// In essence, we define an anonymous function which is immediately called and\n// returns a new object. The new object contains only the exported definitions;\n// all other definitions in the anonymous function are inaccessible to external\n// code.\nvar common = (function() {\n\n  function isHostToolchain(tool) {\n    return tool == 'win' || tool == 'linux' || tool == 'mac';\n  }\n\n  /**\n   * Return the mime type for NaCl plugin.\n   *\n   * @param {string} tool The name of the toolchain, e.g. \"glibc\", \"newlib\" etc.\n   * @return {string} The mime-type for the kind of NaCl plugin matching\n   * the given toolchain.\n   */\n  function mimeTypeForTool(tool) {\n    // For NaCl modules use application/x-nacl.\n    var mimetype = 'application/x-nacl';\n    if (isHostToolchain(tool)) {\n      // For non-NaCl PPAPI plugins use the x-ppapi-debug/release\n      // mime type.\n      if (isRelease)\n        mimetype = 'application/x-ppapi-release';\n      else\n        mimetype = 'application/x-ppapi-debug';\n    } else if (tool == 'pnacl') {\n      mimetype = 'application/x-pnacl';\n    }\n    return mimetype;\n  }\n\n  /**\n   * Check if the browser supports NaCl plugins.\n   *\n   * @param {string} tool The name of the toolchain, e.g. \"glibc\", \"newlib\" etc.\n   * @return {bool} True if the browser supports the type of NaCl plugin\n   * produced by the given toolchain.\n   */\n  function browserSupportsNaCl(tool) {\n    // Assume host toolchains always work with the given browser.\n    // The below mime-type checking might not work with\n    // --register-pepper-plugins.\n    if (isHostToolchain(tool)) {\n      return true;\n    }\n    var mimetype = mimeTypeForTool(tool);\n    return navigator.mimeTypes[mimetype] !== undefined;\n  }\n\n  /**\n   * Inject a script into the DOM, and call a callback when it is loaded.\n   *\n   * @param {string} url The url of the script to load.\n   * @param {Function} onload The callback to call when the script is loaded.\n   * @param {Function} onerror The callback to call if the script fails to load.\n   */\n  function injectScript(url, onload, onerror) {\n    var scriptEl = document.createElement('script');\n    scriptEl.type = 'text/javascript';\n    scriptEl.src = url;\n    scriptEl.onload = onload;\n    if (onerror) {\n      scriptEl.addEventListener('error', onerror, false);\n    }\n    document.head.appendChild(scriptEl);\n  }\n\n  /**\n   * Run all tests for this example.\n   *\n   * @param {Object} moduleEl The module DOM element.\n   */\n  function runTests(moduleEl) {\n    console.log('runTests()');\n    common.tester = new Tester();\n\n    // All NaCl SDK examples are OK if the example exits cleanly; (i.e. the\n    // NaCl module returns 0 or calls exit(0)).\n    //\n    // Without this exception, the browser_tester thinks that the module\n    // has crashed.\n    common.tester.exitCleanlyIsOK();\n\n    common.tester.addAsyncTest('loaded', function(test) {\n      test.pass();\n    });\n\n    if (typeof window.addTests !== 'undefined') {\n      window.addTests();\n    }\n\n    common.tester.waitFor(moduleEl);\n    common.tester.run();\n  }\n\n  /**\n   * Create the Native Client <embed> element as a child of the DOM element\n   * named \"listener\".\n   *\n   * @param {string} name The name of the example.\n   * @param {string} tool The name of the toolchain, e.g. \"glibc\", \"newlib\" etc.\n   * @param {string} path Directory name where .nmf file can be found.\n   * @param {number} width The width to create the plugin.\n   * @param {number} height The height to create the plugin.\n   * @param {Object} attrs Dictionary of attributes to set on the module.\n   */\n  function createNaClModule(name, tool, path, width, height, attrs) {\n    var moduleEl = document.createElement('embed');\n    moduleEl.setAttribute('name', 'nacl_module');\n    moduleEl.setAttribute('id', 'nacl_module');\n    moduleEl.setAttribute('width', width);\n    moduleEl.setAttribute('height', height);\n    moduleEl.setAttribute('path', path);\n    moduleEl.setAttribute('src', path + '/' + name + '.nmf');\n\n    // Add any optional arguments\n    if (attrs) {\n      for (var key in attrs) {\n        moduleEl.setAttribute(key, attrs[key]);\n      }\n    }\n\n    var mimetype = mimeTypeForTool(tool);\n    moduleEl.setAttribute('type', mimetype);\n\n    // The <EMBED> element is wrapped inside a <DIV>, which has both a 'load'\n    // and a 'message' event listener attached.  This wrapping method is used\n    // instead of attaching the event listeners directly to the <EMBED> element\n    // to ensure that the listeners are active before the NaCl module 'load'\n    // event fires.\n    var listenerDiv = document.getElementById('listener');\n    listenerDiv.appendChild(moduleEl);\n\n    // Request the offsetTop property to force a relayout. As of Apr 10, 2014\n    // this is needed if the module is being loaded on a Chrome App's\n    // background page (see crbug.com/350445).\n    moduleEl.offsetTop;\n\n    // Host plugins don't send a moduleDidLoad message. We'll fake it here.\n    var isHost = isHostToolchain(tool);\n    if (isHost) {\n      window.setTimeout(function() {\n        moduleEl.readyState = 1;\n        moduleEl.dispatchEvent(new CustomEvent('loadstart'));\n        moduleEl.readyState = 4;\n        moduleEl.dispatchEvent(new CustomEvent('load'));\n        moduleEl.dispatchEvent(new CustomEvent('loadend'));\n      }, 100);  // 100 ms\n    }\n\n    // This is code that is only used to test the SDK.\n    if (isTest) {\n      var loadNaClTest = function() {\n        injectScript('nacltest.js', function() {\n          runTests(moduleEl);\n        });\n      };\n\n      // Try to load test.js for the example. Whether or not it exists, load\n      // nacltest.js.\n      injectScript('test.js', loadNaClTest, loadNaClTest);\n    }\n  }\n\n  /**\n   * Add the default \"load\" and \"message\" event listeners to the element with\n   * id \"listener\".\n   *\n   * The \"load\" event is sent when the module is successfully loaded. The\n   * \"message\" event is sent when the naclModule posts a message using\n   * PPB_Messaging.PostMessage() (in C) or pp::Instance().PostMessage() (in\n   * C++).\n   */\n  function attachDefaultListeners() {\n    var listenerDiv = document.getElementById('listener');\n    listenerDiv.addEventListener('load', moduleDidLoad, true);\n    listenerDiv.addEventListener('message', handleMessage, true);\n    listenerDiv.addEventListener('error', handleError, true);\n    listenerDiv.addEventListener('crash', handleCrash, true);\n    if (typeof window.attachListeners !== 'undefined') {\n      window.attachListeners();\n    }\n  }\n\n  /**\n   * Called when the NaCl module fails to load.\n   *\n   * This event listener is registered in createNaClModule above.\n   */\n  function handleError(event) {\n    // We can't use common.naclModule yet because the module has not been\n    // loaded.\n    var moduleEl = document.getElementById('nacl_module');\n    updateStatus('ERROR [' + moduleEl.lastError + ']');\n  }\n\n  /**\n   * Called when the Browser can not communicate with the Module\n   *\n   * This event listener is registered in attachDefaultListeners above.\n   */\n  function handleCrash(event) {\n    if (common.naclModule.exitStatus == -1) {\n      updateStatus('CRASHED');\n    } else {\n      updateStatus('EXITED [' + common.naclModule.exitStatus + ']');\n    }\n    if (typeof window.handleCrash !== 'undefined') {\n      window.handleCrash(common.naclModule.lastError);\n    }\n  }\n\n  /**\n   * Called when the NaCl module is loaded.\n   *\n   * This event listener is registered in attachDefaultListeners above.\n   */\n  function moduleDidLoad() {\n    common.naclModule = document.getElementById('nacl_module');\n    updateStatus('RUNNING');\n\n    if (typeof window.moduleDidLoad !== 'undefined') {\n      window.moduleDidLoad();\n    }\n  }\n\n  /**\n   * Hide the NaCl module's embed element.\n   *\n   * We don't want to hide by default; if we do, it is harder to determine that\n   * a plugin failed to load. Instead, call this function inside the example's\n   * \"moduleDidLoad\" function.\n   *\n   */\n  function hideModule() {\n    // Setting common.naclModule.style.display = \"None\" doesn't work; the\n    // module will no longer be able to receive postMessages.\n    common.naclModule.style.height = '0';\n  }\n\n  /**\n   * Remove the NaCl module from the page.\n   */\n  function removeModule() {\n    common.naclModule.parentNode.removeChild(common.naclModule);\n    common.naclModule = null;\n  }\n\n  /**\n   * Return true when |s| starts with the string |prefix|.\n   *\n   * @param {string} s The string to search.\n   * @param {string} prefix The prefix to search for in |s|.\n   */\n  function startsWith(s, prefix) {\n    // indexOf would search the entire string, lastIndexOf(p, 0) only checks at\n    // the first index. See: http://stackoverflow.com/a/4579228\n    return s.lastIndexOf(prefix, 0) === 0;\n  }\n\n  /** Maximum length of logMessageArray. */\n  var kMaxLogMessageLength = 20;\n\n  /** An array of messages to display in the element with id \"log\". */\n  var logMessageArray = [];\n\n  /**\n   * Add a message to an element with id \"log\".\n   *\n   * This function is used by the default \"log:\" message handler.\n   *\n   * @param {string} message The message to log.\n   */\n  function logMessage(message) {\n    logMessageArray.push(message);\n    if (logMessageArray.length > kMaxLogMessageLength)\n      logMessageArray.shift();\n\n    document.getElementById('log').textContent = logMessageArray.join('\\n');\n    console.log(message);\n  }\n\n  /**\n   */\n  var defaultMessageTypes = {\n    'alert': alert,\n    'log': logMessage\n  };\n\n  /**\n   * Called when the NaCl module sends a message to JavaScript (via\n   * PPB_Messaging.PostMessage())\n   *\n   * This event listener is registered in createNaClModule above.\n   *\n   * @param {Event} message_event A message event. message_event.data contains\n   *     the data sent from the NaCl module.\n   */\n  function handleMessage(message_event) {\n    if (typeof message_event.data === 'string') {\n      for (var type in defaultMessageTypes) {\n        if (defaultMessageTypes.hasOwnProperty(type)) {\n          if (startsWith(message_event.data, type + ':')) {\n            func = defaultMessageTypes[type];\n            func(message_event.data.slice(type.length + 1));\n            return;\n          }\n        }\n      }\n    }\n\n    if (typeof window.handleMessage !== 'undefined') {\n      window.handleMessage(message_event);\n      return;\n    }\n\n    logMessage('Unhandled message: ' + message_event.data);\n  }\n\n  /**\n   * Called when the DOM content has loaded; i.e. the page's document is fully\n   * parsed. At this point, we can safely query any elements in the document via\n   * document.querySelector, document.getElementById, etc.\n   *\n   * @param {string} name The name of the example.\n   * @param {string} tool The name of the toolchain, e.g. \"glibc\", \"newlib\" etc.\n   * @param {string} path Directory name where .nmf file can be found.\n   * @param {number} width The width to create the plugin.\n   * @param {number} height The height to create the plugin.\n   * @param {Object} attrs Optional dictionary of additional attributes.\n   */\n  function domContentLoaded(name, tool, path, width, height, attrs) {\n    // If the page loads before the Native Client module loads, then set the\n    // status message indicating that the module is still loading.  Otherwise,\n    // do not change the status message.\n    updateStatus('Page loaded.');\n    if (!browserSupportsNaCl(tool)) {\n      updateStatus(\n          'Browser does not support NaCl (' + tool + '), or NaCl is disabled');\n    } else if (common.naclModule == null) {\n      updateStatus('Creating embed: ' + tool);\n\n      // We use a non-zero sized embed to give Chrome space to place the bad\n      // plug-in graphic, if there is a problem.\n      width = typeof width !== 'undefined' ? width : 200;\n      height = typeof height !== 'undefined' ? height : 200;\n      attachDefaultListeners();\n      createNaClModule(name, tool, path, width, height, attrs);\n    } else {\n      // It's possible that the Native Client module onload event fired\n      // before the page's onload event.  In this case, the status message\n      // will reflect 'SUCCESS', but won't be displayed.  This call will\n      // display the current message.\n      updateStatus('Waiting.');\n    }\n  }\n\n  /** Saved text to display in the element with id 'statusField'. */\n  var statusText = 'NO-STATUSES';\n\n  /**\n   * Set the global status message. If the element with id 'statusField'\n   * exists, then set its HTML to the status message as well.\n   *\n   * @param {string} opt_message The message to set. If null or undefined, then\n   *     set element 'statusField' to the message from the last call to\n   *     updateStatus.\n   */\n  function updateStatus(opt_message) {\n    if (opt_message) {\n      statusText = opt_message;\n    }\n    var statusField = document.getElementById('statusField');\n    if (statusField) {\n      statusField.innerHTML = statusText;\n    }\n  }\n\n  // The symbols to export.\n  return {\n    /** A reference to the NaCl module, once it is loaded. */\n    naclModule: null,\n\n    attachDefaultListeners: attachDefaultListeners,\n    domContentLoaded: domContentLoaded,\n    createNaClModule: createNaClModule,\n    hideModule: hideModule,\n    removeModule: removeModule,\n    logMessage: logMessage,\n    updateStatus: updateStatus\n  };\n\n}());\n\n// Listen for the DOM content to be loaded. This event is fired when parsing of\n// the page's document has finished.\ndocument.addEventListener('DOMContentLoaded', function() {\n  var body = document.body;\n\n  // The data-* attributes on the body can be referenced via body.dataset.\n  if (body.dataset) {\n    var loadFunction;\n    if (!body.dataset.customLoad) {\n      loadFunction = common.domContentLoaded;\n    } else if (typeof window.domContentLoaded !== 'undefined') {\n      loadFunction = window.domContentLoaded;\n    }\n\n    // From https://developer.mozilla.org/en-US/docs/DOM/window.location\n    var searchVars = {};\n    if (window.location.search.length > 1) {\n      var pairs = window.location.search.substr(1).split('&');\n      for (var key_ix = 0; key_ix < pairs.length; key_ix++) {\n        var keyValue = pairs[key_ix].split('=');\n        searchVars[unescape(keyValue[0])] =\n            keyValue.length > 1 ? unescape(keyValue[1]) : '';\n      }\n    }\n\n    if (loadFunction) {\n      var toolchains = body.dataset.tools.split(' ');\n      var configs = body.dataset.configs.split(' ');\n\n      var attrs = {};\n      if (body.dataset.attrs) {\n        var attr_list = body.dataset.attrs.split(' ');\n        for (var key in attr_list) {\n          var attr = attr_list[key].split('=');\n          var key = attr[0];\n          var value = attr[1];\n          attrs[key] = value;\n        }\n      }\n\n      var tc = toolchains.indexOf(searchVars.tc) !== -1 ?\n          searchVars.tc : toolchains[0];\n\n      // If the config value is included in the search vars, use that.\n      // Otherwise default to Release if it is valid, or the first value if\n      // Release is not valid.\n      if (configs.indexOf(searchVars.config) !== -1)\n        var config = searchVars.config;\n      else if (configs.indexOf('Release') !== -1)\n        var config = 'Release';\n      else\n        var config = configs[0];\n\n      var pathFormat = body.dataset.path;\n      var path = pathFormat.replace('{tc}', tc).replace('{config}', config);\n\n      isTest = searchVars.test === 'true';\n      isRelease = path.toLowerCase().indexOf('release') != -1;\n\n      loadFunction(body.dataset.name, tc, path, body.dataset.width,\n                   body.dataset.height, attrs);\n    }\n  }\n});\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/nacl/index.html",
    "content": "<!DOCTYPE html>\n<html>\n<!--\nCopyright (c) 2012 The Chromium Authors. All rights reserved.\nUse of this source code is governed by a BSD-style license that can be\nfound in the LICENSE file.\n-->\n<head>\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\n  <meta http-equiv=\"Expires\" content=\"-1\">\n  <title>SDL NACL Test</title>\n  <script type=\"text/javascript\" src=\"common.js\"></script>\n</head>\n<body data-width=\"640\" data-height=\"640\" data-name=\"sdl_app\" data-tools=\"pnacl\" data-configs=\"Debug Release\" data-path=\"{tc}/{config}\">\n  <h1>SDL NACL Test</h1>\n  <h2>Status: <code id=\"statusField\">NO-STATUS</code></h2>\n  <!-- The NaCl plugin will be embedded inside the element with id \"listener\".\n      See common.js.-->\n  <div id=\"listener\"></div>\n</body>\n</html>\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/nacl/manifest.json",
    "content": "{\n  \"name\": \"SDL testgles2\",\n  \"version\": \"33.0.1750.117\",\n  \"minimum_chrome_version\": \"33.0.1750.117\",\n  \"manifest_version\": 2,\n  \"description\": \"testgles2\",\n  \"offline_enabled\": true,\n  \"icons\": {\n    \"128\": \"icon128.png\"\n  },\n  \"app\": {\n    \"background\": {\n      \"scripts\": [\"background.js\"]\n    }\n  },\n  \"key\": \"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCMN716Qyu0l2EHNFqIJVqVysFcTR6urqhaGGqW4UK7slBaURz9+Sb1b4Ot5P1uQNE5c+CTU5Vu61wpqmSqMMxqHLWdPPMh8uRlyctsb2cxWwG6XoGSvpX29NsQVUFXd4v2tkJm3G9t+V0X8TYskrvWQmnyOW8OEIDvrBhUEfFxWQIDAQAB\",\n  \"oauth2\": {\n    \"client_id\": \"903965034255.apps.googleusercontent.com\",\n    \"scopes\": [\"https://www.googleapis.com/auth/drive\"]\n  },\n  \"permissions\": []\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/picture.xbm",
    "content": "#define picture_width 32\n#define picture_height 32\nstatic char picture_bits[] = {\n   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x18,\n   0x64, 0x6f, 0xf6, 0x26, 0x0a, 0x00, 0x00, 0x50, 0xf2, 0xff, 0xff, 0x4f,\n   0x14, 0x04, 0x00, 0x28, 0x14, 0x0e, 0x00, 0x28, 0x10, 0x32, 0x00, 0x08,\n   0x94, 0x03, 0x00, 0x08, 0xf4, 0x04, 0x00, 0x08, 0xb0, 0x08, 0x00, 0x08,\n   0x34, 0x01, 0x00, 0x28, 0x34, 0x01, 0x00, 0x28, 0x12, 0x00, 0x40, 0x48,\n   0x12, 0x20, 0xa6, 0x48, 0x14, 0x50, 0x11, 0x29, 0x14, 0x50, 0x48, 0x2a,\n   0x10, 0x27, 0xac, 0x0e, 0xd4, 0x71, 0xe8, 0x0a, 0x74, 0x20, 0xa8, 0x0a,\n   0x14, 0x20, 0x00, 0x08, 0x10, 0x50, 0x00, 0x08, 0x14, 0x00, 0x00, 0x28,\n   0x14, 0x00, 0x00, 0x28, 0xf2, 0xff, 0xff, 0x4f, 0x0a, 0x00, 0x00, 0x50,\n   0x64, 0x6f, 0xf6, 0x26, 0x18, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00,\n   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/relative_mode.markdown",
    "content": "Relative mode testing\n=====================\n\nSee test program at the bottom of this file.\n\nInitial tests:\n\n - When in relative mode, the mouse shouldn't be moveable outside of the window.\n - When the cursor is outside the window when relative mode is enabled, mouse\n   clicks should not go to whatever app was under the cursor previously.\n - When alt/cmd-tabbing between a relative mode app and another app, clicks when\n   in the relative mode app should also not go to whatever app was under the\n   cursor previously.\n\n\nCode\n====\n\n    #include <SDL.h>\n\n    int PollEvents()\n    {\n        SDL_Event event;\n        while (SDL_PollEvent(&event))\n        {\n            switch (event.type)\n            {\n                case SDL_QUIT:\n                    return 1;\n                default:\n                    break;\n            }\n        }\n\n        return 0;\n    }\n\n    int main(int argc, char *argv[])\n    {\n        SDL_Window *win;\n\n        SDL_Init(SDL_INIT_VIDEO);\n\n        win = SDL_CreateWindow(\"Test\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0);\n        SDL_SetRelativeMouseMode(SDL_TRUE);\n\n        while (1)\n        {\n            if (PollEvents())\n                break;\n        }\n\n        SDL_DestroyWindow(win);\n\n        SDL_Quit();\n\n        return 0;\n    }\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testatomic.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdio.h>\n\n#include \"SDL.h\"\n\n/*\n  Absolutely basic tests just to see if we get the expected value\n  after calling each function.\n*/\n\nstatic\nchar *\ntf(SDL_bool tf)\n{\n    static char *t = \"TRUE\";\n    static char *f = \"FALSE\";\n\n    if (tf)\n    {\n       return t;\n    }\n\n    return f;\n}\n\nstatic\nvoid RunBasicTest()\n{\n    int value;\n    SDL_SpinLock lock = 0;\n\n    SDL_atomic_t v;\n    SDL_bool tfret = SDL_FALSE;\n\n    SDL_Log(\"\\nspin lock---------------------------------------\\n\\n\");\n\n    SDL_AtomicLock(&lock);\n    SDL_Log(\"AtomicLock                   lock=%d\\n\", lock);\n    SDL_AtomicUnlock(&lock);\n    SDL_Log(\"AtomicUnlock                 lock=%d\\n\", lock);\n\n    SDL_Log(\"\\natomic -----------------------------------------\\n\\n\");\n\n    SDL_AtomicSet(&v, 0);\n    tfret = SDL_AtomicSet(&v, 10) == 0 ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicSet(10)        tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n    tfret = SDL_AtomicAdd(&v, 10) == 10 ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicAdd(10)        tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n\n    SDL_AtomicSet(&v, 0);\n    SDL_AtomicIncRef(&v);\n    tfret = (SDL_AtomicGet(&v) == 1) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicIncRef()       tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n    SDL_AtomicIncRef(&v);\n    tfret = (SDL_AtomicGet(&v) == 2) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicIncRef()       tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n    tfret = (SDL_AtomicDecRef(&v) == SDL_FALSE) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicDecRef()       tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n    tfret = (SDL_AtomicDecRef(&v) == SDL_TRUE) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicDecRef()       tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n\n    SDL_AtomicSet(&v, 10);\n    tfret = (SDL_AtomicCAS(&v, 0, 20) == SDL_FALSE) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicCAS()          tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n    value = SDL_AtomicGet(&v);\n    tfret = (SDL_AtomicCAS(&v, value, 20) == SDL_TRUE) ? SDL_TRUE : SDL_FALSE;\n    SDL_Log(\"AtomicCAS()          tfret=%s val=%d\\n\", tf(tfret), SDL_AtomicGet(&v));\n}\n\n/**************************************************************************/\n/* Atomic operation test\n * Adapted with permission from code by Michael Davidsaver at:\n *  http://bazaar.launchpad.net/~mdavidsaver/epics-base/atomic/revision/12105#src/libCom/test/epicsAtomicTest.c\n * Original copyright 2010 Brookhaven Science Associates as operator of Brookhaven National Lab\n * http://www.aps.anl.gov/epics/license/open.php\n */\n\n/* Tests semantics of atomic operations.  Also a stress test\n * to see if they are really atomic.\n *\n * Several threads adding to the same variable.\n * at the end the value is compared with the expected\n * and with a non-atomic counter.\n */\n\n/* Number of concurrent incrementers */\n#define NThreads 2\n#define CountInc 100\n#define VALBITS (sizeof(atomicValue)*8)\n\n#define atomicValue int\n#define CountTo ((atomicValue)((unsigned int)(1<<(VALBITS-1))-1))\n#define NInter (CountTo/CountInc/NThreads)\n#define Expect (CountTo-NInter*CountInc*NThreads)\n\nenum {\n   CountTo_GreaterThanZero = CountTo > 0,\n};\nSDL_COMPILE_TIME_ASSERT(size, CountTo_GreaterThanZero); /* check for rollover */\n\nstatic SDL_atomic_t good = { 42 };\n\nstatic atomicValue bad = 42;\n\nstatic SDL_atomic_t threadsRunning;\n\nstatic SDL_sem *threadDone;\n\nstatic\nint SDLCALL adder(void* junk)\n{\n    unsigned long N=NInter;\n    SDL_Log(\"Thread subtracting %d %lu times\\n\",CountInc,N);\n    while (N--) {\n        SDL_AtomicAdd(&good, -CountInc);\n        bad-=CountInc;\n    }\n    SDL_AtomicAdd(&threadsRunning, -1);\n    SDL_SemPost(threadDone);\n    return 0;\n}\n\nstatic\nvoid runAdder(void)\n{\n    Uint32 start, end;\n    int T=NThreads;\n\n    start = SDL_GetTicks();\n\n    threadDone = SDL_CreateSemaphore(0);\n\n    SDL_AtomicSet(&threadsRunning, NThreads);\n\n    while (T--)\n        SDL_CreateThread(adder, \"Adder\", NULL);\n\n    while (SDL_AtomicGet(&threadsRunning) > 0)\n        SDL_SemWait(threadDone);\n\n    SDL_DestroySemaphore(threadDone);\n\n    end = SDL_GetTicks();\n\n    SDL_Log(\"Finished in %f sec\\n\", (end - start) / 1000.f);\n}\n\nstatic\nvoid RunEpicTest()\n{\n    int b;\n    atomicValue v;\n\n    SDL_Log(\"\\nepic test---------------------------------------\\n\\n\");\n\n    SDL_Log(\"Size asserted to be >= 32-bit\\n\");\n    SDL_assert(sizeof(atomicValue)>=4);\n\n    SDL_Log(\"Check static initializer\\n\");\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==42);\n\n    SDL_assert(bad==42);\n\n    SDL_Log(\"Test negative values\\n\");\n    SDL_AtomicSet(&good, -5);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==-5);\n\n    SDL_Log(\"Verify maximum value\\n\");\n    SDL_AtomicSet(&good, CountTo);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==CountTo);\n\n    SDL_Log(\"Test compare and exchange\\n\");\n\n    b=SDL_AtomicCAS(&good, 500, 43);\n    SDL_assert(!b); /* no swap since CountTo!=500 */\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==CountTo); /* ensure no swap */\n\n    b=SDL_AtomicCAS(&good, CountTo, 44);\n    SDL_assert(!!b); /* will swap */\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==44);\n\n    SDL_Log(\"Test Add\\n\");\n\n    v=SDL_AtomicAdd(&good, 1);\n    SDL_assert(v==44);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==45);\n\n    v=SDL_AtomicAdd(&good, 10);\n    SDL_assert(v==45);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==55);\n\n    SDL_Log(\"Test Add (Negative values)\\n\");\n\n    v=SDL_AtomicAdd(&good, -20);\n    SDL_assert(v==55);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==35);\n\n    v=SDL_AtomicAdd(&good, -50); /* crossing zero down */\n    SDL_assert(v==35);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==-15);\n\n    v=SDL_AtomicAdd(&good, 30); /* crossing zero up */\n    SDL_assert(v==-15);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==15);\n\n    SDL_Log(\"Reset before count down test\\n\");\n    SDL_AtomicSet(&good, CountTo);\n    v=SDL_AtomicGet(&good);\n    SDL_assert(v==CountTo);\n\n    bad=CountTo;\n    SDL_assert(bad==CountTo);\n\n    SDL_Log(\"Counting down from %d, Expect %d remaining\\n\",CountTo,Expect);\n    runAdder();\n\n    v=SDL_AtomicGet(&good);\n    SDL_Log(\"Atomic %d Non-Atomic %d\\n\",v,bad);\n    SDL_assert(v==Expect);\n    SDL_assert(bad!=Expect);\n}\n\n/* End atomic operation test */\n/**************************************************************************/\n\n/**************************************************************************/\n/* Lock-free FIFO test */\n\n/* This is useful to test the impact of another thread locking the queue\n   entirely for heavy-weight manipulation.\n */\n#define TEST_SPINLOCK_FIFO\n\n#define NUM_READERS 4\n#define NUM_WRITERS 4\n#define EVENTS_PER_WRITER   1000000\n\n/* The number of entries must be a power of 2 */\n#define MAX_ENTRIES 256\n#define WRAP_MASK   (MAX_ENTRIES-1)\n\ntypedef struct\n{\n    SDL_atomic_t sequence;\n    SDL_Event event;\n} SDL_EventQueueEntry;\n\ntypedef struct\n{\n    SDL_EventQueueEntry entries[MAX_ENTRIES];\n\n    char cache_pad1[SDL_CACHELINE_SIZE-((sizeof(SDL_EventQueueEntry)*MAX_ENTRIES)%SDL_CACHELINE_SIZE)];\n\n    SDL_atomic_t enqueue_pos;\n\n    char cache_pad2[SDL_CACHELINE_SIZE-sizeof(SDL_atomic_t)];\n\n    SDL_atomic_t dequeue_pos;\n\n    char cache_pad3[SDL_CACHELINE_SIZE-sizeof(SDL_atomic_t)];\n\n#ifdef TEST_SPINLOCK_FIFO\n    SDL_SpinLock lock;\n    SDL_atomic_t rwcount;\n    SDL_atomic_t watcher;\n\n    char cache_pad4[SDL_CACHELINE_SIZE-sizeof(SDL_SpinLock)-2*sizeof(SDL_atomic_t)];\n#endif\n\n    SDL_atomic_t active;\n\n    /* Only needed for the mutex test */\n    SDL_mutex *mutex;\n\n} SDL_EventQueue;\n\nstatic void InitEventQueue(SDL_EventQueue *queue)\n{\n    int i;\n\n    for (i = 0; i < MAX_ENTRIES; ++i) {\n        SDL_AtomicSet(&queue->entries[i].sequence, i);\n    }\n    SDL_AtomicSet(&queue->enqueue_pos, 0);\n    SDL_AtomicSet(&queue->dequeue_pos, 0);\n#ifdef TEST_SPINLOCK_FIFO\n    queue->lock = 0;\n    SDL_AtomicSet(&queue->rwcount, 0);\n    SDL_AtomicSet(&queue->watcher, 0);\n#endif\n    SDL_AtomicSet(&queue->active, 1);\n}\n\nstatic SDL_bool EnqueueEvent_LockFree(SDL_EventQueue *queue, const SDL_Event *event)\n{\n    SDL_EventQueueEntry *entry;\n    unsigned queue_pos;\n    unsigned entry_seq;\n    int delta;\n    SDL_bool status;\n\n#ifdef TEST_SPINLOCK_FIFO\n    /* This is a gate so an external thread can lock the queue */\n    SDL_AtomicLock(&queue->lock);\n    SDL_assert(SDL_AtomicGet(&queue->watcher) == 0);\n    SDL_AtomicIncRef(&queue->rwcount);\n    SDL_AtomicUnlock(&queue->lock);\n#endif\n\n    queue_pos = (unsigned)SDL_AtomicGet(&queue->enqueue_pos);\n    for ( ; ; ) {\n        entry = &queue->entries[queue_pos & WRAP_MASK];\n        entry_seq = (unsigned)SDL_AtomicGet(&entry->sequence);\n\n        delta = (int)(entry_seq - queue_pos);\n        if (delta == 0) {\n            /* The entry and the queue position match, try to increment the queue position */\n            if (SDL_AtomicCAS(&queue->enqueue_pos, (int)queue_pos, (int)(queue_pos+1))) {\n                /* We own the object, fill it! */\n                entry->event = *event;\n                SDL_AtomicSet(&entry->sequence, (int)(queue_pos + 1));\n                status = SDL_TRUE;\n                break;\n            }\n        } else if (delta < 0) {\n            /* We ran into an old queue entry, which means it still needs to be dequeued */\n            status = SDL_FALSE;\n            break;\n        } else {\n            /* We ran into a new queue entry, get the new queue position */\n            queue_pos = (unsigned)SDL_AtomicGet(&queue->enqueue_pos);\n        }\n    }\n\n#ifdef TEST_SPINLOCK_FIFO\n    SDL_AtomicDecRef(&queue->rwcount);\n#endif\n    return status;\n}\n\nstatic SDL_bool DequeueEvent_LockFree(SDL_EventQueue *queue, SDL_Event *event)\n{\n    SDL_EventQueueEntry *entry;\n    unsigned queue_pos;\n    unsigned entry_seq;\n    int delta;\n    SDL_bool status;\n\n#ifdef TEST_SPINLOCK_FIFO\n    /* This is a gate so an external thread can lock the queue */\n    SDL_AtomicLock(&queue->lock);\n    SDL_assert(SDL_AtomicGet(&queue->watcher) == 0);\n    SDL_AtomicIncRef(&queue->rwcount);\n    SDL_AtomicUnlock(&queue->lock);\n#endif\n\n    queue_pos = (unsigned)SDL_AtomicGet(&queue->dequeue_pos);\n    for ( ; ; ) {\n        entry = &queue->entries[queue_pos & WRAP_MASK];\n        entry_seq = (unsigned)SDL_AtomicGet(&entry->sequence);\n\n        delta = (int)(entry_seq - (queue_pos + 1));\n        if (delta == 0) {\n            /* The entry and the queue position match, try to increment the queue position */\n            if (SDL_AtomicCAS(&queue->dequeue_pos, (int)queue_pos, (int)(queue_pos+1))) {\n                /* We own the object, fill it! */\n                *event = entry->event;\n                SDL_AtomicSet(&entry->sequence, (int)(queue_pos+MAX_ENTRIES));\n                status = SDL_TRUE;\n                break;\n            }\n        } else if (delta < 0) {\n            /* We ran into an old queue entry, which means we've hit empty */\n            status = SDL_FALSE;\n            break;\n        } else {\n            /* We ran into a new queue entry, get the new queue position */\n            queue_pos = (unsigned)SDL_AtomicGet(&queue->dequeue_pos);\n        }\n    }\n\n#ifdef TEST_SPINLOCK_FIFO\n    SDL_AtomicDecRef(&queue->rwcount);\n#endif\n    return status;\n}\n\nstatic SDL_bool EnqueueEvent_Mutex(SDL_EventQueue *queue, const SDL_Event *event)\n{\n    SDL_EventQueueEntry *entry;\n    unsigned queue_pos;\n    unsigned entry_seq;\n    int delta;\n    SDL_bool status = SDL_FALSE;\n\n    SDL_LockMutex(queue->mutex);\n\n    queue_pos = (unsigned)queue->enqueue_pos.value;\n    entry = &queue->entries[queue_pos & WRAP_MASK];\n    entry_seq = (unsigned)entry->sequence.value;\n\n    delta = (int)(entry_seq - queue_pos);\n    if (delta == 0) {\n        ++queue->enqueue_pos.value;\n\n        /* We own the object, fill it! */\n        entry->event = *event;\n        entry->sequence.value = (int)(queue_pos + 1);\n        status = SDL_TRUE;\n    } else if (delta < 0) {\n        /* We ran into an old queue entry, which means it still needs to be dequeued */\n    } else {\n        SDL_Log(\"ERROR: mutex failed!\\n\");\n    }\n\n    SDL_UnlockMutex(queue->mutex);\n\n    return status;\n}\n\nstatic SDL_bool DequeueEvent_Mutex(SDL_EventQueue *queue, SDL_Event *event)\n{\n    SDL_EventQueueEntry *entry;\n    unsigned queue_pos;\n    unsigned entry_seq;\n    int delta;\n    SDL_bool status = SDL_FALSE;\n\n    SDL_LockMutex(queue->mutex);\n\n    queue_pos = (unsigned)queue->dequeue_pos.value;\n    entry = &queue->entries[queue_pos & WRAP_MASK];\n    entry_seq = (unsigned)entry->sequence.value;\n\n    delta = (int)(entry_seq - (queue_pos + 1));\n    if (delta == 0) {\n        ++queue->dequeue_pos.value;\n\n        /* We own the object, fill it! */\n        *event = entry->event;\n        entry->sequence.value = (int)(queue_pos + MAX_ENTRIES);\n        status = SDL_TRUE;\n    } else if (delta < 0) {\n        /* We ran into an old queue entry, which means we've hit empty */\n    } else {\n        SDL_Log(\"ERROR: mutex failed!\\n\");\n    }\n\n    SDL_UnlockMutex(queue->mutex);\n\n    return status;\n}\n\nstatic SDL_sem *writersDone;\nstatic SDL_sem *readersDone;\nstatic SDL_atomic_t writersRunning;\nstatic SDL_atomic_t readersRunning;\n\ntypedef struct\n{\n    SDL_EventQueue *queue;\n    int index;\n    char padding1[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int))%SDL_CACHELINE_SIZE];\n    int waits;\n    SDL_bool lock_free;\n    char padding2[SDL_CACHELINE_SIZE-sizeof(int)-sizeof(SDL_bool)];\n} WriterData;\n\ntypedef struct\n{\n    SDL_EventQueue *queue;\n    int counters[NUM_WRITERS];\n    int waits;\n    SDL_bool lock_free;\n    char padding[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int)*NUM_WRITERS+sizeof(int)+sizeof(SDL_bool))%SDL_CACHELINE_SIZE];\n} ReaderData;\n\nstatic int SDLCALL FIFO_Writer(void* _data)\n{\n    WriterData *data = (WriterData *)_data;\n    SDL_EventQueue *queue = data->queue;\n    int i;\n    SDL_Event event;\n\n    event.type = SDL_USEREVENT;\n    event.user.windowID = 0;\n    event.user.code = 0;\n    event.user.data1 = data;\n    event.user.data2 = NULL;\n\n    if (data->lock_free) {\n        for (i = 0; i < EVENTS_PER_WRITER; ++i) {\n            event.user.code = i;\n            while (!EnqueueEvent_LockFree(queue, &event)) {\n                ++data->waits;\n                SDL_Delay(0);\n            }\n        }\n    } else {\n        for (i = 0; i < EVENTS_PER_WRITER; ++i) {\n            event.user.code = i;\n            while (!EnqueueEvent_Mutex(queue, &event)) {\n                ++data->waits;\n                SDL_Delay(0);\n            }\n        }\n    }\n    SDL_AtomicAdd(&writersRunning, -1);\n    SDL_SemPost(writersDone);\n    return 0;\n}\n\nstatic int SDLCALL FIFO_Reader(void* _data)\n{\n    ReaderData *data = (ReaderData *)_data;\n    SDL_EventQueue *queue = data->queue;\n    SDL_Event event;\n\n    if (data->lock_free) {\n        for ( ; ; ) {\n            if (DequeueEvent_LockFree(queue, &event)) {\n                WriterData *writer = (WriterData*)event.user.data1;\n                ++data->counters[writer->index];\n            } else if (SDL_AtomicGet(&queue->active)) {\n                ++data->waits;\n                SDL_Delay(0);\n            } else {\n                /* We drained the queue, we're done! */\n                break;\n            }\n        }\n    } else {\n        for ( ; ; ) {\n            if (DequeueEvent_Mutex(queue, &event)) {\n                WriterData *writer = (WriterData*)event.user.data1;\n                ++data->counters[writer->index];\n            } else if (SDL_AtomicGet(&queue->active)) {\n                ++data->waits;\n                SDL_Delay(0);\n            } else {\n                /* We drained the queue, we're done! */\n                break;\n            }\n        }\n    }\n    SDL_AtomicAdd(&readersRunning, -1);\n    SDL_SemPost(readersDone);\n    return 0;\n}\n\n#ifdef TEST_SPINLOCK_FIFO\n/* This thread periodically locks the queue for no particular reason */\nstatic int SDLCALL FIFO_Watcher(void* _data)\n{\n    SDL_EventQueue *queue = (SDL_EventQueue *)_data;\n\n    while (SDL_AtomicGet(&queue->active)) {\n        SDL_AtomicLock(&queue->lock);\n        SDL_AtomicIncRef(&queue->watcher);\n        while (SDL_AtomicGet(&queue->rwcount) > 0) {\n            SDL_Delay(0);\n        }\n        /* Do queue manipulation here... */\n        SDL_AtomicDecRef(&queue->watcher);\n        SDL_AtomicUnlock(&queue->lock);\n\n        /* Wait a bit... */\n        SDL_Delay(1);\n    }\n    return 0;\n}\n#endif /* TEST_SPINLOCK_FIFO */\n\nstatic void RunFIFOTest(SDL_bool lock_free)\n{\n    SDL_EventQueue queue;\n    WriterData writerData[NUM_WRITERS];\n    ReaderData readerData[NUM_READERS];\n    Uint32 start, end;\n    int i, j;\n    int grand_total;\n    char textBuffer[1024];\n    size_t len;\n\n    SDL_Log(\"\\nFIFO test---------------------------------------\\n\\n\");\n    SDL_Log(\"Mode: %s\\n\", lock_free ? \"LockFree\" : \"Mutex\");\n\n    readersDone = SDL_CreateSemaphore(0);\n    writersDone = SDL_CreateSemaphore(0);\n\n    SDL_memset(&queue, 0xff, sizeof(queue));\n\n    InitEventQueue(&queue);\n    if (!lock_free) {\n        queue.mutex = SDL_CreateMutex();\n    }\n\n    start = SDL_GetTicks();\n\n#ifdef TEST_SPINLOCK_FIFO\n    /* Start a monitoring thread */\n    if (lock_free) {\n        SDL_CreateThread(FIFO_Watcher, \"FIFOWatcher\", &queue);\n    }\n#endif\n\n    /* Start the readers first */\n    SDL_Log(\"Starting %d readers\\n\", NUM_READERS);\n    SDL_zero(readerData);\n    SDL_AtomicSet(&readersRunning, NUM_READERS);\n    for (i = 0; i < NUM_READERS; ++i) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"FIFOReader%d\", i);\n        readerData[i].queue = &queue;\n        readerData[i].lock_free = lock_free;\n        SDL_CreateThread(FIFO_Reader, name, &readerData[i]);\n    }\n\n    /* Start up the writers */\n    SDL_Log(\"Starting %d writers\\n\", NUM_WRITERS);\n    SDL_zero(writerData);\n    SDL_AtomicSet(&writersRunning, NUM_WRITERS);\n    for (i = 0; i < NUM_WRITERS; ++i) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"FIFOWriter%d\", i);\n        writerData[i].queue = &queue;\n        writerData[i].index = i;\n        writerData[i].lock_free = lock_free;\n        SDL_CreateThread(FIFO_Writer, name, &writerData[i]);\n    }\n\n    /* Wait for the writers */\n    while (SDL_AtomicGet(&writersRunning) > 0) {\n        SDL_SemWait(writersDone);\n    }\n\n    /* Shut down the queue so readers exit */\n    SDL_AtomicSet(&queue.active, 0);\n\n    /* Wait for the readers */\n    while (SDL_AtomicGet(&readersRunning) > 0) {\n        SDL_SemWait(readersDone);\n    }\n\n    end = SDL_GetTicks();\n\n    SDL_DestroySemaphore(readersDone);\n    SDL_DestroySemaphore(writersDone);\n\n    if (!lock_free) {\n        SDL_DestroyMutex(queue.mutex);\n    }\n\n    SDL_Log(\"Finished in %f sec\\n\", (end - start) / 1000.f);\n\n    SDL_Log(\"\\n\");\n    for (i = 0; i < NUM_WRITERS; ++i) {\n        SDL_Log(\"Writer %d wrote %d events, had %d waits\\n\", i, EVENTS_PER_WRITER, writerData[i].waits);\n    }\n    SDL_Log(\"Writers wrote %d total events\\n\", NUM_WRITERS*EVENTS_PER_WRITER);\n\n    /* Print a breakdown of which readers read messages from which writer */\n    SDL_Log(\"\\n\");\n    grand_total = 0;\n    for (i = 0; i < NUM_READERS; ++i) {\n        int total = 0;\n        for (j = 0; j < NUM_WRITERS; ++j) {\n            total += readerData[i].counters[j];\n        }\n        grand_total += total;\n        SDL_Log(\"Reader %d read %d events, had %d waits\\n\", i, total, readerData[i].waits);\n        SDL_snprintf(textBuffer, sizeof(textBuffer), \"  { \");\n        for (j = 0; j < NUM_WRITERS; ++j) {\n            if (j > 0) {\n                len = SDL_strlen(textBuffer);\n                SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, \", \");\n            }\n            len = SDL_strlen(textBuffer);\n            SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, \"%d\", readerData[i].counters[j]);\n        }\n        len = SDL_strlen(textBuffer);\n        SDL_snprintf(textBuffer + len, sizeof(textBuffer) - len, \" }\\n\");\n        SDL_Log(\"%s\", textBuffer);\n    }\n    SDL_Log(\"Readers read %d total events\\n\", grand_total);\n}\n\n/* End FIFO test */\n/**************************************************************************/\n\nint\nmain(int argc, char *argv[])\n{\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    RunBasicTest();\n    RunEpicTest();\n/* This test is really slow, so don't run it by default */\n#if 0\n    RunFIFOTest(SDL_FALSE);\n#endif\n    RunFIFOTest(SDL_TRUE);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testaudiocapture.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include \"SDL.h\"\n\n#include <stdlib.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\nstatic SDL_Window *window = NULL;\nstatic SDL_Renderer *renderer = NULL;\nstatic SDL_AudioSpec spec;\nstatic SDL_AudioDeviceID devid_in = 0;\nstatic SDL_AudioDeviceID devid_out = 0;\n\nstatic void\nloop()\n{\n    SDL_bool please_quit = SDL_FALSE;\n    SDL_Event e;\n\n    while (SDL_PollEvent(&e)) {\n        if (e.type == SDL_QUIT) {\n            please_quit = SDL_TRUE;\n        } else if (e.type == SDL_KEYDOWN) {\n            if (e.key.keysym.sym == SDLK_ESCAPE) {\n                please_quit = SDL_TRUE;\n            }\n        } else if (e.type == SDL_MOUSEBUTTONDOWN) {\n            if (e.button.button == 1) {\n                SDL_PauseAudioDevice(devid_out, SDL_TRUE);\n                SDL_PauseAudioDevice(devid_in, SDL_FALSE);\n            }\n        } else if (e.type == SDL_MOUSEBUTTONUP) {\n            if (e.button.button == 1) {\n                SDL_PauseAudioDevice(devid_in, SDL_TRUE);\n                SDL_PauseAudioDevice(devid_out, SDL_FALSE);\n            }\n        }\n    }\n\n    if (SDL_GetAudioDeviceStatus(devid_in) == SDL_AUDIO_PLAYING) {\n        SDL_SetRenderDrawColor(renderer, 0, 255, 0, 255);\n    } else {\n        SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);\n    }\n    SDL_RenderClear(renderer);\n    SDL_RenderPresent(renderer);\n\n    if (please_quit) {\n        /* stop playing back, quit. */\n        SDL_Log(\"Shutting down.\\n\");\n        SDL_PauseAudioDevice(devid_in, 1);\n        SDL_CloseAudioDevice(devid_in);\n        SDL_PauseAudioDevice(devid_out, 1);\n        SDL_CloseAudioDevice(devid_out);\n        SDL_DestroyRenderer(renderer);\n        SDL_DestroyWindow(window);\n        SDL_Quit();\n        #ifdef __EMSCRIPTEN__\n        emscripten_cancel_main_loop();\n        #endif\n        exit(0);\n    }\n\n    /* Note that it would be easier to just have a one-line function that\n        calls SDL_QueueAudio() as a capture device callback, but we're\n        trying to test the API, so we use SDL_DequeueAudio() here. */\n    while (SDL_TRUE) {\n        Uint8 buf[1024];\n        const Uint32 br = SDL_DequeueAudio(devid_in, buf, sizeof (buf));\n        SDL_QueueAudio(devid_out, buf, br);\n        if (br < sizeof (buf)) {\n            break;\n        }\n    }\n}\n\nint\nmain(int argc, char **argv)\n{\n    /* (argv[1] == NULL means \"open default device.\") */\n    const char *devname = argv[1];\n    SDL_AudioSpec wanted;\n    int devcount;\n    int i;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    window = SDL_CreateWindow(\"testaudiocapture\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0);\n    renderer = SDL_CreateRenderer(window, -1, 0);\n    SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);\n    SDL_RenderClear(renderer);\n    SDL_RenderPresent(renderer);\n\n    SDL_Log(\"Using audio driver: %s\\n\", SDL_GetCurrentAudioDriver());\n\n    devcount = SDL_GetNumAudioDevices(SDL_TRUE);\n    for (i = 0; i < devcount; i++) {\n        SDL_Log(\" Capture device #%d: '%s'\\n\", i, SDL_GetAudioDeviceName(i, SDL_TRUE));\n    }\n\n    SDL_zero(wanted);\n    wanted.freq = 44100;\n    wanted.format = AUDIO_F32SYS;\n    wanted.channels = 1;\n    wanted.samples = 4096;\n    wanted.callback = NULL;\n\n    SDL_zero(spec);\n\n    /* DirectSound can fail in some instances if you open the same hardware\n       for both capture and output and didn't open the output end first,\n       according to the docs, so if you're doing something like this, always\n       open your capture devices second in case you land in those bizarre\n       circumstances. */\n\n    SDL_Log(\"Opening default playback device...\\n\");\n    devid_out = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wanted, &spec, SDL_AUDIO_ALLOW_ANY_CHANGE);\n    if (!devid_out) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open an audio device for playback: %s!\\n\", SDL_GetError());\n        SDL_Quit();\n        exit(1);\n    }\n\n    SDL_Log(\"Opening capture device %s%s%s...\\n\",\n            devname ? \"'\" : \"\",\n            devname ? devname : \"[[default]]\",\n            devname ? \"'\" : \"\");\n\n    devid_in = SDL_OpenAudioDevice(argv[1], SDL_TRUE, &spec, &spec, 0);\n    if (!devid_in) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open an audio device for capture: %s!\\n\", SDL_GetError());\n        SDL_Quit();\n        exit(1);\n    }\n\n    SDL_Log(\"Ready! Hold down mouse or finger to record!\\n\");\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (1) { loop(); SDL_Delay(16); }\n#endif\n\n    return 0;\n}\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testaudiohotplug.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Program to test hotplugging of audio devices */\n\n#include \"SDL_config.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#if HAVE_SIGNAL_H\n#include <signal.h>\n#endif\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\nstatic SDL_AudioSpec spec;\nstatic Uint8 *sound = NULL;     /* Pointer to wave data */\nstatic Uint32 soundlen = 0;     /* Length of wave data */\n\nstatic int posindex = 0;\nstatic Uint32 positions[64];\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nvoid SDLCALL\nfillerup(void *_pos, Uint8 * stream, int len)\n{\n    Uint32 pos = *((Uint32 *) _pos);\n    Uint8 *waveptr;\n    int waveleft;\n\n    /* Set up the pointers */\n    waveptr = sound + pos;\n    waveleft = soundlen - pos;\n\n    /* Go! */\n    while (waveleft <= len) {\n        SDL_memcpy(stream, waveptr, waveleft);\n        stream += waveleft;\n        len -= waveleft;\n        waveptr = sound;\n        waveleft = soundlen;\n        pos = 0;\n    }\n    SDL_memcpy(stream, waveptr, len);\n    pos += len;\n    *((Uint32 *) _pos) = pos;\n}\n\nstatic int done = 0;\nvoid\npoked(int sig)\n{\n    done = 1;\n}\n\nstatic const char*\ndevtypestr(int iscapture)\n{\n    return iscapture ? \"capture\" : \"output\";\n}\n\nstatic void\niteration()\n{\n    SDL_Event e;\n    SDL_AudioDeviceID dev;\n    while (SDL_PollEvent(&e)) {\n        if (e.type == SDL_QUIT) {\n            done = 1;\n        } else if (e.type == SDL_KEYUP) {\n            if (e.key.keysym.sym == SDLK_ESCAPE)\n                done = 1;\n        } else if (e.type == SDL_AUDIODEVICEADDED) {\n            int index = e.adevice.which;\n            int iscapture = e.adevice.iscapture;\n            const char *name = SDL_GetAudioDeviceName(index, iscapture);\n            if (name != NULL)\n                SDL_Log(\"New %s audio device at index %u: %s\\n\", devtypestr(iscapture), (unsigned int) index, name);\n            else {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Got new %s device at index %u, but failed to get the name: %s\\n\",\n                    devtypestr(iscapture), (unsigned int) index, SDL_GetError());\n                continue;\n            }\n            if (!iscapture) {\n                positions[posindex] = 0;\n                spec.userdata = &positions[posindex++];\n                spec.callback = fillerup;\n                dev = SDL_OpenAudioDevice(name, 0, &spec, NULL, 0);\n                if (!dev) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open '%s': %s\\n\", name, SDL_GetError());\n                } else {\n                    SDL_Log(\"Opened '%s' as %u\\n\", name, (unsigned int) dev);\n                    SDL_PauseAudioDevice(dev, 0);\n                }\n            }\n        } else if (e.type == SDL_AUDIODEVICEREMOVED) {\n            dev = (SDL_AudioDeviceID) e.adevice.which;\n            SDL_Log(\"%s device %u removed.\\n\", devtypestr(e.adevice.iscapture), (unsigned int) dev);\n            SDL_CloseAudioDevice(dev);\n        }\n    }\n}\n\n#ifdef __EMSCRIPTEN__\nvoid\nloop()\n{\n    if(done)\n        emscripten_cancel_main_loop();\n    else\n        iteration();\n}\n#endif\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    char filename[4096];\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    /* Some targets (Mac CoreAudio) need an event queue for audio hotplug, so make and immediately hide a window. */\n    SDL_MinimizeWindow(SDL_CreateWindow(\"testaudiohotplug\", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0));\n\n    if (argc > 1) {\n        SDL_strlcpy(filename, argv[1], sizeof(filename));\n    } else {\n        SDL_strlcpy(filename, \"sample.wav\", sizeof(filename));\n    }\n    /* Load the wave file into memory */\n    if (SDL_LoadWAV(filename, &spec, &sound, &soundlen) == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", filename, SDL_GetError());\n        quit(1);\n    }\n\n#if HAVE_SIGNAL_H\n    /* Set the signals */\n#ifdef SIGHUP\n    signal(SIGHUP, poked);\n#endif\n    signal(SIGINT, poked);\n#ifdef SIGQUIT\n    signal(SIGQUIT, poked);\n#endif\n    signal(SIGTERM, poked);\n#endif /* HAVE_SIGNAL_H */\n\n    /* Show the list of available drivers */\n    SDL_Log(\"Available audio drivers:\");\n    for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {\n        SDL_Log(\"%i: %s\", i, SDL_GetAudioDriver(i));\n    }\n\n    SDL_Log(\"Select a driver with the SDL_AUDIODRIVER environment variable.\\n\");\n    SDL_Log(\"Using audio driver: %s\\n\", SDL_GetCurrentAudioDriver());\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        SDL_Delay(100);\n        iteration();\n    }\n#endif\n\n    /* Clean up on signal */\n    /* Quit audio first, then free WAV. This prevents access violations in the audio threads. */\n    SDL_QuitSubSystem(SDL_INIT_AUDIO);\n    SDL_FreeWAV(sound);\n    SDL_Quit();\n    return (0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testaudioinfo.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdio.h>\n#include \"SDL.h\"\n\nstatic void\nprint_devices(int iscapture)\n{\n    const char *typestr = ((iscapture) ? \"capture\" : \"output\");\n    int n = SDL_GetNumAudioDevices(iscapture);\n\n    SDL_Log(\"Found %d %s device%s:\\n\", n, typestr, n != 1 ? \"s\" : \"\");\n\n    if (n == -1)\n        SDL_Log(\"  Driver can't detect specific %s devices.\\n\\n\", typestr);\n    else if (n == 0)\n        SDL_Log(\"  No %s devices found.\\n\\n\", typestr);\n    else {\n        int i;\n        for (i = 0; i < n; i++) {\n            const char *name = SDL_GetAudioDeviceName(i, iscapture);\n            if (name != NULL)\n                SDL_Log(\"  %d: %s\\n\", i, name);\n            else\n                SDL_Log(\"  %d Error: %s\\n\", i, SDL_GetError());\n        }\n        SDL_Log(\"\\n\");\n    }\n}\n\nint\nmain(int argc, char **argv)\n{\n    int n;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_AUDIO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    /* Print available audio drivers */\n    n = SDL_GetNumAudioDrivers();\n    if (n == 0) {\n        SDL_Log(\"No built-in audio drivers\\n\\n\");\n    } else {\n        int i;\n        SDL_Log(\"Built-in audio drivers:\\n\");\n        for (i = 0; i < n; ++i) {\n            SDL_Log(\"  %d: %s\\n\", i, SDL_GetAudioDriver(i));\n        }\n        SDL_Log(\"Select a driver with the SDL_AUDIODRIVER environment variable.\\n\");\n    }\n\n    SDL_Log(\"Using audio driver: %s\\n\\n\", SDL_GetCurrentAudioDriver());\n\n    print_devices(0);\n    print_devices(1);\n\n    SDL_Quit();\n    return 0;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n#include \"testautomation_suites.h\"\n\nstatic SDLTest_CommonState *state;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int result;\n    int testIterations = 1;\n    Uint64 userExecKey = 0;\n    char *userRunSeed = NULL;\n    char *filter = NULL;\n    int i, done;\n    SDL_Event event;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    /* Parse commandline */\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--iterations\") == 0) {\n                if (argv[i + 1]) {\n                    testIterations = SDL_atoi(argv[i + 1]);\n                    if (testIterations < 1) testIterations = 1;\n                    consumed = 2;\n                }\n            }\n            else if (SDL_strcasecmp(argv[i], \"--execKey\") == 0) {\n                if (argv[i + 1]) {\n                    SDL_sscanf(argv[i + 1], \"%\"SDL_PRIu64, (long long unsigned int *)&userExecKey);\n                    consumed = 2;\n                }\n            }\n            else if (SDL_strcasecmp(argv[i], \"--seed\") == 0) {\n                if (argv[i + 1]) {\n                    userRunSeed = SDL_strdup(argv[i + 1]);\n                    consumed = 2;\n                }\n            }\n            else if (SDL_strcasecmp(argv[i], \"--filter\") == 0) {\n                if (argv[i + 1]) {\n                    filter = SDL_strdup(argv[i + 1]);\n                    consumed = 2;\n                }\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--iterations #]\", \"[--execKey #]\", \"[--seed string]\", \"[--filter suite_name|test_name]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n\n        i += consumed;\n    }\n\n    /* Initialize common state */\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    /* Create the windows, initialize the renderers */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    /* Call Harness */\n    result = SDLTest_RunSuites(testSuites, (const char *)userRunSeed, userExecKey, (const char *)filter, testIterations);\n\n    /* Empty event queue */\n    done = 0;\n    for (i=0; i<100; i++)  {\n      while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n      }\n      SDL_Delay(10);\n    }\n\n    /* Clean up */\n    SDL_free(userRunSeed);\n    SDL_free(filter);\n\n    /* Shutdown everything */\n    quit(result);\n    return(result);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_audio.c",
    "content": "/**\n * Original code: automated SDL audio test written by Edgar Simo \"bobbens\"\n * New/updated tests: aschiffler at ferzkopp dot net\n */\n\n/* quiet windows compiler warnings */\n#define _CRT_SECURE_NO_WARNINGS\n\n#include <stdio.h>\n#include <string.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Fixture */\n\nvoid\n_audioSetUp(void *arg)\n{\n    /* Start SDL audio subsystem */\n    int ret = SDL_InitSubSystem( SDL_INIT_AUDIO );\n        SDLTest_AssertPass(\"Call to SDL_InitSubSystem(SDL_INIT_AUDIO)\");\n    SDLTest_AssertCheck(ret==0, \"Check result from SDL_InitSubSystem(SDL_INIT_AUDIO)\");\n    if (ret != 0) {\n           SDLTest_LogError(\"%s\", SDL_GetError());\n        }\n}\n\nvoid\n_audioTearDown(void *arg)\n{\n    /* Remove a possibly created file from SDL disk writer audio driver; ignore errors */\n    remove(\"sdlaudio.raw\");\n\n    SDLTest_AssertPass(\"Cleanup of test files completed\");\n}\n\n\n/* Global counter for callback invocation */\nint _audio_testCallbackCounter;\n\n/* Global accumulator for total callback length */\nint _audio_testCallbackLength;\n\n\n/* Test callback function */\nvoid SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len)\n{\n   /* track that callback was called */\n   _audio_testCallbackCounter++;\n   _audio_testCallbackLength += len;\n}\n\n\n/* Test case functions */\n\n/**\n * \\brief Stop and restart audio subsystem\n *\n * \\sa https://wiki.libsdl.org/SDL_QuitSubSystem\n * \\sa https://wiki.libsdl.org/SDL_InitSubSystem\n */\nint audio_quitInitAudioSubSystem()\n{\n    /* Stop SDL audio subsystem */\n    SDL_QuitSubSystem( SDL_INIT_AUDIO );\n        SDLTest_AssertPass(\"Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)\");\n\n        /* Restart audio again */\n        _audioSetUp(NULL);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Start and stop audio directly\n *\n * \\sa https://wiki.libsdl.org/SDL_InitAudio\n * \\sa https://wiki.libsdl.org/SDL_QuitAudio\n */\nint audio_initQuitAudio()\n{\n        int result;\n    int i, iMax;\n    const char* audioDriver;\n\n    /* Stop SDL audio subsystem */\n    SDL_QuitSubSystem( SDL_INIT_AUDIO );\n        SDLTest_AssertPass(\"Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)\");\n\n        /* Loop over all available audio drivers */\n        iMax = SDL_GetNumAudioDrivers();\n        SDLTest_AssertPass(\"Call to SDL_GetNumAudioDrivers()\");\n        SDLTest_AssertCheck(iMax > 0, \"Validate number of audio drivers; expected: >0 got: %d\", iMax);\n        for (i = 0; i < iMax; i++) {\n            audioDriver = SDL_GetAudioDriver(i);\n            SDLTest_AssertPass(\"Call to SDL_GetAudioDriver(%d)\", i);\n            SDLTest_AssertCheck(audioDriver != NULL, \"Audio driver name is not NULL\");\n            SDLTest_AssertCheck(audioDriver[0] != '\\0', \"Audio driver name is not empty; got: %s\", audioDriver);\n\n            /* Call Init */\n            result = SDL_AudioInit(audioDriver);\n            SDLTest_AssertPass(\"Call to SDL_AudioInit('%s')\", audioDriver);\n            SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0 got: %d\", result);\n\n            /* Call Quit */\n            SDL_AudioQuit();\n            SDLTest_AssertPass(\"Call to SDL_AudioQuit()\");\n    }\n\n    /* NULL driver specification */\n    audioDriver = NULL;\n\n    /* Call Init */\n    result = SDL_AudioInit(audioDriver);\n    SDLTest_AssertPass(\"Call to SDL_AudioInit(NULL)\");\n    SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0 got: %d\", result);\n\n    /* Call Quit */\n    SDL_AudioQuit();\n    SDLTest_AssertPass(\"Call to SDL_AudioQuit()\");\n\n        /* Restart audio again */\n        _audioSetUp(NULL);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Start, open, close and stop audio\n *\n * \\sa https://wiki.libsdl.org/SDL_InitAudio\n * \\sa https://wiki.libsdl.org/SDL_OpenAudio\n * \\sa https://wiki.libsdl.org/SDL_CloseAudio\n * \\sa https://wiki.libsdl.org/SDL_QuitAudio\n */\nint audio_initOpenCloseQuitAudio()\n{\n    int result, expectedResult;\n    int i, iMax, j, k;\n    const char* audioDriver;\n    SDL_AudioSpec desired;\n\n    /* Stop SDL audio subsystem */\n    SDL_QuitSubSystem( SDL_INIT_AUDIO );\n        SDLTest_AssertPass(\"Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)\");\n\n        /* Loop over all available audio drivers */\n        iMax = SDL_GetNumAudioDrivers();\n        SDLTest_AssertPass(\"Call to SDL_GetNumAudioDrivers()\");\n        SDLTest_AssertCheck(iMax > 0, \"Validate number of audio drivers; expected: >0 got: %d\", iMax);\n        for (i = 0; i < iMax; i++) {\n            audioDriver = SDL_GetAudioDriver(i);\n            SDLTest_AssertPass(\"Call to SDL_GetAudioDriver(%d)\", i);\n            SDLTest_AssertCheck(audioDriver != NULL, \"Audio driver name is not NULL\");\n            SDLTest_AssertCheck(audioDriver[0] != '\\0', \"Audio driver name is not empty; got: %s\", audioDriver);\n\n            /* Change specs */\n            for (j = 0; j < 2; j++) {\n\n                /* Call Init */\n                result = SDL_AudioInit(audioDriver);\n                SDLTest_AssertPass(\"Call to SDL_AudioInit('%s')\", audioDriver);\n                SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0 got: %d\", result);\n\n                /* Set spec */\n                SDL_memset(&desired, 0, sizeof(desired));\n                switch (j) {\n                    case 0:\n                    /* Set standard desired spec */\n                    desired.freq = 22050;\n                    desired.format = AUDIO_S16SYS;\n                    desired.channels = 2;\n                    desired.samples = 4096;\n                    desired.callback = _audio_testCallback;\n                    desired.userdata = NULL;\n\n                    case 1:\n                    /* Set custom desired spec */\n                    desired.freq = 48000;\n                    desired.format = AUDIO_F32SYS;\n                    desired.channels = 2;\n                    desired.samples = 2048;\n                    desired.callback = _audio_testCallback;\n                    desired.userdata = NULL;\n                    break;\n            }\n\n            /* Call Open (maybe multiple times) */\n            for (k=0; k <= j; k++) {\n                result = SDL_OpenAudio(&desired, NULL);\n                SDLTest_AssertPass(\"Call to SDL_OpenAudio(desired_spec_%d, NULL), call %d\", j, k+1);\n                expectedResult = (k==0) ? 0 : -1;\n                SDLTest_AssertCheck(result == expectedResult, \"Verify return value; expected: %d, got: %d\", expectedResult, result);\n            }\n\n            /* Call Close (maybe multiple times) */\n            for (k=0; k <= j; k++) {\n                SDL_CloseAudio();\n                SDLTest_AssertPass(\"Call to SDL_CloseAudio(), call %d\", k+1);\n            }\n\n            /* Call Quit (maybe multiple times) */\n            for (k=0; k <= j; k++) {\n                SDL_AudioQuit();\n                SDLTest_AssertPass(\"Call to SDL_AudioQuit(), call %d\", k+1);\n            }\n\n        } /* spec loop */\n    } /* driver loop */\n\n        /* Restart audio again */\n        _audioSetUp(NULL);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Pause and unpause audio\n *\n * \\sa https://wiki.libsdl.org/SDL_PauseAudio\n */\nint audio_pauseUnpauseAudio()\n{\n    int result;\n    int i, iMax, j, k, l;\n    int totalDelay;\n    int pause_on;\n    int originalCounter;\n    const char* audioDriver;\n    SDL_AudioSpec desired;\n\n    /* Stop SDL audio subsystem */\n    SDL_QuitSubSystem( SDL_INIT_AUDIO );\n        SDLTest_AssertPass(\"Call to SDL_QuitSubSystem(SDL_INIT_AUDIO)\");\n\n        /* Loop over all available audio drivers */\n        iMax = SDL_GetNumAudioDrivers();\n        SDLTest_AssertPass(\"Call to SDL_GetNumAudioDrivers()\");\n        SDLTest_AssertCheck(iMax > 0, \"Validate number of audio drivers; expected: >0 got: %d\", iMax);\n        for (i = 0; i < iMax; i++) {\n            audioDriver = SDL_GetAudioDriver(i);\n            SDLTest_AssertPass(\"Call to SDL_GetAudioDriver(%d)\", i);\n            SDLTest_AssertCheck(audioDriver != NULL, \"Audio driver name is not NULL\");\n            SDLTest_AssertCheck(audioDriver[0] != '\\0', \"Audio driver name is not empty; got: %s\", audioDriver);\n\n            /* Change specs */\n            for (j = 0; j < 2; j++) {\n\n                /* Call Init */\n                result = SDL_AudioInit(audioDriver);\n                SDLTest_AssertPass(\"Call to SDL_AudioInit('%s')\", audioDriver);\n                SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0 got: %d\", result);\n\n                /* Set spec */\n                SDL_memset(&desired, 0, sizeof(desired));\n                switch (j) {\n                    case 0:\n                    /* Set standard desired spec */\n                    desired.freq = 22050;\n                    desired.format = AUDIO_S16SYS;\n                    desired.channels = 2;\n                    desired.samples = 4096;\n                    desired.callback = _audio_testCallback;\n                    desired.userdata = NULL;\n\n                    case 1:\n                    /* Set custom desired spec */\n                    desired.freq = 48000;\n                    desired.format = AUDIO_F32SYS;\n                    desired.channels = 2;\n                    desired.samples = 2048;\n                    desired.callback = _audio_testCallback;\n                    desired.userdata = NULL;\n                    break;\n            }\n\n            /* Call Open */\n            result = SDL_OpenAudio(&desired, NULL);\n            SDLTest_AssertPass(\"Call to SDL_OpenAudio(desired_spec_%d, NULL)\", j);\n            SDLTest_AssertCheck(result == 0, \"Verify return value; expected: 0 got: %d\", result);\n\n            /* Start and stop audio multiple times */\n            for (l=0; l<3; l++) {\n                SDLTest_Log(\"Pause/Unpause iteration: %d\", l+1);\n            \n                /* Reset callback counters */\n                _audio_testCallbackCounter = 0;\n                _audio_testCallbackLength = 0;\n\n                /* Un-pause audio to start playing (maybe multiple times) */\n                pause_on = 0;\n                for (k=0; k <= j; k++) {\n                    SDL_PauseAudio(pause_on);\n                    SDLTest_AssertPass(\"Call to SDL_PauseAudio(%d), call %d\", pause_on, k+1);\n                }\n            \n                /* Wait for callback */\n                totalDelay = 0;\n                do {\n                    SDL_Delay(10);\n                    totalDelay += 10;\n                } \n                while (_audio_testCallbackCounter == 0 && totalDelay < 1000);\n                SDLTest_AssertCheck(_audio_testCallbackCounter > 0, \"Verify callback counter; expected: >0 got: %d\", _audio_testCallbackCounter);\n                SDLTest_AssertCheck(_audio_testCallbackLength > 0, \"Verify callback length; expected: >0 got: %d\", _audio_testCallbackLength);\n\n                /* Pause audio to stop playing (maybe multiple times) */\n                for (k=0; k <= j; k++) {\n                    pause_on = (k==0) ? 1 : SDLTest_RandomIntegerInRange(99, 9999);\n                    SDL_PauseAudio(pause_on);\n                    SDLTest_AssertPass(\"Call to SDL_PauseAudio(%d), call %d\", pause_on, k+1);\n                }\n            \n                /* Ensure callback is not called again */\n                originalCounter = _audio_testCallbackCounter;\n                SDL_Delay(totalDelay + 10);\n                SDLTest_AssertCheck(originalCounter == _audio_testCallbackCounter, \"Verify callback counter; expected: %d, got: %d\", originalCounter, _audio_testCallbackCounter);\n            }\n\n            /* Call Close */\n            SDL_CloseAudio();\n            SDLTest_AssertPass(\"Call to SDL_CloseAudio()\");\n\n            /* Call Quit */\n            SDL_AudioQuit();\n            SDLTest_AssertPass(\"Call to SDL_AudioQuit()\");\n\n        } /* spec loop */\n    } /* driver loop */\n\n    /* Restart audio again */\n    _audioSetUp(NULL);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Enumerate and name available audio devices (output and capture).\n *\n * \\sa https://wiki.libsdl.org/SDL_GetNumAudioDevices\n * \\sa https://wiki.libsdl.org/SDL_GetAudioDeviceName\n */\nint audio_enumerateAndNameAudioDevices()\n{\n   int t, tt;\n   int i, n, nn;\n   const char *name, *nameAgain;\n\n   /* Iterate over types: t=0 output device, t=1 input/capture device */\n   for (t=0; t<2; t++) {\n\n      /* Get number of devices. */\n      n = SDL_GetNumAudioDevices(t);\n      SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(%i)\", t);\n      SDLTest_Log(\"Number of %s devices < 0, reported as %i\", (t) ? \"capture\" : \"output\", n);\n      SDLTest_AssertCheck(n >= 0, \"Validate result is >= 0, got: %i\", n);\n\n      /* Variation of non-zero type */\n      if (t==1) {\n         tt = t + SDLTest_RandomIntegerInRange(1,10);\n         nn = SDL_GetNumAudioDevices(tt);\n         SDLTest_AssertCheck(n==nn, \"Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i\", tt, n, nn);\n         nn = SDL_GetNumAudioDevices(-tt);\n         SDLTest_AssertCheck(n==nn, \"Verify result from SDL_GetNumAudioDevices(%i), expected same number of audio devices %i, got %i\", -tt, n, nn);\n      }\n\n      /* List devices. */\n      if (n>0) {\n         for (i=0; i<n; i++) {\n            name = SDL_GetAudioDeviceName(i, t);\n            SDLTest_AssertPass(\"Call to SDL_GetAudioDeviceName(%i, %i)\", i, t);\n            SDLTest_AssertCheck(name != NULL, \"Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL\", i, t);\n            if (name != NULL) {\n              SDLTest_AssertCheck(name[0] != '\\0', \"verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'\", i, t, name);\n              if (t==1) {\n                  /* Also try non-zero type */\n                  tt = t + SDLTest_RandomIntegerInRange(1,10);\n                  nameAgain = SDL_GetAudioDeviceName(i, tt);\n                  SDLTest_AssertCheck(nameAgain != NULL, \"Verify result from SDL_GetAudioDeviceName(%i, %i) is not NULL\", i, tt);\n                  if (nameAgain != NULL) {\n                    SDLTest_AssertCheck(nameAgain[0] != '\\0', \"Verify result from SDL_GetAudioDeviceName(%i, %i) is not empty, got: '%s'\", i, tt, nameAgain);\n                    SDLTest_AssertCheck(SDL_strcmp(name, nameAgain)==0,\n                      \"Verify SDL_GetAudioDeviceName(%i, %i) and SDL_GetAudioDeviceName(%i %i) return the same string\",\n                      i, t, i, tt);\n                  }\n               }\n            }\n         }\n      }\n   }\n\n   return TEST_COMPLETED;\n}\n\n/**\n * \\brief Negative tests around enumeration and naming of audio devices.\n *\n * \\sa https://wiki.libsdl.org/SDL_GetNumAudioDevices\n * \\sa https://wiki.libsdl.org/SDL_GetAudioDeviceName\n */\nint audio_enumerateAndNameAudioDevicesNegativeTests()\n{\n   int t;\n   int i, j, no, nc;\n   const char *name;\n\n   /* Get number of devices. */\n   no = SDL_GetNumAudioDevices(0);\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(0)\");\n   nc = SDL_GetNumAudioDevices(1);\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(1)\");\n\n   /* Invalid device index when getting name */\n   for (t=0; t<2; t++) {\n      /* Negative device index */\n      i = SDLTest_RandomIntegerInRange(-10,-1);\n      name = SDL_GetAudioDeviceName(i, t);\n      SDLTest_AssertPass(\"Call to SDL_GetAudioDeviceName(%i, %i)\", i, t);\n      SDLTest_AssertCheck(name == NULL, \"Check SDL_GetAudioDeviceName(%i, %i) result NULL, expected NULL, got: %s\", i, t, (name == NULL) ? \"NULL\" : name);\n\n      /* Device index past range */\n      for (j=0; j<3; j++) {\n         i = (t) ? nc+j : no+j;\n         name = SDL_GetAudioDeviceName(i, t);\n         SDLTest_AssertPass(\"Call to SDL_GetAudioDeviceName(%i, %i)\", i, t);\n         SDLTest_AssertCheck(name == NULL, \"Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s\", i, t, (name == NULL) ? \"NULL\" : name);\n      }\n\n      /* Capture index past capture range but within output range */\n      if ((no>0) && (no>nc) && (t==1)) {\n         i = no-1;\n         name = SDL_GetAudioDeviceName(i, t);\n         SDLTest_AssertPass(\"Call to SDL_GetAudioDeviceName(%i, %i)\", i, t);\n         SDLTest_AssertCheck(name == NULL, \"Check SDL_GetAudioDeviceName(%i, %i) result, expected: NULL, got: %s\", i, t, (name == NULL) ? \"NULL\" : name);\n      }\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * \\brief Checks available audio driver names.\n *\n * \\sa https://wiki.libsdl.org/SDL_GetNumAudioDrivers\n * \\sa https://wiki.libsdl.org/SDL_GetAudioDriver\n */\nint audio_printAudioDrivers()\n{\n   int i, n;\n   const char *name;\n\n   /* Get number of drivers */\n   n = SDL_GetNumAudioDrivers();\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDrivers()\");\n   SDLTest_AssertCheck(n>=0, \"Verify number of audio drivers >= 0, got: %i\", n);\n\n   /* List drivers. */\n   if (n>0)\n   {\n      for (i=0; i<n; i++) {\n         name = SDL_GetAudioDriver(i);\n         SDLTest_AssertPass(\"Call to SDL_GetAudioDriver(%i)\", i);\n         SDLTest_AssertCheck(name != NULL, \"Verify returned name is not NULL\");\n         if (name != NULL) {\n            SDLTest_AssertCheck(name[0] != '\\0', \"Verify returned name is not empty, got: '%s'\", name);\n         }\n      }\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * \\brief Checks current audio driver name with initialized audio.\n *\n * \\sa https://wiki.libsdl.org/SDL_GetCurrentAudioDriver\n */\nint audio_printCurrentAudioDriver()\n{\n   /* Check current audio driver */\n   const char *name = SDL_GetCurrentAudioDriver();\n   SDLTest_AssertPass(\"Call to SDL_GetCurrentAudioDriver()\");\n   SDLTest_AssertCheck(name != NULL, \"Verify returned name is not NULL\");\n   if (name != NULL) {\n      SDLTest_AssertCheck(name[0] != '\\0', \"Verify returned name is not empty, got: '%s'\", name);\n   }\n\n   return TEST_COMPLETED;\n}\n\n/* Definition of all formats, channels, and frequencies used to test audio conversions */\nconst int _numAudioFormats = 18;\nSDL_AudioFormat _audioFormats[] = { AUDIO_S8, AUDIO_U8, AUDIO_S16LSB, AUDIO_S16MSB, AUDIO_S16SYS, AUDIO_S16, AUDIO_U16LSB,\n                AUDIO_U16MSB, AUDIO_U16SYS, AUDIO_U16, AUDIO_S32LSB, AUDIO_S32MSB, AUDIO_S32SYS, AUDIO_S32,\n                                AUDIO_F32LSB, AUDIO_F32MSB, AUDIO_F32SYS, AUDIO_F32 };\nchar *_audioFormatsVerbose[] = { \"AUDIO_S8\", \"AUDIO_U8\", \"AUDIO_S16LSB\", \"AUDIO_S16MSB\", \"AUDIO_S16SYS\", \"AUDIO_S16\", \"AUDIO_U16LSB\",\n                \"AUDIO_U16MSB\", \"AUDIO_U16SYS\", \"AUDIO_U16\", \"AUDIO_S32LSB\", \"AUDIO_S32MSB\", \"AUDIO_S32SYS\", \"AUDIO_S32\",\n                                \"AUDIO_F32LSB\", \"AUDIO_F32MSB\", \"AUDIO_F32SYS\", \"AUDIO_F32\" };\nconst int _numAudioChannels = 4;\nUint8 _audioChannels[] = { 1, 2, 4, 6 };\nconst int _numAudioFrequencies = 4;\nint _audioFrequencies[] = { 11025, 22050, 44100, 48000 };\n\n\n/**\n * \\brief Builds various audio conversion structures\n *\n * \\sa https://wiki.libsdl.org/SDL_BuildAudioCVT\n */\nint audio_buildAudioCVT()\n{\n  int result;\n  SDL_AudioCVT  cvt;\n  SDL_AudioSpec spec1;\n  SDL_AudioSpec spec2;\n  int i, ii, j, jj, k, kk;\n\n  /* No conversion needed */\n  spec1.format = AUDIO_S16LSB;\n  spec1.channels = 2;\n  spec1.freq = 22050;\n  result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,\n                                   spec1.format, spec1.channels, spec1.freq);\n  SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(spec1 ==> spec1)\");\n  SDLTest_AssertCheck(result == 0, \"Verify result value; expected: 0, got: %i\", result);\n\n  /* Typical conversion */\n  spec1.format = AUDIO_S8;\n  spec1.channels = 1;\n  spec1.freq = 22050;\n  spec2.format = AUDIO_S16LSB;\n  spec2.channels = 2;\n  spec2.freq = 44100;\n  result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,\n                                   spec2.format, spec2.channels, spec2.freq);\n  SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(spec1 ==> spec2)\");\n  SDLTest_AssertCheck(result == 1, \"Verify result value; expected: 1, got: %i\", result);\n\n  /* All source conversions with random conversion targets, allow 'null' conversions */\n  for (i = 0; i < _numAudioFormats; i++) {\n    for (j = 0; j < _numAudioChannels; j++) {\n      for (k = 0; k < _numAudioFrequencies; k++) {\n        spec1.format = _audioFormats[i];\n        spec1.channels = _audioChannels[j];\n        spec1.freq = _audioFrequencies[k];\n        ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1);\n        jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1);\n        kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1);\n        spec2.format = _audioFormats[ii];\n        spec2.channels = _audioChannels[jj];\n        spec2.freq = _audioFrequencies[kk];\n        result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,\n                                         spec2.format, spec2.channels, spec2.freq);\n        SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)\",\n            i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);\n        SDLTest_AssertCheck(result == 0 || result == 1, \"Verify result value; expected: 0 or 1, got: %i\", result);\n        if (result<0) {\n          SDLTest_LogError(\"%s\", SDL_GetError());\n        } else {\n          SDLTest_AssertCheck(cvt.len_mult > 0, \"Verify that cvt.len_mult value; expected: >0, got: %i\", cvt.len_mult);\n        }\n      }\n    }\n  }\n\n   return TEST_COMPLETED;\n}\n\n/**\n * \\brief Checkes calls with invalid input to SDL_BuildAudioCVT\n *\n * \\sa https://wiki.libsdl.org/SDL_BuildAudioCVT\n */\nint audio_buildAudioCVTNegative()\n{\n  const char *expectedError = \"Parameter 'cvt' is invalid\";\n  const char *error;\n  int result;\n  SDL_AudioCVT  cvt;\n  SDL_AudioSpec spec1;\n  SDL_AudioSpec spec2;\n  int i;\n  char message[256];\n\n  /* Valid format */\n  spec1.format = AUDIO_S8;\n  spec1.channels = 1;\n  spec1.freq = 22050;\n  spec2.format = AUDIO_S16LSB;\n  spec2.channels = 2;\n  spec2.freq = 44100;\n\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n  /* NULL input for CVT buffer */\n  result = SDL_BuildAudioCVT((SDL_AudioCVT *)NULL, spec1.format, spec1.channels, spec1.freq,\n                                                   spec2.format, spec2.channels, spec2.freq);\n  SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(NULL,...)\");\n  SDLTest_AssertCheck(result == -1, \"Verify result value; expected: -1, got: %i\", result);\n  error = SDL_GetError();\n  SDLTest_AssertPass(\"Call to SDL_GetError()\");\n  SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n  if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n  }\n\n  /* Invalid conversions */\n  for (i = 1; i < 64; i++) {\n    /* Valid format to start with */\n    spec1.format = AUDIO_S8;\n    spec1.channels = 1;\n    spec1.freq = 22050;\n    spec2.format = AUDIO_S16LSB;\n    spec2.channels = 2;\n    spec2.freq = 44100;\n\n    SDL_ClearError();\n    SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n    /* Set various invalid format inputs */\n    SDL_strlcpy(message, \"Invalid: \", 256);\n    if (i & 1) {\n        SDL_strlcat(message, \" spec1.format\", 256);\n        spec1.format = 0;\n    }\n    if (i & 2) {\n        SDL_strlcat(message, \" spec1.channels\", 256);\n        spec1.channels = 0;\n    }\n    if (i & 4) {\n        SDL_strlcat(message, \" spec1.freq\", 256);\n        spec1.freq = 0;\n    }\n    if (i & 8) {\n        SDL_strlcat(message, \" spec2.format\", 256);\n        spec2.format = 0;\n    }\n    if (i & 16) {\n        SDL_strlcat(message, \" spec2.channels\", 256);\n        spec2.channels = 0;\n    }\n    if (i & 32) {\n        SDL_strlcat(message, \" spec2.freq\", 256);\n        spec2.freq = 0;\n    }\n    SDLTest_Log(\"%s\", message);\n    result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,\n                                   spec2.format, spec2.channels, spec2.freq);\n    SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(spec1 ==> spec2)\");\n    SDLTest_AssertCheck(result == -1, \"Verify result value; expected: -1, got: %i\", result);\n    error = SDL_GetError();\n    SDLTest_AssertPass(\"Call to SDL_GetError()\");\n    SDLTest_AssertCheck(error != NULL && error[0] != '\\0', \"Validate that error message was not NULL or empty\");\n  }\n\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/**\n * \\brief Checks current audio status.\n *\n * \\sa https://wiki.libsdl.org/SDL_GetAudioStatus\n */\nint audio_getAudioStatus()\n{\n   SDL_AudioStatus result;\n\n   /* Check current audio status */\n   result = SDL_GetAudioStatus();\n   SDLTest_AssertPass(\"Call to SDL_GetAudioStatus()\");\n   SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED,\n        \"Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i\",\n        SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result);\n\n   return TEST_COMPLETED;\n}\n\n\n\n/**\n * \\brief Opens, checks current audio status, and closes a device.\n *\n * \\sa https://wiki.libsdl.org/SDL_GetAudioStatus\n */\nint audio_openCloseAndGetAudioStatus()\n{\n   SDL_AudioStatus result;\n   int i;\n   int count;\n   char *device;\n   SDL_AudioDeviceID id;\n   SDL_AudioSpec desired, obtained;\n\n   /* Get number of devices. */\n   count = SDL_GetNumAudioDevices(0);\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(0)\");\n   if (count > 0) {\n     for (i = 0; i < count; i++) {\n       /* Get device name */\n       device = (char *)SDL_GetAudioDeviceName(i, 0);\n       SDLTest_AssertPass(\"SDL_GetAudioDeviceName(%i,0)\", i);\n       SDLTest_AssertCheck(device != NULL, \"Validate device name is not NULL; got: %s\", (device != NULL) ? device : \"NULL\");\n       if (device == NULL) return TEST_ABORTED;\n\n       /* Set standard desired spec */\n       desired.freq=22050;\n       desired.format=AUDIO_S16SYS;\n       desired.channels=2;\n       desired.samples=4096;\n       desired.callback=_audio_testCallback;\n       desired.userdata=NULL;\n\n       /* Open device */\n       id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);\n       SDLTest_AssertPass(\"SDL_OpenAudioDevice('%s',...)\", device);\n       SDLTest_AssertCheck(id > 1, \"Validate device ID; expected: >=2, got: %i\", id);\n       if (id > 1) {\n\n         /* Check device audio status */\n         result = SDL_GetAudioDeviceStatus(id);\n         SDLTest_AssertPass(\"Call to SDL_GetAudioDeviceStatus()\");\n         SDLTest_AssertCheck(result == SDL_AUDIO_STOPPED || result == SDL_AUDIO_PLAYING || result == SDL_AUDIO_PAUSED,\n            \"Verify returned value; expected: STOPPED (%i) | PLAYING (%i) | PAUSED (%i), got: %i\",\n            SDL_AUDIO_STOPPED, SDL_AUDIO_PLAYING, SDL_AUDIO_PAUSED, result);\n\n         /* Close device again */\n         SDL_CloseAudioDevice(id);\n         SDLTest_AssertPass(\"Call to SDL_CloseAudioDevice()\");\n       }\n     }\n   } else {\n     SDLTest_Log(\"No devices to test with\");\n   }\n\n   return TEST_COMPLETED;\n}\n\n/**\n * \\brief Locks and unlocks open audio device.\n *\n * \\sa https://wiki.libsdl.org/SDL_LockAudioDevice\n * \\sa https://wiki.libsdl.org/SDL_UnlockAudioDevice\n */\nint audio_lockUnlockOpenAudioDevice()\n{\n   int i;\n   int count;\n   char *device;\n   SDL_AudioDeviceID id;\n   SDL_AudioSpec desired, obtained;\n\n   /* Get number of devices. */\n   count = SDL_GetNumAudioDevices(0);\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(0)\");\n   if (count > 0) {\n     for (i = 0; i < count; i++) {\n       /* Get device name */\n       device = (char *)SDL_GetAudioDeviceName(i, 0);\n       SDLTest_AssertPass(\"SDL_GetAudioDeviceName(%i,0)\", i);\n       SDLTest_AssertCheck(device != NULL, \"Validate device name is not NULL; got: %s\", (device != NULL) ? device : \"NULL\");\n       if (device == NULL) return TEST_ABORTED;\n\n       /* Set standard desired spec */\n       desired.freq=22050;\n       desired.format=AUDIO_S16SYS;\n       desired.channels=2;\n       desired.samples=4096;\n       desired.callback=_audio_testCallback;\n       desired.userdata=NULL;\n\n       /* Open device */\n       id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);\n       SDLTest_AssertPass(\"SDL_OpenAudioDevice('%s',...)\", device);\n       SDLTest_AssertCheck(id > 1, \"Validate device ID; expected: >=2, got: %i\", id);\n       if (id > 1) {\n         /* Lock to protect callback */\n         SDL_LockAudioDevice(id);\n         SDLTest_AssertPass(\"SDL_LockAudioDevice(%i)\", id);\n\n         /* Simulate callback processing */\n         SDL_Delay(10);\n         SDLTest_Log(\"Simulate callback processing - delay\");\n\n         /* Unlock again */\n         SDL_UnlockAudioDevice(id);\n         SDLTest_AssertPass(\"SDL_UnlockAudioDevice(%i)\", id);\n\n         /* Close device again */\n         SDL_CloseAudioDevice(id);\n         SDLTest_AssertPass(\"Call to SDL_CloseAudioDevice()\");\n       }\n     }\n   } else {\n     SDLTest_Log(\"No devices to test with\");\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * \\brief Convert audio using various conversion structures\n *\n * \\sa https://wiki.libsdl.org/SDL_BuildAudioCVT\n * \\sa https://wiki.libsdl.org/SDL_ConvertAudio\n */\nint audio_convertAudio()\n{\n  int result;\n  SDL_AudioCVT  cvt;\n  SDL_AudioSpec spec1;\n  SDL_AudioSpec spec2;\n  int c;\n  char message[128];\n  int i, ii, j, jj, k, kk, l, ll;\n\n  /* Iterate over bitmask that determines which parameters are modified in the conversion */\n  for (c = 1; c < 8; c++) {\n    SDL_strlcpy(message, \"Changing:\", 128);\n    if (c & 1) {\n      SDL_strlcat(message, \" Format\", 128);\n    }\n    if (c & 2) {\n      SDL_strlcat(message, \" Channels\", 128);\n    }\n    if (c & 4) {\n      SDL_strlcat(message, \" Frequencies\", 128);\n    }\n    SDLTest_Log(\"%s\", message);\n    /* All source conversions with random conversion targets */\n    for (i = 0; i < _numAudioFormats; i++) {\n      for (j = 0; j < _numAudioChannels; j++) {\n        for (k = 0; k < _numAudioFrequencies; k++) {\n          spec1.format = _audioFormats[i];\n          spec1.channels = _audioChannels[j];\n          spec1.freq = _audioFrequencies[k];\n\n          /* Ensure we have a different target format */\n          do {\n            if (c & 1) {\n              ii = SDLTest_RandomIntegerInRange(0, _numAudioFormats - 1);\n            } else {\n              ii = 1;\n            }\n            if (c & 2) {\n              jj = SDLTest_RandomIntegerInRange(0, _numAudioChannels - 1);\n            } else {\n              jj= j;\n            }\n            if (c & 4) {\n              kk = SDLTest_RandomIntegerInRange(0, _numAudioFrequencies - 1);\n            } else {\n              kk = k;\n            }\n          } while ((i == ii) && (j == jj) && (k == kk));\n          spec2.format = _audioFormats[ii];\n          spec2.channels = _audioChannels[jj];\n          spec2.freq = _audioFrequencies[kk];\n\n          result = SDL_BuildAudioCVT(&cvt, spec1.format, spec1.channels, spec1.freq,\n                                           spec2.format, spec2.channels, spec2.freq);\n          SDLTest_AssertPass(\"Call to SDL_BuildAudioCVT(format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i ==> format[%i]=%s(%i),channels[%i]=%i,freq[%i]=%i)\",\n            i, _audioFormatsVerbose[i], spec1.format, j, spec1.channels, k, spec1.freq, ii, _audioFormatsVerbose[ii], spec2.format, jj, spec2.channels, kk, spec2.freq);\n          SDLTest_AssertCheck(result == 1, \"Verify result value; expected: 1, got: %i\", result);\n          if (result != 1) {\n            SDLTest_LogError(\"%s\", SDL_GetError());\n          } else {\n            SDLTest_AssertCheck(cvt.len_mult > 0, \"Verify that cvt.len_mult value; expected: >0, got: %i\", cvt.len_mult);\n            if (cvt.len_mult < 1) return TEST_ABORTED;\n\n            /* Create some random data to convert */\n            l = 64;\n            ll = l * cvt.len_mult;\n            SDLTest_Log(\"Creating dummy sample buffer of %i length (%i bytes)\", l, ll);\n            cvt.len = l;\n            cvt.buf = (Uint8 *)SDL_malloc(ll);\n            SDLTest_AssertCheck(cvt.buf != NULL, \"Check data buffer to convert is not NULL\");\n            if (cvt.buf == NULL) return TEST_ABORTED;\n\n            /* Convert the data */\n            result = SDL_ConvertAudio(&cvt);\n            SDLTest_AssertPass(\"Call to SDL_ConvertAudio()\");\n            SDLTest_AssertCheck(result == 0, \"Verify result value; expected: 0; got: %i\", result);\n            SDLTest_AssertCheck(cvt.buf != NULL, \"Verify conversion buffer is not NULL\");\n            SDLTest_AssertCheck(cvt.len_ratio > 0.0, \"Verify conversion length ratio; expected: >0; got: %f\", cvt.len_ratio);\n\n            /* Free converted buffer */\n            SDL_free(cvt.buf);\n            cvt.buf = NULL;\n          }\n        }\n      }\n    }\n  }\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * \\brief Opens, checks current connected status, and closes a device.\n *\n * \\sa https://wiki.libsdl.org/SDL_AudioDeviceConnected\n */\nint audio_openCloseAudioDeviceConnected()\n{\n   int result = -1;\n   int i;\n   int count;\n   char *device;\n   SDL_AudioDeviceID id;\n   SDL_AudioSpec desired, obtained;\n\n   /* Get number of devices. */\n   count = SDL_GetNumAudioDevices(0);\n   SDLTest_AssertPass(\"Call to SDL_GetNumAudioDevices(0)\");\n   if (count > 0) {\n     for (i = 0; i < count; i++) {\n       /* Get device name */\n       device = (char *)SDL_GetAudioDeviceName(i, 0);\n       SDLTest_AssertPass(\"SDL_GetAudioDeviceName(%i,0)\", i);\n       SDLTest_AssertCheck(device != NULL, \"Validate device name is not NULL; got: %s\", (device != NULL) ? device : \"NULL\");\n       if (device == NULL) return TEST_ABORTED;\n\n       /* Set standard desired spec */\n       desired.freq=22050;\n       desired.format=AUDIO_S16SYS;\n       desired.channels=2;\n       desired.samples=4096;\n       desired.callback=_audio_testCallback;\n       desired.userdata=NULL;\n\n       /* Open device */\n       id = SDL_OpenAudioDevice((const char *)device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);\n       SDLTest_AssertPass(\"SDL_OpenAudioDevice('%s',...)\", device);\n       SDLTest_AssertCheck(id > 1, \"Validate device ID; expected: >1, got: %i\", id);\n       if (id > 1) {\n\n/* TODO: enable test code when function is available in SDL2 */\n\n#ifdef AUDIODEVICECONNECTED_DEFINED\n         /* Get connected status */\n         result = SDL_AudioDeviceConnected(id);\n         SDLTest_AssertPass(\"Call to SDL_AudioDeviceConnected()\");\n#endif\n         SDLTest_AssertCheck(result == 1, \"Verify returned value; expected: 1; got: %i\", result);\n\n         /* Close device again */\n         SDL_CloseAudioDevice(id);\n         SDLTest_AssertPass(\"Call to SDL_CloseAudioDevice()\");\n       }\n     }\n   } else {\n     SDLTest_Log(\"No devices to test with\");\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n\n/* ================= Test Case References ================== */\n\n/* Audio test cases */\nstatic const SDLTest_TestCaseReference audioTest1 =\n        { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevices, \"audio_enumerateAndNameAudioDevices\", \"Enumerate and name available audio devices (output and capture)\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest2 =\n        { (SDLTest_TestCaseFp)audio_enumerateAndNameAudioDevicesNegativeTests, \"audio_enumerateAndNameAudioDevicesNegativeTests\", \"Negative tests around enumeration and naming of audio devices.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest3 =\n        { (SDLTest_TestCaseFp)audio_printAudioDrivers, \"audio_printAudioDrivers\", \"Checks available audio driver names.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest4 =\n        { (SDLTest_TestCaseFp)audio_printCurrentAudioDriver, \"audio_printCurrentAudioDriver\", \"Checks current audio driver name with initialized audio.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest5 =\n        { (SDLTest_TestCaseFp)audio_buildAudioCVT, \"audio_buildAudioCVT\", \"Builds various audio conversion structures.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest6 =\n        { (SDLTest_TestCaseFp)audio_buildAudioCVTNegative, \"audio_buildAudioCVTNegative\", \"Checks calls with invalid input to SDL_BuildAudioCVT\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest7 =\n        { (SDLTest_TestCaseFp)audio_getAudioStatus, \"audio_getAudioStatus\", \"Checks current audio status.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest8 =\n        { (SDLTest_TestCaseFp)audio_openCloseAndGetAudioStatus, \"audio_openCloseAndGetAudioStatus\", \"Opens and closes audio device and get audio status.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest9 =\n        { (SDLTest_TestCaseFp)audio_lockUnlockOpenAudioDevice, \"audio_lockUnlockOpenAudioDevice\", \"Locks and unlocks an open audio device.\", TEST_ENABLED };\n\n/* TODO: enable test when SDL_ConvertAudio segfaults on cygwin have been fixed.    */\n/* For debugging, test case can be run manually using --filter audio_convertAudio  */\n\nstatic const SDLTest_TestCaseReference audioTest10 =\n        { (SDLTest_TestCaseFp)audio_convertAudio, \"audio_convertAudio\", \"Convert audio using available formats.\", TEST_DISABLED };\n\n/* TODO: enable test when SDL_AudioDeviceConnected has been implemented.           */\n\nstatic const SDLTest_TestCaseReference audioTest11 =\n        { (SDLTest_TestCaseFp)audio_openCloseAudioDeviceConnected, \"audio_openCloseAudioDeviceConnected\", \"Opens and closes audio device and get connected status.\", TEST_DISABLED };\n\nstatic const SDLTest_TestCaseReference audioTest12 =\n        { (SDLTest_TestCaseFp)audio_quitInitAudioSubSystem, \"audio_quitInitAudioSubSystem\", \"Quit and re-init audio subsystem.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest13 =\n        { (SDLTest_TestCaseFp)audio_initQuitAudio, \"audio_initQuitAudio\", \"Init and quit audio drivers directly.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest14 =\n        { (SDLTest_TestCaseFp)audio_initOpenCloseQuitAudio, \"audio_initOpenCloseQuitAudio\", \"Cycle through init, open, close and quit with various audio specs.\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference audioTest15 =\n        { (SDLTest_TestCaseFp)audio_pauseUnpauseAudio, \"audio_pauseUnpauseAudio\", \"Pause and Unpause audio for various audio specs while testing callback.\", TEST_ENABLED };\n\n/* Sequence of Audio test cases */\nstatic const SDLTest_TestCaseReference *audioTests[] =  {\n    &audioTest1, &audioTest2, &audioTest3, &audioTest4, &audioTest5, &audioTest6,\n    &audioTest7, &audioTest8, &audioTest9, &audioTest10, &audioTest11,\n    &audioTest12, &audioTest13, &audioTest14, &audioTest15, NULL\n};\n\n/* Audio test suite (global) */\nSDLTest_TestSuiteReference audioTestSuite = {\n    \"Audio\",\n    _audioSetUp,\n    audioTests,\n    _audioTearDown\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_clipboard.c",
    "content": "/**\n * New/updated tests: aschiffler at ferzkopp dot net\n */\n\n#include <stdio.h>\n#include <string.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Test case functions */\n\n/**\n * \\brief Check call to SDL_HasClipboardText\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText\n */\nint\nclipboard_testHasClipboardText(void *arg)\n{\n    SDL_bool result;\n    result = SDL_HasClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_HasClipboardText succeeded\");\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Check call to SDL_GetClipboardText\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText\n */\nint\nclipboard_testGetClipboardText(void *arg)\n{\n    char *charResult;\n    charResult = SDL_GetClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_GetClipboardText succeeded\");\n\n    SDL_free(charResult);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * \\brief Check call to SDL_SetClipboardText\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText\n */\nint\nclipboard_testSetClipboardText(void *arg)\n{\n    char *textRef = SDLTest_RandomAsciiString();\n    char *text = SDL_strdup(textRef);\n    int result;\n    result = SDL_SetClipboardText((const char *)text);\n    SDLTest_AssertPass(\"Call to SDL_SetClipboardText succeeded\");\n    SDLTest_AssertCheck(\n        result == 0,\n        \"Validate SDL_SetClipboardText result, expected 0, got %i\",\n        result);\n    SDLTest_AssertCheck(\n        SDL_strcmp(textRef, text) == 0,\n        \"Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'\",\n        textRef, text);\n\n    /* Cleanup */\n    SDL_free(textRef);\n    SDL_free(text);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * \\brief End-to-end test of SDL_xyzClipboardText functions\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasClipboardText\n * http://wiki.libsdl.org/moin.cgi/SDL_GetClipboardText\n * http://wiki.libsdl.org/moin.cgi/SDL_SetClipboardText\n */\nint\nclipboard_testClipboardTextFunctions(void *arg)\n{\n    char *textRef = SDLTest_RandomAsciiString();\n    char *text = SDL_strdup(textRef);\n    SDL_bool boolResult;\n    int intResult;\n    char *charResult;\n\n    /* Clear clipboard text state */\n    boolResult = SDL_HasClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_HasClipboardText succeeded\");\n    if (boolResult == SDL_TRUE) {\n        intResult = SDL_SetClipboardText((const char *)NULL);\n        SDLTest_AssertPass(\"Call to SDL_SetClipboardText(NULL) succeeded\");\n        SDLTest_AssertCheck(\n            intResult == 0,\n            \"Verify result from SDL_SetClipboardText(NULL), expected 0, got %i\",\n            intResult);\n        charResult = SDL_GetClipboardText();\n        SDLTest_AssertPass(\"Call to SDL_GetClipboardText succeeded\");\n        SDL_free(charResult);\n        boolResult = SDL_HasClipboardText();\n        SDLTest_AssertPass(\"Call to SDL_HasClipboardText succeeded\");\n        SDLTest_AssertCheck(\n            boolResult == SDL_FALSE,\n            \"Verify SDL_HasClipboardText returned SDL_FALSE, got %s\",\n            (boolResult) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    }\n\n    /* Empty clipboard  */\n    charResult = SDL_GetClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_GetClipboardText succeeded\");\n    SDLTest_AssertCheck(\n        charResult != NULL,\n        \"Verify SDL_GetClipboardText did not return NULL\");\n    SDLTest_AssertCheck(\n        charResult[0] == '\\0',\n        \"Verify SDL_GetClipboardText returned string with length 0, got length %i\",\n        (int) SDL_strlen(charResult));\n    intResult = SDL_SetClipboardText((const char *)text);\n    SDLTest_AssertPass(\"Call to SDL_SetClipboardText succeeded\");\n    SDLTest_AssertCheck(\n        intResult == 0,\n        \"Verify result from SDL_SetClipboardText(NULL), expected 0, got %i\",\n        intResult);\n    SDLTest_AssertCheck(\n        SDL_strcmp(textRef, text) == 0,\n        \"Verify SDL_SetClipboardText did not modify input string, expected '%s', got '%s'\",\n        textRef, text);\n    boolResult = SDL_HasClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_HasClipboardText succeeded\");\n    SDLTest_AssertCheck(\n        boolResult == SDL_TRUE,\n        \"Verify SDL_HasClipboardText returned SDL_TRUE, got %s\",\n        (boolResult) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    SDL_free(charResult);\n    charResult = SDL_GetClipboardText();\n    SDLTest_AssertPass(\"Call to SDL_GetClipboardText succeeded\");\n    SDLTest_AssertCheck(\n        SDL_strcmp(textRef, charResult) == 0,\n        \"Verify SDL_GetClipboardText returned correct string, expected '%s', got '%s'\",\n        textRef, charResult);\n\n    /* Cleanup */\n    SDL_free(textRef);\n    SDL_free(text);\n    SDL_free(charResult);\n\n   return TEST_COMPLETED;\n}\n\n\n/* ================= Test References ================== */\n\n/* Clipboard test cases */\nstatic const SDLTest_TestCaseReference clipboardTest1 =\n        { (SDLTest_TestCaseFp)clipboard_testHasClipboardText, \"clipboard_testHasClipboardText\", \"Check call to SDL_HasClipboardText\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference clipboardTest2 =\n        { (SDLTest_TestCaseFp)clipboard_testGetClipboardText, \"clipboard_testGetClipboardText\", \"Check call to SDL_GetClipboardText\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference clipboardTest3 =\n        { (SDLTest_TestCaseFp)clipboard_testSetClipboardText, \"clipboard_testSetClipboardText\", \"Check call to SDL_SetClipboardText\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference clipboardTest4 =\n        { (SDLTest_TestCaseFp)clipboard_testClipboardTextFunctions, \"clipboard_testClipboardTextFunctions\", \"End-to-end test of SDL_xyzClipboardText functions\", TEST_ENABLED };\n\n/* Sequence of Clipboard test cases */\nstatic const SDLTest_TestCaseReference *clipboardTests[] =  {\n    &clipboardTest1, &clipboardTest2, &clipboardTest3, &clipboardTest4, NULL\n};\n\n/* Clipboard test suite (global) */\nSDLTest_TestSuiteReference clipboardTestSuite = {\n    \"Clipboard\",\n    NULL,\n    clipboardTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_events.c",
    "content": "/**\n * Events test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Test case functions */\n\n/* Flag indicating if the userdata should be checked */\nint _userdataCheck = 0;\n\n/* Userdata value to check */\nint _userdataValue = 0;\n\n/* Flag indicating that the filter was called */\nint _eventFilterCalled = 0;\n\n/* Userdata values for event */\nint _userdataValue1 = 1;\nint _userdataValue2 = 2;\n\n/* Event filter that sets some flags and optionally checks userdata */\nint SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event)\n{\n   _eventFilterCalled = 1;\n\n   if (_userdataCheck != 0) {\n       SDLTest_AssertCheck(userdata != NULL, \"Check userdata pointer, expected: non-NULL, got: %s\", (userdata != NULL) ? \"non-NULL\" : \"NULL\");\n       if (userdata != NULL) {\n          SDLTest_AssertCheck(*(int *)userdata == _userdataValue, \"Check userdata value, expected: %i, got: %i\", _userdataValue, *(int *)userdata);\n       }\n   }\n\n   return 0;\n}\n\n/**\n * @brief Test pumping and peeking events.\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_PumpEvents\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_PollEvent\n */\nint\nevents_pushPumpAndPollUserevent(void *arg)\n{\n   SDL_Event event1;\n   SDL_Event event2;\n   int result;\n\n   /* Create user event */\n   event1.type = SDL_USEREVENT;\n   event1.user.code = SDLTest_RandomSint32();\n   event1.user.data1 = (void *)&_userdataValue1;\n   event1.user.data2 = (void *)&_userdataValue2;\n\n   /* Push a user event onto the queue and force queue update */\n   SDL_PushEvent(&event1);\n   SDLTest_AssertPass(\"Call to SDL_PushEvent()\");\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n\n   /* Poll for user event */\n   result = SDL_PollEvent(&event2);\n   SDLTest_AssertPass(\"Call to SDL_PollEvent()\");\n   SDLTest_AssertCheck(result == 1, \"Check result from SDL_PollEvent, expected: 1, got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Adds and deletes an event watch function with NULL userdata\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_AddEventWatch\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_DelEventWatch\n *\n */\nint\nevents_addDelEventWatch(void *arg)\n{\n   SDL_Event event;\n\n   /* Create user event */\n   event.type = SDL_USEREVENT;\n   event.user.code = SDLTest_RandomSint32();\n   event.user.data1 = (void *)&_userdataValue1;\n   event.user.data2 = (void *)&_userdataValue2;\n\n   /* Disable userdata check */\n   _userdataCheck = 0;\n\n   /* Reset event filter call tracker */\n   _eventFilterCalled = 0;\n\n   /* Add watch */\n   SDL_AddEventWatch(_events_sampleNullEventFilter, NULL);\n   SDLTest_AssertPass(\"Call to SDL_AddEventWatch()\");\n\n   /* Push a user event onto the queue and force queue update */\n   SDL_PushEvent(&event);\n   SDLTest_AssertPass(\"Call to SDL_PushEvent()\");\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n   SDLTest_AssertCheck(_eventFilterCalled == 1, \"Check that event filter was called\");\n\n   /* Delete watch */\n   SDL_DelEventWatch(_events_sampleNullEventFilter, NULL);\n   SDLTest_AssertPass(\"Call to SDL_DelEventWatch()\");\n\n   /* Push a user event onto the queue and force queue update */\n   _eventFilterCalled = 0;\n   SDL_PushEvent(&event);\n   SDLTest_AssertPass(\"Call to SDL_PushEvent()\");\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n   SDLTest_AssertCheck(_eventFilterCalled == 0, \"Check that event filter was NOT called\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Adds and deletes an event watch function with userdata\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_AddEventWatch\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_DelEventWatch\n *\n */\nint\nevents_addDelEventWatchWithUserdata(void *arg)\n{\n   SDL_Event event;\n\n   /* Create user event */\n   event.type = SDL_USEREVENT;\n   event.user.code = SDLTest_RandomSint32();\n   event.user.data1 = (void *)&_userdataValue1;\n   event.user.data2 = (void *)&_userdataValue2;\n\n   /* Enable userdata check and set a value to check */\n   _userdataCheck = 1;\n   _userdataValue = SDLTest_RandomIntegerInRange(-1024, 1024);\n\n   /* Reset event filter call tracker */\n   _eventFilterCalled = 0;\n\n   /* Add watch */\n   SDL_AddEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue);\n   SDLTest_AssertPass(\"Call to SDL_AddEventWatch()\");\n\n   /* Push a user event onto the queue and force queue update */\n   SDL_PushEvent(&event);\n   SDLTest_AssertPass(\"Call to SDL_PushEvent()\");\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n   SDLTest_AssertCheck(_eventFilterCalled == 1, \"Check that event filter was called\");\n\n   /* Delete watch */\n   SDL_DelEventWatch(_events_sampleNullEventFilter, (void *)&_userdataValue);\n   SDLTest_AssertPass(\"Call to SDL_DelEventWatch()\");\n\n   /* Push a user event onto the queue and force queue update */\n   _eventFilterCalled = 0;\n   SDL_PushEvent(&event);\n   SDLTest_AssertPass(\"Call to SDL_PushEvent()\");\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n   SDLTest_AssertCheck(_eventFilterCalled == 0, \"Check that event filter was NOT called\");\n\n   return TEST_COMPLETED;\n}\n\n\n/* ================= Test References ================== */\n\n/* Events test cases */\nstatic const SDLTest_TestCaseReference eventsTest1 =\n        { (SDLTest_TestCaseFp)events_pushPumpAndPollUserevent, \"events_pushPumpAndPollUserevent\", \"Pushes, pumps and polls a user event\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference eventsTest2 =\n        { (SDLTest_TestCaseFp)events_addDelEventWatch, \"events_addDelEventWatch\", \"Adds and deletes an event watch function with NULL userdata\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference eventsTest3 =\n        { (SDLTest_TestCaseFp)events_addDelEventWatchWithUserdata, \"events_addDelEventWatchWithUserdata\", \"Adds and deletes an event watch function with userdata\", TEST_ENABLED };\n\n/* Sequence of Events test cases */\nstatic const SDLTest_TestCaseReference *eventsTests[] =  {\n    &eventsTest1, &eventsTest2, &eventsTest3, NULL\n};\n\n/* Events test suite (global) */\nSDLTest_TestSuiteReference eventsTestSuite = {\n    \"Events\",\n    NULL,\n    eventsTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_hints.c",
    "content": "/**\n * Hints test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n\nconst int _numHintsEnum = 25;\nchar* _HintsEnum[] =\n  {\n    SDL_HINT_ACCELEROMETER_AS_JOYSTICK,\n    SDL_HINT_FRAMEBUFFER_ACCELERATION,\n    SDL_HINT_GAMECONTROLLERCONFIG,\n    SDL_HINT_GRAB_KEYBOARD,\n    SDL_HINT_IDLE_TIMER_DISABLED,\n    SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,\n    SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK,\n    SDL_HINT_MOUSE_RELATIVE_MODE_WARP,\n    SDL_HINT_ORIENTATIONS,\n    SDL_HINT_RENDER_DIRECT3D_THREADSAFE,\n    SDL_HINT_RENDER_DRIVER,\n    SDL_HINT_RENDER_OPENGL_SHADERS,\n    SDL_HINT_RENDER_SCALE_QUALITY,\n    SDL_HINT_RENDER_VSYNC,\n    SDL_HINT_TIMER_RESOLUTION,\n    SDL_HINT_VIDEO_ALLOW_SCREENSAVER,\n    SDL_HINT_VIDEO_HIGHDPI_DISABLED,\n    SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES,\n    SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS,\n    SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT,\n    SDL_HINT_VIDEO_WIN_D3DCOMPILER,\n    SDL_HINT_VIDEO_X11_XINERAMA,\n    SDL_HINT_VIDEO_X11_XRANDR,\n    SDL_HINT_VIDEO_X11_XVIDMODE,\n    SDL_HINT_XINPUT_ENABLED,\n  };\nchar* _HintsVerbose[] =\n  {\n    \"SDL_HINT_ACCELEROMETER_AS_JOYSTICK\",\n    \"SDL_HINT_FRAMEBUFFER_ACCELERATION\",\n    \"SDL_HINT_GAMECONTROLLERCONFIG\",\n    \"SDL_HINT_GRAB_KEYBOARD\",\n    \"SDL_HINT_IDLE_TIMER_DISABLED\",\n    \"SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS\",\n    \"SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK\",\n    \"SDL_HINT_MOUSE_RELATIVE_MODE_WARP\",\n    \"SDL_HINT_ORIENTATIONS\",\n    \"SDL_HINT_RENDER_DIRECT3D_THREADSAFE\",\n    \"SDL_HINT_RENDER_DRIVER\",\n    \"SDL_HINT_RENDER_OPENGL_SHADERS\",\n    \"SDL_HINT_RENDER_SCALE_QUALITY\",\n    \"SDL_HINT_RENDER_VSYNC\",\n    \"SDL_HINT_TIMER_RESOLUTION\",\n    \"SDL_HINT_VIDEO_ALLOW_SCREENSAVER\",\n    \"SDL_HINT_VIDEO_HIGHDPI_DISABLED\",\n    \"SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES\",\n    \"SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS\",\n    \"SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT\",\n    \"SDL_HINT_VIDEO_WIN_D3DCOMPILER\",\n    \"SDL_HINT_VIDEO_X11_XINERAMA\",\n    \"SDL_HINT_VIDEO_X11_XRANDR\",\n    \"SDL_HINT_VIDEO_X11_XVIDMODE\",\n    \"SDL_HINT_XINPUT_ENABLED\"\n  };\n\n\n/* Test case functions */\n\n/**\n * @brief Call to SDL_GetHint\n */\nint\nhints_getHint(void *arg)\n{\n  char *result1;\n  char *result2;\n  int i;\n    \n  for (i=0; i<_numHintsEnum; i++) {\n    result1 = (char *)SDL_GetHint((char*)_HintsEnum[i]);\n    SDLTest_AssertPass(\"Call to SDL_GetHint(%s) - using define definition\", (char*)_HintsEnum[i]);\n    result2 = (char *)SDL_GetHint((char *)_HintsVerbose[i]);\n    SDLTest_AssertPass(\"Call to SDL_GetHint(%s) - using string definition\", (char*)_HintsVerbose[i]);\n    SDLTest_AssertCheck(\n      (result1 == NULL && result2 == NULL) || (SDL_strcmp(result1, result2) == 0),\n      \"Verify returned values are equal; got: result1='%s' result2='%s\",\n      (result1 == NULL) ? \"null\" : result1,\n      (result2 == NULL) ? \"null\" : result2);\n  }\n  \n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_SetHint\n */\nint\nhints_setHint(void *arg)\n{\n  char *originalValue;\n  char *value;\n  char *testValue;\n  SDL_bool result;\n  int i, j;\n\n  /* Create random values to set */                    \n  value = SDLTest_RandomAsciiStringOfSize(10);\n    \n  for (i=0; i<_numHintsEnum; i++) {\n    /* Capture current value */\n    originalValue = (char *)SDL_GetHint((char*)_HintsEnum[i]);\n    SDLTest_AssertPass(\"Call to SDL_GetHint(%s)\", (char*)_HintsEnum[i]);\n    \n    /* Set value (twice) */\n    for (j=1; j<=2; j++) {\n      result = SDL_SetHint((char*)_HintsEnum[i], value);\n      SDLTest_AssertPass(\"Call to SDL_SetHint(%s, %s) (iteration %i)\", (char*)_HintsEnum[i], value, j);\n      SDLTest_AssertCheck(\n        result == SDL_TRUE || result == SDL_FALSE, \n        \"Verify valid result was returned, got: %i\",\n        (int)result);\n      testValue = (char *)SDL_GetHint((char*)_HintsEnum[i]);\n      SDLTest_AssertPass(\"Call to SDL_GetHint(%s) - using string definition\", (char*)_HintsVerbose[i]);\n      SDLTest_AssertCheck(\n        (SDL_strcmp(value, testValue) == 0),\n        \"Verify returned value equals set value; got: testValue='%s' value='%s\",\n        (testValue == NULL) ? \"null\" : testValue,\n        value);\n    }\n      \n    /* Reset original value */\n    result = SDL_SetHint((char*)_HintsEnum[i], originalValue);\n    SDLTest_AssertPass(\"Call to SDL_SetHint(%s, originalValue)\", (char*)_HintsEnum[i]);\n    SDLTest_AssertCheck(\n      result == SDL_TRUE || result == SDL_FALSE, \n      \"Verify valid result was returned, got: %i\",\n      (int)result);\n  }\n  \n  SDL_free(value);\n  \n  return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Hints test cases */\nstatic const SDLTest_TestCaseReference hintsTest1 =\n        { (SDLTest_TestCaseFp)hints_getHint, \"hints_getHint\", \"Call to SDL_GetHint\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference hintsTest2 =\n        { (SDLTest_TestCaseFp)hints_setHint, \"hints_setHint\", \"Call to SDL_SetHint\", TEST_ENABLED };\n\n/* Sequence of Hints test cases */\nstatic const SDLTest_TestCaseReference *hintsTests[] =  {\n    &hintsTest1, &hintsTest2, NULL\n};\n\n/* Hints test suite (global) */\nSDLTest_TestSuiteReference hintsTestSuite = {\n    \"Hints\",\n    NULL,\n    hintsTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_keyboard.c",
    "content": "/**\n * Keyboard test suite\n */\n\n#include <stdio.h>\n#include <limits.h>\n\n#include \"SDL_config.h\"\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Test case functions */\n\n/**\n * @brief Check call to SDL_GetKeyboardState with and without numkeys reference.\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyboardState\n */\nint\nkeyboard_getKeyboardState(void *arg)\n{\n   int numkeys;\n   Uint8 *state;\n\n   /* Case where numkeys pointer is NULL */\n   state = (Uint8 *)SDL_GetKeyboardState(NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyboardState(NULL)\");\n   SDLTest_AssertCheck(state != NULL, \"Validate that return value from SDL_GetKeyboardState is not NULL\");\n\n   /* Case where numkeys pointer is not NULL */\n   numkeys = -1;\n   state = (Uint8 *)SDL_GetKeyboardState(&numkeys);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyboardState(&numkeys)\");\n   SDLTest_AssertCheck(state != NULL, \"Validate that return value from SDL_GetKeyboardState is not NULL\");\n   SDLTest_AssertCheck(numkeys >= 0, \"Validate that value of numkeys is >= 0, got: %i\", numkeys);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetKeyboardFocus\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyboardFocus\n */\nint\nkeyboard_getKeyboardFocus(void *arg)\n{\n   SDL_Window* window;\n\n   /* Call, but ignore return value */\n   window = SDL_GetKeyboardFocus();\n   SDLTest_AssertPass(\"Call to SDL_GetKeyboardFocus()\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetKeyFromName for known, unknown and invalid name.\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyFromName\n */\nint\nkeyboard_getKeyFromName(void *arg)\n{\n   SDL_Keycode result;\n\n   /* Case where Key is known, 1 character input */\n   result = SDL_GetKeyFromName(\"A\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(known/single)\");\n   SDLTest_AssertCheck(result == SDLK_a, \"Verify result from call, expected: %i, got: %i\", SDLK_a, result);\n\n   /* Case where Key is known, 2 character input */\n   result = SDL_GetKeyFromName(\"F1\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(known/double)\");\n   SDLTest_AssertCheck(result == SDLK_F1, \"Verify result from call, expected: %i, got: %i\", SDLK_F1, result);\n\n   /* Case where Key is known, 3 character input */\n   result = SDL_GetKeyFromName(\"End\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(known/triple)\");\n   SDLTest_AssertCheck(result == SDLK_END, \"Verify result from call, expected: %i, got: %i\", SDLK_END, result);\n\n   /* Case where Key is known, 4 character input */\n   result = SDL_GetKeyFromName(\"Find\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(known/quad)\");\n   SDLTest_AssertCheck(result == SDLK_FIND, \"Verify result from call, expected: %i, got: %i\", SDLK_FIND, result);\n\n   /* Case where Key is known, multiple character input */\n   result = SDL_GetKeyFromName(\"AudioStop\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(known/multi)\");\n   SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, \"Verify result from call, expected: %i, got: %i\", SDLK_AUDIOSTOP, result);\n\n   /* Case where Key is unknown */\n   result = SDL_GetKeyFromName(\"NotThere\");\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(unknown)\");\n   SDLTest_AssertCheck(result == SDLK_UNKNOWN, \"Verify result from call is UNKNOWN, expected: %i, got: %i\", SDLK_UNKNOWN, result);\n\n   /* Case where input is NULL/invalid */\n   result = SDL_GetKeyFromName(NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromName(NULL)\");\n   SDLTest_AssertCheck(result == SDLK_UNKNOWN, \"Verify result from call is UNKNOWN, expected: %i, got: %i\", SDLK_UNKNOWN, result);\n\n   return TEST_COMPLETED;\n}\n\n/*\n * Local helper to check for the invalid scancode error message\n */\nvoid\n_checkInvalidScancodeError()\n{\n   const char *expectedError = \"Parameter 'scancode' is invalid\";\n   const char *error;\n   error = SDL_GetError();\n   SDLTest_AssertPass(\"Call to SDL_GetError()\");\n   SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n   if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n      SDL_ClearError();\n      SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n   }\n}\n\n/**\n * @brief Check call to SDL_GetKeyFromScancode\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyFromScancode\n */\nint\nkeyboard_getKeyFromScancode(void *arg)\n{\n   SDL_Keycode result;\n\n   /* Case where input is valid */\n   result = SDL_GetKeyFromScancode(SDL_SCANCODE_A);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromScancode(valid)\");\n   SDLTest_AssertCheck(result == SDLK_a, \"Verify result from call, expected: %i, got: %i\", SDLK_a, result);\n\n   /* Case where input is zero */\n   result = SDL_GetKeyFromScancode(0);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromScancode(0)\");\n   SDLTest_AssertCheck(result == SDLK_UNKNOWN, \"Verify result from call is UNKNOWN, expected: %i, got: %i\", SDLK_UNKNOWN, result);\n\n   /* Clear error message */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n   /* Case where input is invalid (too small) */\n   result = SDL_GetKeyFromScancode(-999);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromScancode(-999)\");\n   SDLTest_AssertCheck(result == SDLK_UNKNOWN, \"Verify result from call is UNKNOWN, expected: %i, got: %i\", SDLK_UNKNOWN, result);\n   _checkInvalidScancodeError();\n\n   /* Case where input is invalid (too big) */\n   result = SDL_GetKeyFromScancode(999);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyFromScancode(999)\");\n   SDLTest_AssertCheck(result == SDLK_UNKNOWN, \"Verify result from call is UNKNOWN, expected: %i, got: %i\", SDLK_UNKNOWN, result);\n   _checkInvalidScancodeError();\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetKeyName\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyName\n */\nint\nkeyboard_getKeyName(void *arg)\n{\n   char *result;\n   char *expected;\n\n   /* Case where key has a 1 character name */\n   expected = \"3\";\n   result = (char *)SDL_GetKeyName(SDLK_3);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   /* Case where key has a 2 character name */\n   expected = \"F1\";\n   result = (char *)SDL_GetKeyName(SDLK_F1);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   /* Case where key has a 3 character name */\n   expected = \"Cut\";\n   result = (char *)SDL_GetKeyName(SDLK_CUT);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   /* Case where key has a 4 character name */\n   expected = \"Down\";\n   result = (char *)SDL_GetKeyName(SDLK_DOWN);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   /* Case where key has a N character name */\n   expected = \"BrightnessUp\";\n   result = (char *)SDL_GetKeyName(SDLK_BRIGHTNESSUP);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   /* Case where key has a N character name with space */\n   expected = \"Keypad MemStore\";\n   result = (char *)SDL_GetKeyName(SDLK_KP_MEMSTORE);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName()\");\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: %s, got: %s\", expected, result);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief SDL_GetScancodeName negative cases\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeName\n */\nint\nkeyboard_getScancodeNameNegative(void *arg)\n{\n   SDL_Scancode scancode;\n   char *result;\n   char *expected = \"\";\n\n   /* Clear error message */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n   /* Out-of-bounds scancode */\n   scancode = (SDL_Scancode)SDL_NUM_SCANCODES;\n   result = (char *)SDL_GetScancodeName(scancode);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeName(%d/large)\", scancode);\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: '%s', got: '%s'\", expected, result);\n   _checkInvalidScancodeError();\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief SDL_GetKeyName negative cases\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetKeyName\n */\nint\nkeyboard_getKeyNameNegative(void *arg)\n{\n   SDL_Keycode keycode;\n   char *result;\n   char *expected = \"\";\n\n   /* Unknown keycode */\n   keycode = SDLK_UNKNOWN;\n   result = (char *)SDL_GetKeyName(keycode);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName(%d/unknown)\", keycode);\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: '%s', got: '%s'\", expected, result);\n\n   /* Clear error message */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n   /* Negative keycode */\n   keycode = (SDL_Keycode)SDLTest_RandomIntegerInRange(-255, -1);\n   result = (char *)SDL_GetKeyName(keycode);\n   SDLTest_AssertPass(\"Call to SDL_GetKeyName(%d/negative)\", keycode);\n   SDLTest_AssertCheck(result != NULL, \"Verify result from call is not NULL\");\n   SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, \"Verify result from call is valid, expected: '%s', got: '%s'\", expected, result);\n   _checkInvalidScancodeError();\n\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetModState and SDL_SetModState\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetModState\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetModState\n */\nint\nkeyboard_getSetModState(void *arg)\n{\n   SDL_Keymod result;\n   SDL_Keymod currentState;\n   SDL_Keymod newState;\n   SDL_Keymod allStates =\n    KMOD_NONE |\n    KMOD_LSHIFT |\n    KMOD_RSHIFT |\n    KMOD_LCTRL |\n    KMOD_RCTRL |\n    KMOD_LALT |\n    KMOD_RALT |\n    KMOD_LGUI |\n    KMOD_RGUI |\n    KMOD_NUM |\n    KMOD_CAPS |\n    KMOD_MODE |\n    KMOD_RESERVED;\n\n   /* Get state, cache for later reset */\n   result = SDL_GetModState();\n   SDLTest_AssertPass(\"Call to SDL_GetModState()\");\n   SDLTest_AssertCheck(/*result >= 0 &&*/ result <= allStates, \"Verify result from call is valid, expected: 0 <= result <= %i, got: %i\", allStates, result);\n   currentState = result;\n\n   /* Set random state */\n   newState = SDLTest_RandomIntegerInRange(0, allStates);\n   SDL_SetModState(newState);\n   SDLTest_AssertPass(\"Call to SDL_SetModState(%i)\", newState);\n   result = SDL_GetModState();\n   SDLTest_AssertPass(\"Call to SDL_GetModState()\");\n   SDLTest_AssertCheck(result == newState, \"Verify result from call is valid, expected: %i, got: %i\", newState, result);\n\n   /* Set zero state */\n   SDL_SetModState(0);\n   SDLTest_AssertPass(\"Call to SDL_SetModState(0)\");\n   result = SDL_GetModState();\n   SDLTest_AssertPass(\"Call to SDL_GetModState()\");\n   SDLTest_AssertCheck(result == 0, \"Verify result from call is valid, expected: 0, got: %i\", result);\n\n   /* Revert back to cached current state if needed */\n   if (currentState != 0) {\n     SDL_SetModState(currentState);\n     SDLTest_AssertPass(\"Call to SDL_SetModState(%i)\", currentState);\n     result = SDL_GetModState();\n     SDLTest_AssertPass(\"Call to SDL_GetModState()\");\n     SDLTest_AssertCheck(result == currentState, \"Verify result from call is valid, expected: %i, got: %i\", currentState, result);\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Check call to SDL_StartTextInput and SDL_StopTextInput\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_StartTextInput\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_StopTextInput\n */\nint\nkeyboard_startStopTextInput(void *arg)\n{\n   /* Start-Stop */\n   SDL_StartTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StartTextInput()\");\n   SDL_StopTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StopTextInput()\");\n\n   /* Stop-Start */\n   SDL_StartTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StartTextInput()\");\n\n   /* Start-Start */\n   SDL_StartTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StartTextInput()\");\n\n   /* Stop-Stop */\n   SDL_StopTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StopTextInput()\");\n   SDL_StopTextInput();\n   SDLTest_AssertPass(\"Call to SDL_StopTextInput()\");\n\n   return TEST_COMPLETED;\n}\n\n/* Internal function to test SDL_SetTextInputRect */\nvoid _testSetTextInputRect(SDL_Rect refRect)\n{\n   SDL_Rect testRect;\n\n   testRect = refRect;\n   SDL_SetTextInputRect(&testRect);\n   SDLTest_AssertPass(\"Call to SDL_SetTextInputRect with refRect(x:%i,y:%i,w:%i,h:%i)\", refRect.x, refRect.y, refRect.w, refRect.h);\n   SDLTest_AssertCheck(\n      (refRect.x == testRect.x) && (refRect.y == testRect.y) && (refRect.w == testRect.w) && (refRect.h == testRect.h),\n      \"Check that input data was not modified, expected: x:%i,y:%i,w:%i,h:%i, got: x:%i,y:%i,w:%i,h:%i\",\n      refRect.x, refRect.y, refRect.w, refRect.h,\n      testRect.x, testRect.y, testRect.w, testRect.h);\n}\n\n/**\n * @brief Check call to SDL_SetTextInputRect\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetTextInputRect\n */\nint\nkeyboard_setTextInputRect(void *arg)\n{\n   SDL_Rect refRect;\n\n   /* Normal visible refRect, origin inside */\n   refRect.x = SDLTest_RandomIntegerInRange(1, 50);\n   refRect.y = SDLTest_RandomIntegerInRange(1, 50);\n   refRect.w = SDLTest_RandomIntegerInRange(10, 50);\n   refRect.h = SDLTest_RandomIntegerInRange(10, 50);\n   _testSetTextInputRect(refRect);\n\n   /* Normal visible refRect, origin 0,0 */\n   refRect.x = 0;\n   refRect.y = 0;\n   refRect.w = SDLTest_RandomIntegerInRange(10, 50);\n   refRect.h = SDLTest_RandomIntegerInRange(10, 50);\n   _testSetTextInputRect(refRect);\n\n   /* 1Pixel refRect */\n   refRect.x = SDLTest_RandomIntegerInRange(10, 50);\n   refRect.y = SDLTest_RandomIntegerInRange(10, 50);\n   refRect.w = 1;\n   refRect.h = 1;\n   _testSetTextInputRect(refRect);\n\n   /* 0pixel refRect */\n   refRect.x = 1;\n   refRect.y = 1;\n   refRect.w = 1;\n   refRect.h = 0;\n   _testSetTextInputRect(refRect);\n\n   /* 0pixel refRect */\n   refRect.x = 1;\n   refRect.y = 1;\n   refRect.w = 0;\n   refRect.h = 1;\n   _testSetTextInputRect(refRect);\n\n   /* 0pixel refRect */\n   refRect.x = 1;\n   refRect.y = 1;\n   refRect.w = 0;\n   refRect.h = 0;\n   _testSetTextInputRect(refRect);\n\n   /* 0pixel refRect */\n   refRect.x = 0;\n   refRect.y = 0;\n   refRect.w = 0;\n   refRect.h = 0;\n   _testSetTextInputRect(refRect);\n\n   /* negative refRect */\n   refRect.x = SDLTest_RandomIntegerInRange(-200, -100);\n   refRect.y = SDLTest_RandomIntegerInRange(-200, -100);\n   refRect.w = 50;\n   refRect.h = 50;\n   _testSetTextInputRect(refRect);\n\n   /* oversized refRect */\n   refRect.x = SDLTest_RandomIntegerInRange(1, 50);\n   refRect.y = SDLTest_RandomIntegerInRange(1, 50);\n   refRect.w = 5000;\n   refRect.h = 5000;\n   _testSetTextInputRect(refRect);\n\n   /* NULL refRect */\n   SDL_SetTextInputRect(NULL);\n   SDLTest_AssertPass(\"Call to SDL_SetTextInputRect(NULL)\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_SetTextInputRect with invalid data\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetTextInputRect\n */\nint\nkeyboard_setTextInputRectNegative(void *arg)\n{\n   /* Some platforms set also an error message; prepare for checking it */\n#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA\n   const char *expectedError = \"Parameter 'rect' is invalid\";\n   const char *error;\n\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n#endif\n\n   /* NULL refRect */\n   SDL_SetTextInputRect(NULL);\n   SDLTest_AssertPass(\"Call to SDL_SetTextInputRect(NULL)\");\n\n   /* Some platforms set also an error message; so check it */\n#if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_COCOA\n   error = SDL_GetError();\n   SDLTest_AssertPass(\"Call to SDL_GetError()\");\n   SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n   if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n   }\n\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n#endif\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetScancodeFromKey\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromKey\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode\n */\nint\nkeyboard_getScancodeFromKey(void *arg)\n{\n   SDL_Scancode scancode;\n\n   /* Regular key */\n   scancode = SDL_GetScancodeFromKey(SDLK_4);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromKey(SDLK_4)\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, \"Validate return value from SDL_GetScancodeFromKey, expected: %i, got: %i\", SDL_SCANCODE_4, scancode);\n\n   /* Virtual key */\n   scancode = SDL_GetScancodeFromKey(SDLK_PLUS);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromKey(SDLK_PLUS)\");\n   SDLTest_AssertCheck(scancode == 0, \"Validate return value from SDL_GetScancodeFromKey, expected: 0, got: %i\", scancode);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetScancodeFromName\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromName\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode\n */\nint\nkeyboard_getScancodeFromName(void *arg)\n{\n   SDL_Scancode scancode;\n\n   /* Regular key, 1 character, first name in list */\n   scancode = SDL_GetScancodeFromName(\"A\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('A')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_A, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_A, scancode);\n\n   /* Regular key, 1 character */\n   scancode = SDL_GetScancodeFromName(\"4\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('4')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_4, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_4, scancode);\n\n   /* Regular key, 2 characters */\n   scancode = SDL_GetScancodeFromName(\"F1\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('F1')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_F1, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_F1, scancode);\n\n   /* Regular key, 3 characters */\n   scancode = SDL_GetScancodeFromName(\"End\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('End')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_END, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_END, scancode);\n\n   /* Regular key, 4 characters */\n   scancode = SDL_GetScancodeFromName(\"Find\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('Find')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_FIND, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_FIND, scancode);\n\n   /* Regular key, several characters */\n   scancode = SDL_GetScancodeFromName(\"Backspace\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('Backspace')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_BACKSPACE, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_BACKSPACE, scancode);\n\n   /* Regular key, several characters with space */\n   scancode = SDL_GetScancodeFromName(\"Keypad Enter\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('Keypad Enter')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_KP_ENTER, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_KP_ENTER, scancode);\n\n   /* Regular key, last name in list */\n   scancode = SDL_GetScancodeFromName(\"Sleep\");\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('Sleep')\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_SLEEP, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_SLEEP, scancode);\n\n   return TEST_COMPLETED;\n}\n\n/*\n * Local helper to check for the invalid scancode error message\n */\nvoid\n_checkInvalidNameError()\n{\n   const char *expectedError = \"Parameter 'name' is invalid\";\n   const char *error;\n   error = SDL_GetError();\n   SDLTest_AssertPass(\"Call to SDL_GetError()\");\n   SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n   if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n      SDL_ClearError();\n      SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n   }\n}\n\n/**\n * @brief Check call to SDL_GetScancodeFromName with invalid data\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetScancodeFromName\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_Keycode\n */\nint\nkeyboard_getScancodeFromNameNegative(void *arg)\n{\n   char *name;\n   SDL_Scancode scancode;\n\n   /* Clear error message */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n   /* Random string input */\n   name = SDLTest_RandomAsciiStringOfSize(32);\n   SDLTest_Assert(name != NULL, \"Check that random name is not NULL\");\n   if (name == NULL) {\n      return TEST_ABORTED;\n   }\n   scancode = SDL_GetScancodeFromName((const char *)name);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName('%s')\", name);\n   SDL_free(name);\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_UNKNOWN, scancode);\n   _checkInvalidNameError();\n\n   /* Zero length string input */\n   name = \"\";\n   scancode = SDL_GetScancodeFromName((const char *)name);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName(NULL)\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_UNKNOWN, scancode);\n   _checkInvalidNameError();\n\n   /* NULL input */\n   name = NULL;\n   scancode = SDL_GetScancodeFromName((const char *)name);\n   SDLTest_AssertPass(\"Call to SDL_GetScancodeFromName(NULL)\");\n   SDLTest_AssertCheck(scancode == SDL_SCANCODE_UNKNOWN, \"Validate return value from SDL_GetScancodeFromName, expected: %i, got: %i\", SDL_SCANCODE_UNKNOWN, scancode);\n   _checkInvalidNameError();\n\n   return TEST_COMPLETED;\n}\n\n\n\n/* ================= Test References ================== */\n\n/* Keyboard test cases */\nstatic const SDLTest_TestCaseReference keyboardTest1 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyboardState, \"keyboard_getKeyboardState\", \"Check call to SDL_GetKeyboardState with and without numkeys reference\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest2 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyboardFocus, \"keyboard_getKeyboardFocus\", \"Check call to SDL_GetKeyboardFocus\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest3 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyFromName, \"keyboard_getKeyFromName\", \"Check call to SDL_GetKeyFromName for known, unknown and invalid name\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest4 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyFromScancode, \"keyboard_getKeyFromScancode\", \"Check call to SDL_GetKeyFromScancode\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest5 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyName, \"keyboard_getKeyName\", \"Check call to SDL_GetKeyName\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest6 =\n        { (SDLTest_TestCaseFp)keyboard_getSetModState, \"keyboard_getSetModState\", \"Check call to SDL_GetModState and SDL_SetModState\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest7 =\n        { (SDLTest_TestCaseFp)keyboard_startStopTextInput, \"keyboard_startStopTextInput\", \"Check call to SDL_StartTextInput and SDL_StopTextInput\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest8 =\n        { (SDLTest_TestCaseFp)keyboard_setTextInputRect, \"keyboard_setTextInputRect\", \"Check call to SDL_SetTextInputRect\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest9 =\n        { (SDLTest_TestCaseFp)keyboard_setTextInputRectNegative, \"keyboard_setTextInputRectNegative\", \"Check call to SDL_SetTextInputRect with invalid data\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest10 =\n        { (SDLTest_TestCaseFp)keyboard_getScancodeFromKey, \"keyboard_getScancodeFromKey\", \"Check call to SDL_GetScancodeFromKey\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest11 =\n        { (SDLTest_TestCaseFp)keyboard_getScancodeFromName, \"keyboard_getScancodeFromName\", \"Check call to SDL_GetScancodeFromName\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest12 =\n        { (SDLTest_TestCaseFp)keyboard_getScancodeFromNameNegative, \"keyboard_getScancodeFromNameNegative\", \"Check call to SDL_GetScancodeFromName with invalid data\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest13 =\n        { (SDLTest_TestCaseFp)keyboard_getKeyNameNegative, \"keyboard_getKeyNameNegative\", \"Check call to SDL_GetKeyName with invalid data\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference keyboardTest14 =\n        { (SDLTest_TestCaseFp)keyboard_getScancodeNameNegative, \"keyboard_getScancodeNameNegative\", \"Check call to SDL_GetScancodeName with invalid data\", TEST_ENABLED };\n\n/* Sequence of Keyboard test cases */\nstatic const SDLTest_TestCaseReference *keyboardTests[] =  {\n    &keyboardTest1, &keyboardTest2, &keyboardTest3, &keyboardTest4, &keyboardTest5, &keyboardTest6,\n    &keyboardTest7, &keyboardTest8, &keyboardTest9, &keyboardTest10, &keyboardTest11, &keyboardTest12,\n    &keyboardTest13, &keyboardTest14, NULL\n};\n\n/* Keyboard test suite (global) */\nSDLTest_TestSuiteReference keyboardTestSuite = {\n    \"Keyboard\",\n    NULL,\n    keyboardTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_main.c",
    "content": "/**\n * Automated SDL subsystems management test.\n *\n * Written by J�rgen Tjern� \"jorgenpt\"\n *\n * Released under Public Domain.\n */\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n\n/* !\n * \\brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_Init\n * http://wiki.libsdl.org/moin.cgi/SDL_Quit\n */\nstatic int main_testInitQuitJoystickHaptic (void *arg)\n{\n#if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED\n    return TEST_SKIPPED;\n#else\n    int enabled_subsystems;\n    int initialized_subsystems = SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC;\n\n    SDLTest_AssertCheck( SDL_Init(initialized_subsystems) == 0, \"SDL_Init multiple systems.\" );\n\n    enabled_subsystems = SDL_WasInit(initialized_subsystems);\n    SDLTest_AssertCheck( enabled_subsystems == initialized_subsystems, \"SDL_WasInit(SDL_INIT_EVERYTHING) contains all systems (%i)\", enabled_subsystems );\n\n    SDL_Quit();\n\n    enabled_subsystems = SDL_WasInit(initialized_subsystems);\n    SDLTest_AssertCheck( enabled_subsystems == 0, \"SDL_Quit should shut down everything (%i)\", enabled_subsystems );\n\n    return TEST_COMPLETED;\n#endif\n}\n\n/* !\n * \\brief Tests SDL_InitSubSystem() and SDL_QuitSubSystem()\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_Init\n * http://wiki.libsdl.org/moin.cgi/SDL_Quit\n */\nstatic int main_testInitQuitSubSystem (void *arg)\n{\n#if defined SDL_JOYSTICK_DISABLED || defined SDL_HAPTIC_DISABLED || defined SDL_GAMECONTROLLER_DISABLED\n    return TEST_SKIPPED;\n#else\n    int i;\n    int subsystems[] = { SDL_INIT_JOYSTICK, SDL_INIT_HAPTIC, SDL_INIT_GAMECONTROLLER };\n\n    for (i = 0; i < SDL_arraysize(subsystems); ++i) {\n        int initialized_system;\n        int subsystem = subsystems[i];\n\n        SDLTest_AssertCheck( (SDL_WasInit(subsystem) & subsystem) == 0, \"SDL_WasInit(%x) before init should be false\", subsystem );\n        SDLTest_AssertCheck( SDL_InitSubSystem(subsystem) == 0, \"SDL_InitSubSystem(%x)\", subsystem );\n\n        initialized_system = SDL_WasInit(subsystem);\n        SDLTest_AssertCheck( (initialized_system & subsystem) != 0, \"SDL_WasInit(%x) should be true (%x)\", subsystem, initialized_system );\n\n        SDL_QuitSubSystem(subsystem);\n\n        SDLTest_AssertCheck( (SDL_WasInit(subsystem) & subsystem) == 0, \"SDL_WasInit(%x) after shutdown should be false\", subsystem );\n    }\n\n    return TEST_COMPLETED;\n#endif\n}\n\nconst int joy_and_controller = SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER;\nstatic int main_testImpliedJoystickInit (void *arg)\n{\n#if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED\n    return TEST_SKIPPED;\n#else\n    int initialized_system;\n\n    /* First initialize the controller */\n    SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, \"SDL_WasInit() before init should be false for joystick & controller\" );\n    SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, \"SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)\" );\n\n    /* Then make sure this implicitly initialized the joystick subsystem */\n    initialized_system = SDL_WasInit(joy_and_controller);\n    SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, \"SDL_WasInit() should be true for joystick & controller (%x)\", initialized_system );\n\n    /* Then quit the controller, and make sure that implicitly also quits the */\n    /* joystick subsystem */\n    SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER);\n    initialized_system = SDL_WasInit(joy_and_controller);\n    SDLTest_AssertCheck( (initialized_system & joy_and_controller) == 0, \"SDL_WasInit() should be false for joystick & controller (%x)\", initialized_system );\n\n    return TEST_COMPLETED;\n#endif\n}\n\nstatic int main_testImpliedJoystickQuit (void *arg)\n{\n#if defined SDL_JOYSTICK_DISABLED || defined SDL_GAMECONTROLLER_DISABLED\n    return TEST_SKIPPED;\n#else\n    int initialized_system;\n\n    /* First initialize the controller and the joystick (explicitly) */\n    SDLTest_AssertCheck( (SDL_WasInit(joy_and_controller) & joy_and_controller) == 0, \"SDL_WasInit() before init should be false for joystick & controller\" );\n    SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_JOYSTICK) == 0, \"SDL_InitSubSystem(SDL_INIT_JOYSTICK)\" );\n    SDLTest_AssertCheck( SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == 0, \"SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER)\" );\n\n    /* Then make sure they're both initialized properly */\n    initialized_system = SDL_WasInit(joy_and_controller);\n    SDLTest_AssertCheck( (initialized_system & joy_and_controller) == joy_and_controller, \"SDL_WasInit() should be true for joystick & controller (%x)\", initialized_system );\n\n    /* Then quit the controller, and make sure that it does NOT quit the */\n    /* explicitly initialized joystick subsystem. */\n    SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER);\n    initialized_system = SDL_WasInit(joy_and_controller);\n    SDLTest_AssertCheck( (initialized_system & joy_and_controller) == SDL_INIT_JOYSTICK, \"SDL_WasInit() should be false for joystick & controller (%x)\", initialized_system );\n\n    SDL_QuitSubSystem(SDL_INIT_JOYSTICK);\n\n    return TEST_COMPLETED;\n#endif\n}\n\nstatic const SDLTest_TestCaseReference mainTest1 =\n        { (SDLTest_TestCaseFp)main_testInitQuitJoystickHaptic, \"main_testInitQuitJoystickHaptic\", \"Tests SDL_Init/Quit of Joystick and Haptic subsystem\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference mainTest2 =\n        { (SDLTest_TestCaseFp)main_testInitQuitSubSystem, \"main_testInitQuitSubSystem\", \"Tests SDL_InitSubSystem/QuitSubSystem\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference mainTest3 =\n        { (SDLTest_TestCaseFp)main_testImpliedJoystickInit, \"main_testImpliedJoystickInit\", \"Tests that init for gamecontroller properly implies joystick\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference mainTest4 =\n        { (SDLTest_TestCaseFp)main_testImpliedJoystickQuit, \"main_testImpliedJoystickQuit\", \"Tests that quit for gamecontroller doesn't quit joystick if you inited it explicitly\", TEST_ENABLED};\n\n/* Sequence of Main test cases */\nstatic const SDLTest_TestCaseReference *mainTests[] =  {\n    &mainTest1,\n    &mainTest2,\n    &mainTest3,\n    &mainTest4,\n    NULL\n};\n\n/* Main test suite (global) */\nSDLTest_TestSuiteReference mainTestSuite = {\n    \"Main\",\n    NULL,\n    mainTests,\n    NULL\n};\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_mouse.c",
    "content": "/**\n * Mouse test suite\n */\n\n#include <stdio.h>\n#include <limits.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Test case functions */\n\n/* Helper to evaluate state returned from SDL_GetMouseState */\nint _mouseStateCheck(Uint32 state)\n{\n  return (state == 0) ||\n         (state == SDL_BUTTON(SDL_BUTTON_LEFT)) ||\n         (state == SDL_BUTTON(SDL_BUTTON_MIDDLE)) ||\n         (state == SDL_BUTTON(SDL_BUTTON_RIGHT)) ||\n         (state == SDL_BUTTON(SDL_BUTTON_X1)) ||\n         (state == SDL_BUTTON(SDL_BUTTON_X2));\n}\n\n/**\n * @brief Check call to SDL_GetMouseState\n *\n */\nint\nmouse_getMouseState(void *arg)\n{\n   int x;\n   int y;\n   Uint32 state;\n\n   /* Pump some events to update mouse state */\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n\n   /* Case where x, y pointer is NULL */\n   state = SDL_GetMouseState(NULL, NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetMouseState(NULL, NULL)\");\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where x pointer is not NULL */\n   x = INT_MIN;\n   state = SDL_GetMouseState(&x, NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetMouseState(&x, NULL)\");\n   SDLTest_AssertCheck(x > INT_MIN, \"Validate that value of x is > INT_MIN, got: %i\", x);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where y pointer is not NULL */\n   y = INT_MIN;\n   state = SDL_GetMouseState(NULL, &y);\n   SDLTest_AssertPass(\"Call to SDL_GetMouseState(NULL, &y)\");\n   SDLTest_AssertCheck(y > INT_MIN, \"Validate that value of y is > INT_MIN, got: %i\", y);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where x and y pointer is not NULL */\n   x = INT_MIN;\n   y = INT_MIN;\n   state = SDL_GetMouseState(&x, &y);\n   SDLTest_AssertPass(\"Call to SDL_GetMouseState(&x, &y)\");\n   SDLTest_AssertCheck(x > INT_MIN, \"Validate that value of x is > INT_MIN, got: %i\", x);\n   SDLTest_AssertCheck(y > INT_MIN, \"Validate that value of y is > INT_MIN, got: %i\", y);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetRelativeMouseState\n *\n */\nint\nmouse_getRelativeMouseState(void *arg)\n{\n   int x;\n   int y;\n   Uint32 state;\n\n   /* Pump some events to update mouse state */\n   SDL_PumpEvents();\n   SDLTest_AssertPass(\"Call to SDL_PumpEvents()\");\n\n   /* Case where x, y pointer is NULL */\n   state = SDL_GetRelativeMouseState(NULL, NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseState(NULL, NULL)\");\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where x pointer is not NULL */\n   x = INT_MIN;\n   state = SDL_GetRelativeMouseState(&x, NULL);\n   SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseState(&x, NULL)\");\n   SDLTest_AssertCheck(x > INT_MIN, \"Validate that value of x is > INT_MIN, got: %i\", x);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where y pointer is not NULL */\n   y = INT_MIN;\n   state = SDL_GetRelativeMouseState(NULL, &y);\n   SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseState(NULL, &y)\");\n   SDLTest_AssertCheck(y > INT_MIN, \"Validate that value of y is > INT_MIN, got: %i\", y);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   /* Case where x and y pointer is not NULL */\n   x = INT_MIN;\n   y = INT_MIN;\n   state = SDL_GetRelativeMouseState(&x, &y);\n   SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseState(&x, &y)\");\n   SDLTest_AssertCheck(x > INT_MIN, \"Validate that value of x is > INT_MIN, got: %i\", x);\n   SDLTest_AssertCheck(y > INT_MIN, \"Validate that value of y is > INT_MIN, got: %i\", y);\n   SDLTest_AssertCheck(_mouseStateCheck(state), \"Validate state returned from function, got: %i\", state);\n\n   return TEST_COMPLETED;\n}\n\n\n/* XPM definition of mouse Cursor */\nstatic const char *_mouseArrowData[] = {\n  /* pixels */\n  \"X                               \",\n  \"XX                              \",\n  \"X.X                             \",\n  \"X..X                            \",\n  \"X...X                           \",\n  \"X....X                          \",\n  \"X.....X                         \",\n  \"X......X                        \",\n  \"X.......X                       \",\n  \"X........X                      \",\n  \"X.....XXXXX                     \",\n  \"X..X..X                         \",\n  \"X.X X..X                        \",\n  \"XX  X..X                        \",\n  \"X    X..X                       \",\n  \"     X..X                       \",\n  \"      X..X                      \",\n  \"      X..X                      \",\n  \"       XX                       \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \"\n};\n\n/* Helper that creates a new mouse cursor from an XPM */\nstatic SDL_Cursor *_initArrowCursor(const char *image[])\n{\n  SDL_Cursor *cursor;\n  int i, row, col;\n  Uint8 data[4*32];\n  Uint8 mask[4*32];\n\n  i = -1;\n  for ( row=0; row<32; ++row ) {\n    for ( col=0; col<32; ++col ) {\n      if ( col % 8 ) {\n        data[i] <<= 1;\n        mask[i] <<= 1;\n      } else {\n        ++i;\n        data[i] = mask[i] = 0;\n      }\n      switch (image[row][col]) {\n        case 'X':\n          data[i] |= 0x01;\n          mask[i] |= 0x01;\n          break;\n        case '.':\n          mask[i] |= 0x01;\n          break;\n        case ' ':\n          break;\n      }\n    }\n  }\n\n  cursor = SDL_CreateCursor(data, mask, 32, 32, 0, 0);\n  return cursor;\n}\n\n/**\n * @brief Check call to SDL_CreateCursor and SDL_FreeCursor\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_CreateCursor\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_FreeCursor\n */\nint\nmouse_createFreeCursor(void *arg)\n{\n    SDL_Cursor *cursor;\n\n    /* Create a cursor */\n    cursor = _initArrowCursor(_mouseArrowData);\n        SDLTest_AssertPass(\"Call to SDL_CreateCursor()\");\n        SDLTest_AssertCheck(cursor != NULL, \"Validate result from SDL_CreateCursor() is not NULL\");\n    if (cursor == NULL) {\n        return TEST_ABORTED;\n    }\n\n    /* Free cursor again */\n    SDL_FreeCursor(cursor);\n    SDLTest_AssertPass(\"Call to SDL_FreeCursor()\");\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_CreateColorCursor and SDL_FreeCursor\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_CreateColorCursor\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_FreeCursor\n */\nint\nmouse_createFreeColorCursor(void *arg)\n{\n    SDL_Surface *face;\n    SDL_Cursor *cursor;\n\n    /* Get sample surface */\n    face = SDLTest_ImageFace();\n    SDLTest_AssertCheck(face != NULL, \"Validate sample input image is not NULL\");\n    if (face == NULL) return TEST_ABORTED;\n\n    /* Create a color cursor from surface */\n    cursor = SDL_CreateColorCursor(face, 0, 0);\n        SDLTest_AssertPass(\"Call to SDL_CreateColorCursor()\");\n        SDLTest_AssertCheck(cursor != NULL, \"Validate result from SDL_CreateColorCursor() is not NULL\");\n    if (cursor == NULL) {\n        SDL_FreeSurface(face);\n        return TEST_ABORTED;\n    }\n\n    /* Free cursor again */\n    SDL_FreeCursor(cursor);\n    SDLTest_AssertPass(\"Call to SDL_FreeCursor()\");\n\n    /* Clean up */\n    SDL_FreeSurface(face);\n\n    return TEST_COMPLETED;\n}\n\n/* Helper that changes cursor visibility */\nvoid _changeCursorVisibility(int state)\n{\n    int oldState;\n    int newState;\n    int result;\n\n        oldState = SDL_ShowCursor(SDL_QUERY);\n    SDLTest_AssertPass(\"Call to SDL_ShowCursor(SDL_QUERY)\");\n\n        result = SDL_ShowCursor(state);\n    SDLTest_AssertPass(\"Call to SDL_ShowCursor(%s)\", (state == SDL_ENABLE) ? \"SDL_ENABLE\" : \"SDL_DISABLE\");\n    SDLTest_AssertCheck(result == oldState, \"Validate result from SDL_ShowCursor(%s), expected: %i, got: %i\",\n        (state == SDL_ENABLE) ? \"SDL_ENABLE\" : \"SDL_DISABLE\", oldState, result);\n\n    newState = SDL_ShowCursor(SDL_QUERY);\n    SDLTest_AssertPass(\"Call to SDL_ShowCursor(SDL_QUERY)\");\n    SDLTest_AssertCheck(state == newState, \"Validate new state, expected: %i, got: %i\",\n        state, newState);\n}\n\n/**\n * @brief Check call to SDL_ShowCursor\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_ShowCursor\n */\nint\nmouse_showCursor(void *arg)\n{\n    int currentState;\n\n    /* Get current state */\n    currentState = SDL_ShowCursor(SDL_QUERY);\n    SDLTest_AssertPass(\"Call to SDL_ShowCursor(SDL_QUERY)\");\n    SDLTest_AssertCheck(currentState == SDL_DISABLE || currentState == SDL_ENABLE,\n        \"Validate result is %i or %i, got: %i\", SDL_DISABLE, SDL_ENABLE, currentState);\n    if (currentState == SDL_DISABLE) {\n        /* Show the cursor, then hide it again */\n        _changeCursorVisibility(SDL_ENABLE);\n        _changeCursorVisibility(SDL_DISABLE);\n    } else if (currentState == SDL_ENABLE) {\n        /* Hide the cursor, then show it again */\n        _changeCursorVisibility(SDL_DISABLE);\n        _changeCursorVisibility(SDL_ENABLE);\n    } else {\n        return TEST_ABORTED;\n    }\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_SetCursor\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetCursor\n */\nint\nmouse_setCursor(void *arg)\n{\n    SDL_Cursor *cursor;\n\n    /* Create a cursor */\n    cursor = _initArrowCursor(_mouseArrowData);\n        SDLTest_AssertPass(\"Call to SDL_CreateCursor()\");\n        SDLTest_AssertCheck(cursor != NULL, \"Validate result from SDL_CreateCursor() is not NULL\");\n    if (cursor == NULL) {\n        return TEST_ABORTED;\n    }\n\n    /* Set the arrow cursor */\n    SDL_SetCursor(cursor);\n    SDLTest_AssertPass(\"Call to SDL_SetCursor(cursor)\");\n\n    /* Force redraw */\n    SDL_SetCursor(NULL);\n    SDLTest_AssertPass(\"Call to SDL_SetCursor(NULL)\");\n\n    /* Free cursor again */\n    SDL_FreeCursor(cursor);\n    SDLTest_AssertPass(\"Call to SDL_FreeCursor()\");\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetCursor\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetCursor\n */\nint\nmouse_getCursor(void *arg)\n{\n    SDL_Cursor *cursor;\n\n    /* Get current cursor */\n    cursor = SDL_GetCursor();\n        SDLTest_AssertPass(\"Call to SDL_GetCursor()\");\n        SDLTest_AssertCheck(cursor != NULL, \"Validate result from SDL_GetCursor() is not NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetRelativeMouseMode and SDL_SetRelativeMouseMode\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetRelativeMouseMode\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_SetRelativeMouseMode\n */\nint\nmouse_getSetRelativeMouseMode(void *arg)\n{\n    int result;\n        int i;\n    SDL_bool initialState;\n    SDL_bool currentState;\n\n    /* Capture original state so we can revert back to it later */\n    initialState = SDL_GetRelativeMouseMode();\n        SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseMode()\");\n\n        /* Repeat twice to check D->D transition */\n        for (i=0; i<2; i++) {\n      /* Disable - should always be supported */\n          result = SDL_SetRelativeMouseMode(SDL_FALSE);\n          SDLTest_AssertPass(\"Call to SDL_SetRelativeMouseMode(FALSE)\");\n          SDLTest_AssertCheck(result == 0, \"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i\", result);\n      currentState = SDL_GetRelativeMouseMode();\n          SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseMode()\");\n          SDLTest_AssertCheck(currentState == SDL_FALSE, \"Validate current state is FALSE, got: %i\", currentState);\n        }\n\n        /* Repeat twice to check D->E->E transition */\n        for (i=0; i<2; i++) {\n      /* Enable - may not be supported */\n          result = SDL_SetRelativeMouseMode(SDL_TRUE);\n          SDLTest_AssertPass(\"Call to SDL_SetRelativeMouseMode(TRUE)\");\n          if (result != -1) {\n            SDLTest_AssertCheck(result == 0, \"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i\", result);\n        currentState = SDL_GetRelativeMouseMode();\n            SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseMode()\");\n            SDLTest_AssertCheck(currentState == SDL_TRUE, \"Validate current state is TRUE, got: %i\", currentState);\n          }\n        }\n\n    /* Disable to check E->D transition */\n        result = SDL_SetRelativeMouseMode(SDL_FALSE);\n        SDLTest_AssertPass(\"Call to SDL_SetRelativeMouseMode(FALSE)\");\n        SDLTest_AssertCheck(result == 0, \"Validate result value from SDL_SetRelativeMouseMode, expected: 0, got: %i\", result);\n    currentState = SDL_GetRelativeMouseMode();\n        SDLTest_AssertPass(\"Call to SDL_GetRelativeMouseMode()\");\n        SDLTest_AssertCheck(currentState == SDL_FALSE, \"Validate current state is FALSE, got: %i\", currentState);\n\n        /* Revert to original state - ignore result */\n        result = SDL_SetRelativeMouseMode(initialState);\n\n    return TEST_COMPLETED;\n}\n\n#define MOUSE_TESTWINDOW_WIDTH  320\n#define MOUSE_TESTWINDOW_HEIGHT 200\n\n/**\n * Creates a test window\n */\nSDL_Window *_createMouseSuiteTestWindow()\n{\n  int posX = 100, posY = 100, width = MOUSE_TESTWINDOW_WIDTH, height = MOUSE_TESTWINDOW_HEIGHT;\n  SDL_Window *window;\n  window = SDL_CreateWindow(\"mouse_createMouseSuiteTestWindow\", posX, posY, width, height, 0);\n  SDLTest_AssertPass(\"SDL_CreateWindow()\");\n  SDLTest_AssertCheck(window != NULL, \"Check SDL_CreateWindow result\");\n  return window;\n}\n\n/*\n * Destroy test window\n */\nvoid _destroyMouseSuiteTestWindow(SDL_Window *window)\n{\n  if (window != NULL) {\n     SDL_DestroyWindow(window);\n     window = NULL;\n     SDLTest_AssertPass(\"SDL_DestroyWindow()\");\n  }\n}\n\n/**\n * @brief Check call to SDL_WarpMouseInWindow\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_WarpMouseInWindow\n */\nint\nmouse_warpMouseInWindow(void *arg)\n{\n    const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;\n    int numPositions = 6;\n    int xPositions[6];\n    int yPositions[6];\n    int x, y, i, j;\n    SDL_Window *window;\n\n    xPositions[0] = -1;\n    xPositions[1] = 0;\n    xPositions[2] = 1;\n    xPositions[3] = w-1;\n    xPositions[4] = w;\n    xPositions[5] = w+1;\n    yPositions[0] = -1;\n    yPositions[1] = 0;\n    yPositions[2] = 1;\n    yPositions[3] = h-1;\n    yPositions[4] = h;\n    yPositions[5] = h+1;\n    /* Create test window */\n    window = _createMouseSuiteTestWindow();\n    if (window == NULL) return TEST_ABORTED;\n\n    /* Mouse to random position inside window */\n    x = SDLTest_RandomIntegerInRange(1, w-1);\n    y = SDLTest_RandomIntegerInRange(1, h-1);\n    SDL_WarpMouseInWindow(window, x, y);\n    SDLTest_AssertPass(\"SDL_WarpMouseInWindow(...,%i,%i)\", x, y);\n\n        /* Same position again */\n    SDL_WarpMouseInWindow(window, x, y);\n    SDLTest_AssertPass(\"SDL_WarpMouseInWindow(...,%i,%i)\", x, y);\n\n    /* Mouse to various boundary positions */\n    for (i=0; i<numPositions; i++) {\n      for (j=0; j<numPositions; j++) {\n        x = xPositions[i];\n        y = yPositions[j];\n        SDL_WarpMouseInWindow(window, x, y);\n        SDLTest_AssertPass(\"SDL_WarpMouseInWindow(...,%i,%i)\", x, y);\n\n        /* TODO: add tracking of events and check that each call generates a mouse motion event */\n        SDL_PumpEvents();\n        SDLTest_AssertPass(\"SDL_PumpEvents()\");\n      }\n    }\n\n\n        /* Clean up test window */\n    _destroyMouseSuiteTestWindow(window);\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Check call to SDL_GetMouseFocus\n *\n * @sa http://wiki.libsdl.org/moin.cgi/SDL_GetMouseFocus\n */\nint\nmouse_getMouseFocus(void *arg)\n{\n    const int w = MOUSE_TESTWINDOW_WIDTH, h = MOUSE_TESTWINDOW_HEIGHT;\n    int x, y;\n    SDL_Window *window;\n    SDL_Window *focusWindow;\n\n    /* Get focus - focus non-deterministic */\n    focusWindow = SDL_GetMouseFocus();\n    SDLTest_AssertPass(\"SDL_GetMouseFocus()\");\n\n        /* Create test window */\n    window = _createMouseSuiteTestWindow();\n    if (window == NULL) return TEST_ABORTED;\n\n    /* Mouse to random position inside window */\n    x = SDLTest_RandomIntegerInRange(1, w-1);\n    y = SDLTest_RandomIntegerInRange(1, h-1);\n    SDL_WarpMouseInWindow(window, x, y);\n    SDLTest_AssertPass(\"SDL_WarpMouseInWindow(...,%i,%i)\", x, y);\n\n    /* Pump events to update focus state */\n    SDL_PumpEvents();\n    SDLTest_AssertPass(\"SDL_PumpEvents()\");\n\n        /* Get focus with explicit window setup - focus deterministic */\n    focusWindow = SDL_GetMouseFocus();\n    SDLTest_AssertPass(\"SDL_GetMouseFocus()\");\n    SDLTest_AssertCheck (focusWindow != NULL, \"Check returned window value is not NULL\");\n    SDLTest_AssertCheck (focusWindow == window, \"Check returned window value is test window\");\n\n    /* Mouse to random position outside window */\n    x = SDLTest_RandomIntegerInRange(-9, -1);\n    y = SDLTest_RandomIntegerInRange(-9, -1);\n    SDL_WarpMouseInWindow(window, x, y);\n    SDLTest_AssertPass(\"SDL_WarpMouseInWindow(...,%i,%i)\", x, y);\n\n        /* Clean up test window */\n    _destroyMouseSuiteTestWindow(window);\n\n    /* Pump events to update focus state */\n    SDL_PumpEvents();\n    SDLTest_AssertPass(\"SDL_PumpEvents()\");\n\n        /* Get focus for non-existing window */\n    focusWindow = SDL_GetMouseFocus();\n    SDLTest_AssertPass(\"SDL_GetMouseFocus()\");\n    SDLTest_AssertCheck (focusWindow == NULL, \"Check returned window value is NULL\");\n\n\n    return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Mouse test cases */\nstatic const SDLTest_TestCaseReference mouseTest1 =\n        { (SDLTest_TestCaseFp)mouse_getMouseState, \"mouse_getMouseState\", \"Check call to SDL_GetMouseState\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest2 =\n        { (SDLTest_TestCaseFp)mouse_getRelativeMouseState, \"mouse_getRelativeMouseState\", \"Check call to SDL_GetRelativeMouseState\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest3 =\n        { (SDLTest_TestCaseFp)mouse_createFreeCursor, \"mouse_createFreeCursor\", \"Check call to SDL_CreateCursor and SDL_FreeCursor\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest4 =\n        { (SDLTest_TestCaseFp)mouse_showCursor, \"mouse_showCursor\", \"Check call to SDL_ShowCursor\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest5 =\n        { (SDLTest_TestCaseFp)mouse_setCursor, \"mouse_setCursor\", \"Check call to SDL_SetCursor\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest6 =\n        { (SDLTest_TestCaseFp)mouse_getCursor, \"mouse_getCursor\", \"Check call to SDL_GetCursor\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest7 =\n        { (SDLTest_TestCaseFp)mouse_warpMouseInWindow, \"mouse_warpMouseInWindow\", \"Check call to SDL_WarpMouseInWindow\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest8 =\n        { (SDLTest_TestCaseFp)mouse_getMouseFocus, \"mouse_getMouseFocus\", \"Check call to SDL_getMouseFocus\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest9 =\n        { (SDLTest_TestCaseFp)mouse_createFreeColorCursor, \"mouse_createFreeColorCursor\", \"Check call to SDL_CreateColorCursor and SDL_FreeCursor\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference mouseTest10 =\n        { (SDLTest_TestCaseFp)mouse_getSetRelativeMouseMode, \"mouse_getSetRelativeMouseMode\", \"Check call to SDL_GetRelativeMouseMode and SDL_SetRelativeMouseMode\", TEST_ENABLED };\n\n/* Sequence of Mouse test cases */\nstatic const SDLTest_TestCaseReference *mouseTests[] =  {\n    &mouseTest1, &mouseTest2, &mouseTest3, &mouseTest4, &mouseTest5, &mouseTest6,\n    &mouseTest7, &mouseTest8, &mouseTest9, &mouseTest10, NULL\n};\n\n/* Mouse test suite (global) */\nSDLTest_TestSuiteReference mouseTestSuite = {\n    \"Mouse\",\n    NULL,\n    mouseTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_pixels.c",
    "content": "/**\n * Pixels test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* Test case functions */\n\n/* Definition of all RGB formats used to test pixel conversions */\nconst int _numRGBPixelFormats = 30;\nUint32 _RGBPixelFormats[] =\n  {\n    SDL_PIXELFORMAT_INDEX1LSB,\n    SDL_PIXELFORMAT_INDEX1MSB,\n    SDL_PIXELFORMAT_INDEX4LSB,\n    SDL_PIXELFORMAT_INDEX4MSB,\n    SDL_PIXELFORMAT_INDEX8,\n    SDL_PIXELFORMAT_RGB332,\n    SDL_PIXELFORMAT_RGB444,\n    SDL_PIXELFORMAT_RGB555,\n    SDL_PIXELFORMAT_BGR555,\n    SDL_PIXELFORMAT_ARGB4444,\n    SDL_PIXELFORMAT_RGBA4444,\n    SDL_PIXELFORMAT_ABGR4444,\n    SDL_PIXELFORMAT_BGRA4444,\n    SDL_PIXELFORMAT_ARGB1555,\n    SDL_PIXELFORMAT_RGBA5551,\n    SDL_PIXELFORMAT_ABGR1555,\n    SDL_PIXELFORMAT_BGRA5551,\n    SDL_PIXELFORMAT_RGB565,\n    SDL_PIXELFORMAT_BGR565,\n    SDL_PIXELFORMAT_RGB24,\n    SDL_PIXELFORMAT_BGR24,\n    SDL_PIXELFORMAT_RGB888,\n    SDL_PIXELFORMAT_RGBX8888,\n    SDL_PIXELFORMAT_BGR888,\n    SDL_PIXELFORMAT_BGRX8888,\n    SDL_PIXELFORMAT_ARGB8888,\n    SDL_PIXELFORMAT_RGBA8888,\n    SDL_PIXELFORMAT_ABGR8888,\n    SDL_PIXELFORMAT_BGRA8888,\n    SDL_PIXELFORMAT_ARGB2101010\n  };\nchar* _RGBPixelFormatsVerbose[] =\n  {\n    \"SDL_PIXELFORMAT_INDEX1LSB\",\n    \"SDL_PIXELFORMAT_INDEX1MSB\",\n    \"SDL_PIXELFORMAT_INDEX4LSB\",\n    \"SDL_PIXELFORMAT_INDEX4MSB\",\n    \"SDL_PIXELFORMAT_INDEX8\",\n    \"SDL_PIXELFORMAT_RGB332\",\n    \"SDL_PIXELFORMAT_RGB444\",\n    \"SDL_PIXELFORMAT_RGB555\",\n    \"SDL_PIXELFORMAT_BGR555\",\n    \"SDL_PIXELFORMAT_ARGB4444\",\n    \"SDL_PIXELFORMAT_RGBA4444\",\n    \"SDL_PIXELFORMAT_ABGR4444\",\n    \"SDL_PIXELFORMAT_BGRA4444\",\n    \"SDL_PIXELFORMAT_ARGB1555\",\n    \"SDL_PIXELFORMAT_RGBA5551\",\n    \"SDL_PIXELFORMAT_ABGR1555\",\n    \"SDL_PIXELFORMAT_BGRA5551\",\n    \"SDL_PIXELFORMAT_RGB565\",\n    \"SDL_PIXELFORMAT_BGR565\",\n    \"SDL_PIXELFORMAT_RGB24\",\n    \"SDL_PIXELFORMAT_BGR24\",\n    \"SDL_PIXELFORMAT_RGB888\",\n    \"SDL_PIXELFORMAT_RGBX8888\",\n    \"SDL_PIXELFORMAT_BGR888\",\n    \"SDL_PIXELFORMAT_BGRX8888\",\n    \"SDL_PIXELFORMAT_ARGB8888\",\n    \"SDL_PIXELFORMAT_RGBA8888\",\n    \"SDL_PIXELFORMAT_ABGR8888\",\n    \"SDL_PIXELFORMAT_BGRA8888\",\n    \"SDL_PIXELFORMAT_ARGB2101010\"\n  };\n\n/* Definition of all Non-RGB formats used to test pixel conversions */\nconst int _numNonRGBPixelFormats = 7;\nUint32 _nonRGBPixelFormats[] =\n  {\n    SDL_PIXELFORMAT_YV12,\n    SDL_PIXELFORMAT_IYUV,\n    SDL_PIXELFORMAT_YUY2,\n    SDL_PIXELFORMAT_UYVY,\n    SDL_PIXELFORMAT_YVYU,\n    SDL_PIXELFORMAT_NV12,\n    SDL_PIXELFORMAT_NV21\n  };\nchar* _nonRGBPixelFormatsVerbose[] =\n  {\n    \"SDL_PIXELFORMAT_YV12\",\n    \"SDL_PIXELFORMAT_IYUV\",\n    \"SDL_PIXELFORMAT_YUY2\",\n    \"SDL_PIXELFORMAT_UYVY\",\n    \"SDL_PIXELFORMAT_YVYU\",\n    \"SDL_PIXELFORMAT_NV12\",\n    \"SDL_PIXELFORMAT_NV21\"\n  };\n\n/* Definition of some invalid formats for negative tests */\nconst int _numInvalidPixelFormats = 2;\nUint32 _invalidPixelFormats[] =\n  {\n    0xfffffffe,\n    0xffffffff\n  };\nchar* _invalidPixelFormatsVerbose[] =\n  {\n    \"SDL_PIXELFORMAT_UNKNOWN\",\n    \"SDL_PIXELFORMAT_UNKNOWN\"\n  };\n\n/* Test case functions */\n\n/**\n * @brief Call to SDL_AllocFormat and SDL_FreeFormat\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocFormat\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreeFormat\n */\nint\npixels_allocFreeFormat(void *arg)\n{\n  const char *unknownFormat = \"SDL_PIXELFORMAT_UNKNOWN\";\n  const char *expectedError = \"Parameter 'format' is invalid\";\n  const char *error;\n  int i;\n  Uint32 format;\n  Uint32 masks;\n  SDL_PixelFormat* result;\n\n  /* Blank/unknown format */\n  format = 0;\n  SDLTest_Log(\"RGB Format: %s (%u)\", unknownFormat, format);\n\n  /* Allocate format */\n  result = SDL_AllocFormat(format);\n  SDLTest_AssertPass(\"Call to SDL_AllocFormat()\");\n  SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n  if (result != NULL) {\n    SDLTest_AssertCheck(result->format == format, \"Verify value of result.format; expected: %u, got %u\", format, result->format);\n    SDLTest_AssertCheck(result->BitsPerPixel == 0, \"Verify value of result.BitsPerPixel; expected: 0, got %u\", result->BitsPerPixel);\n    SDLTest_AssertCheck(result->BytesPerPixel == 0, \"Verify value of result.BytesPerPixel; expected: 0, got %u\", result->BytesPerPixel);\n    masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;\n    SDLTest_AssertCheck(masks == 0, \"Verify value of result.[RGBA]mask combined; expected: 0, got %u\", masks);\n\n    /* Deallocate again */\n    SDL_FreeFormat(result);\n    SDLTest_AssertPass(\"Call to SDL_FreeFormat()\");\n  }\n\n  /* RGB formats */\n  for (i = 0; i < _numRGBPixelFormats; i++) {\n    format = _RGBPixelFormats[i];\n    SDLTest_Log(\"RGB Format: %s (%u)\", _RGBPixelFormatsVerbose[i], format);\n\n    /* Allocate format */\n    result = SDL_AllocFormat(format);\n    SDLTest_AssertPass(\"Call to SDL_AllocFormat()\");\n    SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n    if (result != NULL) {\n      SDLTest_AssertCheck(result->format == format, \"Verify value of result.format; expected: %u, got %u\", format, result->format);\n      SDLTest_AssertCheck(result->BitsPerPixel > 0, \"Verify value of result.BitsPerPixel; expected: >0, got %u\", result->BitsPerPixel);\n      SDLTest_AssertCheck(result->BytesPerPixel > 0, \"Verify value of result.BytesPerPixel; expected: >0, got %u\", result->BytesPerPixel);\n      if (result->palette != NULL) {\n         masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;\n         SDLTest_AssertCheck(masks > 0, \"Verify value of result.[RGBA]mask combined; expected: >0, got %u\", masks);\n      }\n\n      /* Deallocate again */\n      SDL_FreeFormat(result);\n      SDLTest_AssertPass(\"Call to SDL_FreeFormat()\");\n    }\n  }\n\n  /* Non-RGB formats */\n  for (i = 0; i < _numNonRGBPixelFormats; i++) {\n    format = _nonRGBPixelFormats[i];\n    SDLTest_Log(\"non-RGB Format: %s (%u)\", _nonRGBPixelFormatsVerbose[i], format);\n\n    /* Try to allocate format */\n    result = SDL_AllocFormat(format);\n    SDLTest_AssertPass(\"Call to SDL_AllocFormat()\");\n    SDLTest_AssertCheck(result == NULL, \"Verify result is NULL\");\n  }\n\n  /* Negative cases */\n\n  /* Invalid Formats */\n  for (i = 0; i < _numInvalidPixelFormats; i++) {\n    SDL_ClearError();\n    SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n    format = _invalidPixelFormats[i];\n    result = SDL_AllocFormat(format);\n    SDLTest_AssertPass(\"Call to SDL_AllocFormat(%u)\", format);\n    SDLTest_AssertCheck(result == NULL, \"Verify result is NULL\");\n    error = SDL_GetError();\n    SDLTest_AssertPass(\"Call to SDL_GetError()\");\n    SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n    if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n    }\n  }\n\n  /* Invalid free pointer */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_FreeFormat(NULL);\n  SDLTest_AssertPass(\"Call to SDL_FreeFormat(NULL)\");\n  error = SDL_GetError();\n  SDLTest_AssertPass(\"Call to SDL_GetError()\");\n  SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n  if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError, error);\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_GetPixelFormatName\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetPixelFormatName\n */\nint\npixels_getPixelFormatName(void *arg)\n{\n  const char *unknownFormat = \"SDL_PIXELFORMAT_UNKNOWN\";\n  const char *error;\n  int i;\n  Uint32 format;\n  char* result;\n\n  /* Blank/undefined format */\n  format = 0;\n  SDLTest_Log(\"RGB Format: %s (%u)\", unknownFormat, format);\n\n  /* Get name of format */\n  result = (char *)SDL_GetPixelFormatName(format);\n  SDLTest_AssertPass(\"Call to SDL_GetPixelFormatName()\");\n  SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n  if (result != NULL) {\n      SDLTest_AssertCheck(result[0] != '\\0', \"Verify result is non-empty\");\n      SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0,\n        \"Verify result text; expected: %s, got %s\", unknownFormat, result);\n  }\n\n  /* RGB formats */\n  for (i = 0; i < _numRGBPixelFormats; i++) {\n    format = _RGBPixelFormats[i];\n    SDLTest_Log(\"RGB Format: %s (%u)\", _RGBPixelFormatsVerbose[i], format);\n\n    /* Get name of format */\n    result = (char *)SDL_GetPixelFormatName(format);\n    SDLTest_AssertPass(\"Call to SDL_GetPixelFormatName()\");\n    SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n    if (result != NULL) {\n      SDLTest_AssertCheck(result[0] != '\\0', \"Verify result is non-empty\");\n      SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0,\n        \"Verify result text; expected: %s, got %s\", _RGBPixelFormatsVerbose[i], result);\n    }\n  }\n\n  /* Non-RGB formats */\n  for (i = 0; i < _numNonRGBPixelFormats; i++) {\n    format = _nonRGBPixelFormats[i];\n    SDLTest_Log(\"non-RGB Format: %s (%u)\", _nonRGBPixelFormatsVerbose[i], format);\n\n    /* Get name of format */\n    result = (char *)SDL_GetPixelFormatName(format);\n    SDLTest_AssertPass(\"Call to SDL_GetPixelFormatName()\");\n    SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n    if (result != NULL) {\n      SDLTest_AssertCheck(result[0] != '\\0', \"Verify result is non-empty\");\n      SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0,\n        \"Verify result text; expected: %s, got %s\", _nonRGBPixelFormatsVerbose[i], result);\n    }\n  }\n\n  /* Negative cases */\n\n  /* Invalid Formats */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  for (i = 0; i < _numInvalidPixelFormats; i++) {\n    format = _invalidPixelFormats[i];\n    result = (char *)SDL_GetPixelFormatName(format);\n    SDLTest_AssertPass(\"Call to SDL_GetPixelFormatName(%u)\", format);\n    SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n    if (result != NULL) {\n      SDLTest_AssertCheck(result[0] != '\\0',\n        \"Verify result is non-empty; got: %s\", result);\n      SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0,\n        \"Validate name is UNKNOWN, expected: '%s', got: '%s'\", _invalidPixelFormatsVerbose[i], result);\n    }\n    error = SDL_GetError();\n    SDLTest_AssertPass(\"Call to SDL_GetError()\");\n    SDLTest_AssertCheck(error == NULL || error[0] == '\\0', \"Validate that error message is empty\");\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_AllocPalette and SDL_FreePalette\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_AllocPalette\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_FreePalette\n */\nint\npixels_allocFreePalette(void *arg)\n{\n  const char *expectedError1 = \"Parameter 'ncolors' is invalid\";\n  const char *expectedError2 = \"Parameter 'palette' is invalid\";\n  const char *error;\n  int variation;\n  int i;\n  int ncolors;\n  SDL_Palette* result;\n\n  /* Allocate palette */\n  for (variation = 1; variation <= 3; variation++) {\n    switch (variation) {\n      /* Just one color */\n      case 1:\n        ncolors = 1;\n        break;\n      /* Two colors */\n      case 2:\n        ncolors = 2;\n        break;\n      /* More than two colors */\n      case 3:\n        ncolors = SDLTest_RandomIntegerInRange(8, 16);\n        break;\n    }\n\n    result = SDL_AllocPalette(ncolors);\n    SDLTest_AssertPass(\"Call to SDL_AllocPalette(%d)\", ncolors);\n    SDLTest_AssertCheck(result != NULL, \"Verify result is not NULL\");\n    if (result != NULL) {\n      SDLTest_AssertCheck(result->ncolors == ncolors, \"Verify value of result.ncolors; expected: %u, got %u\", ncolors, result->ncolors);\n      if (result->ncolors > 0) {\n        SDLTest_AssertCheck(result->colors != NULL, \"Verify value of result.colors is not NULL\");\n        if (result->colors != NULL) {\n          for(i = 0; i < result->ncolors; i++) {\n            SDLTest_AssertCheck(result->colors[i].r == 255, \"Verify value of result.colors[%d].r; expected: 255, got %u\", i, result->colors[i].r);\n            SDLTest_AssertCheck(result->colors[i].g == 255, \"Verify value of result.colors[%d].g; expected: 255, got %u\", i, result->colors[i].g);\n            SDLTest_AssertCheck(result->colors[i].b == 255, \"Verify value of result.colors[%d].b; expected: 255, got %u\", i, result->colors[i].b);\n           }\n         }\n      }\n\n      /* Deallocate again */\n      SDL_FreePalette(result);\n      SDLTest_AssertPass(\"Call to SDL_FreePalette()\");\n    }\n  }\n\n  /* Negative cases */\n\n  /* Invalid number of colors */\n  for (ncolors = 0; ncolors > -3; ncolors--) {\n    SDL_ClearError();\n    SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n    result = SDL_AllocPalette(ncolors);\n    SDLTest_AssertPass(\"Call to SDL_AllocPalette(%d)\", ncolors);\n    SDLTest_AssertCheck(result == NULL, \"Verify result is NULL\");\n    error = SDL_GetError();\n    SDLTest_AssertPass(\"Call to SDL_GetError()\");\n    SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n    if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError1, error);\n    }\n  }\n\n  /* Invalid free pointer */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_FreePalette(NULL);\n  SDLTest_AssertPass(\"Call to SDL_FreePalette(NULL)\");\n  error = SDL_GetError();\n  SDLTest_AssertPass(\"Call to SDL_GetError()\");\n  SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n  if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError2, error);\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_CalculateGammaRamp\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_CalculateGammaRamp\n */\nint\npixels_calcGammaRamp(void *arg)\n{\n  const char *expectedError1 = \"Parameter 'gamma' is invalid\";\n  const char *expectedError2 = \"Parameter 'ramp' is invalid\";\n  const char *error;\n  float gamma;\n  Uint16 *ramp;\n  int variation;\n  int i;\n  int changed;\n  Uint16 magic = 0xbeef;\n\n  /* Allocate temp ramp array and fill with some value */\n  ramp = (Uint16 *)SDL_malloc(256 * sizeof(Uint16));\n  SDLTest_AssertCheck(ramp != NULL, \"Validate temp ramp array could be allocated\");\n  if (ramp == NULL) return TEST_ABORTED;\n\n  /* Make call with different gamma values */\n  for (variation = 0; variation < 4; variation++) {\n    switch (variation) {\n      /* gamma = 0 all black */\n      case 0:\n        gamma = 0.0f;\n        break;\n      /* gamma = 1 identity */\n      case 1:\n        gamma = 1.0f;\n        break;\n      /* gamma = [0.2,0.8] normal range */\n      case 2:\n        gamma = 0.2f + 0.8f * SDLTest_RandomUnitFloat();\n        break;\n      /* gamma = >1.1 non-standard range */\n      case 3:\n        gamma = 1.1f + SDLTest_RandomUnitFloat();\n        break;\n    }\n\n    /* Make call and check that values were updated */\n    for (i = 0; i < 256; i++) ramp[i] = magic;\n    SDL_CalculateGammaRamp(gamma, ramp);\n    SDLTest_AssertPass(\"Call to SDL_CalculateGammaRamp(%f)\", gamma);\n    changed = 0;\n    for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;\n    SDLTest_AssertCheck(changed > 250, \"Validate that ramp was calculated; expected: >250 values changed, got: %d values changed\", changed);\n\n    /* Additional value checks for some cases */\n    i = SDLTest_RandomIntegerInRange(64,192);\n    switch (variation) {\n      case 0:\n        SDLTest_AssertCheck(ramp[i] == 0, \"Validate value at position %d; expected: 0, got: %d\", i, ramp[i]);\n        break;\n      case 1:\n        SDLTest_AssertCheck(ramp[i] == ((i << 8) | i), \"Validate value at position %d; expected: %d, got: %d\", i, (i << 8) | i, ramp[i]);\n        break;\n      case 2:\n      case 3:\n        SDLTest_AssertCheck(ramp[i] > 0, \"Validate value at position %d; expected: >0, got: %d\", i, ramp[i]);\n        break;\n    }\n  }\n\n  /* Negative cases */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  gamma = -1;\n  for (i=0; i<256; i++) ramp[i] = magic;\n  SDL_CalculateGammaRamp(gamma, ramp);\n  SDLTest_AssertPass(\"Call to SDL_CalculateGammaRamp(%f)\", gamma);\n  error = SDL_GetError();\n  SDLTest_AssertPass(\"Call to SDL_GetError()\");\n  SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n  if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError1) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError1, error);\n  }\n  changed = 0;\n  for (i = 0; i < 256; i++) if (ramp[i] != magic) changed++;\n  SDLTest_AssertCheck(changed ==0, \"Validate that ramp unchanged; expected: 0 values changed got: %d values changed\", changed);\n\n  SDL_CalculateGammaRamp(0.5f, NULL);\n  SDLTest_AssertPass(\"Call to SDL_CalculateGammaRamp(0.5,NULL)\");\n  error = SDL_GetError();\n  SDLTest_AssertPass(\"Call to SDL_GetError()\");\n  SDLTest_AssertCheck(error != NULL, \"Validate that error message was not NULL\");\n  if (error != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(error, expectedError2) == 0,\n          \"Validate error message, expected: '%s', got: '%s'\", expectedError2, error);\n  }\n\n  /* Cleanup */\n  SDL_free(ramp);\n\n\n  return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Pixels test cases */\nstatic const SDLTest_TestCaseReference pixelsTest1 =\n        { (SDLTest_TestCaseFp)pixels_allocFreeFormat, \"pixels_allocFreeFormat\", \"Call to SDL_AllocFormat and SDL_FreeFormat\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference pixelsTest2 =\n        { (SDLTest_TestCaseFp)pixels_allocFreePalette, \"pixels_allocFreePalette\", \"Call to SDL_AllocPalette and SDL_FreePalette\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference pixelsTest3 =\n        { (SDLTest_TestCaseFp)pixels_calcGammaRamp, \"pixels_calcGammaRamp\", \"Call to SDL_CalculateGammaRamp\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference pixelsTest4 =\n        { (SDLTest_TestCaseFp)pixels_getPixelFormatName, \"pixels_getPixelFormatName\", \"Call to SDL_GetPixelFormatName\", TEST_ENABLED };\n\n/* Sequence of Pixels test cases */\nstatic const SDLTest_TestCaseReference *pixelsTests[] =  {\n    &pixelsTest1, &pixelsTest2, &pixelsTest3, &pixelsTest4, NULL\n};\n\n/* Pixels test suite (global) */\nSDLTest_TestSuiteReference pixelsTestSuite = {\n    \"Pixels\",\n    NULL,\n    pixelsTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_platform.c",
    "content": "/**\n * Original code: automated SDL platform test written by Edgar Simo \"bobbens\"\n * Extended and updated by aschiffler at ferzkopp dot net\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Helper functions */\n\n/**\n * @brief Compare sizes of types.\n *\n * @note Watcom C flags these as Warning 201: \"Unreachable code\" if you just\n *  compare them directly, so we push it through a function to keep the\n *  compiler quiet.  --ryan.\n */\nstatic int _compareSizeOfType( size_t sizeoftype, size_t hardcodetype )\n{\n    return sizeoftype != hardcodetype;\n}\n\n/* Test case functions */\n\n/**\n * @brief Tests type sizes.\n */\nint platform_testTypes(void *arg)\n{\n   int ret;\n\n   ret = _compareSizeOfType( sizeof(Uint8), 1 );\n   SDLTest_AssertCheck( ret == 0, \"sizeof(Uint8) = %lu, expected  1\", (unsigned long)sizeof(Uint8) );\n\n   ret = _compareSizeOfType( sizeof(Uint16), 2 );\n   SDLTest_AssertCheck( ret == 0, \"sizeof(Uint16) = %lu, expected 2\", (unsigned long)sizeof(Uint16) );\n\n   ret = _compareSizeOfType( sizeof(Uint32), 4 );\n   SDLTest_AssertCheck( ret == 0, \"sizeof(Uint32) = %lu, expected 4\", (unsigned long)sizeof(Uint32) );\n\n   ret = _compareSizeOfType( sizeof(Uint64), 8 );\n   SDLTest_AssertCheck( ret == 0, \"sizeof(Uint64) = %lu, expected 8\", (unsigned long)sizeof(Uint64) );\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests platform endianness and SDL_SwapXY functions.\n */\nint platform_testEndianessAndSwap(void *arg)\n{\n    int real_byteorder;\n    Uint16 value = 0x1234;\n    Uint16 value16 = 0xCDAB;\n    Uint16 swapped16 = 0xABCD;\n    Uint32 value32 = 0xEFBEADDE;\n    Uint32 swapped32 = 0xDEADBEEF;\n\n    Uint64 value64, swapped64;\n    value64 = 0xEFBEADDE;\n    value64 <<= 32;\n    value64 |= 0xCDAB3412;\n    swapped64 = 0x1234ABCD;\n    swapped64 <<= 32;\n    swapped64 |= 0xDEADBEEF;\n\n    if ((*((char *) &value) >> 4) == 0x1) {\n        real_byteorder = SDL_BIG_ENDIAN;\n    } else {\n        real_byteorder = SDL_LIL_ENDIAN;\n    }\n\n    /* Test endianness. */\n    SDLTest_AssertCheck( real_byteorder == SDL_BYTEORDER,\n             \"Machine detected as %s endian, appears to be %s endian.\",\n             (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? \"little\" : \"big\",\n             (real_byteorder == SDL_LIL_ENDIAN) ? \"little\" : \"big\" );\n\n    /* Test 16 swap. */\n    SDLTest_AssertCheck( SDL_Swap16(value16) == swapped16,\n             \"SDL_Swap16(): 16 bit swapped: 0x%X => 0x%X\",\n             value16, SDL_Swap16(value16) );\n\n    /* Test 32 swap. */\n    SDLTest_AssertCheck( SDL_Swap32(value32) == swapped32,\n             \"SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X\",\n             value32, SDL_Swap32(value32) );\n\n    /* Test 64 swap. */\n    SDLTest_AssertCheck( SDL_Swap64(value64) == swapped64,\n             \"SDL_Swap64(): 64 bit swapped: 0x%\"SDL_PRIX64\" => 0x%\"SDL_PRIX64,\n             value64, SDL_Swap64(value64) );\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_GetXYZ() functions\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetPlatform\n * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCount\n * http://wiki.libsdl.org/moin.cgi/SDL_GetCPUCacheLineSize\n * http://wiki.libsdl.org/moin.cgi/SDL_GetRevision\n * http://wiki.libsdl.org/moin.cgi/SDL_GetRevisionNumber\n */\nint platform_testGetFunctions (void *arg)\n{\n   char *platform;\n   char *revision;\n   int ret;\n   size_t len;\n\n   platform = (char *)SDL_GetPlatform();\n   SDLTest_AssertPass(\"SDL_GetPlatform()\");\n   SDLTest_AssertCheck(platform != NULL, \"SDL_GetPlatform() != NULL\");\n   if (platform != NULL) {\n     len = SDL_strlen(platform);\n     SDLTest_AssertCheck(len > 0,\n             \"SDL_GetPlatform(): expected non-empty platform, was platform: '%s', len: %i\",\n             platform,\n             (int) len);\n   }\n\n   ret = SDL_GetCPUCount();\n   SDLTest_AssertPass(\"SDL_GetCPUCount()\");\n   SDLTest_AssertCheck(ret > 0,\n             \"SDL_GetCPUCount(): expected count > 0, was: %i\",\n             ret);\n\n   ret = SDL_GetCPUCacheLineSize();\n   SDLTest_AssertPass(\"SDL_GetCPUCacheLineSize()\");\n   SDLTest_AssertCheck(ret >= 0,\n             \"SDL_GetCPUCacheLineSize(): expected size >= 0, was: %i\",\n             ret);\n\n   revision = (char *)SDL_GetRevision();\n   SDLTest_AssertPass(\"SDL_GetRevision()\");\n   SDLTest_AssertCheck(revision != NULL, \"SDL_GetRevision() != NULL\");\n\n   ret = SDL_GetRevisionNumber();\n   SDLTest_AssertPass(\"SDL_GetRevisionNumber()\");\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasXYZ() functions\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_Has3DNow\n * http://wiki.libsdl.org/moin.cgi/SDL_HasAltiVec\n * http://wiki.libsdl.org/moin.cgi/SDL_HasMMX\n * http://wiki.libsdl.org/moin.cgi/SDL_HasRDTSC\n * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE\n * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE2\n * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE3\n * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE41\n * http://wiki.libsdl.org/moin.cgi/SDL_HasSSE42\n * http://wiki.libsdl.org/moin.cgi/SDL_HasAVX\n */\nint platform_testHasFunctions (void *arg)\n{\n   int ret;\n\n   /* TODO: independently determine and compare values as well */\n\n   ret = SDL_HasRDTSC();\n   SDLTest_AssertPass(\"SDL_HasRDTSC()\");\n\n   ret = SDL_HasAltiVec();\n   SDLTest_AssertPass(\"SDL_HasAltiVec()\");\n\n   ret = SDL_HasMMX();\n   SDLTest_AssertPass(\"SDL_HasMMX()\");\n\n   ret = SDL_Has3DNow();\n   SDLTest_AssertPass(\"SDL_Has3DNow()\");\n\n   ret = SDL_HasSSE();\n   SDLTest_AssertPass(\"SDL_HasSSE()\");\n\n   ret = SDL_HasSSE2();\n   SDLTest_AssertPass(\"SDL_HasSSE2()\");\n\n   ret = SDL_HasSSE3();\n   SDLTest_AssertPass(\"SDL_HasSSE3()\");\n\n   ret = SDL_HasSSE41();\n   SDLTest_AssertPass(\"SDL_HasSSE41()\");\n\n   ret = SDL_HasSSE42();\n   SDLTest_AssertPass(\"SDL_HasSSE42()\");\n\n   ret = SDL_HasAVX();\n   SDLTest_AssertPass(\"SDL_HasAVX()\");\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_GetVersion\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetVersion\n */\nint platform_testGetVersion(void *arg)\n{\n   SDL_version linked;\n   int major = SDL_MAJOR_VERSION;\n   int minor = SDL_MINOR_VERSION;\n\n   SDL_GetVersion(&linked);\n   SDLTest_AssertCheck( linked.major >= major,\n             \"SDL_GetVersion(): returned major %i (>= %i)\",\n             linked.major,\n             major);\n   SDLTest_AssertCheck( linked.minor >= minor,\n             \"SDL_GetVersion(): returned minor %i (>= %i)\",\n             linked.minor,\n             minor);\n\n   return TEST_COMPLETED;\n}\n\n\n/* !\n * \\brief Tests SDL_VERSION macro\n */\nint platform_testSDLVersion(void *arg)\n{\n   SDL_version compiled;\n   int major = SDL_MAJOR_VERSION;\n   int minor = SDL_MINOR_VERSION;\n\n   SDL_VERSION(&compiled);\n   SDLTest_AssertCheck( compiled.major >= major,\n             \"SDL_VERSION() returned major %i (>= %i)\",\n             compiled.major,\n             major);\n   SDLTest_AssertCheck( compiled.minor >= minor,\n             \"SDL_VERSION() returned minor %i (>= %i)\",\n             compiled.minor,\n             minor);\n\n   return TEST_COMPLETED;\n}\n\n\n/* !\n * \\brief Tests default SDL_Init\n */\nint platform_testDefaultInit(void *arg)\n{\n   int ret;\n   int subsystem;\n\n   subsystem = SDL_WasInit(SDL_INIT_EVERYTHING);\n   SDLTest_AssertCheck( subsystem != 0,\n             \"SDL_WasInit(0): returned %i, expected != 0\",\n             subsystem);\n\n   ret = SDL_Init(SDL_WasInit(SDL_INIT_EVERYTHING));\n   SDLTest_AssertCheck( ret == 0,\n             \"SDL_Init(0): returned %i, expected 0, error: %s\",\n             ret,\n             SDL_GetError());\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_Get/Set/ClearError\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetError\n * http://wiki.libsdl.org/moin.cgi/SDL_SetError\n * http://wiki.libsdl.org/moin.cgi/SDL_ClearError\n */\nint platform_testGetSetClearError(void *arg)\n{\n   int result;\n   const char *testError = \"Testing\";\n   char *lastError;\n   size_t len;\n\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertPass(\"SDL_GetError()\");\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == 0,\n             \"SDL_GetError(): no message expected, len: %i\", (int) len);\n   }\n\n   result = SDL_SetError(\"%s\", testError);\n   SDLTest_AssertPass(\"SDL_SetError()\");\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == SDL_strlen(testError),\n             \"SDL_GetError(): expected message len %i, was len: %i\",\n             (int) SDL_strlen(testError),\n             (int) len);\n     SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,\n             \"SDL_GetError(): expected message %s, was message: %s\",\n             testError,\n             lastError);\n   }\n\n   /* Clean up */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_SetError with empty input\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetError\n */\nint platform_testSetErrorEmptyInput(void *arg)\n{\n   int result;\n   const char *testError = \"\";\n   char *lastError;\n   size_t len;\n\n   result = SDL_SetError(\"%s\", testError);\n   SDLTest_AssertPass(\"SDL_SetError()\");\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == SDL_strlen(testError),\n             \"SDL_GetError(): expected message len %i, was len: %i\",\n             (int) SDL_strlen(testError),\n             (int) len);\n     SDLTest_AssertCheck(SDL_strcmp(lastError, testError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             testError,\n             lastError);\n   }\n\n   /* Clean up */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_SetError with invalid input\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetError\n */\nint platform_testSetErrorInvalidInput(void *arg)\n{\n   int result;\n   const char *invalidError = NULL;\n   const char *probeError = \"Testing\";\n   char *lastError;\n   size_t len;\n\n   /* Reset */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   /* Check for no-op */\n   result = SDL_SetError(\"%s\", invalidError);\n   SDLTest_AssertPass(\"SDL_SetError()\");\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == 0,\n             \"SDL_GetError(): expected message len 0, was len: %i\",\n             (int) len);\n   }\n\n   /* Set */\n   result = SDL_SetError(\"%s\", probeError);\n   SDLTest_AssertPass(\"SDL_SetError('%s')\", probeError);\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n\n   /* Check for no-op */\n   result = SDL_SetError(\"%s\", invalidError);\n   SDLTest_AssertPass(\"SDL_SetError(NULL)\");\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == 0,\n             \"SDL_GetError(): expected message len 0, was len: %i\",\n             (int) len);\n   }\n\n   /* Reset */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   /* Set and check */\n   result = SDL_SetError(\"%s\", probeError);\n   SDLTest_AssertPass(\"SDL_SetError()\");\n   SDLTest_AssertCheck(result == -1, \"SDL_SetError: expected -1, got: %i\", result);\n   lastError = (char *)SDL_GetError();\n   SDLTest_AssertCheck(lastError != NULL,\n             \"SDL_GetError() != NULL\");\n   if (lastError != NULL)\n   {\n     len = SDL_strlen(lastError);\n     SDLTest_AssertCheck(len == SDL_strlen(probeError),\n             \"SDL_GetError(): expected message len %i, was len: %i\",\n             (int) SDL_strlen(probeError),\n             (int) len);\n     SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             probeError,\n             lastError);\n   }\n   \n   /* Clean up */\n   SDL_ClearError();\n   SDLTest_AssertPass(\"SDL_ClearError()\");\n\n   return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_GetPowerInfo\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetPowerInfo\n */\nint platform_testGetPowerInfo(void *arg)\n{\n   SDL_PowerState state;\n   SDL_PowerState stateAgain;\n   int secs;\n   int secsAgain;\n   int pct;\n   int pctAgain;\n\n   state = SDL_GetPowerInfo(&secs, &pct);\n   SDLTest_AssertPass(\"SDL_GetPowerInfo()\");\n   SDLTest_AssertCheck(\n       state==SDL_POWERSTATE_UNKNOWN ||\n       state==SDL_POWERSTATE_ON_BATTERY ||\n       state==SDL_POWERSTATE_NO_BATTERY ||\n       state==SDL_POWERSTATE_CHARGING ||\n       state==SDL_POWERSTATE_CHARGED,\n       \"SDL_GetPowerInfo(): state %i is one of the expected values\",\n       (int)state);\n\n   if (state==SDL_POWERSTATE_ON_BATTERY)\n   {\n      SDLTest_AssertCheck(\n         secs >= 0,\n         \"SDL_GetPowerInfo(): on battery, secs >= 0, was: %i\",\n         secs);\n      SDLTest_AssertCheck(\n         (pct >= 0) && (pct <= 100),\n         \"SDL_GetPowerInfo(): on battery, pct=[0,100], was: %i\",\n         pct);\n   }\n\n   if (state==SDL_POWERSTATE_UNKNOWN ||\n       state==SDL_POWERSTATE_NO_BATTERY)\n   {\n      SDLTest_AssertCheck(\n         secs == -1,\n         \"SDL_GetPowerInfo(): no battery, secs == -1, was: %i\",\n         secs);\n      SDLTest_AssertCheck(\n         pct == -1,\n         \"SDL_GetPowerInfo(): no battery, pct == -1, was: %i\",\n         pct);\n   }\n\n   /* Partial return value variations */\n   stateAgain = SDL_GetPowerInfo(&secsAgain, NULL);\n   SDLTest_AssertCheck(\n        state==stateAgain,\n        \"State %i returned when only 'secs' requested\",\n        stateAgain);\n   SDLTest_AssertCheck(\n        secs==secsAgain,\n        \"Value %i matches when only 'secs' requested\",\n        secsAgain);\n   stateAgain = SDL_GetPowerInfo(NULL, &pctAgain);\n   SDLTest_AssertCheck(\n        state==stateAgain,\n        \"State %i returned when only 'pct' requested\",\n        stateAgain);\n   SDLTest_AssertCheck(\n        pct==pctAgain,\n        \"Value %i matches when only 'pct' requested\",\n        pctAgain);\n   stateAgain = SDL_GetPowerInfo(NULL, NULL);\n   SDLTest_AssertCheck(\n        state==stateAgain,\n        \"State %i returned when no value requested\",\n        stateAgain);\n\n   return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Platform test cases */\nstatic const SDLTest_TestCaseReference platformTest1 =\n        { (SDLTest_TestCaseFp)platform_testTypes, \"platform_testTypes\", \"Tests predefined types\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest2 =\n        { (SDLTest_TestCaseFp)platform_testEndianessAndSwap, \"platform_testEndianessAndSwap\", \"Tests endianess and swap functions\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest3 =\n        { (SDLTest_TestCaseFp)platform_testGetFunctions, \"platform_testGetFunctions\", \"Tests various SDL_GetXYZ functions\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest4 =\n        { (SDLTest_TestCaseFp)platform_testHasFunctions, \"platform_testHasFunctions\", \"Tests various SDL_HasXYZ functions\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest5 =\n        { (SDLTest_TestCaseFp)platform_testGetVersion, \"platform_testGetVersion\", \"Tests SDL_GetVersion function\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest6 =\n        { (SDLTest_TestCaseFp)platform_testSDLVersion, \"platform_testSDLVersion\", \"Tests SDL_VERSION macro\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest7 =\n        { (SDLTest_TestCaseFp)platform_testDefaultInit, \"platform_testDefaultInit\", \"Tests default SDL_Init\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest8 =\n        { (SDLTest_TestCaseFp)platform_testGetSetClearError, \"platform_testGetSetClearError\", \"Tests SDL_Get/Set/ClearError\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest9 =\n        { (SDLTest_TestCaseFp)platform_testSetErrorEmptyInput, \"platform_testSetErrorEmptyInput\", \"Tests SDL_SetError with empty input\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest10 =\n        { (SDLTest_TestCaseFp)platform_testSetErrorInvalidInput, \"platform_testSetErrorInvalidInput\", \"Tests SDL_SetError with invalid input\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference platformTest11 =\n        { (SDLTest_TestCaseFp)platform_testGetPowerInfo, \"platform_testGetPowerInfo\", \"Tests SDL_GetPowerInfo function\", TEST_ENABLED };\n\n/* Sequence of Platform test cases */\nstatic const SDLTest_TestCaseReference *platformTests[] =  {\n    &platformTest1,\n    &platformTest2,\n    &platformTest3,\n    &platformTest4,\n    &platformTest5,\n    &platformTest6,\n    &platformTest7,\n    &platformTest8,\n    &platformTest9,\n    &platformTest10,\n    &platformTest11,\n    NULL\n};\n\n/* Platform test suite (global) */\nSDLTest_TestSuiteReference platformTestSuite = {\n    \"Platform\",\n    NULL,\n    platformTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_rect.c",
    "content": "/**\n * Original code: automated SDL rect test written by Edgar Simo \"bobbens\"\n * New/updated tests: aschiffler at ferzkopp dot net\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n/* Helper functions */\n\n/* !\n * \\brief Private helper to check SDL_IntersectRectAndLine results\n */\nvoid _validateIntersectRectAndLineResults(\n    SDL_bool intersection, SDL_bool expectedIntersection,\n    SDL_Rect *rect, SDL_Rect * refRect,\n    int x1, int y1, int x2, int y2,\n    int x1Ref, int y1Ref, int x2Ref, int y2Ref)\n{\n    SDLTest_AssertCheck(intersection == expectedIntersection,\n        \"Check for correct intersection result: expected %s, got %s intersecting rect (%d,%d,%d,%d) with line (%d,%d - %d,%d)\",\n        (expectedIntersection == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (intersection == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        refRect->x, refRect->y, refRect->w, refRect->h,\n        x1Ref, y1Ref, x2Ref, y2Ref);\n    SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h,\n        \"Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rect->x, rect->y, rect->w, rect->h,\n        refRect->x, refRect->y, refRect->w, refRect->h);\n    SDLTest_AssertCheck(x1 == x1Ref && y1 == y1Ref && x2 == x2Ref && y2 == y2Ref,\n        \"Check if line was incorrectly clipped or modified: got (%d,%d - %d,%d) expected (%d,%d - %d,%d)\",\n        x1, y1, x2, y2,\n        x1Ref, y1Ref, x2Ref, y2Ref);\n}\n\n/* Test case functions */\n\n/* !\n * \\brief Tests SDL_IntersectRectAndLine() clipping cases\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine\n */\nint\nrect_testIntersectRectAndLine (void *arg)\n{\n    SDL_Rect refRect = { 0, 0, 32, 32 };\n    SDL_Rect rect;\n    int x1, y1;\n    int x2, y2;\n    SDL_bool intersected;\n\n    int xLeft = -SDLTest_RandomIntegerInRange(1, refRect.w);\n    int xRight = refRect.w + SDLTest_RandomIntegerInRange(1, refRect.w);\n    int yTop = -SDLTest_RandomIntegerInRange(1, refRect.h);\n    int yBottom = refRect.h + SDLTest_RandomIntegerInRange(1, refRect.h);\n\n    x1 = xLeft;\n    y1 = 15;\n    x2 = xRight;\n    y2 = 15;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 15, 31, 15);\n\n    x1 = 15;\n    y1 = yTop;\n    x2 = 15;\n    y2 = yBottom;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 15, 0, 15, 31);\n\n    x1 = -refRect.w;\n    y1 = -refRect.h;\n    x2 = 2*refRect.w;\n    y2 = 2*refRect.h;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n     _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 0, 31, 31);\n\n    x1 = 2*refRect.w;\n    y1 = 2*refRect.h;\n    x2 = -refRect.w;\n    y2 = -refRect.h;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 31, 0, 0);\n\n    x1 = -1;\n    y1 = 32;\n    x2 = 32;\n    y2 = -1;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 0, 31, 31, 0);\n\n    x1 = 32;\n    y1 = -1;\n    x2 = -1;\n    y2 = 32;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, 31, 0, 0, 31);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRectAndLine() non-clipping case line inside\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine\n */\nint\nrect_testIntersectRectAndLineInside (void *arg)\n{\n    SDL_Rect refRect = { 0, 0, 32, 32 };\n    SDL_Rect rect;\n    int x1, y1;\n    int x2, y2;\n    SDL_bool intersected;\n\n    int xmin = refRect.x;\n    int xmax = refRect.x + refRect.w - 1;\n    int ymin = refRect.y;\n    int ymax = refRect.y + refRect.h - 1;\n    int x1Ref = SDLTest_RandomIntegerInRange(xmin + 1, xmax - 1);\n    int y1Ref = SDLTest_RandomIntegerInRange(ymin + 1, ymax - 1);\n    int x2Ref = SDLTest_RandomIntegerInRange(xmin + 1, xmax - 1);\n    int y2Ref = SDLTest_RandomIntegerInRange(ymin + 1, ymax - 1);\n\n    x1 = x1Ref;\n    y1 = y1Ref;\n    x2 = x2Ref;\n    y2 = y2Ref;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref);\n\n    x1 = x1Ref;\n    y1 = y1Ref;\n    x2 = xmax;\n    y2 = ymax;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, xmax, ymax);\n\n    x1 = xmin;\n    y1 = ymin;\n    x2 = x2Ref;\n    y2 = y2Ref;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, x2Ref, y2Ref);\n\n    x1 = xmin;\n    y1 = ymin;\n    x2 = xmax;\n    y2 = ymax;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymin, xmax, ymax);\n\n    x1 = xmin;\n    y1 = ymax;\n    x2 = xmax;\n    y2 = ymin;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_TRUE, &rect, &refRect, x1, y1, x2, y2, xmin, ymax, xmax, ymin);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRectAndLine() non-clipping cases outside\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine\n */\nint\nrect_testIntersectRectAndLineOutside (void *arg)\n{\n    SDL_Rect refRect = { 0, 0, 32, 32 };\n    SDL_Rect rect;\n    int x1, y1;\n    int x2, y2;\n    SDL_bool intersected;\n\n    int xLeft = -SDLTest_RandomIntegerInRange(1, refRect.w);\n    int xRight = refRect.w + SDLTest_RandomIntegerInRange(1, refRect.w);\n    int yTop = -SDLTest_RandomIntegerInRange(1, refRect.h);\n    int yBottom = refRect.h + SDLTest_RandomIntegerInRange(1, refRect.h);\n\n    x1 = xLeft;\n    y1 = 0;\n    x2 = xLeft;\n    y2 = 31;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xLeft, 0, xLeft, 31);\n\n    x1 = xRight;\n    y1 = 0;\n    x2 = xRight;\n    y2 = 31;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, xRight, 0, xRight, 31);\n\n    x1 = 0;\n    y1 = yTop;\n    x2 = 31;\n    y2 = yTop;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yTop, 31, yTop);\n\n    x1 = 0;\n    y1 = yBottom;\n    x2 = 31;\n    y2 = yBottom;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, 0, yBottom, 31, yBottom);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRectAndLine() with empty rectangle\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine\n */\nint\nrect_testIntersectRectAndLineEmpty (void *arg)\n{\n    SDL_Rect refRect;\n    SDL_Rect rect;\n    int x1, y1, x1Ref, y1Ref;\n    int x2, y2, x2Ref, y2Ref;\n    SDL_bool intersected;\n\n    refRect.x = SDLTest_RandomIntegerInRange(1, 1024);\n    refRect.y = SDLTest_RandomIntegerInRange(1, 1024);\n    refRect.w = 0;\n    refRect.h = 0;\n    x1Ref = refRect.x;\n    y1Ref = refRect.y;\n    x2Ref = SDLTest_RandomIntegerInRange(1, 1024);\n    y2Ref = SDLTest_RandomIntegerInRange(1, 1024);\n\n    x1 = x1Ref;\n    y1 = y1Ref;\n    x2 = x2Ref;\n    y2 = y2Ref;\n    rect = refRect;\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    _validateIntersectRectAndLineResults(intersected, SDL_FALSE, &rect, &refRect, x1, y1, x2, y2, x1Ref, y1Ref, x2Ref, y2Ref);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_IntersectRectAndLine() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRectAndLine\n */\nint\nrect_testIntersectRectAndLineParam (void *arg)\n{\n    SDL_Rect rect = { 0, 0, 32, 32 };\n    int x1 = rect.w / 2;\n    int y1 = rect.h / 2;\n    int x2 = x1;\n    int y2 = 2 * rect.h;\n    SDL_bool intersected;\n\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, &y2);\n    SDLTest_AssertCheck(intersected == SDL_TRUE, \"Check that intersection result was SDL_TRUE\");\n\n    intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, &x1, &y1, &x2, &y2);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st parameter is NULL\");\n    intersected = SDL_IntersectRectAndLine(&rect, (int *)NULL, &y1, &x2, &y2);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when 2nd parameter is NULL\");\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, (int *)NULL, &x2, &y2);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when 3rd parameter is NULL\");\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, (int *)NULL, &y2);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when 4th parameter is NULL\");\n    intersected = SDL_IntersectRectAndLine(&rect, &x1, &y1, &x2, (int *)NULL);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when 5th parameter is NULL\");\n    intersected = SDL_IntersectRectAndLine((SDL_Rect *)NULL, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);\n    SDLTest_AssertCheck(intersected == SDL_FALSE, \"Check that function returns SDL_FALSE when all parameters are NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Private helper to check SDL_HasIntersection results\n */\nvoid _validateHasIntersectionResults(\n    SDL_bool intersection, SDL_bool expectedIntersection,\n    SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)\n{\n    SDLTest_AssertCheck(intersection == expectedIntersection,\n        \"Check intersection result: expected %s, got %s intersecting A (%d,%d,%d,%d) with B (%d,%d,%d,%d)\",\n        (expectedIntersection == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (intersection == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        rectB->x, rectB->y, rectB->w, rectB->h);\n    SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,\n        \"Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        refRectA->x, refRectA->y, refRectA->w, refRectA->h);\n    SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,\n        \"Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectB->x, rectB->y, rectB->w, rectB->h,\n        refRectB->x, refRectB->y, refRectB->w, refRectB->h);\n}\n\n/* !\n * \\brief Private helper to check SDL_IntersectRect results\n */\nvoid _validateIntersectRectResults(\n    SDL_bool intersection, SDL_bool expectedIntersection,\n    SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,\n    SDL_Rect *result, SDL_Rect *expectedResult)\n{\n    _validateHasIntersectionResults(intersection, expectedIntersection, rectA, rectB, refRectA, refRectB);\n    if (result && expectedResult) {\n        SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,\n            \"Check that intersection of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n            rectA->x, rectA->y, rectA->w, rectA->h,\n            rectB->x, rectB->y, rectB->w, rectB->h,\n            result->x, result->y, result->w, result->h,\n            expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);\n    }\n}\n\n/* !\n * \\brief Private helper to check SDL_UnionRect results\n */\nvoid _validateUnionRectResults(\n    SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB,\n    SDL_Rect *result, SDL_Rect *expectedResult)\n{\n    SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,\n        \"Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        refRectA->x, refRectA->y, refRectA->w, refRectA->h);\n    SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,\n        \"Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectB->x, rectB->y, rectB->w, rectB->h,\n        refRectB->x, refRectB->y, refRectB->w, refRectB->h);\n    SDLTest_AssertCheck(result->x == expectedResult->x && result->y == expectedResult->y && result->w == expectedResult->w && result->h == expectedResult->h,\n        \"Check that union of rectangles A (%d,%d,%d,%d) and B (%d,%d,%d,%d) was correctly calculated, got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        rectB->x, rectB->y, rectB->w, rectB->h,\n        result->x, result->y, result->w, result->h,\n        expectedResult->x, expectedResult->y, expectedResult->w, expectedResult->h);\n}\n\n/* !\n * \\brief Private helper to check SDL_RectEmpty results\n */\nvoid _validateRectEmptyResults(\n    SDL_bool empty, SDL_bool expectedEmpty,\n    SDL_Rect *rect, SDL_Rect *refRect)\n{\n    SDLTest_AssertCheck(empty == expectedEmpty,\n        \"Check for correct empty result: expected %s, got %s testing (%d,%d,%d,%d)\",\n        (expectedEmpty == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (empty == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        rect->x, rect->y, rect->w, rect->h);\n    SDLTest_AssertCheck(rect->x == refRect->x && rect->y == refRect->y && rect->w == refRect->w && rect->h == refRect->h,\n        \"Check that source rectangle was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rect->x, rect->y, rect->w, rect->h,\n        refRect->x, refRect->y, refRect->w, refRect->h);\n}\n\n/* !\n * \\brief Private helper to check SDL_RectEquals results\n */\nvoid _validateRectEqualsResults(\n    SDL_bool equals, SDL_bool expectedEquals,\n    SDL_Rect *rectA, SDL_Rect *rectB, SDL_Rect *refRectA, SDL_Rect *refRectB)\n{\n    SDLTest_AssertCheck(equals == expectedEquals,\n        \"Check for correct equals result: expected %s, got %s testing (%d,%d,%d,%d) and (%d,%d,%d,%d)\",\n        (expectedEquals == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (equals == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        rectB->x, rectB->y, rectB->w, rectB->h);\n    SDLTest_AssertCheck(rectA->x == refRectA->x && rectA->y == refRectA->y && rectA->w == refRectA->w && rectA->h == refRectA->h,\n        \"Check that source rectangle A was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectA->x, rectA->y, rectA->w, rectA->h,\n        refRectA->x, refRectA->y, refRectA->w, refRectA->h);\n    SDLTest_AssertCheck(rectB->x == refRectB->x && rectB->y == refRectB->y && rectB->w == refRectB->w && rectB->h == refRectB->h,\n        \"Check that source rectangle B was not modified: got (%d,%d,%d,%d) expected (%d,%d,%d,%d)\",\n        rectB->x, rectB->y, rectB->w, rectB->h,\n        refRectB->x, refRectB->y, refRectB->w, refRectB->h);\n}\n\n/* !\n * \\brief Tests SDL_IntersectRect() with B fully inside A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectInside (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_bool intersection;\n\n    /* rectB fully contained in rectA */\n    refRectB.x = 0;\n    refRectB.y = 0;\n    refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRect() with B fully outside A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectOutside (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_bool intersection;\n\n    /* rectB fully outside of rectA */\n    refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10);\n    refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10);\n    refRectB.w = refRectA.w;\n    refRectB.h = refRectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRect() with B partially intersecting A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectPartial (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_Rect expectedResult;\n    SDL_bool intersection;\n\n    /* rectB partially contained in rectA */\n    refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);\n    refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);\n    refRectB.w = refRectA.w;\n    refRectB.h = refRectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    expectedResult.x = refRectB.x;\n    expectedResult.y = refRectB.y;\n    expectedResult.w = refRectA.w - refRectB.x;\n    expectedResult.h = refRectA.h - refRectB.y;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* rectB right edge */\n    refRectB.x = rectA.w - 1;\n    refRectB.y = rectA.y;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    expectedResult.x = refRectB.x;\n    expectedResult.y = refRectB.y;\n    expectedResult.w = 1;\n    expectedResult.h = refRectB.h;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* rectB left edge */\n    refRectB.x = 1 - rectA.w;\n    refRectB.y = rectA.y;\n    refRectB.w = refRectA.w;\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    expectedResult.x = 0;\n    expectedResult.y = refRectB.y;\n    expectedResult.w = 1;\n    expectedResult.h = refRectB.h;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* rectB bottom edge */\n    refRectB.x = rectA.x;\n    refRectB.y = rectA.h - 1;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    expectedResult.x = refRectB.x;\n    expectedResult.y = refRectB.y;\n    expectedResult.w = refRectB.w;\n    expectedResult.h = 1;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* rectB top edge */\n    refRectB.x = rectA.x;\n    refRectB.y = 1 - rectA.h;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = rectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    expectedResult.x = refRectB.x;\n    expectedResult.y = 0;\n    expectedResult.w = refRectB.w;\n    expectedResult.h = 1;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRect() with 1x1 pixel sized rectangles\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectPoint (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 1, 1 };\n    SDL_Rect refRectB = { 0, 0, 1, 1 };\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_bool intersection;\n    int offsetX, offsetY;\n\n    /* intersecting pixels */\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB.x = refRectA.x;\n    refRectB.y = refRectA.y;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB, &result, &refRectA);\n\n    /* non-intersecting pixels cases */\n    for (offsetX = -1; offsetX <= 1; offsetX++) {\n        for (offsetY = -1; offsetY <= 1; offsetY++) {\n            if (offsetX != 0 || offsetY != 0) {\n                refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n                refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n                refRectB.x = refRectA.x;\n                refRectB.y = refRectA.y;\n                refRectB.x += offsetX;\n                refRectB.y += offsetY;\n                rectA = refRectA;\n                rectB = refRectB;\n                intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n                _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n            }\n        }\n    }\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_IntersectRect() with empty rectangles\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectEmpty (void *arg)\n{\n    SDL_Rect refRectA;\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_bool intersection;\n    SDL_bool empty;\n\n    /* Rect A empty */\n    result.w = SDLTest_RandomIntegerInRange(1, 100);\n    result.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectA.w = 0;\n    refRectA.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    empty = (SDL_bool)SDL_RectEmpty(&result);\n    SDLTest_AssertCheck(empty == SDL_TRUE, \"Validate result is empty Rect; got: %s\", (empty == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n\n    /* Rect B empty */\n    result.w = SDLTest_RandomIntegerInRange(1, 100);\n    result.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectB.w = 0;\n    refRectB.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    empty = (SDL_bool)SDL_RectEmpty(&result);\n    SDLTest_AssertCheck(empty == SDL_TRUE, \"Validate result is empty Rect; got: %s\", (empty == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n\n    /* Rect A and B empty */\n    result.w = SDLTest_RandomIntegerInRange(1, 100);\n    result.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectA.w = 0;\n    refRectA.h = 0;\n    refRectB.w = 0;\n    refRectB.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_IntersectRect(&rectA, &rectB, &result);\n    _validateIntersectRectResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    empty = (SDL_bool)SDL_RectEmpty(&result);\n    SDLTest_AssertCheck(empty == SDL_TRUE, \"Validate result is empty Rect; got: %s\", (empty == SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_IntersectRect() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_IntersectRect\n */\nint rect_testIntersectRectParam(void *arg)\n{\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_Rect result;\n    SDL_bool intersection;\n\n    /* invalid parameter combinations */\n    intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, &result);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st parameter is NULL\");\n    intersection = SDL_IntersectRect(&rectA, (SDL_Rect *)NULL, &result);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 2st parameter is NULL\");\n    intersection = SDL_IntersectRect(&rectA, &rectB, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 3st parameter is NULL\");\n    intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, &result);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st and 2nd parameters are NULL\");\n    intersection = SDL_IntersectRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st and 3rd parameters are NULL \");\n    intersection = SDL_IntersectRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when all parameters are NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasIntersection() with B fully inside A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionInside (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n\n    /* rectB fully contained in rectA */\n    refRectB.x = 0;\n    refRectB.y = 0;\n    refRectB.w = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasIntersection() with B fully outside A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionOutside (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n\n    /* rectB fully outside of rectA */\n    refRectB.x = refRectA.x + refRectA.w + SDLTest_RandomIntegerInRange(1, 10);\n    refRectB.y = refRectA.y + refRectA.h + SDLTest_RandomIntegerInRange(1, 10);\n    refRectB.w = refRectA.w;\n    refRectB.h = refRectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasIntersection() with B partially intersecting A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionPartial (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 32, 32 };\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n\n    /* rectB partially contained in rectA */\n    refRectB.x = SDLTest_RandomIntegerInRange(refRectA.x + 1, refRectA.x + refRectA.w - 1);\n    refRectB.y = SDLTest_RandomIntegerInRange(refRectA.y + 1, refRectA.y + refRectA.h - 1);\n    refRectB.w = refRectA.w;\n    refRectB.h = refRectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* rectB right edge */\n    refRectB.x = rectA.w - 1;\n    refRectB.y = rectA.y;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* rectB left edge */\n    refRectB.x = 1 - rectA.w;\n    refRectB.y = rectA.y;\n    refRectB.w = refRectA.w;\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* rectB bottom edge */\n    refRectB.x = rectA.x;\n    refRectB.y = rectA.h - 1;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = SDLTest_RandomIntegerInRange(1, refRectA.h - 1);\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* rectB top edge */\n    refRectB.x = rectA.x;\n    refRectB.y = 1 - rectA.h;\n    refRectB.w = SDLTest_RandomIntegerInRange(1, refRectA.w - 1);\n    refRectB.h = rectA.h;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasIntersection() with 1x1 pixel sized rectangles\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionPoint (void *arg)\n{\n    SDL_Rect refRectA = { 0, 0, 1, 1 };\n    SDL_Rect refRectB = { 0, 0, 1, 1 };\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n    int offsetX, offsetY;\n\n    /* intersecting pixels */\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB.x = refRectA.x;\n    refRectB.y = refRectA.y;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_TRUE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* non-intersecting pixels cases */\n    for (offsetX = -1; offsetX <= 1; offsetX++) {\n        for (offsetY = -1; offsetY <= 1; offsetY++) {\n            if (offsetX != 0 || offsetY != 0) {\n                refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n                refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n                refRectB.x = refRectA.x;\n                refRectB.y = refRectA.y;\n                refRectB.x += offsetX;\n                refRectB.y += offsetY;\n                rectA = refRectA;\n                rectB = refRectB;\n                intersection = SDL_HasIntersection(&rectA, &rectB);\n                _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);\n            }\n        }\n    }\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_HasIntersection() with empty rectangles\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionEmpty (void *arg)\n{\n    SDL_Rect refRectA;\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n\n    /* Rect A empty */\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectA.w = 0;\n    refRectA.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* Rect B empty */\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectB.w = 0;\n    refRectB.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);\n\n    /* Rect A and B empty */\n    refRectA.x = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.y = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.w = SDLTest_RandomIntegerInRange(1, 100);\n    refRectA.h = SDLTest_RandomIntegerInRange(1, 100);\n    refRectB = refRectA;\n    refRectA.w = 0;\n    refRectA.h = 0;\n    refRectB.w = 0;\n    refRectB.h = 0;\n    rectA = refRectA;\n    rectB = refRectB;\n    intersection = SDL_HasIntersection(&rectA, &rectB);\n    _validateHasIntersectionResults(intersection, SDL_FALSE, &rectA, &rectB, &refRectA, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_HasIntersection() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_HasIntersection\n */\nint rect_testHasIntersectionParam(void *arg)\n{\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool intersection;\n\n    /* invalid parameter combinations */\n    intersection = SDL_HasIntersection((SDL_Rect *)NULL, &rectB);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st parameter is NULL\");\n    intersection = SDL_HasIntersection(&rectA, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when 2st parameter is NULL\");\n    intersection = SDL_HasIntersection((SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(intersection == SDL_FALSE, \"Check that function returns SDL_FALSE when all parameters are NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Test SDL_EnclosePoints() without clipping\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints\n */\nint rect_testEnclosePoints(void *arg)\n{\n    const int numPoints = 16;\n    SDL_Point refPoints[16];\n    SDL_Point points[16];\n    SDL_Rect result;\n    SDL_bool anyEnclosed;\n    SDL_bool anyEnclosedNoResult;\n    SDL_bool expectedEnclosed = SDL_TRUE;\n    int newx, newy;\n    int minx = 0, maxx = 0, miny = 0, maxy = 0;\n    int i;\n\n    /* Create input data, tracking result */\n    for (i=0; i<numPoints; i++) {\n        newx = SDLTest_RandomIntegerInRange(-1024, 1024);\n        newy = SDLTest_RandomIntegerInRange(-1024, 1024);\n        refPoints[i].x = newx;\n        refPoints[i].y = newy;\n        points[i].x = newx;\n        points[i].y = newy;\n        if (i==0) {\n            minx = newx;\n            maxx = newx;\n            miny = newy;\n            maxy = newy;\n        } else {\n            if (newx < minx) minx = newx;\n            if (newx > maxx) maxx = newx;\n            if (newy < miny) miny = newy;\n            if (newy > maxy) maxy = newy;\n        }\n    }\n\n    /* Call function and validate - special case: no result requested */\n    anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,\n        \"Check expected return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosedNoResult==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n\n    /* Call function and validate */\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,\n        \"Check return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n    SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),\n        \"Resulting enclosing rectangle incorrect: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)\",\n        minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Test SDL_EnclosePoints() with repeated input points\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints\n */\nint rect_testEnclosePointsRepeatedInput(void *arg)\n{\n    const int numPoints = 8;\n    const int halfPoints = 4;\n    SDL_Point refPoints[8];\n    SDL_Point points[8];\n    SDL_Rect result;\n    SDL_bool anyEnclosed;\n    SDL_bool anyEnclosedNoResult;\n    SDL_bool expectedEnclosed = SDL_TRUE;\n    int newx, newy;\n    int minx = 0, maxx = 0, miny = 0, maxy = 0;\n    int i;\n\n    /* Create input data, tracking result */\n    for (i=0; i<numPoints; i++) {\n        if (i < halfPoints) {\n            newx = SDLTest_RandomIntegerInRange(-1024, 1024);\n            newy = SDLTest_RandomIntegerInRange(-1024, 1024);\n        } else {\n            newx = refPoints[i-halfPoints].x;\n            newy = refPoints[i-halfPoints].y;\n        }\n        refPoints[i].x = newx;\n        refPoints[i].y = newy;\n        points[i].x = newx;\n        points[i].y = newy;\n        if (i==0) {\n            minx = newx;\n            maxx = newx;\n            miny = newy;\n            maxy = newy;\n        } else {\n            if (newx < minx) minx = newx;\n            if (newx > maxx) maxx = newx;\n            if (newy < miny) miny = newy;\n            if (newy > maxy) maxy = newy;\n        }\n    }\n\n    /* Call function and validate - special case: no result requested */\n    anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,\n        \"Check return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosedNoResult==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n\n    /* Call function and validate */\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)NULL, &result);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,\n        \"Check return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n    SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),\n        \"Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)\",\n        minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Test SDL_EnclosePoints() with clipping\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints\n */\nint rect_testEnclosePointsWithClipping(void *arg)\n{\n    const int numPoints = 16;\n    SDL_Point refPoints[16];\n    SDL_Point points[16];\n    SDL_Rect refClip;\n    SDL_Rect clip;\n    SDL_Rect result;\n    SDL_bool anyEnclosed;\n    SDL_bool anyEnclosedNoResult;\n    SDL_bool expectedEnclosed = SDL_FALSE;\n    int newx, newy;\n    int minx = 0, maxx = 0, miny = 0, maxy = 0;\n    int i;\n\n    /* Setup clipping rectangle */\n    refClip.x = SDLTest_RandomIntegerInRange(-1024, 1024);\n    refClip.y = SDLTest_RandomIntegerInRange(-1024, 1024);\n    refClip.w = SDLTest_RandomIntegerInRange(1, 1024);\n    refClip.h = SDLTest_RandomIntegerInRange(1, 1024);\n\n    /* Create input data, tracking result */\n    for (i=0; i<numPoints; i++) {\n        newx = SDLTest_RandomIntegerInRange(-1024, 1024);\n        newy = SDLTest_RandomIntegerInRange(-1024, 1024);\n        refPoints[i].x = newx;\n        refPoints[i].y = newy;\n        points[i].x = newx;\n        points[i].y = newy;\n        if ((newx>=refClip.x) && (newx<(refClip.x + refClip.w)) &&\n            (newy>=refClip.y) && (newy<(refClip.y + refClip.h))) {\n            if (expectedEnclosed==SDL_FALSE) {\n                minx = newx;\n                maxx = newx;\n                miny = newy;\n                maxy = newy;\n            } else {\n                if (newx < minx) minx = newx;\n                if (newx > maxx) maxx = newx;\n                if (newy < miny) miny = newy;\n                if (newy > maxy) maxy = newy;\n            }\n            expectedEnclosed = SDL_TRUE;\n        }\n    }\n\n    /* Call function and validate - special case: no result requested */\n    clip = refClip;\n    anyEnclosedNoResult = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, (SDL_Rect *)NULL);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosedNoResult,\n        \"Expected return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosedNoResult==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n    SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,\n        \"Check that source clipping rectangle was not modified\");\n\n    /* Call function and validate */\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,\n        \"Check return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n    for (i=0; i<numPoints; i++) {\n        SDLTest_AssertCheck(refPoints[i].x==points[i].x && refPoints[i].y==points[i].y,\n            \"Check that source point %i was not modified: expected (%i,%i) actual (%i,%i)\",\n            i, refPoints[i].x, refPoints[i].y, points[i].x, points[i].y);\n    }\n    SDLTest_AssertCheck(refClip.x==clip.x && refClip.y==clip.y && refClip.w==clip.w && refClip.h==clip.h,\n        \"Check that source clipping rectangle was not modified\");\n    if (expectedEnclosed==SDL_TRUE) {\n        SDLTest_AssertCheck(result.x==minx && result.y==miny && result.w==(maxx - minx + 1) && result.h==(maxy - miny + 1),\n            \"Check resulting enclosing rectangle: expected (%i,%i - %i,%i), actual (%i,%i - %i,%i)\",\n            minx, miny, maxx, maxy, result.x, result.y, result.x + result.w - 1, result.y + result.h - 1);\n    }\n\n    /* Empty clipping rectangle */\n    clip.w = 0;\n    clip.h = 0;\n    expectedEnclosed = SDL_FALSE;\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, numPoints, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(expectedEnclosed==anyEnclosed,\n        \"Check return value %s, got %s\",\n        (expectedEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\",\n        (anyEnclosed==SDL_TRUE) ? \"SDL_TRUE\" : \"SDL_FALSE\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_EnclosePoints() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_EnclosePoints\n */\nint rect_testEnclosePointsParam(void *arg)\n{\n    SDL_Point points[1];\n    int count;\n    SDL_Rect clip;\n    SDL_Rect result;\n    SDL_bool anyEnclosed;\n\n    /* invalid parameter combinations */\n    anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 1, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, \"Check that functions returns SDL_FALSE when 1st parameter is NULL\");\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, 0, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, \"Check that functions returns SDL_FALSE when 2nd parameter is 0\");\n    count = SDLTest_RandomIntegerInRange(-100, -1);\n    anyEnclosed = SDL_EnclosePoints((const SDL_Point *)points, count, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, \"Check that functions returns SDL_FALSE when 2nd parameter is %i (negative)\", count);\n    anyEnclosed = SDL_EnclosePoints((SDL_Point *)NULL, 0, (const SDL_Rect *)&clip, &result);\n    SDLTest_AssertCheck(anyEnclosed == SDL_FALSE, \"Check that functions returns SDL_FALSE when 1st parameter is NULL and 2nd parameter was 0\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_UnionRect() where rect B is outside rect A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect\n */\nint rect_testUnionRectOutside(void *arg)\n{\n    SDL_Rect refRectA, refRectB;\n    SDL_Rect rectA, rectB;\n    SDL_Rect expectedResult;\n    SDL_Rect result;\n    int minx, maxx, miny, maxy;\n    int dx, dy;\n\n    /* Union 1x1 outside */\n    for (dx = -1; dx < 2; dx++) {\n        for (dy = -1; dy < 2; dy++) {\n            if ((dx != 0) || (dy != 0)) {\n                refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.w=1;\n                refRectA.h=1;\n                refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024) + dx*2048;\n                refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024) + dx*2048;\n                refRectB.w=1;\n                refRectB.h=1;\n                minx = (refRectA.x<refRectB.x) ? refRectA.x : refRectB.x;\n                maxx = (refRectA.x>refRectB.x) ? refRectA.x : refRectB.x;\n                miny = (refRectA.y<refRectB.y) ? refRectA.y : refRectB.y;\n                maxy = (refRectA.y>refRectB.y) ? refRectA.y : refRectB.y;\n                expectedResult.x = minx;\n                expectedResult.y = miny;\n                expectedResult.w = maxx - minx + 1;\n                expectedResult.h = maxy - miny + 1;\n                rectA = refRectA;\n                rectB = refRectB;\n                SDL_UnionRect(&rectA, &rectB, &result);\n                _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n            }\n        }\n    }\n\n    /* Union outside overlap */\n    for (dx = -1; dx < 2; dx++) {\n        for (dy = -1; dy < 2; dy++) {\n            if ((dx != 0) || (dy != 0)) {\n                refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.w=SDLTest_RandomIntegerInRange(256, 512);\n                refRectA.h=SDLTest_RandomIntegerInRange(256, 512);\n                refRectB.x=refRectA.x + 1 + dx*2;\n                refRectB.y=refRectA.y + 1 + dy*2;\n                refRectB.w=refRectA.w - 2;\n                refRectB.h=refRectA.h - 2;\n                expectedResult = refRectA;\n                if (dx == -1) expectedResult.x--;\n                if (dy == -1) expectedResult.y--;\n                if ((dx == 1) || (dx == -1)) expectedResult.w++;\n                if ((dy == 1) || (dy == -1)) expectedResult.h++;\n                rectA = refRectA;\n                rectB = refRectB;\n                SDL_UnionRect(&rectA, &rectB, &result);\n                _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n            }\n        }\n    }\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_UnionRect() where rect A or rect B are empty\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect\n */\nint rect_testUnionRectEmpty(void *arg)\n{\n    SDL_Rect refRectA, refRectB;\n    SDL_Rect rectA, rectB;\n    SDL_Rect expectedResult;\n    SDL_Rect result;\n\n    /* A empty */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=0;\n    refRectA.h=0;\n    refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.w=SDLTest_RandomIntegerInRange(1, 1024);\n    refRectB.h=SDLTest_RandomIntegerInRange(1, 1024);\n    expectedResult = refRectB;\n    rectA = refRectA;\n    rectB = refRectB;\n    SDL_UnionRect(&rectA, &rectB, &result);\n    _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* B empty */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);\n    refRectA.h=SDLTest_RandomIntegerInRange(1, 1024);\n    refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.w=0;\n    refRectB.h=0;\n    expectedResult = refRectA;\n    rectA = refRectA;\n    rectB = refRectB;\n    SDL_UnionRect(&rectA, &rectB, &result);\n    _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* A and B empty */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=0;\n    refRectA.h=0;\n    refRectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectB.w=0;\n    refRectB.h=0;\n    result.x=0;\n    result.y=0;\n    result.w=0;\n    result.h=0;\n    expectedResult = result;\n    rectA = refRectA;\n    rectB = refRectB;\n    SDL_UnionRect(&rectA, &rectB, &result);\n    _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_UnionRect() where rect B is inside rect A\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect\n */\nint rect_testUnionRectInside(void *arg)\n{\n    SDL_Rect refRectA, refRectB;\n    SDL_Rect rectA, rectB;\n    SDL_Rect expectedResult;\n    SDL_Rect result;\n    int dx, dy;\n\n    /* Union 1x1 with itself */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=1;\n    refRectA.h=1;\n    expectedResult = refRectA;\n    rectA = refRectA;\n    SDL_UnionRect(&rectA, &rectA, &result);\n    _validateUnionRectResults(&rectA, &rectA, &refRectA, &refRectA, &result, &expectedResult);\n\n    /* Union 1x1 somewhere inside */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=SDLTest_RandomIntegerInRange(256, 1024);\n    refRectA.h=SDLTest_RandomIntegerInRange(256, 1024);\n    refRectB.x=refRectA.x + 1 + SDLTest_RandomIntegerInRange(1, refRectA.w - 2);\n    refRectB.y=refRectA.y + 1 + SDLTest_RandomIntegerInRange(1, refRectA.h - 2);\n    refRectB.w=1;\n    refRectB.h=1;\n    expectedResult = refRectA;\n    rectA = refRectA;\n    rectB = refRectB;\n    SDL_UnionRect(&rectA, &rectB, &result);\n    _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n\n    /* Union inside with edges modified */\n    for (dx = -1; dx < 2; dx++) {\n        for (dy = -1; dy < 2; dy++) {\n            if ((dx != 0) || (dy != 0)) {\n                refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRectA.w=SDLTest_RandomIntegerInRange(256, 1024);\n                refRectA.h=SDLTest_RandomIntegerInRange(256, 1024);\n                refRectB = refRectA;\n                if (dx == -1) refRectB.x++;\n                if ((dx == 1) || (dx == -1)) refRectB.w--;\n                if (dy == -1) refRectB.y++;\n                if ((dy == 1) || (dy == -1)) refRectB.h--;\n                expectedResult = refRectA;\n                rectA = refRectA;\n                rectB = refRectB;\n                SDL_UnionRect(&rectA, &rectB, &result);\n                _validateUnionRectResults(&rectA, &rectB, &refRectA, &refRectB, &result, &expectedResult);\n            }\n        }\n    }\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_UnionRect() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_UnionRect\n */\nint rect_testUnionRectParam(void *arg)\n{\n    SDL_Rect rectA, rectB;\n    SDL_Rect result;\n\n    /* invalid parameter combinations */\n    SDL_UnionRect((SDL_Rect *)NULL, &rectB, &result);\n    SDLTest_AssertPass(\"Check that function returns when 1st parameter is NULL\");\n    SDL_UnionRect(&rectA, (SDL_Rect *)NULL, &result);\n    SDLTest_AssertPass(\"Check that function returns  when 2nd parameter is NULL\");\n    SDL_UnionRect(&rectA, &rectB, (SDL_Rect *)NULL);\n    SDLTest_AssertPass(\"Check that function returns  when 3rd parameter is NULL\");\n    SDL_UnionRect((SDL_Rect *)NULL, &rectB, (SDL_Rect *)NULL);\n    SDLTest_AssertPass(\"Check that function returns  when 1st and 3rd parameter are NULL\");\n    SDL_UnionRect(&rectA, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertPass(\"Check that function returns  when 2nd and 3rd parameter are NULL\");\n    SDL_UnionRect((SDL_Rect *)NULL, (SDL_Rect *)NULL, (SDL_Rect *)NULL);\n    SDLTest_AssertPass(\"Check that function returns  when all parameters are NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_RectEmpty() with various inputs\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty\n */\nint rect_testRectEmpty(void *arg)\n{\n    SDL_Rect refRect;\n    SDL_Rect rect;\n    SDL_bool expectedResult;\n    SDL_bool result;\n    int w, h;\n\n    /* Non-empty case */\n    refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRect.w=SDLTest_RandomIntegerInRange(256, 1024);\n    refRect.h=SDLTest_RandomIntegerInRange(256, 1024);\n    expectedResult = SDL_FALSE;\n    rect = refRect;\n    result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect);\n    _validateRectEmptyResults(result, expectedResult, &rect, &refRect);\n\n    /* Empty case */\n    for (w=-1; w<2; w++) {\n        for (h=-1; h<2; h++) {\n            if ((w != 1) || (h != 1)) {\n                refRect.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRect.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n                refRect.w=w;\n                refRect.h=h;\n                expectedResult = SDL_TRUE;\n                rect = refRect;\n                result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)&rect);\n                _validateRectEmptyResults(result, expectedResult, &rect, &refRect);\n            }\n        }\n    }\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_RectEmpty() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RectEmpty\n */\nint rect_testRectEmptyParam(void *arg)\n{\n    SDL_bool result;\n\n    /* invalid parameter combinations */\n    result = (SDL_bool)SDL_RectEmpty((const SDL_Rect *)NULL);\n    SDLTest_AssertCheck(result == SDL_TRUE, \"Check that function returns TRUE when 1st parameter is NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Tests SDL_RectEquals() with various inputs\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals\n */\nint rect_testRectEquals(void *arg)\n{\n    SDL_Rect refRectA;\n    SDL_Rect refRectB;\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool expectedResult;\n    SDL_bool result;\n\n    /* Equals */\n    refRectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    refRectA.w=SDLTest_RandomIntegerInRange(1, 1024);\n    refRectA.h=SDLTest_RandomIntegerInRange(1, 1024);\n    refRectB = refRectA;\n    expectedResult = SDL_TRUE;\n    rectA = refRectA;\n    rectB = refRectB;\n    result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)&rectB);\n    _validateRectEqualsResults(result, expectedResult, &rectA, &rectB, &refRectA, &refRectB);\n\n    return TEST_COMPLETED;\n}\n\n/* !\n * \\brief Negative tests against SDL_RectEquals() with invalid parameters\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RectEquals\n */\nint rect_testRectEqualsParam(void *arg)\n{\n    SDL_Rect rectA;\n    SDL_Rect rectB;\n    SDL_bool result;\n\n    /* data setup */\n    rectA.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    rectA.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    rectA.w=SDLTest_RandomIntegerInRange(1, 1024);\n    rectA.h=SDLTest_RandomIntegerInRange(1, 1024);\n    rectB.x=SDLTest_RandomIntegerInRange(-1024, 1024);\n    rectB.y=SDLTest_RandomIntegerInRange(-1024, 1024);\n    rectB.w=SDLTest_RandomIntegerInRange(1, 1024);\n    rectB.h=SDLTest_RandomIntegerInRange(1, 1024);\n\n    /* invalid parameter combinations */\n    result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)&rectB);\n    SDLTest_AssertCheck(result == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st parameter is NULL\");\n    result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)&rectA, (const SDL_Rect *)NULL);\n    SDLTest_AssertCheck(result == SDL_FALSE, \"Check that function returns SDL_FALSE when 2nd parameter is NULL\");\n    result = (SDL_bool)SDL_RectEquals((const SDL_Rect *)NULL, (const SDL_Rect *)NULL);\n    SDLTest_AssertCheck(result == SDL_FALSE, \"Check that function returns SDL_FALSE when 1st and 2nd parameter are NULL\");\n\n    return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Rect test cases */\n\n/* SDL_IntersectRectAndLine */\nstatic const SDLTest_TestCaseReference rectTest1 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectAndLine,\"rect_testIntersectRectAndLine\",  \"Tests SDL_IntersectRectAndLine clipping cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest2 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineInside, \"rect_testIntersectRectAndLineInside\", \"Tests SDL_IntersectRectAndLine with line fully contained in rect\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest3 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineOutside, \"rect_testIntersectRectAndLineOutside\", \"Tests SDL_IntersectRectAndLine with line fully outside of rect\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest4 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineEmpty, \"rect_testIntersectRectAndLineEmpty\", \"Tests SDL_IntersectRectAndLine with empty rectangle \", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest5 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectAndLineParam, \"rect_testIntersectRectAndLineParam\", \"Negative tests against SDL_IntersectRectAndLine with invalid parameters\", TEST_ENABLED };\n\n/* SDL_IntersectRect */\nstatic const SDLTest_TestCaseReference rectTest6 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectInside, \"rect_testIntersectRectInside\", \"Tests SDL_IntersectRect with B fully contained in A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest7 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectOutside, \"rect_testIntersectRectOutside\", \"Tests SDL_IntersectRect with B fully outside of A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest8 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectPartial, \"rect_testIntersectRectPartial\", \"Tests SDL_IntersectRect with B partially intersecting A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest9 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectPoint, \"rect_testIntersectRectPoint\", \"Tests SDL_IntersectRect with 1x1 sized rectangles\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest10 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectEmpty, \"rect_testIntersectRectEmpty\", \"Tests SDL_IntersectRect with empty rectangles\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest11 =\n        { (SDLTest_TestCaseFp)rect_testIntersectRectParam, \"rect_testIntersectRectParam\", \"Negative tests against SDL_IntersectRect with invalid parameters\", TEST_ENABLED };\n\n/* SDL_HasIntersection */\nstatic const SDLTest_TestCaseReference rectTest12 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionInside, \"rect_testHasIntersectionInside\", \"Tests SDL_HasIntersection with B fully contained in A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest13 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionOutside, \"rect_testHasIntersectionOutside\", \"Tests SDL_HasIntersection with B fully outside of A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest14 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionPartial,\"rect_testHasIntersectionPartial\",  \"Tests SDL_HasIntersection with B partially intersecting A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest15 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionPoint, \"rect_testHasIntersectionPoint\", \"Tests SDL_HasIntersection with 1x1 sized rectangles\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest16 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionEmpty, \"rect_testHasIntersectionEmpty\", \"Tests SDL_HasIntersection with empty rectangles\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest17 =\n        { (SDLTest_TestCaseFp)rect_testHasIntersectionParam, \"rect_testHasIntersectionParam\", \"Negative tests against SDL_HasIntersection with invalid parameters\", TEST_ENABLED };\n\n/* SDL_EnclosePoints */\nstatic const SDLTest_TestCaseReference rectTest18 =\n        { (SDLTest_TestCaseFp)rect_testEnclosePoints, \"rect_testEnclosePoints\", \"Tests SDL_EnclosePoints without clipping\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest19 =\n        { (SDLTest_TestCaseFp)rect_testEnclosePointsWithClipping, \"rect_testEnclosePointsWithClipping\", \"Tests SDL_EnclosePoints with clipping\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest20 =\n        { (SDLTest_TestCaseFp)rect_testEnclosePointsRepeatedInput, \"rect_testEnclosePointsRepeatedInput\", \"Tests SDL_EnclosePoints with repeated input\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest21 =\n        { (SDLTest_TestCaseFp)rect_testEnclosePointsParam, \"rect_testEnclosePointsParam\", \"Negative tests against SDL_EnclosePoints with invalid parameters\", TEST_ENABLED };\n\n/* SDL_UnionRect */\nstatic const SDLTest_TestCaseReference rectTest22 =\n        { (SDLTest_TestCaseFp)rect_testUnionRectInside, \"rect_testUnionRectInside\", \"Tests SDL_UnionRect where rect B is inside rect A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest23 =\n        { (SDLTest_TestCaseFp)rect_testUnionRectOutside, \"rect_testUnionRectOutside\", \"Tests SDL_UnionRect where rect B is outside rect A\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest24 =\n        { (SDLTest_TestCaseFp)rect_testUnionRectEmpty, \"rect_testUnionRectEmpty\", \"Tests SDL_UnionRect where rect A or rect B are empty\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest25 =\n        { (SDLTest_TestCaseFp)rect_testUnionRectParam, \"rect_testUnionRectParam\", \"Negative tests against SDL_UnionRect with invalid parameters\", TEST_ENABLED };\n\n/* SDL_RectEmpty */\nstatic const SDLTest_TestCaseReference rectTest26 =\n        { (SDLTest_TestCaseFp)rect_testRectEmpty, \"rect_testRectEmpty\", \"Tests SDL_RectEmpty with various inputs\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest27 =\n        { (SDLTest_TestCaseFp)rect_testRectEmptyParam, \"rect_testRectEmptyParam\", \"Negative tests against SDL_RectEmpty with invalid parameters\", TEST_ENABLED };\n\n/* SDL_RectEquals */\n\nstatic const SDLTest_TestCaseReference rectTest28 =\n        { (SDLTest_TestCaseFp)rect_testRectEquals, \"rect_testRectEquals\", \"Tests SDL_RectEquals with various inputs\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rectTest29 =\n        { (SDLTest_TestCaseFp)rect_testRectEqualsParam, \"rect_testRectEqualsParam\", \"Negative tests against SDL_RectEquals with invalid parameters\", TEST_ENABLED };\n\n\n/* !\n * \\brief Sequence of Rect test cases; functions that handle simple rectangles including overlaps and merges.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/CategoryRect\n */\nstatic const SDLTest_TestCaseReference *rectTests[] =  {\n    &rectTest1, &rectTest2, &rectTest3, &rectTest4, &rectTest5, &rectTest6, &rectTest7, &rectTest8, &rectTest9, &rectTest10, &rectTest11, &rectTest12, &rectTest13, &rectTest14,\n    &rectTest15, &rectTest16, &rectTest17, &rectTest18, &rectTest19, &rectTest20, &rectTest21, &rectTest22, &rectTest23, &rectTest24, &rectTest25, &rectTest26, &rectTest27,\n    &rectTest28, &rectTest29, NULL\n};\n\n\n/* Rect test suite (global) */\nSDLTest_TestSuiteReference rectTestSuite = {\n    \"Rect\",\n    NULL,\n    rectTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_render.c",
    "content": "/**\n * Original code: automated SDL platform test written by Edgar Simo \"bobbens\"\n * Extended and extensively updated by aschiffler at ferzkopp dot net\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\n#define TESTRENDER_SCREEN_W     80\n#define TESTRENDER_SCREEN_H     60\n\n#define RENDER_COMPARE_FORMAT  SDL_PIXELFORMAT_ARGB8888\n#define RENDER_COMPARE_AMASK   0xff000000 /**< Alpha bit mask. */\n#define RENDER_COMPARE_RMASK   0x00ff0000 /**< Red bit mask. */\n#define RENDER_COMPARE_GMASK   0x0000ff00 /**< Green bit mask. */\n#define RENDER_COMPARE_BMASK   0x000000ff /**< Blue bit mask. */\n\n#define ALLOWABLE_ERROR_OPAQUE  0\n#define ALLOWABLE_ERROR_BLENDED 64\n\n/* Test window and renderer */\nSDL_Window *window = NULL;\nSDL_Renderer *renderer = NULL;\n\n/* Prototypes for helper functions */\n\nstatic int _clearScreen (void);\nstatic void _compare(SDL_Surface *reference, int allowable_error);\nstatic int _hasTexAlpha(void);\nstatic int _hasTexColor(void);\nstatic SDL_Texture *_loadTestFace(void);\nstatic int _hasBlendModes(void);\nstatic int _hasDrawColor(void);\nstatic int _isSupported(int code);\n\n/**\n * Create software renderer for tests\n */\nvoid InitCreateRenderer(void *arg)\n{\n  int posX = 100, posY = 100, width = 320, height = 240;\n  renderer = NULL;\n  window = SDL_CreateWindow(\"render_testCreateRenderer\", posX, posY, width, height, 0);\n  SDLTest_AssertPass(\"SDL_CreateWindow()\");\n  SDLTest_AssertCheck(window != NULL, \"Check SDL_CreateWindow result\");\n  if (window == NULL) {\n      return;\n  }\n\n  renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);\n  SDLTest_AssertPass(\"SDL_CreateRenderer()\");\n  SDLTest_AssertCheck(renderer != 0, \"Check SDL_CreateRenderer result\");\n  if (renderer == NULL) {\n      SDL_DestroyWindow(window);\n      return;\n  }\n}\n\n/*\n * Destroy renderer for tests\n */\nvoid CleanupDestroyRenderer(void *arg)\n{\n  if (renderer != NULL) {\n     SDL_DestroyRenderer(renderer);\n     renderer = NULL;\n     SDLTest_AssertPass(\"SDL_DestroyRenderer()\");\n  }\n\n  if (window != NULL) {\n     SDL_DestroyWindow(window);\n     window = NULL;\n     SDLTest_AssertPass(\"SDL_DestroyWindow\");\n  }\n}\n\n\n/**\n * @brief Tests call to SDL_GetNumRenderDrivers\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_GetNumRenderDrivers\n */\nint\nrender_testGetNumRenderDrivers(void *arg)\n{\n  int n;\n  n = SDL_GetNumRenderDrivers();\n  SDLTest_AssertCheck(n >= 1, \"Number of renderers >= 1, reported as %i\", n);\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests the SDL primitives for rendering.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderFillRect\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderDrawLine\n *\n */\nint render_testPrimitives (void *arg)\n{\n   int ret;\n   int x, y;\n   SDL_Rect rect;\n   SDL_Surface *referenceSurface = NULL;\n   int checkFailCount1;\n   int checkFailCount2;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Need drawcolor or just skip test. */\n   SDLTest_AssertCheck(_hasDrawColor(), \"_hasDrawColor\");\n\n   /* Draw a rectangle. */\n   rect.x = 40;\n   rect.y = 0;\n   rect.w = 40;\n   rect.h = 80;\n\n   ret = SDL_SetRenderDrawColor(renderer, 13, 73, 200, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, &rect );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n   /* Draw a rectangle. */\n   rect.x = 10;\n   rect.y = 10;\n   rect.w = 60;\n   rect.h = 40;\n   ret = SDL_SetRenderDrawColor(renderer, 200, 0, 100, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, &rect );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n   /* Draw some points like so:\n    * X.X.X.X..\n    * .X.X.X.X.\n    * X.X.X.X.. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   for (y=0; y<3; y++) {\n      for (x = y % 2; x<TESTRENDER_SCREEN_W; x+=2) {\n         ret = SDL_SetRenderDrawColor(renderer, x*y, x*y/2, x*y/3, SDL_ALPHA_OPAQUE );\n         if (ret != 0) checkFailCount1++;\n\n         ret = SDL_RenderDrawPoint(renderer, x, y );\n         if (ret != 0) checkFailCount2++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i\", checkFailCount2);\n\n   /* Draw some lines. */\n   ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor\");\n\n   ret = SDL_RenderDrawLine(renderer, 0, 30, TESTRENDER_SCREEN_W, 30 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderDrawLine(renderer, 40, 30, 40, 60 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderDrawLine(renderer, 0, 0, 29, 29 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderDrawLine(renderer, 29, 30, 0, 59 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderDrawLine(renderer, 79, 0, 50, 29 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderDrawLine, expected: 0, got: %i\", ret);\n   \n   /* Make current */\n   SDL_RenderPresent(renderer);\n   \n   /* See if it's the same. */\n   referenceSurface = SDLTest_ImagePrimitives();\n   _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );\n\n   /* Clean up. */\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the SDL primitives with alpha for rendering.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawBlendMode\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderFillRect\n */\nint render_testPrimitivesBlend (void *arg)\n{\n   int ret;\n   int i, j;\n   SDL_Rect rect;\n   SDL_Surface *referenceSurface = NULL;\n   int checkFailCount1;\n   int checkFailCount2;\n   int checkFailCount3;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Need drawcolor and blendmode or just skip test. */\n   SDLTest_AssertCheck(_hasDrawColor(), \"_hasDrawColor\");\n   SDLTest_AssertCheck(_hasBlendModes(), \"_hasBlendModes\");\n\n   /* Create some rectangles for each blend mode. */\n   ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, NULL );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n   rect.x = 10;\n   rect.y = 25;\n   rect.w = 40;\n   rect.h = 25;\n   ret = SDL_SetRenderDrawColor(renderer, 240, 10, 10, 75 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, &rect );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n   rect.x = 30;\n   rect.y = 40;\n   rect.w = 45;\n   rect.h = 15;\n   ret = SDL_SetRenderDrawColor(renderer, 10, 240, 10, 100 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, &rect );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n   rect.x = 25;\n   rect.y = 25;\n   rect.w = 25;\n   rect.h = 25;\n   ret = SDL_SetRenderDrawColor(renderer, 10, 10, 240, 125 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", ret);\n\n   ret = SDL_RenderFillRect(renderer, &rect );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderFillRect, expected: 0, got: %i\", ret);\n\n\n   /* Draw blended lines, lines for everyone. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   checkFailCount3 = 0;\n   for (i=0; i<TESTRENDER_SCREEN_W; i+=2)  {\n      ret = SDL_SetRenderDrawColor(renderer, 60+2*i, 240-2*i, 50, 3*i );\n      if (ret != 0) checkFailCount1++;\n\n      ret = SDL_SetRenderDrawBlendMode(renderer,(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :\n            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );\n      if (ret != 0) checkFailCount2++;\n\n      ret = SDL_RenderDrawLine(renderer, 0, 0, i, 59 );\n      if (ret != 0) checkFailCount3++;\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", checkFailCount2);\n   SDLTest_AssertCheck(checkFailCount3 == 0, \"Validate results from calls to SDL_RenderDrawLine, expected: 0, got: %i\", checkFailCount3);\n\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   checkFailCount3 = 0;\n   for (i=0; i<TESTRENDER_SCREEN_H; i+=2)  {\n      ret = SDL_SetRenderDrawColor(renderer, 60+2*i, 240-2*i, 50, 3*i );\n      if (ret != 0) checkFailCount1++;\n\n      ret = SDL_SetRenderDrawBlendMode(renderer,(((i/2)%3)==0) ? SDL_BLENDMODE_BLEND :\n            (((i/2)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );\n      if (ret != 0) checkFailCount2++;\n\n      ret = SDL_RenderDrawLine(renderer, 0, 0, 79, i );\n      if (ret != 0) checkFailCount3++;\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", checkFailCount2);\n   SDLTest_AssertCheck(checkFailCount3 == 0, \"Validate results from calls to SDL_RenderDrawLine, expected: 0, got: %i\", checkFailCount3);\n\n   /* Draw points. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   checkFailCount3 = 0;\n   for (j=0; j<TESTRENDER_SCREEN_H; j+=3) {\n      for (i=0; i<TESTRENDER_SCREEN_W; i+=3) {\n         ret = SDL_SetRenderDrawColor(renderer, j*4, i*3, j*4, i*3 );\n         if (ret != 0) checkFailCount1++;\n\n         ret = SDL_SetRenderDrawBlendMode(renderer, ((((i+j)/3)%3)==0) ? SDL_BLENDMODE_BLEND :\n               ((((i+j)/3)%3)==1) ? SDL_BLENDMODE_ADD : SDL_BLENDMODE_NONE );\n         if (ret != 0) checkFailCount2++;\n\n         ret = SDL_RenderDrawPoint(renderer, i, j );\n         if (ret != 0) checkFailCount3++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", checkFailCount2);\n   SDLTest_AssertCheck(checkFailCount3 == 0, \"Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i\", checkFailCount3);\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* See if it's the same. */\n   referenceSurface = SDLTest_ImagePrimitivesBlend();\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );\n\n   /* Clean up. */\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n\n\n/**\n * @brief Tests some blitting routines.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderCopy\n * http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nint\nrender_testBlit(void *arg)\n{\n   int ret;\n   SDL_Rect rect;\n   SDL_Texture *tface;\n   SDL_Surface *referenceSurface = NULL;\n   Uint32 tformat;\n   int taccess, tw, th;\n   int i, j, ni, nj;\n   int checkFailCount1;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Need drawcolor or just skip test. */\n   SDLTest_AssertCheck(_hasDrawColor(), \"_hasDrawColor)\");\n\n   /* Create face surface. */\n   tface = _loadTestFace();\n   SDLTest_AssertCheck(tface != NULL,  \"Verify _loadTestFace() result\");\n   if (tface == NULL) {\n       return TEST_ABORTED;\n   }\n\n   /* Constant values. */\n   ret = SDL_QueryTexture(tface, &tformat, &taccess, &tw, &th);\n   SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_QueryTexture, expected 0, got %i\", ret);\n   rect.w = tw;\n   rect.h = th;\n   ni     = TESTRENDER_SCREEN_W - tw;\n   nj     = TESTRENDER_SCREEN_H - th;\n\n   /* Loop blit. */\n   checkFailCount1 = 0;\n   for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );\n         if (ret != 0) checkFailCount1++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_RenderCopy, expected: 0, got: %i\", checkFailCount1);\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* See if it's the same */\n   referenceSurface = SDLTest_ImageBlit();\n   _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Blits doing color tests.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureColorMod\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderCopy\n * http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nint\nrender_testBlitColor (void *arg)\n{\n   int ret;\n   SDL_Rect rect;\n   SDL_Texture *tface;\n   SDL_Surface *referenceSurface = NULL;\n   Uint32 tformat;\n   int taccess, tw, th;\n   int i, j, ni, nj;\n   int checkFailCount1;\n   int checkFailCount2;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Create face surface. */\n   tface = _loadTestFace();\n   SDLTest_AssertCheck(tface != NULL, \"Verify _loadTestFace() result\");\n   if (tface == NULL) {\n       return TEST_ABORTED;\n   }\n\n   /* Constant values. */\n   ret = SDL_QueryTexture(tface, &tformat, &taccess, &tw, &th);\n   SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_QueryTexture, expected 0, got %i\", ret);\n   rect.w = tw;\n   rect.h = th;\n   ni     = TESTRENDER_SCREEN_W - tw;\n   nj     = TESTRENDER_SCREEN_H - th;\n\n   /* Test blitting with color mod. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n         /* Set color mod. */\n         ret = SDL_SetTextureColorMod( tface, (255/nj)*j, (255/ni)*i, (255/nj)*j );\n         if (ret != 0) checkFailCount1++;\n\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );\n         if (ret != 0) checkFailCount2++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_RenderCopy, expected: 0, got: %i\", checkFailCount2);\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* See if it's the same. */\n   referenceSurface = SDLTest_ImageBlitColor();\n   _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests blitting with alpha.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureAlphaMod\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderCopy\n * http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nint\nrender_testBlitAlpha (void *arg)\n{\n   int ret;\n   SDL_Rect rect;\n   SDL_Texture *tface;\n   SDL_Surface *referenceSurface = NULL;\n   Uint32 tformat;\n   int taccess, tw, th;\n   int i, j, ni, nj;\n   int checkFailCount1;\n   int checkFailCount2;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Need alpha or just skip test. */\n   SDLTest_AssertCheck(_hasTexAlpha(), \"_hasTexAlpha\");\n\n   /* Create face surface. */\n   tface = _loadTestFace();\n   SDLTest_AssertCheck(tface != NULL, \"Verify _loadTestFace() result\");\n   if (tface == NULL) {\n       return TEST_ABORTED;\n   }\n\n   /* Constant values. */\n   ret = SDL_QueryTexture(tface, &tformat, &taccess, &tw, &th);\n   SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_QueryTexture, expected 0, got %i\", ret);\n   rect.w = tw;\n   rect.h = th;\n   ni     = TESTRENDER_SCREEN_W - tw;\n   nj     = TESTRENDER_SCREEN_H - th;\n\n   /* Test blitting with alpha mod. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n         /* Set alpha mod. */\n         ret = SDL_SetTextureAlphaMod( tface, (255/ni)*i );\n         if (ret != 0) checkFailCount1++;\n\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );\n         if (ret != 0) checkFailCount2++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_RenderCopy, expected: 0, got: %i\", checkFailCount2);\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* See if it's the same. */\n   referenceSurface = SDLTest_ImageBlitAlpha();\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n/* Helper functions */\n\n/**\n * @brief Tests a blend mode.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureBlendMode\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderCopy\n */\nstatic void\n_testBlitBlendMode( SDL_Texture * tface, int mode )\n{\n   int ret;\n   Uint32 tformat;\n   int taccess, tw, th;\n   int i, j, ni, nj;\n   SDL_Rect rect;\n   int checkFailCount1;\n   int checkFailCount2;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Constant values. */\n   ret = SDL_QueryTexture(tface, &tformat, &taccess, &tw, &th);\n   SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_QueryTexture, expected 0, got %i\", ret);\n   rect.w = tw;\n   rect.h = th;\n   ni     = TESTRENDER_SCREEN_W - tw;\n   nj     = TESTRENDER_SCREEN_H - th;\n\n   /* Test blend mode. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n         /* Set blend mode. */\n         ret = SDL_SetTextureBlendMode( tface, (SDL_BlendMode)mode );\n         if (ret != 0) checkFailCount1++;\n\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );\n         if (ret != 0) checkFailCount2++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_RenderCopy, expected: 0, got: %i\", checkFailCount2);\n}\n\n\n/**\n * @brief Tests some more blitting routines.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureColorMod\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureAlphaMod\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureBlendMode\n * http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nint\nrender_testBlitBlend (void *arg)\n{\n   int ret;\n   SDL_Rect rect;\n   SDL_Texture *tface;\n   SDL_Surface *referenceSurface = NULL;\n   Uint32 tformat;\n   int taccess, tw, th;\n   int i, j, ni, nj;\n   int mode;\n   int checkFailCount1;\n   int checkFailCount2;\n   int checkFailCount3;\n   int checkFailCount4;\n\n   SDLTest_AssertCheck(_hasBlendModes(), \"_hasBlendModes\");\n   SDLTest_AssertCheck(_hasTexColor(), \"_hasTexColor\");\n   SDLTest_AssertCheck(_hasTexAlpha(), \"_hasTexAlpha\");\n\n   /* Create face surface. */\n   tface = _loadTestFace();\n   SDLTest_AssertCheck(tface != NULL, \"Verify _loadTestFace() result\");\n   if (tface == NULL) {\n       return TEST_ABORTED;\n   }\n\n   /* Constant values. */\n   ret = SDL_QueryTexture(tface, &tformat, &taccess, &tw, &th);\n   SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_QueryTexture, expected 0, got %i\", ret);\n   rect.w = tw;\n   rect.h = th;\n   ni = TESTRENDER_SCREEN_W - tw;\n   nj = TESTRENDER_SCREEN_H - th;\n\n   /* Set alpha mod. */\n   ret = SDL_SetTextureAlphaMod( tface, 100 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetTextureAlphaMod, expected: 0, got: %i\", ret);\n\n   /* Test None. */\n   _testBlitBlendMode( tface, SDL_BLENDMODE_NONE );\n   referenceSurface = SDLTest_ImageBlitBlendNone();\n\n   /* Make current and compare */\n   SDL_RenderPresent(renderer);\n   _compare(referenceSurface, ALLOWABLE_ERROR_OPAQUE );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   /* Test Blend. */\n   _testBlitBlendMode( tface, SDL_BLENDMODE_BLEND );\n   referenceSurface = SDLTest_ImageBlitBlend();\n\n   /* Make current and compare */\n   SDL_RenderPresent(renderer);\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   /* Test Add. */\n   _testBlitBlendMode( tface, SDL_BLENDMODE_ADD );\n   referenceSurface = SDLTest_ImageBlitBlendAdd();\n\n   /* Make current and compare */\n   SDL_RenderPresent(renderer);\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   /* Test Mod. */\n   _testBlitBlendMode( tface, SDL_BLENDMODE_MOD);\n   referenceSurface = SDLTest_ImageBlitBlendMod();\n\n   /* Make current and compare */\n   SDL_RenderPresent(renderer);\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED );\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   /* Clear surface. */\n   _clearScreen();\n\n   /* Loop blit. */\n   checkFailCount1 = 0;\n   checkFailCount2 = 0;\n   checkFailCount3 = 0;\n   checkFailCount4 = 0;\n   for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n\n         /* Set color mod. */\n         ret = SDL_SetTextureColorMod( tface, (255/nj)*j, (255/ni)*i, (255/nj)*j );\n         if (ret != 0) checkFailCount1++;\n\n         /* Set alpha mod. */\n         ret = SDL_SetTextureAlphaMod( tface, (100/ni)*i );\n         if (ret != 0) checkFailCount2++;\n\n         /* Crazy blending mode magic. */\n         mode = (i/4*j/4) % 4;\n         if (mode==0) mode = SDL_BLENDMODE_NONE;\n         else if (mode==1) mode = SDL_BLENDMODE_BLEND;\n         else if (mode==2) mode = SDL_BLENDMODE_ADD;\n         else if (mode==3) mode = SDL_BLENDMODE_MOD;\n         ret = SDL_SetTextureBlendMode( tface, (SDL_BlendMode)mode );\n         if (ret != 0) checkFailCount3++;\n\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_RenderCopy(renderer, tface, NULL, &rect );\n         if (ret != 0) checkFailCount4++;\n      }\n   }\n   SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i\", checkFailCount1);\n   SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i\", checkFailCount2);\n   SDLTest_AssertCheck(checkFailCount3 == 0, \"Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i\", checkFailCount3);\n   SDLTest_AssertCheck(checkFailCount4 == 0, \"Validate results from calls to SDL_RenderCopy, expected: 0, got: %i\", checkFailCount4);\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* Check to see if final image matches. */\n   referenceSurface = SDLTest_ImageBlitBlendAll();\n   _compare(referenceSurface, ALLOWABLE_ERROR_BLENDED);\n   SDL_FreeSurface(referenceSurface);\n   referenceSurface = NULL;\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Checks to see if functionality is supported. Helper function.\n */\nstatic int\n_isSupported( int code )\n{\n   return (code == 0);\n}\n\n/**\n * @brief Test to see if we can vary the draw color. Helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor\n * http://wiki.libsdl.org/moin.cgi/SDL_GetRenderDrawColor\n */\nstatic int\n_hasDrawColor (void)\n{\n   int ret, fail;\n   Uint8 r, g, b, a;\n\n   fail = 0;\n\n   /* Set color. */\n   ret = SDL_SetRenderDrawColor(renderer, 100, 100, 100, 100 );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetRenderDrawColor(renderer, &r, &g, &b, &a );\n   if (!_isSupported(ret))\n      fail = 1;\n\n   /* Restore natural. */\n   ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE );\n   if (!_isSupported(ret))\n      fail = 1;\n\n   /* Something failed, consider not available. */\n   if (fail)\n      return 0;\n\n   /* Not set properly, consider failed. */\n   else if ((r != 100) || (g != 100) || (b != 100) || (a != 100))\n      return 0;\n   return 1;\n}\n\n/**\n * @brief Test to see if we can vary the blend mode. Helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawBlendMode\n * http://wiki.libsdl.org/moin.cgi/SDL_GetRenderDrawBlendMode\n */\nstatic int\n_hasBlendModes (void)\n{\n   int fail;\n   int ret;\n   SDL_BlendMode mode;\n\n   fail = 0;\n\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = (mode != SDL_BLENDMODE_BLEND);\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_ADD );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = (mode != SDL_BLENDMODE_ADD);\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_MOD );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = (mode != SDL_BLENDMODE_MOD);\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetRenderDrawBlendMode(renderer, &mode );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = (mode != SDL_BLENDMODE_NONE);\n   if (!_isSupported(ret))\n      fail = 1;\n\n   return !fail;\n}\n\n\n/**\n * @brief Loads the test image 'Face' as texture. Helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_CreateTextureFromSurface\n */\nstatic SDL_Texture *\n_loadTestFace(void)\n{\n   SDL_Surface *face;\n   SDL_Texture *tface;\n\n   face = SDLTest_ImageFace();\n   if (face == NULL) {\n      return NULL;\n   }\n\n   tface = SDL_CreateTextureFromSurface(renderer, face);\n   if (tface == NULL) {\n       SDLTest_LogError(\"SDL_CreateTextureFromSurface() failed with error: %s\", SDL_GetError());\n   }\n\n   SDL_FreeSurface(face);\n\n   return tface;\n}\n\n\n/**\n * @brief Test to see if can set texture color mode. Helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetTextureColorMod\n * http://wiki.libsdl.org/moin.cgi/SDL_GetTextureColorMod\n * http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nstatic int\n_hasTexColor (void)\n{\n   int fail;\n   int ret;\n   SDL_Texture *tface;\n   Uint8 r, g, b;\n\n   /* Get test face. */\n   tface = _loadTestFace();\n   if (tface == NULL)\n      return 0;\n\n   /* See if supported. */\n   fail = 0;\n   ret = SDL_SetTextureColorMod( tface, 100, 100, 100 );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetTextureColorMod( tface, &r, &g, &b );\n   if (!_isSupported(ret))\n      fail = 1;\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n\n   if (fail)\n      return 0;\n   else if ((r != 100) || (g != 100) || (b != 100))\n      return 0;\n   return 1;\n}\n\n/**\n * @brief Test to see if we can vary the alpha of the texture. Helper function.\n *\n * \\sa\n *  http://wiki.libsdl.org/moin.cgi/SDL_SetTextureAlphaMod\n *  http://wiki.libsdl.org/moin.cgi/SDL_GetTextureAlphaMod\n *  http://wiki.libsdl.org/moin.cgi/SDL_DestroyTexture\n */\nstatic int\n_hasTexAlpha(void)\n{\n   int fail;\n   int ret;\n   SDL_Texture *tface;\n   Uint8 a;\n\n   /* Get test face. */\n   tface = _loadTestFace();\n   if (tface == NULL)\n      return 0;\n\n   /* See if supported. */\n   fail = 0;\n   ret = SDL_SetTextureAlphaMod( tface, 100 );\n   if (!_isSupported(ret))\n      fail = 1;\n   ret = SDL_GetTextureAlphaMod( tface, &a );\n   if (!_isSupported(ret))\n      fail = 1;\n\n   /* Clean up. */\n   SDL_DestroyTexture( tface );\n\n   if (fail)\n      return 0;\n   else if (a != 100)\n      return 0;\n   return 1;\n}\n\n/**\n * @brief Compares screen pixels with image pixels. Helper function.\n *\n * @param s Image to compare against.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderReadPixels\n * http://wiki.libsdl.org/moin.cgi/SDL_CreateRGBSurfaceFrom\n * http://wiki.libsdl.org/moin.cgi/SDL_FreeSurface\n */\nstatic void\n_compare(SDL_Surface *referenceSurface, int allowable_error)\n{\n   int result;\n   SDL_Rect rect;\n   Uint8 *pixels;\n   SDL_Surface *testSurface;\n\n   /* Read pixels. */\n   pixels = (Uint8 *)SDL_malloc(4*TESTRENDER_SCREEN_W*TESTRENDER_SCREEN_H);\n   SDLTest_AssertCheck(pixels != NULL, \"Validate allocated temp pixel buffer\");\n   if (pixels == NULL) return;\n\n   /* Explicitly specify the rect in case the window isn't the expected size... */\n   rect.x = 0;\n   rect.y = 0;\n   rect.w = TESTRENDER_SCREEN_W;\n   rect.h = TESTRENDER_SCREEN_H;\n   result = SDL_RenderReadPixels(renderer, &rect, RENDER_COMPARE_FORMAT, pixels, 80*4 );\n   SDLTest_AssertCheck(result == 0, \"Validate result from SDL_RenderReadPixels, expected: 0, got: %i\", result);\n\n   /* Create surface. */\n   testSurface = SDL_CreateRGBSurfaceFrom(pixels, TESTRENDER_SCREEN_W, TESTRENDER_SCREEN_H, 32, TESTRENDER_SCREEN_W*4,\n                                       RENDER_COMPARE_RMASK, RENDER_COMPARE_GMASK, RENDER_COMPARE_BMASK, RENDER_COMPARE_AMASK);\n   SDLTest_AssertCheck(testSurface != NULL, \"Verify result from SDL_CreateRGBSurfaceFrom is not NULL\");\n\n   /* Compare surface. */\n   result = SDLTest_CompareSurfaces( testSurface, referenceSurface, allowable_error );\n   SDLTest_AssertCheck(result == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", result);\n\n   /* Clean up. */\n   SDL_free(pixels);\n   SDL_FreeSurface(testSurface);\n}\n\n/**\n * @brief Clears the screen. Helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawColor\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderClear\n * http://wiki.libsdl.org/moin.cgi/SDL_RenderPresent\n * http://wiki.libsdl.org/moin.cgi/SDL_SetRenderDrawBlendMode\n */\nstatic int\n_clearScreen(void)\n{\n   int ret;\n\n   /* Set color. */\n   ret = SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   /* Clear screen. */\n   ret = SDL_RenderClear(renderer);\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_RenderClear, expected: 0, got: %i\", ret);\n\n   /* Make current */\n   SDL_RenderPresent(renderer);\n\n   /* Set defaults. */\n   ret = SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawBlendMode, expected: 0, got: %i\", ret);\n\n   ret = SDL_SetRenderDrawColor(renderer, 255, 255, 255, SDL_ALPHA_OPAQUE );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i\", ret);\n\n   return 0;\n}\n\n/* ================= Test References ================== */\n\n/* Render test cases */\nstatic const SDLTest_TestCaseReference renderTest1 =\n        { (SDLTest_TestCaseFp)render_testGetNumRenderDrivers, \"render_testGetNumRenderDrivers\", \"Tests call to SDL_GetNumRenderDrivers\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference renderTest2 =\n        { (SDLTest_TestCaseFp)render_testPrimitives, \"render_testPrimitives\", \"Tests rendering primitives\", TEST_ENABLED };\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference renderTest3 =\n        { (SDLTest_TestCaseFp)render_testPrimitivesBlend, \"render_testPrimitivesBlend\", \"Tests rendering primitives with blending\", TEST_DISABLED };\n\nstatic const SDLTest_TestCaseReference renderTest4 =\n        { (SDLTest_TestCaseFp)render_testBlit, \"render_testBlit\", \"Tests blitting\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference renderTest5 =\n        { (SDLTest_TestCaseFp)render_testBlitColor, \"render_testBlitColor\", \"Tests blitting with color\", TEST_ENABLED };\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference renderTest6 =\n        { (SDLTest_TestCaseFp)render_testBlitAlpha, \"render_testBlitAlpha\", \"Tests blitting with alpha\", TEST_DISABLED };\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference renderTest7 =\n        {  (SDLTest_TestCaseFp)render_testBlitBlend, \"render_testBlitBlend\", \"Tests blitting with blending\", TEST_DISABLED };\n\n/* Sequence of Render test cases */\nstatic const SDLTest_TestCaseReference *renderTests[] =  {\n    &renderTest1, &renderTest2, &renderTest3, &renderTest4, &renderTest5, &renderTest6, &renderTest7, NULL\n};\n\n/* Render test suite (global) */\nSDLTest_TestSuiteReference renderTestSuite = {\n    \"Render\",\n    InitCreateRenderer,\n    renderTests,\n    CleanupDestroyRenderer\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_rwops.c",
    "content": "\n/**\n * Automated SDL_RWops test.\n *\n * Original code written by Edgar Simo \"bobbens\"\n * Ported by Markus Kauppila (markus.kauppila@gmail.com)\n * Updated and extended for SDL_test by aschiffler at ferzkopp dot net\n *\n * Released under Public Domain.\n */\n\n/* quiet windows compiler warnings */\n#define _CRT_SECURE_NO_WARNINGS\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* ================= Test Case Implementation ================== */\n\nconst char* RWopsReadTestFilename = \"rwops_read\";\nconst char* RWopsWriteTestFilename = \"rwops_write\";\nconst char* RWopsAlphabetFilename = \"rwops_alphabet\";\n\nstatic const char RWopsHelloWorldTestString[] = \"Hello World!\";\nstatic const char RWopsHelloWorldCompString[] = \"Hello World!\";\nstatic const char RWopsAlphabetString[] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n/* Fixture */\n\nvoid\nRWopsSetUp(void *arg)\n{\n    size_t fileLen;\n    FILE *handle;\n    size_t writtenLen;\n    int result;\n\n    /* Clean up from previous runs (if any); ignore errors */\n    remove(RWopsReadTestFilename);\n    remove(RWopsWriteTestFilename);\n    remove(RWopsAlphabetFilename);\n\n    /* Create a test file */\n    handle = fopen(RWopsReadTestFilename, \"w\");\n    SDLTest_AssertCheck(handle != NULL, \"Verify creation of file '%s' returned non NULL handle\", RWopsReadTestFilename);\n        if (handle == NULL) return;\n\n    /* Write some known text into it */\n    fileLen = SDL_strlen(RWopsHelloWorldTestString);\n    writtenLen = fwrite(RWopsHelloWorldTestString, 1, fileLen, handle);\n    SDLTest_AssertCheck(fileLen == writtenLen, \"Verify number of written bytes, expected %i, got %i\", (int) fileLen, (int) writtenLen);\n    result = fclose(handle);\n    SDLTest_AssertCheck(result == 0, \"Verify result from fclose, expected 0, got %i\", result);\n\n    /* Create a second test file */\n    handle = fopen(RWopsAlphabetFilename, \"w\");\n    SDLTest_AssertCheck(handle != NULL, \"Verify creation of file '%s' returned non NULL handle\", RWopsAlphabetFilename);\n        if (handle == NULL) return;\n\n    /* Write alphabet text into it */\n    fileLen = SDL_strlen(RWopsAlphabetString);\n    writtenLen = fwrite(RWopsAlphabetString, 1, fileLen, handle);\n    SDLTest_AssertCheck(fileLen == writtenLen, \"Verify number of written bytes, expected %i, got %i\", (int) fileLen, (int) writtenLen);\n    result = fclose(handle);\n    SDLTest_AssertCheck(result == 0, \"Verify result from fclose, expected 0, got %i\", result);\n\n    SDLTest_AssertPass(\"Creation of test file completed\");\n}\n\nvoid\nRWopsTearDown(void *arg)\n{\n    int result;\n\n    /* Remove the created files to clean up; ignore errors for write filename */\n    result = remove(RWopsReadTestFilename);\n    SDLTest_AssertCheck(result == 0, \"Verify result from remove(%s), expected 0, got %i\", RWopsReadTestFilename, result);\n    remove(RWopsWriteTestFilename);\n    result = remove(RWopsAlphabetFilename);\n    SDLTest_AssertCheck(result == 0, \"Verify result from remove(%s), expected 0, got %i\", RWopsAlphabetFilename, result);\n\n    SDLTest_AssertPass(\"Cleanup of test files completed\");\n}\n\n/**\n * @brief Makes sure parameters work properly. Local helper function.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWseek\n * http://wiki.libsdl.org/moin.cgi/SDL_RWread\n */\nvoid\n_testGenericRWopsValidations(SDL_RWops *rw, int write)\n{\n   char buf[sizeof(RWopsHelloWorldTestString)];\n   Sint64 i;\n   size_t s;\n   int seekPos = SDLTest_RandomIntegerInRange(4, 8);\n\n   /* Clear buffer */\n   SDL_zero(buf);\n\n   /* Set to start. */\n   i = SDL_RWseek(rw, 0, RW_SEEK_SET );\n   SDLTest_AssertPass(\"Call to SDL_RWseek succeeded\");\n   SDLTest_AssertCheck(i == (Sint64)0, \"Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %\"SDL_PRIs64, i);\n\n   /* Test write. */\n   s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1);\n   SDLTest_AssertPass(\"Call to SDL_RWwrite succeeded\");\n   if (write) {\n        SDLTest_AssertCheck(s == (size_t)1, \"Verify result of writing one byte with SDL_RWwrite, expected 1, got %i\", (int) s);\n   }\n   else {\n        SDLTest_AssertCheck(s == (size_t)0, \"Verify result of writing with SDL_RWwrite, expected: 0, got %i\", (int) s);\n   }\n\n   /* Test seek to random position */\n   i = SDL_RWseek( rw, seekPos, RW_SEEK_SET );\n   SDLTest_AssertPass(\"Call to SDL_RWseek succeeded\");\n   SDLTest_AssertCheck(i == (Sint64)seekPos, \"Verify seek to %i with SDL_RWseek (RW_SEEK_SET), expected %i, got %\"SDL_PRIs64, seekPos, seekPos, i);\n\n   /* Test seek back to start */\n   i = SDL_RWseek(rw, 0, RW_SEEK_SET );\n   SDLTest_AssertPass(\"Call to SDL_RWseek succeeded\");\n   SDLTest_AssertCheck(i == (Sint64)0, \"Verify seek to 0 with SDL_RWseek (RW_SEEK_SET), expected 0, got %\"SDL_PRIs64, i);\n\n   /* Test read */\n   s = SDL_RWread( rw, buf, 1, sizeof(RWopsHelloWorldTestString)-1 );\n   SDLTest_AssertPass(\"Call to SDL_RWread succeeded\");\n   SDLTest_AssertCheck(\n       s == (size_t)(sizeof(RWopsHelloWorldTestString)-1),\n       \"Verify result from SDL_RWread, expected %i, got %i\",\n       (int) (sizeof(RWopsHelloWorldTestString)-1),\n       (int) s);\n   SDLTest_AssertCheck(\n       SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1 ) == 0,\n       \"Verify read bytes match expected string, expected '%s', got '%s'\", RWopsHelloWorldTestString, buf);\n\n   /* More seek tests. */\n   i = SDL_RWseek( rw, -4, RW_SEEK_CUR );\n   SDLTest_AssertPass(\"Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded\");\n   SDLTest_AssertCheck(\n       i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5),\n       \"Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i\",\n       (int) (sizeof(RWopsHelloWorldTestString)-5),\n       (int) i);\n\n   i = SDL_RWseek( rw, -1, RW_SEEK_END );\n   SDLTest_AssertPass(\"Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded\");\n   SDLTest_AssertCheck(\n       i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2),\n       \"Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i\",\n       (int) (sizeof(RWopsHelloWorldTestString)-2),\n       (int) i);\n\n   /* Invalid whence seek */\n   i = SDL_RWseek( rw, 0, 999 );\n   SDLTest_AssertPass(\"Call to SDL_RWseek(...,0,invalid_whence) succeeded\");\n   SDLTest_AssertCheck(\n       i == (Sint64)(-1),\n       \"Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i\",\n       (int) i);\n}\n\n/* !\n * Negative test for SDL_RWFromFile parameters\n *\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile\n *\n */\nint\nrwops_testParamNegative (void)\n{\n   SDL_RWops *rwops;\n\n   /* These should all fail. */\n   rwops = SDL_RWFromFile(NULL, NULL);\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(NULL, NULL) succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromFile(NULL, NULL) returns NULL\");\n\n   rwops = SDL_RWFromFile(NULL, \"ab+\");\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(NULL, \\\"ab+\\\") succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromFile(NULL, \\\"ab+\\\") returns NULL\");\n\n   rwops = SDL_RWFromFile(NULL, \"sldfkjsldkfj\");\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(NULL, \\\"sldfkjsldkfj\\\") succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromFile(NULL, \\\"sldfkjsldkfj\\\") returns NULL\");\n\n   rwops = SDL_RWFromFile(\"something\", \"\");\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(\\\"something\\\", \\\"\\\") succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromFile(\\\"something\\\", \\\"\\\") returns NULL\");\n\n   rwops = SDL_RWFromFile(\"something\", NULL);\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(\\\"something\\\", NULL) succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromFile(\\\"something\\\", NULL) returns NULL\");\n\n   rwops = SDL_RWFromMem((void *)NULL, 10);\n   SDLTest_AssertPass(\"Call to SDL_RWFromMem(NULL, 10) succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromMem(NULL, 10) returns NULL\");\n\n   rwops = SDL_RWFromMem((void *)RWopsAlphabetString, 0);\n   SDLTest_AssertPass(\"Call to SDL_RWFromMem(data, 0) succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromMem(data, 0) returns NULL\");\n\n   rwops = SDL_RWFromConstMem((const void *)RWopsAlphabetString, 0);\n   SDLTest_AssertPass(\"Call to SDL_RWFromConstMem(data, 0) succeeded\");\n   SDLTest_AssertCheck(rwops == NULL, \"Verify SDL_RWFromConstMem(data, 0) returns NULL\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests opening from memory.\n *\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromMem\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n */\nint\nrwops_testMem (void)\n{\n   char mem[sizeof(RWopsHelloWorldTestString)];\n   SDL_RWops *rw;\n   int result;\n\n   /* Clear buffer */\n   SDL_zero(mem);\n\n   /* Open */\n   rw = SDL_RWFromMem(mem, sizeof(RWopsHelloWorldTestString)-1);\n   SDLTest_AssertPass(\"Call to SDL_RWFromMem() succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening memory with SDL_RWFromMem does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) return TEST_ABORTED;\n\n   /* Check type */\n   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY, \"Verify RWops type is SDL_RWOPS_MEMORY; expected: %d, got: %d\", SDL_RWOPS_MEMORY, rw->type);\n\n   /* Run generic tests */\n   _testGenericRWopsValidations(rw, 1);\n\n   /* Close */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests opening from memory.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromConstMem\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n */\nint\nrwops_testConstMem (void)\n{\n   SDL_RWops *rw;\n   int result;\n\n   /* Open handle */\n   rw = SDL_RWFromConstMem( RWopsHelloWorldCompString, sizeof(RWopsHelloWorldCompString)-1 );\n   SDLTest_AssertPass(\"Call to SDL_RWFromConstMem() succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening memory with SDL_RWFromConstMem does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) return TEST_ABORTED;\n\n   /* Check type */\n   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY_RO, \"Verify RWops type is SDL_RWOPS_MEMORY_RO; expected: %d, got: %d\", SDL_RWOPS_MEMORY_RO, rw->type);\n\n   /* Run generic tests */\n   _testGenericRWopsValidations( rw, 0 );\n\n   /* Close handle */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests reading from file.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n */\nint\nrwops_testFileRead(void)\n{\n   SDL_RWops *rw;\n   int result;\n\n   /* Read test. */\n   rw = SDL_RWFromFile(RWopsReadTestFilename, \"r\");\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(..,\\\"r\\\") succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening file with SDL_RWFromFile in read mode does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) return TEST_ABORTED;\n\n   /* Check type */\n#if defined(__ANDROID__)\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d\", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);\n#elif defined(__WIN32__)\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_WINFILE,\n      \"Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d\", SDL_RWOPS_WINFILE, rw->type);\n#else\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d\", SDL_RWOPS_STDFILE, rw->type);\n#endif\n\n   /* Run generic tests */\n   _testGenericRWopsValidations( rw, 0 );\n\n   /* Close handle */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests writing from file.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n */\nint\nrwops_testFileWrite(void)\n{\n   SDL_RWops *rw;\n   int result;\n\n   /* Write test. */\n   rw = SDL_RWFromFile(RWopsWriteTestFilename, \"w+\");\n   SDLTest_AssertPass(\"Call to SDL_RWFromFile(..,\\\"w+\\\") succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening file with SDL_RWFromFile in write mode does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) return TEST_ABORTED;\n\n   /* Check type */\n#if defined(__ANDROID__)\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE || rw->type == SDL_RWOPS_JNIFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE or SDL_RWOPS_JNIFILE; expected: %d|%d, got: %d\", SDL_RWOPS_STDFILE, SDL_RWOPS_JNIFILE, rw->type);\n#elif defined(__WIN32__)\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_WINFILE,\n      \"Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d\", SDL_RWOPS_WINFILE, rw->type);\n#else\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d\", SDL_RWOPS_STDFILE, rw->type);\n#endif\n\n   /* Run generic tests */\n   _testGenericRWopsValidations( rw, 1 );\n\n   /* Close handle */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests reading from file handle\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFP\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n *\n */\nint\nrwops_testFPRead(void)\n{\n   FILE *fp;\n   SDL_RWops *rw;\n   int result;\n\n   /* Run read tests. */\n   fp = fopen(RWopsReadTestFilename, \"r\");\n   SDLTest_AssertCheck(fp != NULL, \"Verify handle from opening file '%s' in read mode is not NULL\", RWopsReadTestFilename);\n\n   /* Bail out if NULL */\n   if (fp == NULL) return TEST_ABORTED;\n\n   /* Open */\n   rw = SDL_RWFromFP( fp, SDL_TRUE );\n   SDLTest_AssertPass(\"Call to SDL_RWFromFP() succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening file with SDL_RWFromFP in read mode does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) {\n     fclose(fp);\n     return TEST_ABORTED;\n   }\n\n   /* Check type */\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d\", SDL_RWOPS_STDFILE, rw->type);\n\n   /* Run generic tests */\n   _testGenericRWopsValidations( rw, 0 );\n\n   /* Close handle - does fclose() */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests writing to file handle\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFP\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n *\n */\nint\nrwops_testFPWrite(void)\n{\n   FILE *fp;\n   SDL_RWops *rw;\n   int result;\n\n   /* Run write tests. */\n   fp = fopen(RWopsWriteTestFilename, \"w+\");\n   SDLTest_AssertCheck(fp != NULL, \"Verify handle from opening file '%s' in write mode is not NULL\", RWopsWriteTestFilename);\n\n   /* Bail out if NULL */\n   if (fp == NULL) return TEST_ABORTED;\n\n   /* Open */\n   rw = SDL_RWFromFP( fp, SDL_TRUE );\n   SDLTest_AssertPass(\"Call to SDL_RWFromFP() succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Verify opening file with SDL_RWFromFP in write mode does not return NULL\");\n\n   /* Bail out if NULL */\n   if (rw == NULL) {\n     fclose(fp);\n     return TEST_ABORTED;\n   }\n\n   /* Check type */\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_STDFILE,\n      \"Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d\", SDL_RWOPS_STDFILE, rw->type);\n\n   /* Run generic tests */\n   _testGenericRWopsValidations( rw, 1 );\n\n   /* Close handle - does fclose() */\n   result = SDL_RWclose(rw);\n   SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n   SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests alloc and free RW context.\n *\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_AllocRW\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_FreeRW\n */\nint\nrwops_testAllocFree (void)\n{\n   /* Allocate context */\n   SDL_RWops *rw = SDL_AllocRW();\n   SDLTest_AssertPass(\"Call to SDL_AllocRW() succeeded\");\n   SDLTest_AssertCheck(rw != NULL, \"Validate result from SDL_AllocRW() is not NULL\");\n   if (rw==NULL) return TEST_ABORTED;\n\n   /* Check type */\n   SDLTest_AssertCheck(\n      rw->type == SDL_RWOPS_UNKNOWN,\n      \"Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %d\", SDL_RWOPS_UNKNOWN, rw->type);\n\n   /* Free context again */\n   SDL_FreeRW(rw);\n   SDLTest_AssertPass(\"Call to SDL_FreeRW() succeeded\");\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Compare memory and file reads\n *\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromMem\n * \\sa http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile\n */\nint\nrwops_testCompareRWFromMemWithRWFromFile(void)\n{\n   int slen = 26;\n   char buffer_file[27];\n   char buffer_mem[27];\n   size_t rv_file;\n   size_t rv_mem;\n   Uint64 sv_file;\n   Uint64 sv_mem;\n   SDL_RWops* rwops_file;\n   SDL_RWops* rwops_mem;\n   int size;\n   int result;\n\n\n   for (size=5; size<10; size++)\n   {\n     /* Terminate buffer */\n     buffer_file[slen] = 0;\n     buffer_mem[slen] = 0;\n\n     /* Read/seek from memory */\n     rwops_mem = SDL_RWFromMem((void *)RWopsAlphabetString, slen);\n     SDLTest_AssertPass(\"Call to SDL_RWFromMem()\");\n     rv_mem = SDL_RWread(rwops_mem, buffer_mem, size, 6);\n     SDLTest_AssertPass(\"Call to SDL_RWread(mem, size=%d)\", size);\n     sv_mem = SDL_RWseek(rwops_mem, 0, SEEK_END);\n     SDLTest_AssertPass(\"Call to SDL_RWseek(mem,SEEK_END)\");\n     result = SDL_RWclose(rwops_mem);\n     SDLTest_AssertPass(\"Call to SDL_RWclose(mem)\");\n     SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n     /* Read/see from file */\n     rwops_file = SDL_RWFromFile(RWopsAlphabetFilename, \"r\");\n     SDLTest_AssertPass(\"Call to SDL_RWFromFile()\");\n     rv_file = SDL_RWread(rwops_file, buffer_file, size, 6);\n     SDLTest_AssertPass(\"Call to SDL_RWread(file, size=%d)\", size);\n     sv_file = SDL_RWseek(rwops_file, 0, SEEK_END);\n     SDLTest_AssertPass(\"Call to SDL_RWseek(file,SEEK_END)\");\n     result = SDL_RWclose(rwops_file);\n     SDLTest_AssertPass(\"Call to SDL_RWclose(file)\");\n     SDLTest_AssertCheck(result == 0, \"Verify result value is 0; got: %d\", result);\n\n     /* Compare */\n     SDLTest_AssertCheck(rv_mem == rv_file, \"Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d\", (int) rv_mem, (int) rv_file);\n     SDLTest_AssertCheck(sv_mem == sv_file, \"Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%d sv_file=%d\", (int) sv_mem, (int) sv_file);\n     SDLTest_AssertCheck(buffer_mem[slen] == 0, \"Verify mem buffer termination; expected: 0, got: %d\", buffer_mem[slen]);\n     SDLTest_AssertCheck(buffer_file[slen] == 0, \"Verify file buffer termination; expected: 0, got: %d\", buffer_file[slen]);\n     SDLTest_AssertCheck(\n       SDL_strncmp(buffer_mem, RWopsAlphabetString, slen) == 0,\n       \"Verify mem buffer contain alphabet string; expected: %s, got: %s\", RWopsAlphabetString, buffer_mem);\n     SDLTest_AssertCheck(\n       SDL_strncmp(buffer_file, RWopsAlphabetString, slen) == 0,\n       \"Verify file buffer contain alphabet string; expected: %s, got: %s\", RWopsAlphabetString, buffer_file);\n   }\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests writing and reading from file using endian aware functions.\n *\n * \\sa\n * http://wiki.libsdl.org/moin.cgi/SDL_RWFromFile\n * http://wiki.libsdl.org/moin.cgi/SDL_RWClose\n * http://wiki.libsdl.org/moin.cgi/SDL_ReadBE16\n * http://wiki.libsdl.org/moin.cgi/SDL_WriteBE16\n */\nint\nrwops_testFileWriteReadEndian(void)\n{\n   SDL_RWops *rw;\n   Sint64 result;\n   int mode;\n   size_t objectsWritten;\n   Uint16 BE16value;\n   Uint32 BE32value;\n   Uint64 BE64value;\n   Uint16 LE16value;\n   Uint32 LE32value;\n   Uint64 LE64value;\n   Uint16 BE16test;\n   Uint32 BE32test;\n   Uint64 BE64test;\n   Uint16 LE16test;\n   Uint32 LE32test;\n   Uint64 LE64test;\n   int cresult;\n\n   for (mode = 0; mode < 3; mode++) {\n\n     /* Create test data */\n     switch (mode) {\n       case 0:\n        SDLTest_Log(\"All 0 values\");\n        BE16value = 0;\n        BE32value = 0;\n        BE64value = 0;\n        LE16value = 0;\n        LE32value = 0;\n        LE64value = 0;\n        break;\n       case 1:\n        SDLTest_Log(\"All 1 values\");\n        BE16value = 1;\n        BE32value = 1;\n        BE64value = 1;\n        LE16value = 1;\n        LE32value = 1;\n        LE64value = 1;\n        break;\n       case 2:\n        SDLTest_Log(\"Random values\");\n        BE16value = SDLTest_RandomUint16();\n        BE32value = SDLTest_RandomUint32();\n        BE64value = SDLTest_RandomUint64();\n        LE16value = SDLTest_RandomUint16();\n        LE32value = SDLTest_RandomUint32();\n        LE64value = SDLTest_RandomUint64();\n        break;\n     }\n\n     /* Write test. */\n     rw = SDL_RWFromFile(RWopsWriteTestFilename, \"w+\");\n     SDLTest_AssertPass(\"Call to SDL_RWFromFile(..,\\\"w+\\\")\");\n     SDLTest_AssertCheck(rw != NULL, \"Verify opening file with SDL_RWFromFile in write mode does not return NULL\");\n\n     /* Bail out if NULL */\n     if (rw == NULL) return TEST_ABORTED;\n\n     /* Write test data */\n     objectsWritten = SDL_WriteBE16(rw, BE16value);\n     SDLTest_AssertPass(\"Call to SDL_WriteBE16()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n     objectsWritten = SDL_WriteBE32(rw, BE32value);\n     SDLTest_AssertPass(\"Call to SDL_WriteBE32()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n     objectsWritten = SDL_WriteBE64(rw, BE64value);\n     SDLTest_AssertPass(\"Call to SDL_WriteBE64()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n     objectsWritten = SDL_WriteLE16(rw, LE16value);\n     SDLTest_AssertPass(\"Call to SDL_WriteLE16()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n     objectsWritten = SDL_WriteLE32(rw, LE32value);\n     SDLTest_AssertPass(\"Call to SDL_WriteLE32()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n     objectsWritten = SDL_WriteLE64(rw, LE64value);\n     SDLTest_AssertPass(\"Call to SDL_WriteLE64()\");\n     SDLTest_AssertCheck(objectsWritten == 1, \"Validate number of objects written, expected: 1, got: %i\", (int) objectsWritten);\n\n     /* Test seek to start */\n     result = SDL_RWseek( rw, 0, RW_SEEK_SET );\n     SDLTest_AssertPass(\"Call to SDL_RWseek succeeded\");\n     SDLTest_AssertCheck(result == 0, \"Verify result from position 0 with SDL_RWseek, expected 0, got %i\", (int) result);\n\n     /* Read test data */\n     BE16test = SDL_ReadBE16(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadBE16()\");\n     SDLTest_AssertCheck(BE16test == BE16value, \"Validate return value from SDL_ReadBE16, expected: %hu, got: %hu\", BE16value, BE16test);\n     BE32test = SDL_ReadBE32(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadBE32()\");\n     SDLTest_AssertCheck(BE32test == BE32value, \"Validate return value from SDL_ReadBE32, expected: %u, got: %u\", BE32value, BE32test);\n     BE64test = SDL_ReadBE64(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadBE64()\");\n     SDLTest_AssertCheck(BE64test == BE64value, \"Validate return value from SDL_ReadBE64, expected: %\"SDL_PRIu64\", got: %\"SDL_PRIu64, BE64value, BE64test);\n     LE16test = SDL_ReadLE16(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadLE16()\");\n     SDLTest_AssertCheck(LE16test == LE16value, \"Validate return value from SDL_ReadLE16, expected: %hu, got: %hu\", LE16value, LE16test);\n     LE32test = SDL_ReadLE32(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadLE32()\");\n     SDLTest_AssertCheck(LE32test == LE32value, \"Validate return value from SDL_ReadLE32, expected: %u, got: %u\", LE32value, LE32test);\n     LE64test = SDL_ReadLE64(rw);\n     SDLTest_AssertPass(\"Call to SDL_ReadLE64()\");\n     SDLTest_AssertCheck(LE64test == LE64value, \"Validate return value from SDL_ReadLE64, expected: %\"SDL_PRIu64\", got: %\"SDL_PRIu64, LE64value, LE64test);\n\n     /* Close handle */\n     cresult = SDL_RWclose(rw);\n     SDLTest_AssertPass(\"Call to SDL_RWclose() succeeded\");\n     SDLTest_AssertCheck(cresult == 0, \"Verify result value is 0; got: %d\", cresult);\n   }\n\n   return TEST_COMPLETED;\n}\n\n\n/* ================= Test References ================== */\n\n/* RWops test cases */\nstatic const SDLTest_TestCaseReference rwopsTest1 =\n        { (SDLTest_TestCaseFp)rwops_testParamNegative, \"rwops_testParamNegative\", \"Negative test for SDL_RWFromFile parameters\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest2 =\n        { (SDLTest_TestCaseFp)rwops_testMem, \"rwops_testMem\", \"Tests opening from memory\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest3 =\n        { (SDLTest_TestCaseFp)rwops_testConstMem, \"rwops_testConstMem\", \"Tests opening from (const) memory\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest4 =\n        { (SDLTest_TestCaseFp)rwops_testFileRead, \"rwops_testFileRead\", \"Tests reading from a file\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest5 =\n        { (SDLTest_TestCaseFp)rwops_testFileWrite, \"rwops_testFileWrite\", \"Test writing to a file\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest6 =\n        { (SDLTest_TestCaseFp)rwops_testFPRead, \"rwops_testFPRead\", \"Test reading from file pointer\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest7 =\n        { (SDLTest_TestCaseFp)rwops_testFPWrite, \"rwops_testFPWrite\", \"Test writing to file pointer\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest8 =\n        { (SDLTest_TestCaseFp)rwops_testAllocFree, \"rwops_testAllocFree\", \"Test alloc and free of RW context\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest9 =\n        { (SDLTest_TestCaseFp)rwops_testFileWriteReadEndian, \"rwops_testFileWriteReadEndian\", \"Test writing and reading via the Endian aware functions\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference rwopsTest10 =\n        { (SDLTest_TestCaseFp)rwops_testCompareRWFromMemWithRWFromFile, \"rwops_testCompareRWFromMemWithRWFromFile\", \"Compare RWFromMem and RWFromFile RWops for read and seek\", TEST_ENABLED };\n\n/* Sequence of RWops test cases */\nstatic const SDLTest_TestCaseReference *rwopsTests[] =  {\n    &rwopsTest1, &rwopsTest2, &rwopsTest3, &rwopsTest4, &rwopsTest5, &rwopsTest6,\n    &rwopsTest7, &rwopsTest8, &rwopsTest9, &rwopsTest10, NULL\n};\n\n/* RWops test suite (global) */\nSDLTest_TestSuiteReference rwopsTestSuite = {\n    \"RWops\",\n    RWopsSetUp,\n    rwopsTests,\n    RWopsTearDown\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_sdltest.c",
    "content": "/**\n * SDL_test test suite\n */\n\n#include <limits.h>\n/* Visual Studio 2008 doesn't have stdint.h */\n#if defined(_MSC_VER) && _MSC_VER <= 1500\n#define UINT8_MAX   _UI8_MAX\n#define UINT16_MAX  _UI16_MAX\n#define UINT32_MAX  _UI32_MAX\n#define INT64_MIN    _I64_MIN\n#define INT64_MAX    _I64_MAX\n#define UINT64_MAX  _UI64_MAX\n#else\n#include <stdint.h>\n#endif\n\n#include <stdio.h>\n#include <float.h>\n#include <ctype.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* Test case functions */\n\n/* Forward declarations for internal harness functions */\nextern char *SDLTest_GenerateRunSeed(const int length);\n\n/**\n * @brief Calls to SDLTest_GenerateRunSeed()\n */\nint\nsdltest_generateRunSeed(void *arg)\n{\n  char* result;\n  size_t i, l;\n  int j;\n  \n  for (i = 1; i <= 10; i += 3) {   \n     result = SDLTest_GenerateRunSeed((const int)i);\n     SDLTest_AssertPass(\"Call to SDLTest_GenerateRunSeed()\");\n     SDLTest_AssertCheck(result != NULL, \"Verify returned value is not NULL\");\n     if (result != NULL) {\n       l = SDL_strlen(result);\n       SDLTest_AssertCheck(l == i, \"Verify length of returned value is %d, got: %d\", (int) i, (int) l);\n       SDL_free(result);\n     }\n  }\n\n  /* Negative cases */\n  for (j = -2; j <= 0; j++) {\n     result = SDLTest_GenerateRunSeed((const int)j);\n     SDLTest_AssertPass(\"Call to SDLTest_GenerateRunSeed()\");\n     SDLTest_AssertCheck(result == NULL, \"Verify returned value is not NULL\");\n  }\n  \n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Calls to SDLTest_GetFuzzerInvocationCount()\n */\nint\nsdltest_getFuzzerInvocationCount(void *arg)\n{\n  Uint8 result;\n  int fuzzerCount1, fuzzerCount2;\n\n  fuzzerCount1 = SDLTest_GetFuzzerInvocationCount();\n  SDLTest_AssertPass(\"Call to SDLTest_GetFuzzerInvocationCount()\");\n  SDLTest_AssertCheck(fuzzerCount1 >= 0, \"Verify returned value, expected: >=0, got: %d\", fuzzerCount1);\n\n  result = SDLTest_RandomUint8();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8(), returned %d\", result);\n\n  fuzzerCount2 = SDLTest_GetFuzzerInvocationCount();\n  SDLTest_AssertPass(\"Call to SDLTest_GetFuzzerInvocationCount()\");\n  SDLTest_AssertCheck(fuzzerCount2 > fuzzerCount1, \"Verify returned value, expected: >%d, got: %d\", fuzzerCount1, fuzzerCount2);\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Calls to random number generators\n */\nint\nsdltest_randomNumber(void *arg)\n{\n  Sint64 result;\n  Uint64 uresult;\n  double dresult;\n  Uint64 umax;\n  Sint64 min, max;\n\n  result = (Sint64)SDLTest_RandomUint8();\n  umax = (1 << 8) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8\");\n  SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, \"Verify result value, expected: [0,%\"SDL_PRIu64\"], got: %\"SDL_PRIs64, umax, result);\n\n  result = (Sint64)SDLTest_RandomSint8();\n  min = 0 - (1 << 7);\n  max =     (1 << 7) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8\");\n  SDLTest_AssertCheck(result >= min && result <= max, \"Verify result value, expected: [%\"SDL_PRIs64\",%\"SDL_PRIs64\"], got: %\"SDL_PRIs64, min, max, result);\n\n  result = (Sint64)SDLTest_RandomUint16();\n  umax = (1 << 16) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16\");\n  SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, \"Verify result value, expected: [0,%\"SDL_PRIu64\"], got: %\"SDL_PRIs64, umax, result);\n\n  result = (Sint64)SDLTest_RandomSint16();\n  min = 0 - (1 << 15);\n  max =     (1 << 15) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16\");\n  SDLTest_AssertCheck(result >= min && result <= max, \"Verify result value, expected: [%\"SDL_PRIs64\",%\"SDL_PRIs64\"], got: %\"SDL_PRIs64, min, max, result);\n\n  result = (Sint64)SDLTest_RandomUint32();\n  umax = ((Uint64)1 << 32) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32\");\n  SDLTest_AssertCheck(result >= 0 && result <= (Sint64)umax, \"Verify result value, expected: [0,%\"SDL_PRIu64\"], got: %\"SDL_PRIs64, umax, result);\n\n  result = (Sint64)SDLTest_RandomSint32();\n  min = 0 - ((Sint64)1 << 31);\n  max =     ((Sint64)1 << 31) - 1;\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32\");\n  SDLTest_AssertCheck(result >= min && result <= max, \"Verify result value, expected: [%\"SDL_PRIs64\",%\"SDL_PRIs64\"], got: %\"SDL_PRIs64, min, max, result);\n\n  uresult = SDLTest_RandomUint64();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64\");\n\n  result = SDLTest_RandomSint64();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64\");\n\n  dresult = (double)SDLTest_RandomUnitFloat();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUnitFloat\");\n  SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, \"Verify result value, expected: [0.0,1.0[, got: %e\", dresult);\n\n  dresult = (double)SDLTest_RandomFloat();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomFloat\");\n  SDLTest_AssertCheck(dresult >= (double)(-FLT_MAX) && dresult <= (double)FLT_MAX, \"Verify result value, expected: [%e,%e], got: %e\", (double)(-FLT_MAX), (double)FLT_MAX, dresult);\n\n  dresult = (double)SDLTest_RandomUnitDouble();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUnitDouble\");\n  SDLTest_AssertCheck(dresult >= 0.0 && dresult < 1.0, \"Verify result value, expected: [0.0,1.0[, got: %e\", dresult);\n\n  dresult = SDLTest_RandomDouble();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomDouble\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Uint8\n */\nint\nsdltest_randomBoundaryNumberUint8(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Uint64 uresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0 || uresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 100,\n    \"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 0xff, SDL_FALSE) returns 0 (no error) */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(1, 255, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xfe, SDL_FALSE) returns 0xff (no error) */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 254, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0xff,\n    \"Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xff, SDL_FALSE) returns 0 (sets error) */\n  uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 255, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters(0,255,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Uint16\n */\nint\nsdltest_randomBoundaryNumberUint16(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Uint64 uresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0 || uresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 100,\n    \"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 0xffff, SDL_FALSE) returns 0 (no error) */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(1, 0xffff, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xfffe, SDL_FALSE) returns 0xffff (no error) */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xfffe, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0xffff,\n    \"Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xffff, SDL_FALSE) returns 0 (sets error) */\n  uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xffff, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters(0,0xffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Uint32\n */\nint\nsdltest_randomBoundaryNumberUint32(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Uint64 uresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0 || uresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 100,\n    \"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 0xffffffff, SDL_FALSE) returns 0 (no error) */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(1, 0xffffffff, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xfffffffe, SDL_FALSE) returns 0xffffffff (no error) */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xfffffffe, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0xffffffff,\n    \"Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xffffffff, SDL_FALSE) returns 0 (sets error) */\n  uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xffffffff, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters(0,0xffffffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Uint64\n */\nint\nsdltest_randomBoundaryNumberUint64(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Uint64 uresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomUintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 12 || uresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 10 || uresult == 11 || uresult == 19 || uresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0 || uresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(0, 99, SDL_FALSE) returns 100 */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 100,\n    \"Validate result value for parameters (0,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, uresult);\n\n  /* RandomUintXBoundaryValue(1, 0xffffffffffffffff, SDL_FALSE) returns 0 (no error) */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(1, (Uint64)0xffffffffffffffffULL, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xfffffffffffffffe, SDL_FALSE) returns 0xffffffffffffffff (no error) */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xfffffffffffffffeULL, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == (Uint64)0xffffffffffffffffULL,\n    \"Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomUintXBoundaryValue(0, 0xffffffffffffffff, SDL_FALSE) returns 0 (sets error) */\n  uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xffffffffffffffffULL, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomUint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    uresult == 0,\n    \"Validate result value for parameters(0,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %\"SDL_PRIs64, uresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Sint8\n */\nint\nsdltest_randomBoundaryNumberSint8(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Sint64 sresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 0 || sresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(SCHAR_MIN, 99, SDL_FALSE) returns 100 */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 100,\n    \"Validate result value for parameters (SCHAR_MIN,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (no error) */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN + 1, SCHAR_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SCHAR_MIN,\n    \"Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SCHAR_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE) returns SCHAR_MAX (no error) */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX -1, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SCHAR_MAX,\n    \"Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SCHAR_MAX, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (sets error) */\n  sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint8BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SCHAR_MIN,\n    \"Validate result value for parameters(SCHAR_MIN,SCHAR_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SCHAR_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Sint16\n */\nint\nsdltest_randomBoundaryNumberSint16(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Sint64 sresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 0 || sresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(SHRT_MIN, 99, SDL_FALSE) returns 100 */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 100,\n    \"Validate result value for parameters (SHRT_MIN,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE) returns SHRT_MIN (no error) */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN + 1, SHRT_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SHRT_MIN,\n    \"Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SHRT_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE) returns SHRT_MAX (no error) */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SHRT_MAX,\n    \"Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SHRT_MAX, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE) returns 0 (sets error) */\n  sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint16BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == SHRT_MIN,\n    \"Validate result value for parameters(SHRT_MIN,SHRT_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, SHRT_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Sint32\n */\nint\nsdltest_randomBoundaryNumberSint32(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Sint64 sresult;\n#if ((ULONG_MAX) == (UINT_MAX))\n  Sint32 long_min = LONG_MIN;\n  Sint32 long_max = LONG_MAX;\n#else\n  Sint32 long_min = INT_MIN;\n  Sint32 long_max = INT_MAX;\n#endif\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 0 || sresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(LONG_MIN, 99, SDL_FALSE) returns 100 */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 100,\n    \"Validate result value for parameters (LONG_MIN,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(LONG_MIN + 1, LONG_MAX, SDL_FALSE) returns LONG_MIN (no error) */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == long_min,\n    \"Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, long_min, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == long_max,\n    \"Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, long_max, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */\n  sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint32BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == long_min,\n    \"Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %\"SDL_PRIs64, long_min, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/*\n * @brief Calls to random boundary number generators for Sint64\n */\nint\nsdltest_randomBoundaryNumberSint64(void *arg)\n{\n  const char *expectedError = \"That operation is not supported\";\n  char *lastError;\n  Sint64 sresult;\n\n  /* Clean error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  /* RandomSintXBoundaryValue(10, 10, SDL_TRUE) returns 10 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10,\n    \"Validate result value for parameters (10,10,SDL_TRUE); expected: 10, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 11, SDL_TRUE) returns 10, 11 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 11, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11,\n    \"Validate result value for parameters (10,11,SDL_TRUE); expected: 10|11, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 12, SDL_TRUE) returns 10, 11, 12 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 12, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12,\n    \"Validate result value for parameters (10,12,SDL_TRUE); expected: 10|11|12, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 13, SDL_TRUE) returns 10, 11, 12, 13 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 13, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 12 || sresult == 13,\n    \"Validate result value for parameters (10,13,SDL_TRUE); expected: 10|11|12|13, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(10, 20, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (10,20,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(20, 10, SDL_TRUE) returns 10, 11, 19 or 20 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(20, 10, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 10 || sresult == 11 || sresult == 19 || sresult == 20,\n    \"Validate result value for parameters (20,10,SDL_TRUE); expected: 10|11|19|20, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(1, 20, SDL_FALSE) returns 0, 21 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(1, 20, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 0 || sresult == 21,\n    \"Validate result value for parameters (1,20,SDL_FALSE); expected: 0|21, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(LLONG_MIN, 99, SDL_FALSE) returns 100 */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, 99, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == 100,\n    \"Validate result value for parameters (LLONG_MIN,99,SDL_FALSE); expected: 100, got: %\"SDL_PRIs64, sresult);\n\n  /* RandomSintXBoundaryValue(LLONG_MIN + 1, LLONG_MAX, SDL_FALSE) returns LLONG_MIN (no error) */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN + 1, INT64_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == INT64_MIN,\n    \"Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %\"SDL_PRIs64\", got: %\"SDL_PRIs64, INT64_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE) returns LLONG_MAX (no error) */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX - 1, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == INT64_MAX,\n    \"Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %\"SDL_PRIs64\", got: %\"SDL_PRIs64, INT64_MAX, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\\0', \"Validate no error message was set\");\n\n  /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE) returns 0 (sets error) */\n  sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(INT64_MIN, INT64_MAX, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomSint64BoundaryValue\");\n  SDLTest_AssertCheck(\n    sresult == INT64_MIN,\n    \"Validate result value for parameters(LLONG_MIN,LLONG_MAX,SDL_FALSE); expected: %\"SDL_PRIs64\", got: %\"SDL_PRIs64, INT64_MIN, sresult);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Calls to SDLTest_RandomIntegerInRange\n */\nint\nsdltest_randomIntegerInRange(void *arg)\n{\n  Sint32 min, max;\n  Sint32 result;\n#if ((ULONG_MAX) == (UINT_MAX))\n  Sint32 long_min = LONG_MIN;\n  Sint32 long_max = LONG_MAX;\n#else\n  Sint32 long_min = INT_MIN;\n  Sint32 long_max = INT_MAX;\n#endif\n\n  /* Standard range */\n  min = (Sint32)SDLTest_RandomSint16();\n  max = min + (Sint32)SDLTest_RandomUint8() + 2;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(min,max)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  /* One Range */\n  min = (Sint32)SDLTest_RandomSint16();\n  max = min + 1;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(min,min+1)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  /* Zero range */\n  min = (Sint32)SDLTest_RandomSint16();\n  max = min;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(min,min)\");\n  SDLTest_AssertCheck(min == result, \"Validated returned value; expected: %d, got: %d\", min, result);\n\n  /* Zero range at zero */\n  min = 0;\n  max = 0;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(0,0)\");\n  SDLTest_AssertCheck(result == 0, \"Validated returned value; expected: 0, got: %d\", result);\n\n  /* Swapped min-max */\n  min = (Sint32)SDLTest_RandomSint16();\n  max = min + (Sint32)SDLTest_RandomUint8() + 2;\n  result = SDLTest_RandomIntegerInRange(max, min);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(max,min)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  /* Range with min at integer limit */\n  min = long_min;\n  max = long_max + (Sint32)SDLTest_RandomSint16();\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  /* Range with max at integer limit */\n  min = long_min - (Sint32)SDLTest_RandomSint16();\n  max = long_max;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  /* Full integer range */\n  min = long_min;\n  max = long_max;\n  result = SDLTest_RandomIntegerInRange(min, max);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomIntegerInRange(SINT32_MIN,SINT32_MAX)\");\n  SDLTest_AssertCheck(min <= result && result <= max, \"Validated returned value; expected: [%d,%d], got: %d\", min, max, result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Calls to SDLTest_RandomAsciiString\n */\nint\nsdltest_randomAsciiString(void *arg)\n{\n  char* result;\n  size_t len;\n  int nonAsciiCharacters;\n  size_t i;\n\n  result = SDLTest_RandomAsciiString();\n  SDLTest_AssertPass(\"Call to SDLTest_RandomAsciiString()\");\n  SDLTest_AssertCheck(result != NULL, \"Validate that result is not NULL\");\n  if (result != NULL) {\n     len = SDL_strlen(result);\n     SDLTest_AssertCheck(len >= 1 && len <= 255, \"Validate that result length; expected: len=[1,255], got: %d\", (int) len);\n     nonAsciiCharacters = 0;\n     for (i=0; i<len; i++) {\n       if (iscntrl(result[i])) {\n         nonAsciiCharacters++;\n       }\n     }\n     SDLTest_AssertCheck(nonAsciiCharacters == 0, \"Validate that result does not contain non-Ascii characters, got: %d\", nonAsciiCharacters);\n     if (nonAsciiCharacters) {\n        SDLTest_LogError(\"Invalid result from generator: '%s'\", result);\n     }\n     SDL_free(result);\n  }\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Calls to SDLTest_RandomAsciiStringWithMaximumLength\n */\nint\nsdltest_randomAsciiStringWithMaximumLength(void *arg)\n{\n  const char* expectedError = \"Parameter 'maxLength' is invalid\";\n  char* lastError;\n  char* result;\n  size_t targetLen;\n  size_t len;\n  int nonAsciiCharacters;\n  size_t i;\n\n  targetLen = 16 + SDLTest_RandomUint8();\n  result = SDLTest_RandomAsciiStringWithMaximumLength((int) targetLen);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomAsciiStringWithMaximumLength(%d)\", targetLen);\n  SDLTest_AssertCheck(result != NULL, \"Validate that result is not NULL\");\n  if (result != NULL) {\n     len = SDL_strlen(result);\n     SDLTest_AssertCheck(len >= 1 && len <= targetLen, \"Validate that result length; expected: len=[1,%d], got: %d\", (int) targetLen, (int) len);\n     nonAsciiCharacters = 0;\n     for (i=0; i<len; i++) {\n       if (iscntrl(result[i])) {\n         nonAsciiCharacters++;\n       }\n     }\n     SDLTest_AssertCheck(nonAsciiCharacters == 0, \"Validate that result does not contain non-Ascii characters, got: %d\", nonAsciiCharacters);\n     if (nonAsciiCharacters) {\n        SDLTest_LogError(\"Invalid result from generator: '%s'\", result);\n     }\n     SDL_free(result);\n  }\n\n  /* Negative test */\n  targetLen = 0;\n  result = SDLTest_RandomAsciiStringWithMaximumLength((int) targetLen);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomAsciiStringWithMaximumLength(%d)\", targetLen);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Calls to SDLTest_RandomAsciiStringOfSize\n */\nint\nsdltest_randomAsciiStringOfSize(void *arg)\n{\n  const char* expectedError = \"Parameter 'size' is invalid\";\n  char* lastError;\n  char* result;\n  size_t targetLen;\n  size_t len;\n  int nonAsciiCharacters;\n  size_t i;\n\n  /* Positive test */\n  targetLen = 16 + SDLTest_RandomUint8();\n  result = SDLTest_RandomAsciiStringOfSize((int) targetLen);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomAsciiStringOfSize(%d)\", targetLen);\n  SDLTest_AssertCheck(result != NULL, \"Validate that result is not NULL\");\n  if (result != NULL) {\n     len = SDL_strlen(result);\n     SDLTest_AssertCheck(len == targetLen, \"Validate that result length; expected: len=%d, got: %d\", (int) targetLen, (int) len);\n     nonAsciiCharacters = 0;\n     for (i=0; i<len; i++) {\n       if (iscntrl(result[i])) {\n         nonAsciiCharacters++;\n       }\n     }\n     SDLTest_AssertCheck(nonAsciiCharacters == 0, \"Validate that result does not contain non-ASCII characters, got: %d\", nonAsciiCharacters);\n     if (nonAsciiCharacters) {\n        SDLTest_LogError(\"Invalid result from generator: '%s'\", result);\n     }\n     SDL_free(result);\n  }\n\n  /* Negative test */\n  targetLen = 0;\n  result = SDLTest_RandomAsciiStringOfSize((int) targetLen);\n  SDLTest_AssertPass(\"Call to SDLTest_RandomAsciiStringOfSize(%d)\", targetLen);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n\n  /* Clear error messages */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"SDL_ClearError()\");\n\n  return TEST_COMPLETED;\n}\n\n\n/* ================= Test References ================== */\n\n/* SDL_test test cases */\nstatic const SDLTest_TestCaseReference sdltestTest1 =\n        { (SDLTest_TestCaseFp)sdltest_getFuzzerInvocationCount, \"sdltest_getFuzzerInvocationCount\", \"Call to sdltest_GetFuzzerInvocationCount\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest2 =\n        { (SDLTest_TestCaseFp)sdltest_randomNumber, \"sdltest_randomNumber\", \"Calls to random number generators\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest3 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint8, \"sdltest_randomBoundaryNumberUint8\", \"Calls to random boundary number generators for Uint8\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest4 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint16, \"sdltest_randomBoundaryNumberUint16\", \"Calls to random boundary number generators for Uint16\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest5 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint32, \"sdltest_randomBoundaryNumberUint32\", \"Calls to random boundary number generators for Uint32\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest6 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberUint64, \"sdltest_randomBoundaryNumberUint64\", \"Calls to random boundary number generators for Uint64\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest7 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint8, \"sdltest_randomBoundaryNumberSint8\", \"Calls to random boundary number generators for Sint8\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest8 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint16, \"sdltest_randomBoundaryNumberSint16\", \"Calls to random boundary number generators for Sint16\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest9 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint32, \"sdltest_randomBoundaryNumberSint32\", \"Calls to random boundary number generators for Sint32\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest10 =\n        { (SDLTest_TestCaseFp)sdltest_randomBoundaryNumberSint64, \"sdltest_randomBoundaryNumberSint64\", \"Calls to random boundary number generators for Sint64\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest11 =\n        { (SDLTest_TestCaseFp)sdltest_randomIntegerInRange, \"sdltest_randomIntegerInRange\", \"Calls to ranged random number generator\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest12 =\n        { (SDLTest_TestCaseFp)sdltest_randomAsciiString, \"sdltest_randomAsciiString\", \"Calls to default ASCII string generator\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest13 =\n        { (SDLTest_TestCaseFp)sdltest_randomAsciiStringWithMaximumLength, \"sdltest_randomAsciiStringWithMaximumLength\", \"Calls to random maximum length ASCII string generator\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest14 =\n        { (SDLTest_TestCaseFp)sdltest_randomAsciiStringOfSize, \"sdltest_randomAsciiStringOfSize\", \"Calls to fixed size ASCII string generator\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference sdltestTest15 =\n        { (SDLTest_TestCaseFp)sdltest_generateRunSeed, \"sdltest_generateRunSeed\", \"Checks internal harness function SDLTest_GenerateRunSeed\", TEST_ENABLED };\n\n/* Sequence of SDL_test test cases */\nstatic const SDLTest_TestCaseReference *sdltestTests[] =  {\n    &sdltestTest1, &sdltestTest2, &sdltestTest3, &sdltestTest4, &sdltestTest5, &sdltestTest6,\n    &sdltestTest7, &sdltestTest8, &sdltestTest9, &sdltestTest10, &sdltestTest11, &sdltestTest12,\n    &sdltestTest13, &sdltestTest14, &sdltestTest15, NULL\n};\n\n/* SDL_test test suite (global) */\nSDLTest_TestSuiteReference sdltestTestSuite = {\n    \"SDLtest\",\n    NULL,\n    sdltestTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_stdlib.c",
    "content": "/**\n * Standard C library routine test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n\n/* Test case functions */\n\n/**\n * @brief Call to SDL_strlcpy\n */\n#undef SDL_strlcpy\nint\nstdlib_strlcpy(void *arg)\n{\n  size_t result;\n  char text[1024];\n  const char *expected;\n\n  result = SDL_strlcpy(text, \"foo\", sizeof(text));\n  expected = \"foo\";\n  SDLTest_AssertPass(\"Call to SDL_strlcpy(\\\"foo\\\")\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), (int) result);\n\n  result = SDL_strlcpy(text, \"foo\", 2);\n  expected = \"f\";\n  SDLTest_AssertPass(\"Call to SDL_strlcpy(\\\"foo\\\") with buffer size 2\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == 3, \"Check result value, expected: 3, got: %d\", (int) result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_snprintf\n */\n#undef SDL_snprintf\nint\nstdlib_snprintf(void *arg)\n{\n  int result;\n  char text[1024];\n  const char *expected;\n\n  result = SDL_snprintf(text, sizeof(text), \"%s\", \"foo\");\n  expected = \"foo\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%s\\\", \\\"foo\\\")\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, 2, \"%s\", \"foo\");\n  expected = \"f\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%s\\\", \\\"foo\\\") with buffer size 2\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == 3, \"Check result value, expected: 3, got: %d\", result);\n\n  result = SDL_snprintf(NULL, 0, \"%s\", \"foo\");\n  SDLTest_AssertCheck(result == 3, \"Check result value, expected: 3, got: %d\", result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%f\", 1.0);\n  expected = \"1.000000\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%f\\\", 1.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%.f\", 1.0);\n  expected = \"1\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%.f\\\", 1.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%#.f\", 1.0);\n  expected = \"1.\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%#.f\\\", 1.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%f\", 1.0 + 1.0 / 3.0);\n  expected = \"1.333333\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%f\\\", 1.0 + 1.0 / 3.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%+f\", 1.0 + 1.0 / 3.0);\n  expected = \"+1.333333\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%+f\\\", 1.0 + 1.0 / 3.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%.2f\", 1.0 + 1.0 / 3.0);\n  expected = \"1.33\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%.2f\\\", 1.0 + 1.0 / 3.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: %s, got: %s\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%6.2f\", 1.0 + 1.0 / 3.0);\n  expected = \"  1.33\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%6.2f\\\", 1.0 + 1.0 / 3.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: '%s', got: '%s'\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, sizeof(text), \"%06.2f\", 1.0 + 1.0 / 3.0);\n  expected = \"001.33\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%06.2f\\\", 1.0 + 1.0 / 3.0)\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: '%s', got: '%s'\", expected, text);\n  SDLTest_AssertCheck(result == SDL_strlen(text), \"Check result value, expected: %d, got: %d\", (int) SDL_strlen(text), result);\n\n  result = SDL_snprintf(text, 5, \"%06.2f\", 1.0 + 1.0 / 3.0);\n  expected = \"001.\";\n  SDLTest_AssertPass(\"Call to SDL_snprintf(\\\"%%06.2f\\\", 1.0 + 1.0 / 3.0) with buffer size 5\");\n  SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, \"Check text, expected: '%s', got: '%s'\", expected, text);\n  SDLTest_AssertCheck(result == 6, \"Check result value, expected: 6, got: %d\", result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_getenv and SDL_setenv\n */\nint\nstdlib_getsetenv(void *arg)\n{\n  const int nameLen = 16;\n  char name[17];\n  int counter;\n  int result;\n  char * value1;\n  char * value2;\n  char * expected;\n  int overwrite;\n  char * text;\n\n  /* Create a random name. This tests SDL_getenv, since we need to */\n  /* make sure the variable is not set yet (it shouldn't). */\n  do {\n    for(counter = 0; counter < nameLen; counter++) {\n      name[counter] = (char)SDLTest_RandomIntegerInRange(65, 90);\n    }\n    name[nameLen] = '\\0';\n    \n    text = SDL_getenv(name);\n    SDLTest_AssertPass(\"Call to SDL_getenv('%s')\", name);\n    if (text != NULL) {\n      SDLTest_Log(\"Expected: NULL, Got: '%s' (%i)\", text, (int) SDL_strlen(text));\n    }\n  } while (text != NULL);\n   \n  /* Create random values to set */                    \n  value1 = SDLTest_RandomAsciiStringOfSize(10);\n  value2 = SDLTest_RandomAsciiStringOfSize(10);\n\n  /* Set value 1 without overwrite */\n  overwrite = 0;\n  expected = value1;\n  result = SDL_setenv(name, value1, overwrite);\n  SDLTest_AssertPass(\"Call to SDL_setenv('%s','%s', %i)\", name, value1, overwrite);\n  SDLTest_AssertCheck(result == 0, \"Check result, expected: 0, got: %i\", result);\n\n  /* Check value */\n  text = SDL_getenv(name);\n  SDLTest_AssertPass(\"Call to SDL_getenv('%s')\", name);\n  SDLTest_AssertCheck(text != NULL, \"Verify returned text is not NULL\");\n  if (text != NULL) {\n    SDLTest_AssertCheck(\n      SDL_strcmp(text, expected) == 0, \n      \"Verify returned text, expected: %s, got: %s\",\n      expected,\n      text);\n  }\n  \n  /* Set value 2 with overwrite */\n  overwrite = 1;\n  expected = value2;    \n  result = SDL_setenv(name, value2, overwrite);\n  SDLTest_AssertPass(\"Call to SDL_setenv('%s','%s', %i)\", name, value2, overwrite);\n  SDLTest_AssertCheck(result == 0, \"Check result, expected: 0, got: %i\", result);\n\n  /* Check value */\n  text = SDL_getenv(name);\n  SDLTest_AssertPass(\"Call to SDL_getenv('%s')\", name);\n  SDLTest_AssertCheck(text != NULL, \"Verify returned text is not NULL\");\n  if (text != NULL) {\n    SDLTest_AssertCheck(\n      SDL_strcmp(text, expected) == 0, \n      \"Verify returned text, expected: %s, got: %s\",\n      expected,\n      text);\n  }\n\n  /* Set value 1 without overwrite */\n  overwrite = 0;\n  expected = value2;    \n  result = SDL_setenv(name, value1, overwrite);\n  SDLTest_AssertPass(\"Call to SDL_setenv('%s','%s', %i)\", name, value1, overwrite);\n  SDLTest_AssertCheck(result == 0, \"Check result, expected: 0, got: %i\", result);\n\n  /* Check value */\n  text = SDL_getenv(name);\n  SDLTest_AssertPass(\"Call to SDL_getenv('%s')\", name);\n  SDLTest_AssertCheck(text != NULL, \"Verify returned text is not NULL\");\n  if (text != NULL) {\n    SDLTest_AssertCheck(\n      SDL_strcmp(text, expected) == 0, \n      \"Verify returned text, expected: %s, got: %s\",\n      expected,\n      text);\n  }\n  \n  /* Set value 1 without overwrite */\n  overwrite = 1;\n  expected = value1;\n  result = SDL_setenv(name, value1, overwrite);\n  SDLTest_AssertPass(\"Call to SDL_setenv('%s','%s', %i)\", name, value1, overwrite);\n  SDLTest_AssertCheck(result == 0, \"Check result, expected: 0, got: %i\", result);\n\n  /* Check value */\n  text = SDL_getenv(name);\n  SDLTest_AssertPass(\"Call to SDL_getenv('%s')\", name);\n  SDLTest_AssertCheck(text != NULL, \"Verify returned text is not NULL\");\n  if (text != NULL) {\n    SDLTest_AssertCheck(\n      SDL_strcmp(text, expected) == 0, \n      \"Verify returned text, expected: %s, got: %s\",\n      expected,\n      text);\n  }\n\n  /* Negative cases */\n  for (overwrite=0; overwrite <= 1; overwrite++) { \n    result = SDL_setenv(NULL, value1, overwrite);\n    SDLTest_AssertPass(\"Call to SDL_setenv(NULL,'%s', %i)\", value1, overwrite);\n    SDLTest_AssertCheck(result == -1, \"Check result, expected: -1, got: %i\", result);\n    result = SDL_setenv(\"\", value1, overwrite);\n    SDLTest_AssertPass(\"Call to SDL_setenv('','%s', %i)\", value1, overwrite);\n    SDLTest_AssertCheck(result == -1, \"Check result, expected: -1, got: %i\", result);\n    result = SDL_setenv(\"=\", value1, overwrite);\n    SDLTest_AssertPass(\"Call to SDL_setenv('=','%s', %i)\", value1, overwrite);\n    SDLTest_AssertCheck(result == -1, \"Check result, expected: -1, got: %i\", result);\n    result = SDL_setenv(name, NULL, overwrite);\n    SDLTest_AssertPass(\"Call to SDL_setenv('%s', NULL, %i)\", name, overwrite);\n    SDLTest_AssertCheck(result == -1, \"Check result, expected: -1, got: %i\", result);\n  }\n\n  /* Clean up */\n  SDL_free(value1);\n  SDL_free(value2);\n    \n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_sscanf\n */\n#undef SDL_sscanf\nint\nstdlib_sscanf(void *arg)\n{\n  int output;\n  int result;\n  int expected_output;\n  int expected_result;\n\n  expected_output = output = 123;\n  expected_result = -1;\n  result = SDL_sscanf(\"\", \"%i\", &output);\n  SDLTest_AssertPass(\"Call to SDL_sscanf(\\\"\\\", \\\"%%i\\\", &output)\");\n  SDLTest_AssertCheck(expected_output == output, \"Check output, expected: %i, got: %i\", expected_output, output);\n  SDLTest_AssertCheck(expected_result == result, \"Check return value, expected: %i, got: %i\", expected_result, result);\n\n  expected_output = output = 123;\n  expected_result = 0;\n  result = SDL_sscanf(\"a\", \"%i\", &output);\n  SDLTest_AssertPass(\"Call to SDL_sscanf(\\\"a\\\", \\\"%%i\\\", &output)\");\n  SDLTest_AssertCheck(expected_output == output, \"Check output, expected: %i, got: %i\", expected_output, output);\n  SDLTest_AssertCheck(expected_result == result, \"Check return value, expected: %i, got: %i\", expected_result, result);\n\n  output = 123;\n  expected_output = 2;\n  expected_result = 1;\n  result = SDL_sscanf(\"2\", \"%i\", &output);\n  SDLTest_AssertPass(\"Call to SDL_sscanf(\\\"2\\\", \\\"%%i\\\", &output)\");\n  SDLTest_AssertCheck(expected_output == output, \"Check output, expected: %i, got: %i\", expected_output, output);\n  SDLTest_AssertCheck(expected_result == result, \"Check return value, expected: %i, got: %i\", expected_result, result);\n\n  return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Standard C routine test cases */\nstatic const SDLTest_TestCaseReference stdlibTest1 =\n        { (SDLTest_TestCaseFp)stdlib_strlcpy, \"stdlib_strlcpy\", \"Call to SDL_strlcpy\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference stdlibTest2 =\n        { (SDLTest_TestCaseFp)stdlib_snprintf, \"stdlib_snprintf\", \"Call to SDL_snprintf\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference stdlibTest3 =\n        { (SDLTest_TestCaseFp)stdlib_getsetenv, \"stdlib_getsetenv\", \"Call to SDL_getenv and SDL_setenv\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference stdlibTest4 =\n        { (SDLTest_TestCaseFp)stdlib_sscanf, \"stdlib_sscanf\", \"Call to SDL_sscanf\", TEST_ENABLED };\n\n/* Sequence of Standard C routine test cases */\nstatic const SDLTest_TestCaseReference *stdlibTests[] =  {\n    &stdlibTest1, &stdlibTest2, &stdlibTest3, &stdlibTest4, NULL\n};\n\n/* Standard C routine test suite (global) */\nSDLTest_TestSuiteReference stdlibTestSuite = {\n    \"Stdlib\",\n    NULL,\n    stdlibTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_suites.h",
    "content": "/**\n * Reference to all test suites.\n *\n */\n\n#ifndef _testsuites_h\n#define _testsuites_h\n\n#include \"SDL_test.h\"\n\n/* Test collections */\nextern SDLTest_TestSuiteReference audioTestSuite;\nextern SDLTest_TestSuiteReference clipboardTestSuite;\nextern SDLTest_TestSuiteReference eventsTestSuite;\nextern SDLTest_TestSuiteReference keyboardTestSuite;\nextern SDLTest_TestSuiteReference mainTestSuite;\nextern SDLTest_TestSuiteReference mouseTestSuite;\nextern SDLTest_TestSuiteReference pixelsTestSuite;\nextern SDLTest_TestSuiteReference platformTestSuite;\nextern SDLTest_TestSuiteReference rectTestSuite;\nextern SDLTest_TestSuiteReference renderTestSuite;\nextern SDLTest_TestSuiteReference rwopsTestSuite;\nextern SDLTest_TestSuiteReference sdltestTestSuite;\nextern SDLTest_TestSuiteReference stdlibTestSuite;\nextern SDLTest_TestSuiteReference surfaceTestSuite;\nextern SDLTest_TestSuiteReference syswmTestSuite;\nextern SDLTest_TestSuiteReference timerTestSuite;\nextern SDLTest_TestSuiteReference videoTestSuite;\nextern SDLTest_TestSuiteReference hintsTestSuite;\n\n/* All test suites */\nSDLTest_TestSuiteReference *testSuites[] =  {\n    &audioTestSuite,\n    &clipboardTestSuite,\n    &eventsTestSuite,\n    &keyboardTestSuite,\n    &mainTestSuite,\n    &mouseTestSuite,\n    &pixelsTestSuite,\n    &platformTestSuite,\n    &rectTestSuite,\n    &renderTestSuite,\n    &rwopsTestSuite,\n    &sdltestTestSuite,\n    &stdlibTestSuite,\n    &surfaceTestSuite,\n    &syswmTestSuite,\n    &timerTestSuite,\n    &videoTestSuite,\n    &hintsTestSuite,\n    NULL\n};\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_surface.c",
    "content": "/**\n * Original code: automated SDL surface test written by Edgar Simo \"bobbens\"\n * Adapted/rewritten for test lib by Andreas Schiffler\n */\n\n/* Supress C4996 VS compiler warnings for unlink() */\n#define _CRT_SECURE_NO_DEPRECATE\n#define _CRT_NONSTDC_NO_DEPRECATE\n\n#include <stdio.h>\n#ifndef _MSC_VER\n#include <unistd.h>\n#endif\n#include <sys/stat.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n#ifdef __MACOSX__\n#include <unistd.h> /* For unlink() */\n#endif\n\n/* ================= Test Case Implementation ================== */\n\n/* Shared test surface */\n\nstatic SDL_Surface *referenceSurface = NULL;\nstatic SDL_Surface *testSurface = NULL;\n\n/* Helper functions for the test cases */\n\n#define TEST_SURFACE_WIDTH testSurface->w\n#define TEST_SURFACE_HEIGHT testSurface->h\n\n/* Fixture */\n\n/* Create a 32-bit writable surface for blitting tests */\nvoid\n_surfaceSetUp(void *arg)\n{\n    int result;\n    SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;\n    SDL_BlendMode currentBlendMode;\n    Uint32 rmask, gmask, bmask, amask;\n#if SDL_BYTEORDER == SDL_BIG_ENDIAN\n    rmask = 0xff000000;\n    gmask = 0x00ff0000;\n    bmask = 0x0000ff00;\n    amask = 0x000000ff;\n#else\n    rmask = 0x000000ff;\n    gmask = 0x0000ff00;\n    bmask = 0x00ff0000;\n    amask = 0xff000000;\n#endif\n\n    referenceSurface = SDLTest_ImageBlit(); /* For size info */\n    testSurface = SDL_CreateRGBSurface(SDL_SWSURFACE, referenceSurface->w, referenceSurface->h, 32, rmask, gmask, bmask, amask);\n    SDLTest_AssertCheck(testSurface != NULL, \"Check that testSurface is not NULL\");\n    if (testSurface != NULL) {\n      /* Disable blend mode for target surface */\n      result = SDL_SetSurfaceBlendMode(testSurface, blendMode);\n      SDLTest_AssertCheck(result == 0, \"Validate result from SDL_SetSurfaceBlendMode, expected: 0, got: %i\", result);\n      result = SDL_GetSurfaceBlendMode(testSurface, &currentBlendMode);\n      SDLTest_AssertCheck(result == 0, \"Validate result from SDL_GetSurfaceBlendMode, expected: 0, got: %i\", result);\n      SDLTest_AssertCheck(currentBlendMode == blendMode, \"Validate blendMode, expected: %i, got: %i\", blendMode, currentBlendMode);\n    }\n}\n\nvoid\n_surfaceTearDown(void *arg)\n{\n    SDL_FreeSurface(referenceSurface);\n    referenceSurface = NULL;\n    SDL_FreeSurface(testSurface);\n    testSurface = NULL;\n}\n\n/**\n * Helper that clears the test surface\n */\nvoid _clearTestSurface()\n{\n    int ret;\n    Uint32 color;\n\n    /* Clear surface. */\n    color = SDL_MapRGBA( testSurface->format, 0, 0, 0, 0);\n    SDLTest_AssertPass(\"Call to SDL_MapRGBA()\");\n    ret = SDL_FillRect( testSurface, NULL, color);\n    SDLTest_AssertPass(\"Call to SDL_FillRect()\");\n    SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_FillRect, expected: 0, got: %i\", ret);\n}\n\n/**\n * Helper that blits in a specific blend mode, -1 for basic blitting, -2 for color mod, -3 for alpha mod, -4 for mixed blend modes.\n */\nvoid _testBlitBlendMode(int mode)\n{\n    int ret;\n    int i, j, ni, nj;\n    SDL_Surface *face;\n    SDL_Rect rect;\n    int nmode;\n    SDL_BlendMode bmode;\n    int checkFailCount1;\n    int checkFailCount2;\n    int checkFailCount3;\n    int checkFailCount4;\n\n    /* Check test surface */\n    SDLTest_AssertCheck(testSurface != NULL, \"Verify testSurface is not NULL\");\n    if (testSurface == NULL) return;\n\n    /* Create sample surface */\n    face = SDLTest_ImageFace();\n    SDLTest_AssertCheck(face != NULL, \"Verify face surface is not NULL\");\n    if (face == NULL) return;\n\n        /* Reset alpha modulation */\n    ret = SDL_SetSurfaceAlphaMod(face, 255);\n    SDLTest_AssertPass(\"Call to SDL_SetSurfaceAlphaMod()\");\n    SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetSurfaceAlphaMod(), expected: 0, got: %i\", ret);\n\n        /* Reset color modulation */\n    ret = SDL_SetSurfaceColorMod(face, 255, 255, 255);\n    SDLTest_AssertPass(\"Call to SDL_SetSurfaceColorMod()\");\n    SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetSurfaceColorMod(), expected: 0, got: %i\", ret);\n\n        /* Reset color key */\n    ret = SDL_SetColorKey(face, SDL_FALSE, 0);\n    SDLTest_AssertPass(\"Call to SDL_SetColorKey()\");\n    SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetColorKey(), expected: 0, got: %i\", ret);\n\n    /* Clear the test surface */\n        _clearTestSurface();\n\n    /* Target rect size */\n    rect.w = face->w;\n    rect.h = face->h;\n\n    /* Steps to take */\n    ni = testSurface->w - face->w;\n    nj = testSurface->h - face->h;\n\n    /* Optionally set blend mode. */\n    if (mode >= 0) {\n        ret = SDL_SetSurfaceBlendMode( face, (SDL_BlendMode)mode );\n        SDLTest_AssertPass(\"Call to SDL_SetSurfaceBlendMode()\");\n        SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetSurfaceBlendMode(..., %i), expected: 0, got: %i\", mode, ret);\n    }\n\n    /* Test blend mode. */\n    checkFailCount1 = 0;\n    checkFailCount2 = 0;\n    checkFailCount3 = 0;\n    checkFailCount4 = 0;\n    for (j=0; j <= nj; j+=4) {\n      for (i=0; i <= ni; i+=4) {\n        if (mode == -2) {\n            /* Set color mod. */\n            ret = SDL_SetSurfaceColorMod( face, (255/nj)*j, (255/ni)*i, (255/nj)*j );\n            if (ret != 0) checkFailCount2++;\n        }\n        else if (mode == -3) {\n            /* Set alpha mod. */\n            ret = SDL_SetSurfaceAlphaMod( face, (255/ni)*i );\n            if (ret != 0) checkFailCount3++;\n        }\n        else if (mode == -4) {\n            /* Crazy blending mode magic. */\n            nmode = (i/4*j/4) % 4;\n            if (nmode==0) {\n                bmode = SDL_BLENDMODE_NONE;\n            } else if (nmode==1) {\n                bmode = SDL_BLENDMODE_BLEND;\n            } else if (nmode==2) {\n                bmode = SDL_BLENDMODE_ADD;\n            } else if (nmode==3) {\n                bmode = SDL_BLENDMODE_MOD;\n            }\n            ret = SDL_SetSurfaceBlendMode( face, bmode );\n            if (ret != 0) checkFailCount4++;\n        }\n\n         /* Blitting. */\n         rect.x = i;\n         rect.y = j;\n         ret = SDL_BlitSurface( face, NULL, testSurface, &rect );\n         if (ret != 0) checkFailCount1++;\n      }\n    }\n    SDLTest_AssertCheck(checkFailCount1 == 0, \"Validate results from calls to SDL_BlitSurface, expected: 0, got: %i\", checkFailCount1);\n    SDLTest_AssertCheck(checkFailCount2 == 0, \"Validate results from calls to SDL_SetSurfaceColorMod, expected: 0, got: %i\", checkFailCount2);\n    SDLTest_AssertCheck(checkFailCount3 == 0, \"Validate results from calls to SDL_SetSurfaceAlphaMod, expected: 0, got: %i\", checkFailCount3);\n    SDLTest_AssertCheck(checkFailCount4 == 0, \"Validate results from calls to SDL_SetSurfaceBlendMode, expected: 0, got: %i\", checkFailCount4);\n\n    /* Clean up */\n    SDL_FreeSurface(face);\n    face = NULL;\n}\n\n/* Helper to check that a file exists */\nvoid\n_AssertFileExist(const char *filename)\n{\n    struct stat st;\n    int ret = stat(filename, &st);\n\n    SDLTest_AssertCheck(ret == 0, \"Verify file '%s' exists\", filename);\n}\n\n\n/* Test case functions */\n\n/**\n * @brief Tests sprite saving and loading\n */\nint\nsurface_testSaveLoadBitmap(void *arg)\n{\n    int ret;\n    const char *sampleFilename = \"testSaveLoadBitmap.bmp\";\n    SDL_Surface *face;\n    SDL_Surface *rface;\n\n    /* Create sample surface */\n    face = SDLTest_ImageFace();\n    SDLTest_AssertCheck(face != NULL, \"Verify face surface is not NULL\");\n    if (face == NULL) return TEST_ABORTED;\n\n    /* Delete test file; ignore errors */\n    unlink(sampleFilename);\n\n    /* Save a surface */\n    ret = SDL_SaveBMP(face, sampleFilename);\n    SDLTest_AssertPass(\"Call to SDL_SaveBMP()\");\n    SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SaveBMP, expected: 0, got: %i\", ret);\n    _AssertFileExist(sampleFilename);\n\n    /* Load a surface */\n    rface = SDL_LoadBMP(sampleFilename);\n    SDLTest_AssertPass(\"Call to SDL_LoadBMP()\");\n    SDLTest_AssertCheck(rface != NULL, \"Verify result from SDL_LoadBMP is not NULL\");\n    if (rface != NULL) {\n        SDLTest_AssertCheck(face->w == rface->w, \"Verify width of loaded surface, expected: %i, got: %i\", face->w, rface->w);\n        SDLTest_AssertCheck(face->h == rface->h, \"Verify height of loaded surface, expected: %i, got: %i\", face->h, rface->h);\n    }\n\n    /* Delete test file; ignore errors */\n    unlink(sampleFilename);\n\n    /* Clean up */\n    SDL_FreeSurface(face);\n    face = NULL;\n    SDL_FreeSurface(rface);\n    rface = NULL;\n\n    return TEST_COMPLETED;\n}\n\n/* !\n *  Tests surface conversion.\n */\nint\nsurface_testSurfaceConversion(void *arg)\n{\n    SDL_Surface *rface = NULL, *face = NULL;\n    int ret = 0;\n\n    /* Create sample surface */\n    face = SDLTest_ImageFace();\n    SDLTest_AssertCheck(face != NULL, \"Verify face surface is not NULL\");\n    if (face == NULL)\n        return TEST_ABORTED;\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (face->format->palette) {\n       ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels);\n       SDLTest_AssertPass(\"Call to SDL_SetColorKey()\");\n       SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetColorKey, expected: 0, got: %i\", ret);\n    }\n\n    /* Convert to 32 bit to compare. */\n    rface = SDL_ConvertSurface( face, testSurface->format, 0 );\n    SDLTest_AssertPass(\"Call to SDL_ConvertSurface()\");\n    SDLTest_AssertCheck(rface != NULL, \"Verify result from SDL_ConvertSurface is not NULL\");\n\n    /* Compare surface. */\n    ret = SDLTest_CompareSurfaces( rface, face, 0 );\n    SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n    /* Clean up. */\n    SDL_FreeSurface(face);\n    face = NULL;\n    SDL_FreeSurface(rface);\n    rface = NULL;\n\n    return TEST_COMPLETED;\n}\n\n\n/* !\n *  Tests surface conversion across all pixel formats.\n */\nint\nsurface_testCompleteSurfaceConversion(void *arg)\n{\n    Uint32 pixel_formats[] = {\n        SDL_PIXELFORMAT_INDEX8,\n        SDL_PIXELFORMAT_RGB332,\n        SDL_PIXELFORMAT_RGB444,\n        SDL_PIXELFORMAT_RGB555,\n        SDL_PIXELFORMAT_BGR555,\n        SDL_PIXELFORMAT_ARGB4444,\n        SDL_PIXELFORMAT_RGBA4444,\n        SDL_PIXELFORMAT_ABGR4444,\n        SDL_PIXELFORMAT_BGRA4444,\n        SDL_PIXELFORMAT_ARGB1555,\n        SDL_PIXELFORMAT_RGBA5551,\n        SDL_PIXELFORMAT_ABGR1555,\n        SDL_PIXELFORMAT_BGRA5551,\n        SDL_PIXELFORMAT_RGB565,\n        SDL_PIXELFORMAT_BGR565,\n        SDL_PIXELFORMAT_RGB24,\n        SDL_PIXELFORMAT_BGR24,\n        SDL_PIXELFORMAT_RGB888,\n        SDL_PIXELFORMAT_RGBX8888,\n        SDL_PIXELFORMAT_BGR888,\n        SDL_PIXELFORMAT_BGRX8888,\n        SDL_PIXELFORMAT_ARGB8888,\n        SDL_PIXELFORMAT_RGBA8888,\n        SDL_PIXELFORMAT_ABGR8888,\n        SDL_PIXELFORMAT_BGRA8888,\n        SDL_PIXELFORMAT_ARGB2101010,\n    };\n    SDL_Surface *face = NULL, *cvt1, *cvt2, *final;\n    SDL_PixelFormat *fmt1, *fmt2;\n    int i, j, ret = 0;\n\n    /* Create sample surface */\n    face = SDLTest_ImageFace();\n    SDLTest_AssertCheck(face != NULL, \"Verify face surface is not NULL\");\n    if (face == NULL)\n        return TEST_ABORTED;\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (face->format->palette) {\n       ret = SDL_SetColorKey(face, SDL_RLEACCEL, *(Uint8 *) face->pixels);\n       SDLTest_AssertPass(\"Call to SDL_SetColorKey()\");\n       SDLTest_AssertCheck(ret == 0, \"Verify result from SDL_SetColorKey, expected: 0, got: %i\", ret);\n    }\n\n    for ( i = 0; i < SDL_arraysize(pixel_formats); ++i ) {\n        for ( j = 0; j < SDL_arraysize(pixel_formats); ++j ) {\n            fmt1 = SDL_AllocFormat(pixel_formats[i]);\n            SDL_assert(fmt1 != NULL);\n            cvt1 = SDL_ConvertSurface(face, fmt1, 0);\n            SDL_assert(cvt1 != NULL);\n\n            fmt2 = SDL_AllocFormat(pixel_formats[j]);\n            SDL_assert(fmt1 != NULL);\n            cvt2 = SDL_ConvertSurface(cvt1, fmt2, 0);\n            SDL_assert(cvt2 != NULL);\n\n            if ( fmt1->BytesPerPixel == face->format->BytesPerPixel &&\n                 fmt2->BytesPerPixel == face->format->BytesPerPixel &&\n                 (fmt1->Amask != 0) == (face->format->Amask != 0) &&\n                 (fmt2->Amask != 0) == (face->format->Amask != 0) ) {\n                final = SDL_ConvertSurface( cvt2, face->format, 0 );\n                SDL_assert(final != NULL);\n\n                /* Compare surface. */\n                ret = SDLTest_CompareSurfaces( face, final, 0 );\n                SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n                SDL_FreeSurface(final);\n            }\n\n            SDL_FreeSurface(cvt1);\n            SDL_FreeFormat(fmt1);\n            SDL_FreeSurface(cvt2);\n            SDL_FreeFormat(fmt2);\n        }\n    }\n\n    /* Clean up. */\n    SDL_FreeSurface( face );\n\n    return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests sprite loading. A failure case.\n */\nint\nsurface_testLoadFailure(void *arg)\n{\n    SDL_Surface *face = SDL_LoadBMP(\"nonexistant.bmp\");\n    SDLTest_AssertCheck(face == NULL, \"SDL_CreateLoadBmp\");\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some blitting routines.\n */\nint\nsurface_testBlit(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Basic blitting */\n   _testBlitBlendMode(-1);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlit();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some blitting routines with color mod\n */\nint\nsurface_testBlitColorMod(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Basic blitting with color mod */\n   _testBlitBlendMode(-2);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitColor();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some blitting routines with alpha mod\n */\nint\nsurface_testBlitAlphaMod(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Basic blitting with alpha mod */\n   _testBlitBlendMode(-3);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitAlpha();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests some more blitting routines.\n */\nint\nsurface_testBlitBlendNone(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Basic blitting */\n   _testBlitBlendMode(SDL_BLENDMODE_NONE);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitBlendNone();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some more blitting routines.\n */\nint\nsurface_testBlitBlendBlend(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Blend blitting */\n   _testBlitBlendMode(SDL_BLENDMODE_BLEND);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitBlend();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some more blitting routines.\n */\nint\nsurface_testBlitBlendAdd(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Add blitting */\n   _testBlitBlendMode(SDL_BLENDMODE_ADD);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitBlendAdd();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some more blitting routines.\n */\nint\nsurface_testBlitBlendMod(void *arg)\n{\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* Mod blitting */\n   _testBlitBlendMode(SDL_BLENDMODE_MOD);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitBlendMod();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests some more blitting routines with loop\n */\nint\nsurface_testBlitBlendLoop(void *arg) {\n\n   int ret;\n   SDL_Surface *compareSurface;\n\n   /* All blitting modes */\n   _testBlitBlendMode(-4);\n\n   /* Verify result by comparing surfaces */\n   compareSurface = SDLTest_ImageBlitBlendAll();\n   ret = SDLTest_CompareSurfaces( testSurface, compareSurface, 0 );\n   SDLTest_AssertCheck(ret == 0, \"Validate result from SDLTest_CompareSurfaces, expected: 0, got: %i\", ret);\n\n   /* Clean up. */\n   SDL_FreeSurface(compareSurface);\n\n   return TEST_COMPLETED;\n\n}\n\n/* ================= Test References ================== */\n\n/* Surface test cases */\nstatic const SDLTest_TestCaseReference surfaceTest1 =\n        { (SDLTest_TestCaseFp)surface_testSaveLoadBitmap, \"surface_testSaveLoadBitmap\", \"Tests sprite saving and loading.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest2 =\n        { (SDLTest_TestCaseFp)surface_testBlit, \"surface_testBlit\", \"Tests basic blitting.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest3 =\n        { (SDLTest_TestCaseFp)surface_testBlitBlendNone, \"surface_testBlitBlendNone\", \"Tests blitting routines with none blending mode.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest4 =\n        { (SDLTest_TestCaseFp)surface_testLoadFailure, \"surface_testLoadFailure\", \"Tests sprite loading. A failure case.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest5 =\n        { (SDLTest_TestCaseFp)surface_testSurfaceConversion, \"surface_testSurfaceConversion\", \"Tests surface conversion.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest6 =\n        { (SDLTest_TestCaseFp)surface_testCompleteSurfaceConversion, \"surface_testCompleteSurfaceConversion\", \"Tests surface conversion across all pixel formats\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest7 =\n        { (SDLTest_TestCaseFp)surface_testBlitColorMod, \"surface_testBlitColorMod\", \"Tests some blitting routines with color mod.\", TEST_ENABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest8 =\n        { (SDLTest_TestCaseFp)surface_testBlitAlphaMod, \"surface_testBlitAlphaMod\", \"Tests some blitting routines with alpha mod.\", TEST_ENABLED};\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference surfaceTest9 =\n        { (SDLTest_TestCaseFp)surface_testBlitBlendLoop, \"surface_testBlitBlendLoop\", \"Test blitting routines with various blending modes\", TEST_DISABLED};\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference surfaceTest10 =\n        { (SDLTest_TestCaseFp)surface_testBlitBlendBlend, \"surface_testBlitBlendBlend\", \"Tests blitting routines with blend blending mode.\", TEST_DISABLED};\n\n/* TODO: rewrite test case, define new test data and re-enable; current implementation fails */\nstatic const SDLTest_TestCaseReference surfaceTest11 =\n        { (SDLTest_TestCaseFp)surface_testBlitBlendAdd, \"surface_testBlitBlendAdd\", \"Tests blitting routines with add blending mode.\", TEST_DISABLED};\n\nstatic const SDLTest_TestCaseReference surfaceTest12 =\n        { (SDLTest_TestCaseFp)surface_testBlitBlendMod, \"surface_testBlitBlendMod\", \"Tests blitting routines with mod blending mode.\", TEST_ENABLED};\n\n/* Sequence of Surface test cases */\nstatic const SDLTest_TestCaseReference *surfaceTests[] =  {\n    &surfaceTest1, &surfaceTest2, &surfaceTest3, &surfaceTest4, &surfaceTest5,\n    &surfaceTest6, &surfaceTest7, &surfaceTest8, &surfaceTest9, &surfaceTest10,\n    &surfaceTest11, &surfaceTest12, NULL\n};\n\n/* Surface test suite (global) */\nSDLTest_TestSuiteReference surfaceTestSuite = {\n    \"Surface\",\n    _surfaceSetUp,\n    surfaceTests,\n    _surfaceTearDown\n\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_syswm.c",
    "content": "/**\n * SysWM test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_syswm.h\"\n#include \"SDL_test.h\"\n\n/* Test case functions */\n\n/**\n * @brief Call to SDL_GetWindowWMInfo\n */\nint\nsyswm_getWindowWMInfo(void *arg)\n{\n  SDL_bool result;\n  SDL_Window *window;\n  SDL_SysWMinfo info;\n\n  window = SDL_CreateWindow(\"\", 0, 0, 0, 0, SDL_WINDOW_HIDDEN);\n  SDLTest_AssertPass(\"Call to SDL_CreateWindow()\");\n  SDLTest_AssertCheck(window != NULL, \"Check that value returned from SDL_CreateWindow is not NULL\");\n  if (window == NULL) {\n     return TEST_ABORTED;\n  }\n\n  /* Initialize info structure with SDL version info */\n  SDL_VERSION(&info.version);\n\n  /* Make call */\n  result = SDL_GetWindowWMInfo(window, &info);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowWMInfo()\");\n  SDLTest_Log((result == SDL_TRUE) ? \"Got window information\" : \"Couldn't get window information\");\n\n  SDL_DestroyWindow(window);\n  SDLTest_AssertPass(\"Call to SDL_DestroyWindow()\");\n\n  return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* SysWM test cases */\nstatic const SDLTest_TestCaseReference syswmTest1 =\n        { (SDLTest_TestCaseFp)syswm_getWindowWMInfo, \"syswm_getWindowWMInfo\", \"Call to SDL_GetWindowWMInfo\", TEST_ENABLED };\n\n/* Sequence of SysWM test cases */\nstatic const SDLTest_TestCaseReference *syswmTests[] =  {\n    &syswmTest1, NULL\n};\n\n/* SysWM test suite (global) */\nSDLTest_TestSuiteReference syswmTestSuite = {\n    \"SysWM\",\n    NULL,\n    syswmTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_timer.c",
    "content": "/**\n * Timer test suite\n */\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* Flag indicating if the param should be checked */\nint _paramCheck = 0;\n\n/* Userdata value to check */\nint _paramValue = 0;\n\n/* Flag indicating that the callback was called */\nint _timerCallbackCalled = 0;\n\n/* Fixture */\n\nvoid\n_timerSetUp(void *arg)\n{\n    /* Start SDL timer subsystem */\n    int ret = SDL_InitSubSystem( SDL_INIT_TIMER );\n        SDLTest_AssertPass(\"Call to SDL_InitSubSystem(SDL_INIT_TIMER)\");\n    SDLTest_AssertCheck(ret==0, \"Check result from SDL_InitSubSystem(SDL_INIT_TIMER)\");\n    if (ret != 0) {\n           SDLTest_LogError(\"%s\", SDL_GetError());\n        }\n}\n\n/* Test case functions */\n\n/**\n * @brief Call to SDL_GetPerformanceCounter\n */\nint\ntimer_getPerformanceCounter(void *arg)\n{\n  Uint64 result;\n\n  result = SDL_GetPerformanceCounter();\n  SDLTest_AssertPass(\"Call to SDL_GetPerformanceCounter()\");\n  SDLTest_AssertCheck(result > 0, \"Check result value, expected: >0, got: %\"SDL_PRIu64, result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_GetPerformanceFrequency\n */\nint\ntimer_getPerformanceFrequency(void *arg)\n{\n  Uint64 result;\n\n  result = SDL_GetPerformanceFrequency();\n  SDLTest_AssertPass(\"Call to SDL_GetPerformanceFrequency()\");\n  SDLTest_AssertCheck(result > 0, \"Check result value, expected: >0, got: %\"SDL_PRIu64, result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Call to SDL_Delay and SDL_GetTicks\n */\nint\ntimer_delayAndGetTicks(void *arg)\n{\n  const Uint32 testDelay = 100;\n  const Uint32 marginOfError = 25;\n  Uint32 result;\n  Uint32 result2;\n  Uint32 difference;\n\n  /* Zero delay */\n  SDL_Delay(0);\n  SDLTest_AssertPass(\"Call to SDL_Delay(0)\");\n\n  /* Non-zero delay */\n  SDL_Delay(1);\n  SDLTest_AssertPass(\"Call to SDL_Delay(1)\");\n\n  SDL_Delay(SDLTest_RandomIntegerInRange(5, 15));\n  SDLTest_AssertPass(\"Call to SDL_Delay()\");\n\n  /* Get ticks count - should be non-zero by now */\n  result = SDL_GetTicks();\n  SDLTest_AssertPass(\"Call to SDL_GetTicks()\");\n  SDLTest_AssertCheck(result > 0, \"Check result value, expected: >0, got: %d\", result);\n\n  /* Delay a bit longer and measure ticks and verify difference */\n  SDL_Delay(testDelay);\n  SDLTest_AssertPass(\"Call to SDL_Delay(%d)\", testDelay);\n  result2 = SDL_GetTicks();\n  SDLTest_AssertPass(\"Call to SDL_GetTicks()\");\n  SDLTest_AssertCheck(result2 > 0, \"Check result value, expected: >0, got: %d\", result2);\n  difference = result2 - result;\n  SDLTest_AssertCheck(difference > (testDelay - marginOfError), \"Check difference, expected: >%d, got: %d\", testDelay - marginOfError, difference);\n  SDLTest_AssertCheck(difference < (testDelay + marginOfError), \"Check difference, expected: <%d, got: %d\", testDelay + marginOfError, difference);\n\n  return TEST_COMPLETED;\n}\n\n/* Test callback */\nUint32 SDLCALL _timerTestCallback(Uint32 interval, void *param)\n{\n   _timerCallbackCalled = 1;\n\n   if (_paramCheck != 0) {\n       SDLTest_AssertCheck(param != NULL, \"Check param pointer, expected: non-NULL, got: %s\", (param != NULL) ? \"non-NULL\" : \"NULL\");\n       if (param != NULL) {\n          SDLTest_AssertCheck(*(int *)param == _paramValue, \"Check param value, expected: %i, got: %i\", _paramValue, *(int *)param);\n       }\n   }\n\n   return 0;\n}\n\n/**\n * @brief Call to SDL_AddTimer and SDL_RemoveTimer\n */\nint\ntimer_addRemoveTimer(void *arg)\n{\n  SDL_TimerID id;\n  SDL_bool result;\n  int param;\n\n  /* Reset state */\n  _paramCheck = 0;\n  _timerCallbackCalled = 0;\n\n  /* Set timer with a long delay */\n  id = SDL_AddTimer(10000, _timerTestCallback, NULL);\n  SDLTest_AssertPass(\"Call to SDL_AddTimer(10000,...)\");\n  SDLTest_AssertCheck(id > 0, \"Check result value, expected: >0, got: %d\", id);\n\n  /* Remove timer again and check that callback was not called */\n  result = SDL_RemoveTimer(id);\n  SDLTest_AssertPass(\"Call to SDL_RemoveTimer()\");\n  SDLTest_AssertCheck(result == SDL_TRUE, \"Check result value, expected: %i, got: %i\", SDL_TRUE, result);\n  SDLTest_AssertCheck(_timerCallbackCalled == 0, \"Check callback WAS NOT called, expected: 0, got: %i\", _timerCallbackCalled);\n\n  /* Try to remove timer again (should be a NOOP) */\n  result = SDL_RemoveTimer(id);\n  SDLTest_AssertPass(\"Call to SDL_RemoveTimer()\");\n  SDLTest_AssertCheck(result == SDL_FALSE, \"Check result value, expected: %i, got: %i\", SDL_FALSE, result);\n\n  /* Reset state */\n  param = SDLTest_RandomIntegerInRange(-1024, 1024);\n  _paramCheck = 1;\n  _paramValue = param;\n  _timerCallbackCalled = 0;\n\n  /* Set timer with a short delay */\n  id = SDL_AddTimer(10, _timerTestCallback, (void *)&param);\n  SDLTest_AssertPass(\"Call to SDL_AddTimer(10, param)\");\n  SDLTest_AssertCheck(id > 0, \"Check result value, expected: >0, got: %d\", id);\n\n  /* Wait to let timer trigger callback */\n  SDL_Delay(100);\n  SDLTest_AssertPass(\"Call to SDL_Delay(100)\");\n\n  /* Remove timer again and check that callback was called */\n  result = SDL_RemoveTimer(id);\n  SDLTest_AssertPass(\"Call to SDL_RemoveTimer()\");\n  SDLTest_AssertCheck(result == SDL_FALSE, \"Check result value, expected: %i, got: %i\", SDL_FALSE, result);\n  SDLTest_AssertCheck(_timerCallbackCalled == 1, \"Check callback WAS called, expected: 1, got: %i\", _timerCallbackCalled);\n\n  return TEST_COMPLETED;\n}\n\n/* ================= Test References ================== */\n\n/* Timer test cases */\nstatic const SDLTest_TestCaseReference timerTest1 =\n        { (SDLTest_TestCaseFp)timer_getPerformanceCounter, \"timer_getPerformanceCounter\", \"Call to SDL_GetPerformanceCounter\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference timerTest2 =\n        { (SDLTest_TestCaseFp)timer_getPerformanceFrequency, \"timer_getPerformanceFrequency\", \"Call to SDL_GetPerformanceFrequency\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference timerTest3 =\n        { (SDLTest_TestCaseFp)timer_delayAndGetTicks, \"timer_delayAndGetTicks\", \"Call to SDL_Delay and SDL_GetTicks\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference timerTest4 =\n        { (SDLTest_TestCaseFp)timer_addRemoveTimer, \"timer_addRemoveTimer\", \"Call to SDL_AddTimer and SDL_RemoveTimer\", TEST_ENABLED };\n\n/* Sequence of Timer test cases */\nstatic const SDLTest_TestCaseReference *timerTests[] =  {\n    &timerTest1, &timerTest2, &timerTest3, &timerTest4, NULL\n};\n\n/* Timer test suite (global) */\nSDLTest_TestSuiteReference timerTestSuite = {\n    \"Timer\",\n    _timerSetUp,\n    timerTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testautomation_video.c",
    "content": "/**\n * Video test suite\n */\n\n#include <stdio.h>\n#include <string.h>\n\n/* Visual Studio 2008 doesn't have stdint.h */\n#if defined(_MSC_VER) && _MSC_VER <= 1500\n#define UINT8_MAX   ~(Uint8)0\n#define UINT16_MAX  ~(Uint16)0\n#define UINT32_MAX  ~(Uint32)0\n#define UINT64_MAX  ~(Uint64)0\n#else\n#include <stdint.h>\n#endif\n\n#include \"SDL.h\"\n#include \"SDL_test.h\"\n\n/* Private helpers */\n\n/*\n * Create a test window\n */\nSDL_Window *_createVideoSuiteTestWindow(const char *title)\n{\n  SDL_Window* window;\n  int x, y, w, h;\n  SDL_WindowFlags flags;\n\n  /* Standard window */\n  x = SDLTest_RandomIntegerInRange(1, 100);\n  y = SDLTest_RandomIntegerInRange(1, 100);\n  w = SDLTest_RandomIntegerInRange(320, 1024);\n  h = SDLTest_RandomIntegerInRange(320, 768);\n  flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS;\n\n  window = SDL_CreateWindow(title, x, y, w, h, flags);\n  SDLTest_AssertPass(\"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)\", x, y, w, h, flags);\n  SDLTest_AssertCheck(window != NULL, \"Validate that returned window struct is not NULL\");\n\n  return window;\n}\n\n/*\n * Destroy test window\n */\nvoid _destroyVideoSuiteTestWindow(SDL_Window *window)\n{\n  if (window != NULL) {\n     SDL_DestroyWindow(window);\n     window = NULL;\n     SDLTest_AssertPass(\"Call to SDL_DestroyWindow()\");\n  }\n}\n\n/* Test case functions */\n\n/**\n * @brief Enable and disable screensaver while checking state\n */\nint\nvideo_enableDisableScreensaver(void *arg)\n{\n    SDL_bool initialResult;\n    SDL_bool result;\n\n    /* Get current state and proceed according to current state */\n    initialResult = SDL_IsScreenSaverEnabled();\n    SDLTest_AssertPass(\"Call to SDL_IsScreenSaverEnabled()\");\n    if (initialResult == SDL_TRUE) {\n\n      /* Currently enabled: disable first, then enable again */\n\n      /* Disable screensaver and check */\n      SDL_DisableScreenSaver();\n      SDLTest_AssertPass(\"Call to SDL_DisableScreenSaver()\");\n      result = SDL_IsScreenSaverEnabled();\n      SDLTest_AssertPass(\"Call to SDL_IsScreenSaverEnabled()\");\n      SDLTest_AssertCheck(result == SDL_FALSE, \"Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i\", SDL_FALSE, result);\n\n      /* Enable screensaver and check */\n      SDL_EnableScreenSaver();\n      SDLTest_AssertPass(\"Call to SDL_EnableScreenSaver()\");\n      result = SDL_IsScreenSaverEnabled();\n      SDLTest_AssertPass(\"Call to SDL_IsScreenSaverEnabled()\");\n      SDLTest_AssertCheck(result == SDL_TRUE, \"Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i\", SDL_TRUE, result);\n\n    } else {\n\n      /* Currently disabled: enable first, then disable again */\n\n      /* Enable screensaver and check */\n      SDL_EnableScreenSaver();\n      SDLTest_AssertPass(\"Call to SDL_EnableScreenSaver()\");\n      result = SDL_IsScreenSaverEnabled();\n      SDLTest_AssertPass(\"Call to SDL_IsScreenSaverEnabled()\");\n      SDLTest_AssertCheck(result == SDL_TRUE, \"Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i\", SDL_TRUE, result);\n\n      /* Disable screensaver and check */\n      SDL_DisableScreenSaver();\n      SDLTest_AssertPass(\"Call to SDL_DisableScreenSaver()\");\n      result = SDL_IsScreenSaverEnabled();\n      SDLTest_AssertPass(\"Call to SDL_IsScreenSaverEnabled()\");\n      SDLTest_AssertCheck(result == SDL_FALSE, \"Verify result from SDL_IsScreenSaverEnabled, expected: %i, got: %i\", SDL_FALSE, result);\n    }\n\n    return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_CreateWindow function using different positions\n */\nint\nvideo_createWindowVariousPositions(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_createWindowVariousPositions Test Window\";\n  int x, y, w, h;\n  int xVariation, yVariation;\n\n  for (xVariation = 0; xVariation < 6; xVariation++) {\n   for (yVariation = 0; yVariation < 6; yVariation++) {\n    switch(xVariation) {\n     case 0:\n      /* Zero X Position */\n      x = 0;\n      break;\n     case 1:\n      /* Random X position inside screen */\n      x = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Random X position outside screen (positive) */\n      x = SDLTest_RandomIntegerInRange(10000, 11000);\n      break;\n     case 3:\n      /* Random X position outside screen (negative) */\n      x = SDLTest_RandomIntegerInRange(-1000, -100);\n      break;\n     case 4:\n      /* Centered X position */\n      x = SDL_WINDOWPOS_CENTERED;\n      break;\n     case 5:\n      /* Undefined X position */\n      x = SDL_WINDOWPOS_UNDEFINED;\n      break;\n    }\n\n    switch(yVariation) {\n     case 0:\n      /* Zero X Position */\n      y = 0;\n      break;\n     case 1:\n      /* Random X position inside screen */\n      y = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Random X position outside screen (positive) */\n      y = SDLTest_RandomIntegerInRange(10000, 11000);\n      break;\n     case 3:\n      /* Random Y position outside screen (negative) */\n      y = SDLTest_RandomIntegerInRange(-1000, -100);\n      break;\n     case 4:\n      /* Centered Y position */\n      y = SDL_WINDOWPOS_CENTERED;\n      break;\n     case 5:\n      /* Undefined Y position */\n      y = SDL_WINDOWPOS_UNDEFINED;\n      break;\n    }\n\n    w = SDLTest_RandomIntegerInRange(32, 96);\n    h = SDLTest_RandomIntegerInRange(32, 96);\n    window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN);\n    SDLTest_AssertPass(\"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)\", x, y, w, h);\n    SDLTest_AssertCheck(window != NULL, \"Validate that returned window struct is not NULL\");\n\n    /* Clean up */\n    _destroyVideoSuiteTestWindow(window);\n   }\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_CreateWindow function using different sizes\n */\nint\nvideo_createWindowVariousSizes(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_createWindowVariousSizes Test Window\";\n  int x, y, w, h;\n  int wVariation, hVariation;\n\n  x = SDLTest_RandomIntegerInRange(1, 100);\n  y = SDLTest_RandomIntegerInRange(1, 100);\n  for (wVariation = 0; wVariation < 3; wVariation++) {\n   for (hVariation = 0; hVariation < 3; hVariation++) {\n    switch(wVariation) {\n     case 0:\n      /* Width of 1 */\n      w = 1;\n      break;\n     case 1:\n      /* Random \"normal\" width */\n      w = SDLTest_RandomIntegerInRange(320, 1920);\n      break;\n     case 2:\n      /* Random \"large\" width */\n      w = SDLTest_RandomIntegerInRange(2048, 4095);\n      break;\n    }\n\n    switch(hVariation) {\n     case 0:\n      /* Height of 1 */\n      h = 1;\n      break;\n     case 1:\n      /* Random \"normal\" height */\n      h = SDLTest_RandomIntegerInRange(320, 1080);\n      break;\n     case 2:\n      /* Random \"large\" height */\n      h = SDLTest_RandomIntegerInRange(2048, 4095);\n      break;\n     }\n\n    window = SDL_CreateWindow(title, x, y, w, h, SDL_WINDOW_SHOWN);\n    SDLTest_AssertPass(\"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,SHOWN)\", x, y, w, h);\n    SDLTest_AssertCheck(window != NULL, \"Validate that returned window struct is not NULL\");\n\n    /* Clean up */\n    _destroyVideoSuiteTestWindow(window);\n   }\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_CreateWindow function using different flags\n */\nint\nvideo_createWindowVariousFlags(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_createWindowVariousFlags Test Window\";\n  int x, y, w, h;\n  int fVariation;\n  SDL_WindowFlags flags;\n\n  /* Standard window */\n  x = SDLTest_RandomIntegerInRange(1, 100);\n  y = SDLTest_RandomIntegerInRange(1, 100);\n  w = SDLTest_RandomIntegerInRange(320, 1024);\n  h = SDLTest_RandomIntegerInRange(320, 768);\n\n  for (fVariation = 0; fVariation < 13; fVariation++) {\n    switch(fVariation) {\n     case 0:\n      flags = SDL_WINDOW_FULLSCREEN;\n      /* Skip - blanks screen; comment out next line to run test */\n      continue;\n      break;\n     case 1:\n      flags = SDL_WINDOW_FULLSCREEN_DESKTOP;\n      /* Skip - blanks screen; comment out next line to run test */\n      continue;\n      break;\n     case 2:\n      flags = SDL_WINDOW_OPENGL;\n      break;\n     case 3:\n      flags = SDL_WINDOW_SHOWN;\n      break;\n     case 4:\n      flags = SDL_WINDOW_HIDDEN;\n      break;\n     case 5:\n      flags = SDL_WINDOW_BORDERLESS;\n      break;\n     case 6:\n      flags = SDL_WINDOW_RESIZABLE;\n      break;\n     case 7:\n      flags = SDL_WINDOW_MINIMIZED;\n      break;\n     case 8:\n      flags = SDL_WINDOW_MAXIMIZED;\n      break;\n     case 9:\n      flags = SDL_WINDOW_INPUT_GRABBED;\n      break;\n     case 10:\n      flags = SDL_WINDOW_INPUT_FOCUS;\n      break;\n     case 11:\n      flags = SDL_WINDOW_MOUSE_FOCUS;\n      break;\n     case 12:\n      flags = SDL_WINDOW_FOREIGN;\n      break;\n    }\n\n    window = SDL_CreateWindow(title, x, y, w, h, flags);\n    SDLTest_AssertPass(\"Call to SDL_CreateWindow('Title',%d,%d,%d,%d,%d)\", x, y, w, h, flags);\n    SDLTest_AssertCheck(window != NULL, \"Validate that returned window struct is not NULL\");\n\n    /* Clean up */\n    _destroyVideoSuiteTestWindow(window);\n  }\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests the functionality of the SDL_GetWindowFlags function\n */\nint\nvideo_getWindowFlags(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_getWindowFlags Test Window\";\n  SDL_WindowFlags flags;\n  Uint32 actualFlags;\n\n  /* Reliable flag set always set in test window */\n  flags = SDL_WINDOW_SHOWN;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window != NULL) {\n      actualFlags = SDL_GetWindowFlags(window);\n      SDLTest_AssertPass(\"Call to SDL_GetWindowFlags()\");\n      SDLTest_AssertCheck((flags & actualFlags) == flags, \"Verify returned value has flags %d set, got: %d\", flags, actualFlags);\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_GetNumDisplayModes function\n */\nint\nvideo_getNumDisplayModes(void *arg)\n{\n  int result;\n  int displayNum;\n  int i;\n\n  /* Get number of displays */\n  displayNum = SDL_GetNumVideoDisplays();\n  SDLTest_AssertPass(\"Call to SDL_GetNumVideoDisplays()\");\n\n  /* Make call for each display */\n  for (i=0; i<displayNum; i++) {\n    result = SDL_GetNumDisplayModes(i);\n    SDLTest_AssertPass(\"Call to SDL_GetNumDisplayModes(%d)\", i);\n    SDLTest_AssertCheck(result >= 1, \"Validate returned value from function; expected: >=1; got: %d\", result);\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests negative call to SDL_GetNumDisplayModes function\n */\nint\nvideo_getNumDisplayModesNegative(void *arg)\n{\n  int result;\n  int displayNum;\n  int displayIndex;\n\n  /* Get number of displays */\n  displayNum = SDL_GetNumVideoDisplays();\n  SDLTest_AssertPass(\"Call to SDL_GetNumVideoDisplays()\");\n\n  /* Invalid boundary values */\n  displayIndex =  SDLTest_RandomSint32BoundaryValue(0, displayNum, SDL_FALSE);\n  result = SDL_GetNumDisplayModes(displayIndex);\n  SDLTest_AssertPass(\"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/boundary)\", displayIndex);\n  SDLTest_AssertCheck(result < 0, \"Validate returned value from function; expected: <0; got: %d\", result);\n\n  /* Large (out-of-bounds) display index */\n  displayIndex = SDLTest_RandomIntegerInRange(-2000, -1000);\n  result = SDL_GetNumDisplayModes(displayIndex);\n  SDLTest_AssertPass(\"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large negative)\", displayIndex);\n  SDLTest_AssertCheck(result < 0, \"Validate returned value from function; expected: <0; got: %d\", result);\n\n  displayIndex = SDLTest_RandomIntegerInRange(1000, 2000);\n  result = SDL_GetNumDisplayModes(displayIndex);\n  SDLTest_AssertPass(\"Call to SDL_GetNumDisplayModes(%d=out-of-bounds/large positive)\", displayIndex);\n  SDLTest_AssertCheck(result < 0, \"Validate returned value from function; expected: <0; got: %d\", result);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_GetClosestDisplayMode function against current resolution\n */\nint\nvideo_getClosestDisplayModeCurrentResolution(void *arg)\n{\n  int result;\n  SDL_DisplayMode current;\n  SDL_DisplayMode target;\n  SDL_DisplayMode closest;\n  SDL_DisplayMode* dResult;\n  int displayNum;\n  int i;\n  int variation;\n\n  /* Get number of displays */\n  displayNum = SDL_GetNumVideoDisplays();\n  SDLTest_AssertPass(\"Call to SDL_GetNumVideoDisplays()\");\n\n  /* Make calls for each display */\n  for (i=0; i<displayNum; i++) {\n    SDLTest_Log(\"Testing against display: %d\", i);\n\n    /* Get first display mode to get a sane resolution; this should always work */\n    result = SDL_GetDisplayMode(i, 0, &current);\n    SDLTest_AssertPass(\"Call to SDL_GetDisplayMode()\");\n    SDLTest_AssertCheck(result == 0, \"Verify return value, expected: 0, got: %d\", result);\n    if (result != 0) {\n      return TEST_ABORTED;\n    }\n\n    /* Set the desired resolution equals to current resolution */\n    target.w = current.w;\n    target.h = current.h;\n    for (variation = 0; variation < 8; variation ++) {\n      /* Vary constraints on other query parameters */\n      target.format = (variation & 1) ? current.format : 0;\n      target.refresh_rate = (variation & 2) ? current.refresh_rate : 0;\n      target.driverdata = (variation & 4) ? current.driverdata : 0;\n\n      /* Make call */\n      dResult = SDL_GetClosestDisplayMode(i, &target, &closest);\n      SDLTest_AssertPass(\"Call to SDL_GetClosestDisplayMode(target=current/variation%d)\", variation);\n      SDLTest_AssertCheck(dResult != NULL, \"Verify returned value is not NULL\");\n\n      /* Check that one gets the current resolution back again */\n      SDLTest_AssertCheck(closest.w == current.w, \"Verify returned width matches current width; expected: %d, got: %d\", current.w, closest.w);\n      SDLTest_AssertCheck(closest.h == current.h, \"Verify returned height matches current height; expected: %d, got: %d\", current.h, closest.h);\n      SDLTest_AssertCheck(closest.w == dResult->w, \"Verify return value matches assigned value; expected: %d, got: %d\", closest.w, dResult->w);\n      SDLTest_AssertCheck(closest.h == dResult->h, \"Verify return value matches assigned value; expected: %d, got: %d\", closest.h, dResult->h);\n    }\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests the functionality of the SDL_GetClosestDisplayMode function against random resolution\n */\nint\nvideo_getClosestDisplayModeRandomResolution(void *arg)\n{\n  SDL_DisplayMode target;\n  SDL_DisplayMode closest;\n  SDL_DisplayMode* dResult;\n  int displayNum;\n  int i;\n  int variation;\n\n  /* Get number of displays */\n  displayNum = SDL_GetNumVideoDisplays();\n  SDLTest_AssertPass(\"Call to SDL_GetNumVideoDisplays()\");\n\n  /* Make calls for each display */\n  for (i=0; i<displayNum; i++) {\n    SDLTest_Log(\"Testing against display: %d\", i);\n\n    for (variation = 0; variation < 16; variation ++) {\n\n      /* Set random constraints */\n      target.w = (variation & 1) ? SDLTest_RandomIntegerInRange(1, 4096) : 0;\n      target.h = (variation & 2) ? SDLTest_RandomIntegerInRange(1, 4096) : 0;\n      target.format = (variation & 4) ? SDLTest_RandomIntegerInRange(1, 10) : 0;\n      target.refresh_rate = (variation & 8) ? SDLTest_RandomIntegerInRange(25, 120) : 0;\n      target.driverdata = 0;\n\n      /* Make call; may or may not find anything, so don't validate any further */\n      dResult = SDL_GetClosestDisplayMode(i, &target, &closest);\n      SDLTest_AssertPass(\"Call to SDL_GetClosestDisplayMode(target=random/variation%d)\", variation);\n    }\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowBrightness\n *\n* @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowBrightness\n */\nint\nvideo_getWindowBrightness(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_getWindowBrightness Test Window\";\n  float result;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window != NULL) {\n      result = SDL_GetWindowBrightness(window);\n      SDLTest_AssertPass(\"Call to SDL_GetWindowBrightness()\");\n      SDLTest_AssertCheck(result >= 0.0 && result <= 1.0, \"Validate range of result value; expected: [0.0, 1.0], got: %f\", result);\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowBrightness with invalid input\n *\n* @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowBrightness\n */\nint\nvideo_getWindowBrightnessNegative(void *arg)\n{\n  const char *invalidWindowError = \"Invalid window\";\n  char *lastError;\n  float result;\n\n  /* Call against invalid window */\n  result = SDL_GetWindowBrightness(NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowBrightness(window=NULL)\");\n  SDLTest_AssertCheck(result == 1.0, \"Validate result value; expected: 1.0, got: %f\", result);\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL, \"Verify error message is not NULL\");\n  if (lastError != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(lastError, invalidWindowError) == 0,\n         \"SDL_GetError(): expected message '%s', was message: '%s'\",\n         invalidWindowError,\n         lastError);\n  }\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowDisplayMode\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowDisplayMode\n */\nint\nvideo_getWindowDisplayMode(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_getWindowDisplayMode Test Window\";\n  SDL_DisplayMode mode;\n  int result;\n\n  /* Invalidate part of the mode content so we can check values later */\n  mode.w = -1;\n  mode.h = -1;\n  mode.refresh_rate = -1;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window != NULL) {\n      result = SDL_GetWindowDisplayMode(window, &mode);\n      SDLTest_AssertPass(\"Call to SDL_GetWindowDisplayMode()\");\n      SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n      SDLTest_AssertCheck(mode.w > 0, \"Validate mode.w content; expected: >0, got: %d\", mode.w);\n      SDLTest_AssertCheck(mode.h > 0, \"Validate mode.h content; expected: >0, got: %d\", mode.h);\n      SDLTest_AssertCheck(mode.refresh_rate > 0, \"Validate mode.refresh_rate content; expected: >0, got: %d\", mode.refresh_rate);\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  return TEST_COMPLETED;\n}\n\n/* Helper function that checks for an 'Invalid window' error */\nvoid _checkInvalidWindowError()\n{\n  const char *invalidWindowError = \"Invalid window\";\n  char *lastError;\n\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL, \"Verify error message is not NULL\");\n  if (lastError != NULL) {\n      SDLTest_AssertCheck(SDL_strcmp(lastError, invalidWindowError) == 0,\n         \"SDL_GetError(): expected message '%s', was message: '%s'\",\n         invalidWindowError,\n         lastError);\n      SDL_ClearError();\n      SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  }\n}\n\n/**\n * @brief Tests call to SDL_GetWindowDisplayMode with invalid input\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowDisplayMode\n */\nint\nvideo_getWindowDisplayModeNegative(void *arg)\n{\n  const char *expectedError = \"Parameter 'mode' is invalid\";\n  char *lastError;\n  SDL_Window* window;\n  const char* title = \"video_getWindowDisplayModeNegative Test Window\";\n  SDL_DisplayMode mode;\n  int result;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window != NULL) {\n      result = SDL_GetWindowDisplayMode(window, NULL);\n      SDLTest_AssertPass(\"Call to SDL_GetWindowDisplayMode(...,mode=NULL)\");\n      SDLTest_AssertCheck(result == -1, \"Validate result value; expected: -1, got: %d\", result);\n      lastError = (char *)SDL_GetError();\n      SDLTest_AssertPass(\"SDL_GetError()\");\n      SDLTest_AssertCheck(lastError != NULL, \"Verify error message is not NULL\");\n      if (lastError != NULL) {\n        SDLTest_AssertCheck(SDL_strcmp(lastError, expectedError) == 0,\n             \"SDL_GetError(): expected message '%s', was message: '%s'\",\n             expectedError,\n             lastError);\n      }\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Call against invalid window */\n  result = SDL_GetWindowDisplayMode(NULL, &mode);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowDisplayMode(window=NULL,...)\");\n  SDLTest_AssertCheck(result == -1, \"Validate result value; expected: -1, got: %d\", result);\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowGammaRamp\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowGammaRamp\n */\nint\nvideo_getWindowGammaRamp(void *arg)\n{\n  SDL_Window* window;\n  const char* title = \"video_getWindowGammaRamp Test Window\";\n  Uint16 red[256];\n  Uint16 green[256];\n  Uint16 blue[256];\n  int result;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  /* Retrieve no channel */\n  result = SDL_GetWindowGammaRamp(window, NULL, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(all NULL)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  /* Retrieve single channel */\n  result = SDL_GetWindowGammaRamp(window, red, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(r)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  result = SDL_GetWindowGammaRamp(window, NULL, green, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(g)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  result = SDL_GetWindowGammaRamp(window, NULL, NULL, blue);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(b)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  /* Retrieve two channels */\n  result = SDL_GetWindowGammaRamp(window, red, green, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(r, g)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  result = SDL_GetWindowGammaRamp(window, NULL, green, blue);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(g,b)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  result = SDL_GetWindowGammaRamp(window, red, NULL, blue);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(r,b)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  /* Retrieve all channels */\n  result = SDL_GetWindowGammaRamp(window, red, green, blue);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(r,g,b)\");\n  SDLTest_AssertCheck(result == 0, \"Validate result value; expected: 0, got: %d\", result);\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowGammaRamp with invalid input\n *\n* @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowGammaRamp\n */\nint\nvideo_getWindowGammaRampNegative(void *arg)\n{\n  Uint16 red[256];\n  Uint16 green[256];\n  Uint16 blue[256];\n  int result;\n\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n  /* Call against invalid window */\n  result = SDL_GetWindowGammaRamp(NULL, red, green, blue);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGammaRamp(window=NULL,r,g,b)\");\n  SDLTest_AssertCheck(result == -1, \"Validate result value; expected: -1, got: %i\", result);\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/* Helper for setting and checking the window grab state */\nvoid\n_setAndCheckWindowGrabState(SDL_Window* window, SDL_bool desiredState)\n{\n  SDL_bool currentState;\n\n  /* Set state */\n  SDL_SetWindowGrab(window, desiredState);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowGrab(%s)\", (desiredState == SDL_FALSE) ? \"SDL_FALSE\" : \"SDL_TRUE\");\n\n  /* Get and check state */\n  currentState = SDL_GetWindowGrab(window);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGrab()\");\n  SDLTest_AssertCheck(\n      currentState == desiredState,\n      \"Validate returned state; expected: %s, got: %s\",\n      (desiredState == SDL_FALSE) ? \"SDL_FALSE\" : \"SDL_TRUE\",\n      (currentState == SDL_FALSE) ? \"SDL_FALSE\" : \"SDL_TRUE\");\n}\n\n/**\n * @brief Tests call to SDL_GetWindowGrab and SDL_SetWindowGrab\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowGrab\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_SetWindowGrab\n */\nint\nvideo_getSetWindowGrab(void *arg)\n{\n  const char* title = \"video_getSetWindowGrab Test Window\";\n  SDL_Window* window;\n  SDL_bool originalState, dummyState, currentState, desiredState;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  /* Get state */\n  originalState = SDL_GetWindowGrab(window);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGrab()\");\n\n  /* F */\n  _setAndCheckWindowGrabState(window, SDL_FALSE);\n\n  /* F --> F */\n  _setAndCheckWindowGrabState(window, SDL_FALSE);\n\n  /* F --> T */\n  _setAndCheckWindowGrabState(window, SDL_TRUE);\n\n  /* T --> T */\n  _setAndCheckWindowGrabState(window, SDL_TRUE);\n\n  /* T --> F */\n  _setAndCheckWindowGrabState(window, SDL_FALSE);\n\n  /* Negative tests */\n  dummyState = SDL_GetWindowGrab(NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGrab(window=NULL)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowGrab(NULL, SDL_FALSE);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowGrab(window=NULL,SDL_FALSE)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowGrab(NULL, SDL_TRUE);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowGrab(window=NULL,SDL_FALSE)\");\n  _checkInvalidWindowError();\n\n  /* State should still be F */\n  desiredState = SDL_FALSE;\n  currentState = SDL_GetWindowGrab(window);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowGrab()\");\n  SDLTest_AssertCheck(\n      currentState == desiredState,\n      \"Validate returned state; expected: %s, got: %s\",\n      (desiredState == SDL_FALSE) ? \"SDL_FALSE\" : \"SDL_TRUE\",\n      (currentState == SDL_FALSE) ? \"SDL_FALSE\" : \"SDL_TRUE\");\n\n  /* Restore state */\n  _setAndCheckWindowGrabState(window, originalState);\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests call to SDL_GetWindowID and SDL_GetWindowFromID\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowID\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_SetWindowFromID\n */\nint\nvideo_getWindowId(void *arg)\n{\n  const char* title = \"video_getWindowId Test Window\";\n  SDL_Window* window;\n  SDL_Window* result;\n  Uint32 id, randomId;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  /* Get ID */\n  id = SDL_GetWindowID(window);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID()\");\n\n  /* Get window from ID */\n  result = SDL_GetWindowFromID(id);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(%d)\", id);\n  SDLTest_AssertCheck(result == window, \"Verify result matches window pointer\");\n\n  /* Get window from random large ID, no result check */\n  randomId = SDLTest_RandomIntegerInRange(UINT8_MAX,UINT16_MAX);\n  result = SDL_GetWindowFromID(randomId);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(%d/random_large)\", randomId);\n\n  /* Get window from 0 and Uint32 max ID, no result check */\n  result = SDL_GetWindowFromID(0);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(0)\");\n  result = SDL_GetWindowFromID(UINT32_MAX);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(UINT32_MAX)\");\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Get window from ID for closed window */\n  result = SDL_GetWindowFromID(id);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(%d/closed_window)\", id);\n  SDLTest_AssertCheck(result == NULL, \"Verify result is NULL\");\n\n  /* Negative test */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  id = SDL_GetWindowID(NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowID(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowPixelFormat\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowPixelFormat\n */\nint\nvideo_getWindowPixelFormat(void *arg)\n{\n  const char* title = \"video_getWindowPixelFormat Test Window\";\n  SDL_Window* window;\n  Uint32 format;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  /* Get format */\n  format = SDL_GetWindowPixelFormat(window);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowPixelFormat()\");\n  SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, \"Verify that returned format is valid; expected: != %d, got: %d\", SDL_PIXELFORMAT_UNKNOWN, format);\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Negative test */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  format = SDL_GetWindowPixelFormat(NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowPixelFormat(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowPosition and SDL_SetWindowPosition\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowPosition\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_SetWindowPosition\n */\nint\nvideo_getSetWindowPosition(void *arg)\n{\n  const char* title = \"video_getSetWindowPosition Test Window\";\n  SDL_Window* window;\n  int xVariation, yVariation;\n  int referenceX, referenceY;\n  int currentX, currentY;\n  int desiredX, desiredY;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  for (xVariation = 0; xVariation < 4; xVariation++) {\n   for (yVariation = 0; yVariation < 4; yVariation++) {\n    switch(xVariation) {\n     case 0:\n      /* Zero X Position */\n      desiredX = 0;\n      break;\n     case 1:\n      /* Random X position inside screen */\n      desiredX = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Random X position outside screen (positive) */\n      desiredX = SDLTest_RandomIntegerInRange(10000, 11000);\n      break;\n     case 3:\n      /* Random X position outside screen (negative) */\n      desiredX = SDLTest_RandomIntegerInRange(-1000, -100);\n      break;\n    }\n\n    switch(yVariation) {\n     case 0:\n      /* Zero X Position */\n      desiredY = 0;\n      break;\n     case 1:\n      /* Random X position inside screen */\n      desiredY = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Random X position outside screen (positive) */\n      desiredY = SDLTest_RandomIntegerInRange(10000, 11000);\n      break;\n     case 3:\n      /* Random Y position outside screen (negative) */\n      desiredY = SDLTest_RandomIntegerInRange(-1000, -100);\n      break;\n    }\n\n    /* Set position */\n    SDL_SetWindowPosition(window, desiredX, desiredY);\n    SDLTest_AssertPass(\"Call to SDL_SetWindowPosition(...,%d,%d)\", desiredX, desiredY);\n\n    /* Get position */\n    currentX = desiredX + 1;\n    currentY = desiredY + 1;\n    SDL_GetWindowPosition(window, &currentX, &currentY);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowPosition()\");\n    SDLTest_AssertCheck(desiredX == currentX, \"Verify returned X position; expected: %d, got: %d\", desiredX, currentX);\n    SDLTest_AssertCheck(desiredY == currentY, \"Verify returned Y position; expected: %d, got: %d\", desiredY, currentY);\n\n    /* Get position X */\n    currentX = desiredX + 1;\n    SDL_GetWindowPosition(window, &currentX, NULL);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowPosition(&y=NULL)\");\n    SDLTest_AssertCheck(desiredX == currentX, \"Verify returned X position; expected: %d, got: %d\", desiredX, currentX);\n\n    /* Get position Y */\n    currentY = desiredY + 1;\n    SDL_GetWindowPosition(window, NULL, &currentY);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowPosition(&x=NULL)\");\n    SDLTest_AssertCheck(desiredY == currentY, \"Verify returned Y position; expected: %d, got: %d\", desiredY, currentY);\n   }\n  }\n\n  /* Dummy call with both pointers NULL */\n  SDL_GetWindowPosition(window, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowPosition(&x=NULL,&y=NULL)\");\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Set some 'magic' value for later check that nothing was changed */\n  referenceX = SDLTest_RandomSint32();\n  referenceY = SDLTest_RandomSint32();\n  currentX = referenceX;\n  currentY = referenceY;\n  desiredX = SDLTest_RandomSint32();\n  desiredY = SDLTest_RandomSint32();\n\n  /* Negative tests */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_GetWindowPosition(NULL, &currentX, &currentY);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowPosition(window=NULL)\");\n  SDLTest_AssertCheck(\n    currentX == referenceX && currentY == referenceY,\n    \"Verify that content of X and Y pointers has not been modified; expected: %d,%d; got: %d,%d\",\n    referenceX, referenceY,\n    currentX, currentY);\n  _checkInvalidWindowError();\n\n  SDL_GetWindowPosition(NULL, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowPosition(NULL, NULL, NULL)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowPosition(NULL, desiredX, desiredY);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowPosition(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/* Helper function that checks for an 'Invalid parameter' error */\nvoid _checkInvalidParameterError()\n{\n  const char *invalidParameterError = \"Parameter\";\n  char *lastError;\n\n  lastError = (char *)SDL_GetError();\n  SDLTest_AssertPass(\"SDL_GetError()\");\n  SDLTest_AssertCheck(lastError != NULL, \"Verify error message is not NULL\");\n  if (lastError != NULL) {\n      SDLTest_AssertCheck(SDL_strncmp(lastError, invalidParameterError, SDL_strlen(invalidParameterError)) == 0,\n         \"SDL_GetError(): expected message starts with '%s', was message: '%s'\",\n         invalidParameterError,\n         lastError);\n      SDL_ClearError();\n      SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  }\n}\n\n/**\n * @brief Tests call to SDL_GetWindowSize and SDL_SetWindowSize\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowSize\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_SetWindowSize\n */\nint\nvideo_getSetWindowSize(void *arg)\n{\n  const char* title = \"video_getSetWindowSize Test Window\";\n  SDL_Window* window;\n  int result;\n  SDL_Rect display;\n  int maxwVariation, maxhVariation;\n  int wVariation, hVariation;\n  int referenceW, referenceH;\n  int currentW, currentH;\n  int desiredW, desiredH;\n\n  /* Get display bounds for size range */\n  result = SDL_GetDisplayBounds(0, &display);\n  SDLTest_AssertPass(\"SDL_GetDisplayBounds()\");\n  SDLTest_AssertCheck(result == 0, \"Verify return value; expected: 0, got: %d\", result);\n  if (result != 0) return TEST_ABORTED;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n#ifdef __WIN32__\n  /* Platform clips window size to screen size */\n  maxwVariation = 4;\n  maxhVariation = 4;\n#else\n  /* Platform allows window size >= screen size */\n  maxwVariation = 5;\n  maxhVariation = 5;\n#endif\n  \n  for (wVariation = 0; wVariation < maxwVariation; wVariation++) {\n   for (hVariation = 0; hVariation < maxhVariation; hVariation++) {\n    switch(wVariation) {\n     case 0:\n      /* 1 Pixel Wide */\n      desiredW = 1;\n      break;\n     case 1:\n      /* Random width inside screen */\n      desiredW = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Width 1 pixel smaller than screen */\n      desiredW = display.w - 1;\n      break;\n     case 3:\n      /* Width at screen size */\n      desiredW = display.w;\n      break;\n     case 4:\n      /* Width 1 pixel larger than screen */\n      desiredW = display.w + 1;\n      break;\n    }\n\n    switch(hVariation) {\n     case 0:\n      /* 1 Pixel High */\n      desiredH = 1;\n      break;\n     case 1:\n      /* Random height inside screen */\n      desiredH = SDLTest_RandomIntegerInRange(1, 100);\n      break;\n     case 2:\n      /* Height 1 pixel smaller than screen */\n      desiredH = display.h - 1;\n      break;\n     case 3:\n      /* Height at screen size */\n      desiredH = display.h;\n      break;\n     case 4:\n      /* Height 1 pixel larger than screen */\n      desiredH = display.h + 1;\n      break;\n    }\n\n    /* Set size */\n    SDL_SetWindowSize(window, desiredW, desiredH);\n    SDLTest_AssertPass(\"Call to SDL_SetWindowSize(...,%d,%d)\", desiredW, desiredH);\n\n    /* Get size */\n    currentW = desiredW + 1;\n    currentH = desiredH + 1;\n    SDL_GetWindowSize(window, &currentW, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowSize()\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentW);\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredH, currentH);\n\n    /* Get just width */\n    currentW = desiredW + 1;\n    SDL_GetWindowSize(window, &currentW, NULL);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowSize(&h=NULL)\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentW);\n\n    /* Get just height */\n    currentH = desiredH + 1;\n    SDL_GetWindowSize(window, NULL, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowSize(&w=NULL)\");\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredH, currentH);\n   }\n  }\n\n  /* Dummy call with both pointers NULL */\n  SDL_GetWindowSize(window, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowSize(&w=NULL,&h=NULL)\");\n\n  /* Negative tests for parameter input */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  for (desiredH = -2; desiredH < 2; desiredH++) {\n    for (desiredW = -2; desiredW < 2; desiredW++) {\n      if (desiredW <= 0 || desiredH <= 0) {\n        SDL_SetWindowSize(window, desiredW, desiredH);\n        SDLTest_AssertPass(\"Call to SDL_SetWindowSize(...,%d,%d)\", desiredW, desiredH);\n        _checkInvalidParameterError();\n      }\n    }\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Set some 'magic' value for later check that nothing was changed */\n  referenceW = SDLTest_RandomSint32();\n  referenceH = SDLTest_RandomSint32();\n  currentW = referenceW;\n  currentH = referenceH;\n  desiredW = SDLTest_RandomSint32();\n  desiredH = SDLTest_RandomSint32();\n\n  /* Negative tests for window input */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_GetWindowSize(NULL, &currentW, &currentH);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowSize(window=NULL)\");\n  SDLTest_AssertCheck(\n    currentW == referenceW && currentH == referenceH,\n    \"Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d\",\n    referenceW, referenceH,\n    currentW, currentH);\n  _checkInvalidWindowError();\n\n  SDL_GetWindowSize(NULL, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowSize(NULL, NULL, NULL)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowSize(NULL, desiredW, desiredH);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowSize(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize\n *\n */\nint\nvideo_getSetWindowMinimumSize(void *arg)\n{\n  const char* title = \"video_getSetWindowMinimumSize Test Window\";\n  SDL_Window* window;\n  int result;\n  SDL_Rect display;\n  int wVariation, hVariation;\n  int referenceW, referenceH;\n  int currentW, currentH;\n  int desiredW, desiredH;\n\n  /* Get display bounds for size range */\n  result = SDL_GetDisplayBounds(0, &display);\n  SDLTest_AssertPass(\"SDL_GetDisplayBounds()\");\n  SDLTest_AssertCheck(result == 0, \"Verify return value; expected: 0, got: %d\", result);\n  if (result != 0) return TEST_ABORTED;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  for (wVariation = 0; wVariation < 5; wVariation++) {\n   for (hVariation = 0; hVariation < 5; hVariation++) {\n    switch(wVariation) {\n     case 0:\n      /* 1 Pixel Wide */\n      desiredW = 1;\n      break;\n     case 1:\n      /* Random width inside screen */\n      desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1);\n      break;\n     case 2:\n      /* Width at screen size */\n      desiredW = display.w;\n      break;\n    }\n\n    switch(hVariation) {\n     case 0:\n      /* 1 Pixel High */\n      desiredH = 1;\n      break;\n     case 1:\n      /* Random height inside screen */\n      desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1);\n      break;\n     case 2:\n      /* Height at screen size */\n      desiredH = display.h;\n      break;\n     case 4:\n      /* Height 1 pixel larger than screen */\n      desiredH = display.h + 1;\n      break;\n    }\n\n    /* Set size */\n    SDL_SetWindowMinimumSize(window, desiredW, desiredH);\n    SDLTest_AssertPass(\"Call to SDL_SetWindowMinimumSize(...,%d,%d)\", desiredW, desiredH);\n\n    /* Get size */\n    currentW = desiredW + 1;\n    currentH = desiredH + 1;\n    SDL_GetWindowMinimumSize(window, &currentW, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize()\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentW);\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredH, currentH);\n\n    /* Get just width */\n    currentW = desiredW + 1;\n    SDL_GetWindowMinimumSize(window, &currentW, NULL);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize(&h=NULL)\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentH);\n\n    /* Get just height */\n    currentH = desiredH + 1;\n    SDL_GetWindowMinimumSize(window, NULL, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize(&w=NULL)\");\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredW, currentH);\n   }\n  }\n\n  /* Dummy call with both pointers NULL */\n  SDL_GetWindowMinimumSize(window, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize(&w=NULL,&h=NULL)\");\n\n  /* Negative tests for parameter input */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  for (desiredH = -2; desiredH < 2; desiredH++) {\n    for (desiredW = -2; desiredW < 2; desiredW++) {\n      if (desiredW <= 0 || desiredH <= 0) {\n        SDL_SetWindowMinimumSize(window, desiredW, desiredH);\n        SDLTest_AssertPass(\"Call to SDL_SetWindowMinimumSize(...,%d,%d)\", desiredW, desiredH);\n        _checkInvalidParameterError();\n      }\n    }\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Set some 'magic' value for later check that nothing was changed */\n  referenceW = SDLTest_RandomSint32();\n  referenceH = SDLTest_RandomSint32();\n  currentW = referenceW;\n  currentH = referenceH;\n  desiredW = SDLTest_RandomSint32();\n  desiredH = SDLTest_RandomSint32();\n\n  /* Negative tests for window input */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_GetWindowMinimumSize(NULL, &currentW, &currentH);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize(window=NULL)\");\n  SDLTest_AssertCheck(\n    currentW == referenceW && currentH == referenceH,\n    \"Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d\",\n    referenceW, referenceH,\n    currentW, currentH);\n  _checkInvalidWindowError();\n\n  SDL_GetWindowMinimumSize(NULL, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMinimumSize(NULL, NULL, NULL)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowMinimumSize(NULL, desiredW, desiredH);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowMinimumSize(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n/**\n * @brief Tests call to SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize\n *\n */\nint\nvideo_getSetWindowMaximumSize(void *arg)\n{\n  const char* title = \"video_getSetWindowMaximumSize Test Window\";\n  SDL_Window* window;\n  int result;\n  SDL_Rect display;\n  int wVariation, hVariation;\n  int referenceW, referenceH;\n  int currentW, currentH;\n  int desiredW, desiredH;\n\n  /* Get display bounds for size range */\n  result = SDL_GetDisplayBounds(0, &display);\n  SDLTest_AssertPass(\"SDL_GetDisplayBounds()\");\n  SDLTest_AssertCheck(result == 0, \"Verify return value; expected: 0, got: %d\", result);\n  if (result != 0) return TEST_ABORTED;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  for (wVariation = 0; wVariation < 3; wVariation++) {\n   for (hVariation = 0; hVariation < 3; hVariation++) {\n    switch(wVariation) {\n     case 0:\n      /* 1 Pixel Wide */\n      desiredW = 1;\n      break;\n     case 1:\n      /* Random width inside screen */\n      desiredW = SDLTest_RandomIntegerInRange(2, display.w - 1);\n      break;\n     case 2:\n      /* Width at screen size */\n      desiredW = display.w;\n      break;\n    }\n\n    switch(hVariation) {\n     case 0:\n      /* 1 Pixel High */\n      desiredH = 1;\n      break;\n     case 1:\n      /* Random height inside screen */\n      desiredH = SDLTest_RandomIntegerInRange(2, display.h - 1);\n      break;\n     case 2:\n      /* Height at screen size */\n      desiredH = display.h;\n      break;\n    }\n\n    /* Set size */\n    SDL_SetWindowMaximumSize(window, desiredW, desiredH);\n    SDLTest_AssertPass(\"Call to SDL_SetWindowMaximumSize(...,%d,%d)\", desiredW, desiredH);\n\n    /* Get size */\n    currentW = desiredW + 1;\n    currentH = desiredH + 1;\n    SDL_GetWindowMaximumSize(window, &currentW, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize()\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentW);\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredH, currentH);\n\n    /* Get just width */\n    currentW = desiredW + 1;\n    SDL_GetWindowMaximumSize(window, &currentW, NULL);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize(&h=NULL)\");\n    SDLTest_AssertCheck(desiredW == currentW, \"Verify returned width; expected: %d, got: %d\", desiredW, currentH);\n\n    /* Get just height */\n    currentH = desiredH + 1;\n    SDL_GetWindowMaximumSize(window, NULL, &currentH);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize(&w=NULL)\");\n    SDLTest_AssertCheck(desiredH == currentH, \"Verify returned height; expected: %d, got: %d\", desiredW, currentH);\n   }\n  }\n\n  /* Dummy call with both pointers NULL */\n  SDL_GetWindowMaximumSize(window, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize(&w=NULL,&h=NULL)\");\n\n  /* Negative tests for parameter input */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  for (desiredH = -2; desiredH < 2; desiredH++) {\n    for (desiredW = -2; desiredW < 2; desiredW++) {\n      if (desiredW <= 0 || desiredH <= 0) {\n        SDL_SetWindowMaximumSize(window, desiredW, desiredH);\n        SDLTest_AssertPass(\"Call to SDL_SetWindowMaximumSize(...,%d,%d)\", desiredW, desiredH);\n        _checkInvalidParameterError();\n      }\n    }\n  }\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  /* Set some 'magic' value for later check that nothing was changed */\n  referenceW = SDLTest_RandomSint32();\n  referenceH = SDLTest_RandomSint32();\n  currentW = referenceW;\n  currentH = referenceH;\n  desiredW = SDLTest_RandomSint32();\n  desiredH = SDLTest_RandomSint32();\n\n  /* Negative tests */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n  SDL_GetWindowMaximumSize(NULL, &currentW, &currentH);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize(window=NULL)\");\n  SDLTest_AssertCheck(\n    currentW == referenceW && currentH == referenceH,\n    \"Verify that content of W and H pointers has not been modified; expected: %d,%d; got: %d,%d\",\n    referenceW, referenceH,\n    currentW, currentH);\n  _checkInvalidWindowError();\n\n  SDL_GetWindowMaximumSize(NULL, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowMaximumSize(NULL, NULL, NULL)\");\n  _checkInvalidWindowError();\n\n  SDL_SetWindowMaximumSize(NULL, desiredW, desiredH);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowMaximumSize(window=NULL)\");\n  _checkInvalidWindowError();\n\n  return TEST_COMPLETED;\n}\n\n\n/**\n * @brief Tests call to SDL_SetWindowData and SDL_GetWindowData\n *\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_SetWindowData\n * @sa http://wiki.libsdl.org/moin.fcg/SDL_GetWindowData\n */\nint\nvideo_getSetWindowData(void *arg)\n{\n  int returnValue = TEST_COMPLETED;\n  const char* title = \"video_setGetWindowData Test Window\";\n  SDL_Window* window;\n  const char *referenceName = \"TestName\";\n  const char *name = \"TestName\";\n  const char *referenceName2 = \"TestName2\";\n  const char *name2 = \"TestName2\";\n  int datasize;\n  char *referenceUserdata = NULL;\n  char *userdata = NULL;\n  char *referenceUserdata2 = NULL;\n  char *userdata2 = NULL;\n  char *result;\n  int iteration;\n\n  /* Call against new test window */\n  window = _createVideoSuiteTestWindow(title);\n  if (window == NULL) return TEST_ABORTED;\n\n  /* Create testdata */\n  datasize = SDLTest_RandomIntegerInRange(1, 32);\n  referenceUserdata =  SDLTest_RandomAsciiStringOfSize(datasize);\n  if (referenceUserdata == NULL) {\n    returnValue = TEST_ABORTED;\n    goto cleanup;\n  }\n  userdata = SDL_strdup(referenceUserdata);\n  if (userdata == NULL) {\n    returnValue = TEST_ABORTED;\n    goto cleanup;\n  }\n  datasize = SDLTest_RandomIntegerInRange(1, 32);\n  referenceUserdata2 =  SDLTest_RandomAsciiStringOfSize(datasize);\n  if (referenceUserdata2 == NULL) {\n    returnValue = TEST_ABORTED;\n    goto cleanup;\n  }\n  userdata2 = (char *)SDL_strdup(referenceUserdata2);\n  if (userdata2 == NULL) {\n    returnValue = TEST_ABORTED;\n    goto cleanup;\n  }\n\n  /* Get non-existent data */\n  result = (char *)SDL_GetWindowData(window, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s)\", name);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n\n  /* Set data */\n  result = (char *)SDL_SetWindowData(window, name, userdata);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,%s)\", name, userdata);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n\n  /* Get data (twice) */\n  for (iteration = 1; iteration <= 2; iteration++) {\n    result = (char *)SDL_GetWindowData(window, name);\n    SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s) [iteration %d]\", name, iteration);\n    SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata, result);\n    SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  }\n\n  /* Set data again twice */\n  for (iteration = 1; iteration <= 2; iteration++) {\n    result = (char *)SDL_SetWindowData(window, name, userdata);\n    SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,%s) [iteration %d]\", name, userdata, iteration);\n    SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata, result);\n    SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n    SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n  }\n\n  /* Get data again */\n  result = (char *)SDL_GetWindowData(window, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s) [again]\", name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n\n  /* Set data with new data */\n  result = (char *)SDL_SetWindowData(window, name, userdata2);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,%s) [new userdata]\", name, userdata2);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, \"Validate that userdata2 was not changed, expected: %s, got: %s\", referenceUserdata2, userdata2);\n\n  /* Set data with new data again */\n  result = (char *)SDL_SetWindowData(window, name, userdata2);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,%s) [new userdata again]\", name, userdata2);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata2, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, \"Validate that userdata2 was not changed, expected: %s, got: %s\", referenceUserdata2, userdata2);\n\n  /* Get new data */\n  result = (char *)SDL_GetWindowData(window, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s)\", name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata2, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n\n  /* Set data with NULL to clear */\n  result = (char *)SDL_SetWindowData(window, name, NULL);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,NULL)\", name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata2, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, \"Validate that userdata2 was not changed, expected: %s, got: %s\", referenceUserdata2, userdata2);\n\n  /* Set data with NULL to clear again */\n  result = (char *)SDL_SetWindowData(window, name, NULL);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,NULL) [again]\", name);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata2, userdata2) == 0, \"Validate that userdata2 was not changed, expected: %s, got: %s\", referenceUserdata2, userdata2);\n\n  /* Get non-existent data */\n  result = (char *)SDL_GetWindowData(window, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s)\", name);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n\n  /* Get non-existent data new name */\n  result = (char *)SDL_GetWindowData(window, name2);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s)\", name2);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName2, name2) == 0, \"Validate that name2 was not changed, expected: %s, got: %s\", referenceName2, name2);\n\n  /* Set data (again) */\n  result = (char *)SDL_SetWindowData(window, name, userdata);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(...%s,%s) [again, after clear]\", name, userdata);\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, userdata) == 0, \"Validate that userdata was not changed, expected: %s, got: %s\", referenceUserdata, userdata);\n\n  /* Get data (again) */\n  result = (char *)SDL_GetWindowData(window, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(..,%s) [again, after clear]\", name);\n  SDLTest_AssertCheck(SDL_strcmp(referenceUserdata, result) == 0, \"Validate that correct result was returned; expected: %s, got: %s\", referenceUserdata, result);\n  SDLTest_AssertCheck(SDL_strcmp(referenceName, name) == 0, \"Validate that name was not changed, expected: %s, got: %s\", referenceName, name);\n\n  /* Negative test */\n  SDL_ClearError();\n  SDLTest_AssertPass(\"Call to SDL_ClearError()\");\n\n  /* Set with invalid window */\n  result = (char *)SDL_SetWindowData(NULL, name, userdata);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(window=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidWindowError();\n\n  /* Set data with NULL name, valid userdata */\n  result = (char *)SDL_SetWindowData(window, NULL, userdata);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(name=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Set data with empty name, valid userdata */\n  result = (char *)SDL_SetWindowData(window, \"\", userdata);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(name='')\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Set data with NULL name, NULL userdata */\n  result = (char *)SDL_SetWindowData(window, NULL, NULL);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(name=NULL,userdata=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Set data with empty name, NULL userdata */\n  result = (char *)SDL_SetWindowData(window, \"\", NULL);\n  SDLTest_AssertPass(\"Call to SDL_SetWindowData(name='',userdata=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Get with invalid window */\n  result = (char *)SDL_GetWindowData(NULL, name);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(window=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidWindowError();\n\n  /* Get data with NULL name */\n  result = (char *)SDL_GetWindowData(window, NULL);\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(name=NULL)\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Get data with empty name */\n  result = (char *)SDL_GetWindowData(window, \"\");\n  SDLTest_AssertPass(\"Call to SDL_GetWindowData(name='')\");\n  SDLTest_AssertCheck(result == NULL, \"Validate that result is NULL\");\n  _checkInvalidParameterError();\n\n  /* Clean up */\n  _destroyVideoSuiteTestWindow(window);\n\n  cleanup:\n  SDL_free(referenceUserdata);\n  SDL_free(referenceUserdata2);\n  SDL_free(userdata);\n  SDL_free(userdata2);\n\n  return returnValue;\n}\n\n\n/* ================= Test References ================== */\n\n/* Video test cases */\nstatic const SDLTest_TestCaseReference videoTest1 =\n        { (SDLTest_TestCaseFp)video_enableDisableScreensaver, \"video_enableDisableScreensaver\",  \"Enable and disable screenaver while checking state\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest2 =\n        { (SDLTest_TestCaseFp)video_createWindowVariousPositions, \"video_createWindowVariousPositions\",  \"Create windows at various locations\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest3 =\n        { (SDLTest_TestCaseFp)video_createWindowVariousSizes, \"video_createWindowVariousSizes\",  \"Create windows with various sizes\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest4 =\n        { (SDLTest_TestCaseFp)video_createWindowVariousFlags, \"video_createWindowVariousFlags\",  \"Create windows using various flags\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest5 =\n        { (SDLTest_TestCaseFp)video_getWindowFlags, \"video_getWindowFlags\",  \"Get window flags set during SDL_CreateWindow\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest6 =\n        { (SDLTest_TestCaseFp)video_getNumDisplayModes, \"video_getNumDisplayModes\",  \"Use SDL_GetNumDisplayModes function to get number of display modes\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest7 =\n        { (SDLTest_TestCaseFp)video_getNumDisplayModesNegative, \"video_getNumDisplayModesNegative\",  \"Negative tests for SDL_GetNumDisplayModes\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest8 =\n        { (SDLTest_TestCaseFp)video_getClosestDisplayModeCurrentResolution, \"video_getClosestDisplayModeCurrentResolution\",  \"Use function to get closes match to requested display mode for current resolution\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest9 =\n        { (SDLTest_TestCaseFp)video_getClosestDisplayModeRandomResolution, \"video_getClosestDisplayModeRandomResolution\",  \"Use function to get closes match to requested display mode for random resolution\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest10 =\n        { (SDLTest_TestCaseFp)video_getWindowBrightness, \"video_getWindowBrightness\",  \"Get window brightness\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest11 =\n        { (SDLTest_TestCaseFp)video_getWindowBrightnessNegative, \"video_getWindowBrightnessNegative\",  \"Get window brightness with invalid input\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest12 =\n        { (SDLTest_TestCaseFp)video_getWindowDisplayMode, \"video_getWindowDisplayMode\",  \"Get window display mode\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest13 =\n        { (SDLTest_TestCaseFp)video_getWindowDisplayModeNegative, \"video_getWindowDisplayModeNegative\",  \"Get window display mode with invalid input\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest14 =\n        { (SDLTest_TestCaseFp)video_getWindowGammaRamp, \"video_getWindowGammaRamp\",  \"Get window gamma ramp\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest15 =\n        { (SDLTest_TestCaseFp)video_getWindowGammaRampNegative, \"video_getWindowGammaRampNegative\",  \"Get window gamma ramp against invalid input\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest16 =\n        { (SDLTest_TestCaseFp)video_getSetWindowGrab, \"video_getSetWindowGrab\",  \"Checks SDL_GetWindowGrab and SDL_SetWindowGrab positive and negative cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest17 =\n        { (SDLTest_TestCaseFp)video_getWindowId, \"video_getWindowId\",  \"Checks SDL_GetWindowID and SDL_GetWindowFromID\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest18 =\n        { (SDLTest_TestCaseFp)video_getWindowPixelFormat, \"video_getWindowPixelFormat\",  \"Checks SDL_GetWindowPixelFormat\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest19 =\n        { (SDLTest_TestCaseFp)video_getSetWindowPosition, \"video_getSetWindowPosition\",  \"Checks SDL_GetWindowPosition and SDL_SetWindowPosition positive and negative cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest20 =\n        { (SDLTest_TestCaseFp)video_getSetWindowSize, \"video_getSetWindowSize\",  \"Checks SDL_GetWindowSize and SDL_SetWindowSize positive and negative cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest21 =\n        { (SDLTest_TestCaseFp)video_getSetWindowMinimumSize, \"video_getSetWindowMinimumSize\",  \"Checks SDL_GetWindowMinimumSize and SDL_SetWindowMinimumSize positive and negative cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest22 =\n        { (SDLTest_TestCaseFp)video_getSetWindowMaximumSize, \"video_getSetWindowMaximumSize\",  \"Checks SDL_GetWindowMaximumSize and SDL_SetWindowMaximumSize positive and negative cases\", TEST_ENABLED };\n\nstatic const SDLTest_TestCaseReference videoTest23 =\n        { (SDLTest_TestCaseFp)video_getSetWindowData, \"video_getSetWindowData\",  \"Checks SDL_SetWindowData and SDL_GetWindowData positive and negative cases\", TEST_ENABLED };\n\n/* Sequence of Video test cases */\nstatic const SDLTest_TestCaseReference *videoTests[] =  {\n    &videoTest1, &videoTest2, &videoTest3, &videoTest4, &videoTest5, &videoTest6,\n    &videoTest7, &videoTest8, &videoTest9, &videoTest10, &videoTest11, &videoTest12,\n    &videoTest13, &videoTest14, &videoTest15, &videoTest16, &videoTest17,\n    &videoTest18, &videoTest19, &videoTest20, &videoTest21, &videoTest22,\n    &videoTest23, NULL\n};\n\n/* Video test suite (global) */\nSDLTest_TestSuiteReference videoTestSuite = {\n    \"Video\",\n    NULL,\n    videoTests,\n    NULL\n};\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testbounds.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"SDL.h\"\n\nint main(int argc, char **argv)\n{\n    int total, i;\n\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_Log(\"SDL_Init(SDL_INIT_VIDEO) failed: %s\", SDL_GetError());\n        return 1;\n    }\n\n    total = SDL_GetNumVideoDisplays();\n    for (i = 0; i < total; i++) {\n        SDL_Rect bounds = { -1,-1,-1,-1 }, usable = { -1,-1,-1,-1 };\n        SDL_GetDisplayBounds(i, &bounds);\n        SDL_GetDisplayUsableBounds(i, &usable);\n        SDL_Log(\"Display #%d ('%s'): bounds={(%d,%d),%dx%d}, usable={(%d,%d),%dx%d}\",\n                i, SDL_GetDisplayName(i),\n                bounds.x, bounds.y, bounds.w, bounds.h,\n                usable.x, usable.y, usable.w, usable.h);\n    }\n\n    SDL_Quit();\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testcustomcursor.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n/* Stolen from the mailing list */\n/* Creates a new mouse cursor from an XPM */\n\n\n/* XPM */\nstatic const char *arrow[] = {\n  /* width height num_colors chars_per_pixel */\n  \"    32    32        3            1\",\n  /* colors */\n  \"X c #000000\",\n  \". c #ffffff\",\n  \"  c None\",\n  /* pixels */\n  \"X                               \",\n  \"XX                              \",\n  \"X.X                             \",\n  \"X..X                            \",\n  \"X...X                           \",\n  \"X....X                          \",\n  \"X.....X                         \",\n  \"X......X                        \",\n  \"X.......X                       \",\n  \"X........X                      \",\n  \"X.....XXXXX                     \",\n  \"X..X..X                         \",\n  \"X.X X..X                        \",\n  \"XX  X..X                        \",\n  \"X    X..X                       \",\n  \"     X..X                       \",\n  \"      X..X                      \",\n  \"      X..X                      \",\n  \"       XX                       \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"                                \",\n  \"0,0\"\n};  \n\nstatic SDL_Cursor*\ninit_color_cursor(const char *file)\n{\n    SDL_Cursor *cursor = NULL;\n    SDL_Surface *surface = SDL_LoadBMP(file);\n    if (surface) {\n        if (surface->format->palette) {\n            SDL_SetColorKey(surface, 1, *(Uint8 *) surface->pixels);\n        } else {\n            switch (surface->format->BitsPerPixel) {\n            case 15:\n                SDL_SetColorKey(surface, 1, (*(Uint16 *)surface->pixels) & 0x00007FFF);\n                break;\n            case 16:\n                SDL_SetColorKey(surface, 1, *(Uint16 *)surface->pixels);\n                break;\n            case 24:\n                SDL_SetColorKey(surface, 1, (*(Uint32 *)surface->pixels) & 0x00FFFFFF);\n                break;\n            case 32:\n                SDL_SetColorKey(surface, 1, *(Uint32 *)surface->pixels);\n                break;\n            }\n        }\n        cursor = SDL_CreateColorCursor(surface, 0, 0);\n        SDL_FreeSurface(surface);\n    }\n    return cursor;\n}\n\nstatic SDL_Cursor*\ninit_system_cursor(const char *image[])\n{\n  int i, row, col;\n  Uint8 data[4*32];\n  Uint8 mask[4*32];\n  int hot_x, hot_y;\n\n  i = -1;\n  for (row=0; row<32; ++row) {\n    for (col=0; col<32; ++col) {\n      if (col % 8) {\n        data[i] <<= 1;\n        mask[i] <<= 1;\n      } else {\n        ++i;\n        data[i] = mask[i] = 0;\n      }\n      switch (image[4+row][col]) {\n        case 'X':\n          data[i] |= 0x01;\n          mask[i] |= 0x01;\n          break;\n        case '.':\n          mask[i] |= 0x01;\n          break;\n        case ' ':\n          break;\n      }\n    }\n  }\n  sscanf(image[4+row], \"%d,%d\", &hot_x, &hot_y);\n  return SDL_CreateCursor(data, mask, 32, 32, hot_x, hot_y);\n}\n\nstatic SDLTest_CommonState *state;\nint done;\nstatic SDL_Cursor *cursors[1+SDL_NUM_SYSTEM_CURSORS];\nstatic int current_cursor;\nstatic int show_cursor;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n        if (event.type == SDL_MOUSEBUTTONDOWN) {\n            if (event.button.button == SDL_BUTTON_LEFT) {\n                ++current_cursor;\n                if (current_cursor == SDL_arraysize(cursors)) {\n                    current_cursor = 0;\n                }\n                SDL_SetCursor(cursors[current_cursor]);\n            } else {\n                show_cursor = !show_cursor;\n                SDL_ShowCursor(show_cursor);\n            }\n        }\n    }\n    \n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_RenderClear(renderer);\n        SDL_RenderPresent(renderer);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    const char *color_cursor = NULL;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            color_cursor = argv[i];\n            break;\n        }\n        if (consumed < 0) {\n            SDLTest_CommonLogUsage(state, argv[0], NULL);\n            quit(1);\n        }\n        i += consumed;\n    }\n\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    if (color_cursor) {\n        cursors[0] = init_color_cursor(color_cursor);\n    } else {\n        cursors[0] = init_system_cursor(arrow);\n    }\n    if (!cursors[0]) {\n        SDL_Log(\"Error, couldn't create cursor\\n\");\n        quit(2);\n    }\n    for (i = 0; i < SDL_NUM_SYSTEM_CURSORS; ++i) {\n        cursors[1+i] = SDL_CreateSystemCursor((SDL_SystemCursor)i);\n        if (!cursors[1+i]) {\n            SDL_Log(\"Error, couldn't create system cursor %d\\n\", i);\n            quit(2);\n        }\n    }\n    SDL_SetCursor(cursors[0]);\n\n    /* Main render loop */\n    done = 0;\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n\n    for (i = 0; i < SDL_arraysize(cursors); ++i) {\n        SDL_FreeCursor(cursors[i]);\n    }\n    quit(0);\n\n    /* keep the compiler happy ... */\n    return(0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testdisplayinfo.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Program to test querying of display info */\n\n#include \"SDL.h\"\n\n#include <stdio.h>\n#include <stdlib.h>\n\nstatic void\nprint_mode(const char *prefix, const SDL_DisplayMode *mode)\n{\n    if (!mode)\n        return;\n\n    SDL_Log(\"%s: fmt=%s w=%d h=%d refresh=%d\\n\",\n            prefix, SDL_GetPixelFormatName(mode->format),\n            mode->w, mode->h, mode->refresh_rate);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_DisplayMode mode;\n    int num_displays, dpy;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n    SDL_Log(\"Using video target '%s'.\\n\", SDL_GetCurrentVideoDriver());\n    num_displays = SDL_GetNumVideoDisplays();\n\n    SDL_Log(\"See %d displays.\\n\", num_displays);\n\n    for (dpy = 0; dpy < num_displays; dpy++) {\n        const int num_modes = SDL_GetNumDisplayModes(dpy);\n        SDL_Rect rect = { 0, 0, 0, 0 };\n        float ddpi, hdpi, vdpi;\n        int m;\n\n        SDL_GetDisplayBounds(dpy, &rect);\n        SDL_Log(\"%d: \\\"%s\\\" (%dx%d, (%d, %d)), %d modes.\\n\", dpy, SDL_GetDisplayName(dpy), rect.w, rect.h, rect.x, rect.y, num_modes);\n\n        if (SDL_GetDisplayDPI(dpy, &ddpi, &hdpi, &vdpi) == -1) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"    DPI: failed to query (%s)\\n\", SDL_GetError());\n        } else {\n            SDL_Log(\"    DPI: ddpi=%f; hdpi=%f; vdpi=%f\\n\", ddpi, hdpi, vdpi);\n        }\n\n        if (SDL_GetCurrentDisplayMode(dpy, &mode) == -1) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"    CURRENT: failed to query (%s)\\n\", SDL_GetError());\n        } else {\n            print_mode(\"CURRENT\", &mode);\n        }\n\n        if (SDL_GetDesktopDisplayMode(dpy, &mode) == -1) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"    DESKTOP: failed to query (%s)\\n\", SDL_GetError());\n        } else {\n            print_mode(\"DESKTOP\", &mode);\n        }\n\n        for (m = 0; m < num_modes; m++) {\n            if (SDL_GetDisplayMode(dpy, m, &mode) == -1) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"    MODE %d: failed to query (%s)\\n\", m, SDL_GetError());\n            } else {\n                char prefix[64];\n                SDL_snprintf(prefix, sizeof (prefix), \"    MODE %d\", m);\n                print_mode(prefix, &mode);\n            }\n        }\n\n        SDL_Log(\"\\n\");\n    }\n\n    SDL_Quit();\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testdraw2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program:  draw as many random objects on the screen as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n#define NUM_OBJECTS 100\n\nstatic SDLTest_CommonState *state;\nstatic int num_objects;\nstatic SDL_bool cycle_color;\nstatic SDL_bool cycle_alpha;\nstatic int cycle_direction = 1;\nstatic int current_alpha = 255;\nstatic int current_color = 255;\nstatic SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;\n\nint done;\n\nvoid\nDrawPoints(SDL_Renderer * renderer)\n{\n    int i;\n    int x, y;\n    SDL_Rect viewport;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    for (i = 0; i < num_objects * 4; ++i) {\n        /* Cycle the color and alpha, if desired */\n        if (cycle_color) {\n            current_color += cycle_direction;\n            if (current_color < 0) {\n                current_color = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_color > 255) {\n                current_color = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        if (cycle_alpha) {\n            current_alpha += cycle_direction;\n            if (current_alpha < 0) {\n                current_alpha = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_alpha > 255) {\n                current_alpha = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color,\n                               (Uint8) current_color, (Uint8) current_alpha);\n\n        x = rand() % viewport.w;\n        y = rand() % viewport.h;\n        SDL_RenderDrawPoint(renderer, x, y);\n    }\n}\n\nvoid\nDrawLines(SDL_Renderer * renderer)\n{\n    int i;\n    int x1, y1, x2, y2;\n    SDL_Rect viewport;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    for (i = 0; i < num_objects; ++i) {\n        /* Cycle the color and alpha, if desired */\n        if (cycle_color) {\n            current_color += cycle_direction;\n            if (current_color < 0) {\n                current_color = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_color > 255) {\n                current_color = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        if (cycle_alpha) {\n            current_alpha += cycle_direction;\n            if (current_alpha < 0) {\n                current_alpha = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_alpha > 255) {\n                current_alpha = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color,\n                               (Uint8) current_color, (Uint8) current_alpha);\n\n        if (i == 0) {\n            SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);\n            SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0);\n            SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2);\n            SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1);\n        } else {\n            x1 = (rand() % (viewport.w*2)) - viewport.w;\n            x2 = (rand() % (viewport.w*2)) - viewport.w;\n            y1 = (rand() % (viewport.h*2)) - viewport.h;\n            y2 = (rand() % (viewport.h*2)) - viewport.h;\n            SDL_RenderDrawLine(renderer, x1, y1, x2, y2);\n        }\n    }\n}\n\nvoid\nDrawRects(SDL_Renderer * renderer)\n{\n    int i;\n    SDL_Rect rect;\n    SDL_Rect viewport;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    for (i = 0; i < num_objects / 4; ++i) {\n        /* Cycle the color and alpha, if desired */\n        if (cycle_color) {\n            current_color += cycle_direction;\n            if (current_color < 0) {\n                current_color = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_color > 255) {\n                current_color = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        if (cycle_alpha) {\n            current_alpha += cycle_direction;\n            if (current_alpha < 0) {\n                current_alpha = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_alpha > 255) {\n                current_alpha = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color,\n                               (Uint8) current_color, (Uint8) current_alpha);\n\n        rect.w = rand() % (viewport.h / 2);\n        rect.h = rand() % (viewport.h / 2);\n        rect.x = (rand() % (viewport.w*2) - viewport.w) - (rect.w / 2);\n        rect.y = (rand() % (viewport.h*2) - viewport.h) - (rect.h / 2);\n        SDL_RenderFillRect(renderer, &rect);\n    }\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        if (state->windows[i] == NULL)\n            continue;\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n\n        DrawRects(renderer);\n        DrawLines(renderer);\n        DrawPoints(renderer);\n\n        SDL_RenderPresent(renderer);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    Uint32 then, now, frames;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize parameters */\n    num_objects = NUM_OBJECTS;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--blend\") == 0) {\n                if (argv[i + 1]) {\n                    if (SDL_strcasecmp(argv[i + 1], \"none\") == 0) {\n                        blendMode = SDL_BLENDMODE_NONE;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"blend\") == 0) {\n                        blendMode = SDL_BLENDMODE_BLEND;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"add\") == 0) {\n                        blendMode = SDL_BLENDMODE_ADD;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"mod\") == 0) {\n                        blendMode = SDL_BLENDMODE_MOD;\n                        consumed = 2;\n                    }\n                }\n            } else if (SDL_strcasecmp(argv[i], \"--cyclecolor\") == 0) {\n                cycle_color = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--cyclealpha\") == 0) {\n                cycle_alpha = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_isdigit(*argv[i])) {\n                num_objects = SDL_atoi(argv[i]);\n                consumed = 1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--blend none|blend|add|mod]\", \"[--cyclecolor]\", \"[--cyclealpha]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            return 1;\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        return 2;\n    }\n\n    /* Create the windows and initialize the renderers */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawBlendMode(renderer, blendMode);\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    srand((unsigned int)time(NULL));\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n        }\n#endif\n\n\n    SDLTest_CommonQuit(state);\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testdrawchessboard.c",
    "content": "/*\n   Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n   This software is provided 'as-is', without any express or implied\n   warranty.  In no event will the authors be held liable for any damages\n   arising from the use of this software.\n\n   Permission is granted to anyone to use this software for any purpose,\n   including commercial applications, and to alter it and redistribute it\n   freely.\n\n   This file is created by : Nitin Jain (nitin.j4@samsung.com)\n*/\n\n/* Sample program:  Draw a Chess Board  by using SDL_CreateSoftwareRenderer API */\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\nSDL_Window *window;\nSDL_Renderer *renderer;\nSDL_Surface *surface;\nint done;\n\nvoid\nDrawChessBoard(SDL_Renderer * renderer)\n{\n    int row = 0,column = 0,x = 0;\n    SDL_Rect rect, darea;\n\n    /* Get the Size of drawing surface */\n    SDL_RenderGetViewport(renderer, &darea);\n\n    for( ; row < 8; row++)\n    {\n        column = row%2;\n        x = column;\n        for( ; column < 4+(row%2); column++)\n        {\n            SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF);\n\n            rect.w = darea.w/8;\n            rect.h = darea.h/8;\n            rect.x = x * rect.w;\n            rect.y = row * rect.h;\n            x = x + 2;\n            SDL_RenderFillRect(renderer, &rect);\n        }\n    }\n}\n\nvoid\nloop()\n{\n    SDL_Event e;\n    while (SDL_PollEvent(&e)) {\n       \n       /* Re-create when window has been resized */\n       if ((e.type == SDL_WINDOWEVENT) && (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)) {\n\n          SDL_DestroyRenderer(renderer);\n\n          surface = SDL_GetWindowSurface(window);\n          renderer = SDL_CreateSoftwareRenderer(surface);\n          /* Clear the rendering surface with the specified color */\n          SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);\n          SDL_RenderClear(renderer);\n       }\n\n       if (e.type == SDL_QUIT) {\n            done = 1;\n#ifdef __EMSCRIPTEN__\n            emscripten_cancel_main_loop();\n#endif\n            return;\n        }\n\n        if ((e.type == SDL_KEYDOWN) && (e.key.keysym.sym == SDLK_ESCAPE)) {\n            done = 1;\n#ifdef __EMSCRIPTEN__\n            emscripten_cancel_main_loop();\n#endif\n            return;\n        }\n    }\n\n    DrawChessBoard(renderer);\n\n    /* Got everything on rendering surface,\n       now Update the drawing image on window screen */\n    SDL_UpdateWindowSurface(window);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL */\n    if(SDL_Init(SDL_INIT_VIDEO) != 0)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_Init fail : %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n\n    /* Create window and renderer for given surface */\n    window = SDL_CreateWindow(\"Chess Board\", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_RESIZABLE);\n    if(!window)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Window creation fail : %s\\n\",SDL_GetError());\n        return 1;\n    }\n    surface = SDL_GetWindowSurface(window);\n    renderer = SDL_CreateSoftwareRenderer(surface);\n    if(!renderer)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Render creation for surface fail : %s\\n\",SDL_GetError());\n        return 1;\n    }\n\n    /* Clear the rendering surface with the specified color */\n    SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);\n    SDL_RenderClear(renderer);\n\n\n    /* Draw the Image on rendering surface */\n    done = 0;\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n\n    SDL_Quit();\n    return 0;\n}\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testdropfile.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"SDL_test_common.h\"\n\nstatic SDLTest_CommonState *state;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i, done;\n    SDL_Event event;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        /* needed voodoo to allow app to launch via OS X Finder */\n        if (SDL_strncmp(argv[i], \"-psn\", 4)==0) {\n            consumed = 1;\n        }\n        if (consumed == 0) {\n            consumed = -1;\n        }\n        if (consumed < 0) {\n            SDLTest_CommonLogUsage(state, argv[0], NULL);\n            quit(1);\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n        SDL_RenderPresent(renderer);\n    }\n\n    SDL_EventState(SDL_DROPFILE, SDL_ENABLE);\n\n    /* Main render loop */\n    done = 0;\n    while (!done) {\n        /* Check for events */\n        while (SDL_PollEvent(&event)) {\n            if (event.type == SDL_DROPBEGIN) {\n                SDL_Log(\"Drop beginning on window %u\", (unsigned int) event.drop.windowID);\n            } else if (event.type == SDL_DROPCOMPLETE) {\n                SDL_Log(\"Drop complete on window %u\", (unsigned int) event.drop.windowID);\n            } else if ((event.type == SDL_DROPFILE) || (event.type == SDL_DROPTEXT)) {\n                const char *typestr = (event.type == SDL_DROPFILE) ? \"File\" : \"Text\";\n                char *dropped_filedir = event.drop.file;\n                SDL_Log(\"%s dropped on window %u: %s\", typestr, (unsigned int) event.drop.windowID, dropped_filedir);\n                /* Normally you'd have to do this, but this is freed in SDLTest_CommonEvent() */\n                /*SDL_free(dropped_filedir);*/\n            }\n\n            SDLTest_CommonEvent(state, &event, &done);\n        }\n    }\n\n    quit(0);\n    /* keep the compiler happy ... */\n    return(0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testerror.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL threading code and error handling */\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"SDL.h\"\n\nstatic int alive = 0;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nint SDLCALL\nThreadFunc(void *data)\n{\n    /* Set the child thread error string */\n    SDL_SetError(\"Thread %s (%lu) had a problem: %s\",\n                 (char *) data, SDL_ThreadID(), \"nevermind\");\n    while (alive) {\n        SDL_Log(\"Thread '%s' is alive!\\n\", (char *) data);\n        SDL_Delay(1 * 1000);\n    }\n    SDL_Log(\"Child thread error string: %s\\n\", SDL_GetError());\n    return (0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Thread *thread;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    /* Set the error value for the main thread */\n    SDL_SetError(\"No worries\");\n\n    alive = 1;\n    thread = SDL_CreateThread(ThreadFunc, NULL, \"#1\");\n    if (thread == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create thread: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n    SDL_Delay(5 * 1000);\n    SDL_Log(\"Waiting for thread #1\\n\");\n    alive = 0;\n    SDL_WaitThread(thread, NULL);\n\n    SDL_Log(\"Main thread error string: %s\\n\", SDL_GetError());\n\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testfile.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* sanity tests on SDL_rwops.c (usefull for alternative implementations of stdio rwops) */\n\n/* quiet windows compiler warnings */\n#define _CRT_NONSTDC_NO_WARNINGS\n\n#include <stdlib.h>\n\n#ifndef _MSC_VER\n#include <unistd.h>\n#endif\n\n#include \"SDL.h\"\n\n\n#include <stdio.h>\n\n/* WARNING ! those 2 files will be destroyed by this test program */\n\n#ifdef __IPHONEOS__\n#define FBASENAME1  \"../Documents/sdldata1\" /* this file will be created during tests */\n#define FBASENAME2  \"../Documents/sdldata2\"     /* this file should not exist before starting test */\n#else\n#define FBASENAME1  \"sdldata1\"      /* this file will be created during tests */\n#define FBASENAME2  \"sdldata2\"      /* this file should not exist before starting test */\n#endif\n\n#ifndef NULL\n#define NULL ((void *)0)\n#endif\n\nstatic void\ncleanup(void)\n{\n    unlink(FBASENAME1);\n    unlink(FBASENAME2);\n}\n\nstatic void\nrwops_error_quit(unsigned line, SDL_RWops * rwops)\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"testfile.c(%d): failed\\n\", line);\n    if (rwops) {\n        rwops->close(rwops);    /* This calls SDL_FreeRW(rwops); */\n    }\n    cleanup();\n    exit(1);                    /* quit with rwops error (test failed) */\n}\n\n#define RWOP_ERR_QUIT(x)    rwops_error_quit( __LINE__, (x) )\n\n\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_RWops *rwops = NULL;\n    char test_buf[30];\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    cleanup();\n\n/* test 1 : basic argument test: all those calls to SDL_RWFromFile should fail */\n\n    rwops = SDL_RWFromFile(NULL, NULL);\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(NULL, \"ab+\");\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(NULL, \"sldfkjsldkfj\");\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(\"something\", \"\");\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(\"something\", NULL);\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    SDL_Log(\"test1 OK\\n\");\n\n/* test 2 : check that inexistent file is not successfully opened/created when required */\n/* modes : r, r+ imply that file MUST exist\n   modes : a, a+, w, w+ checks that it succeeds (file may not exists)\n\n */\n    rwops = SDL_RWFromFile(FBASENAME2, \"rb\");   /* this file doesn't exist that call must fail */\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(FBASENAME2, \"rb+\");  /* this file doesn't exist that call must fail */\n    if (rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops = SDL_RWFromFile(FBASENAME2, \"wb\");\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    unlink(FBASENAME2);\n    rwops = SDL_RWFromFile(FBASENAME2, \"wb+\");\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    unlink(FBASENAME2);\n    rwops = SDL_RWFromFile(FBASENAME2, \"ab\");\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    unlink(FBASENAME2);\n    rwops = SDL_RWFromFile(FBASENAME2, \"ab+\");\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    unlink(FBASENAME2);\n    SDL_Log(\"test2 OK\\n\");\n\n/* test 3 : creation, writing , reading, seeking,\n            test : w mode, r mode, w+ mode\n */\n    rwops = SDL_RWFromFile(FBASENAME1, \"wb\");   /* write only */\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->write(rwops, \"1234567890\", 10, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (10 != rwops->write(rwops, \"1234567890\", 1, 10))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->write(rwops, \"1234567\", 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);   /* we are in write only mode */\n    rwops->close(rwops);\n\n    rwops = SDL_RWFromFile(FBASENAME1, \"rb\");   /* read mode, file must exists */\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (20 != rwops->seek(rwops, -7, RW_SEEK_END))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->read(rwops, test_buf, 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"1234567\", 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 10, 100))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR))\n        RWOP_ERR_QUIT(rwops);\n    if (2 != rwops->read(rwops, test_buf, 10, 3))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"12345678901234567890\", 20))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->write(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);   /* readonly mode */\n    rwops->close(rwops);\n\n/* test 3: same with w+ mode */\n    rwops = SDL_RWFromFile(FBASENAME1, \"wb+\");  /* write + read + truncation */\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->write(rwops, \"1234567890\", 10, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (10 != rwops->write(rwops, \"1234567890\", 1, 10))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->write(rwops, \"1234567\", 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);   /* we are in read/write mode */\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (20 != rwops->seek(rwops, -7, RW_SEEK_END))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->read(rwops, test_buf, 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"1234567\", 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 10, 100))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR))\n        RWOP_ERR_QUIT(rwops);\n    if (2 != rwops->read(rwops, test_buf, 10, 3))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"12345678901234567890\", 20))\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    SDL_Log(\"test3 OK\\n\");\n\n/* test 4: same in r+ mode */\n    rwops = SDL_RWFromFile(FBASENAME1, \"rb+\");  /* write + read + file must exists, no truncation */\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->write(rwops, \"1234567890\", 10, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (10 != rwops->write(rwops, \"1234567890\", 1, 10))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->write(rwops, \"1234567\", 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);   /* we are in read/write mode */\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (20 != rwops->seek(rwops, -7, RW_SEEK_END))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->read(rwops, test_buf, 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"1234567\", 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 10, 100))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR))\n        RWOP_ERR_QUIT(rwops);\n    if (2 != rwops->read(rwops, test_buf, 10, 3))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"12345678901234567890\", 20))\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    SDL_Log(\"test4 OK\\n\");\n\n/* test5 : append mode */\n    rwops = SDL_RWFromFile(FBASENAME1, \"ab+\");  /* write + read + append */\n    if (!rwops)\n        RWOP_ERR_QUIT(rwops);\n    if (1 != rwops->write(rwops, \"1234567890\", 10, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (10 != rwops->write(rwops, \"1234567890\", 1, 10))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->write(rwops, \"1234567\", 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n\n    if (1 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n\n    if (20 + 27 != rwops->seek(rwops, -7, RW_SEEK_END))\n        RWOP_ERR_QUIT(rwops);\n    if (7 != rwops->read(rwops, test_buf, 1, 7))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"1234567\", 7))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 1, 1))\n        RWOP_ERR_QUIT(rwops);\n    if (0 != rwops->read(rwops, test_buf, 10, 100))\n        RWOP_ERR_QUIT(rwops);\n\n    if (27 != rwops->seek(rwops, -27, RW_SEEK_CUR))\n        RWOP_ERR_QUIT(rwops);\n\n    if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET))\n        RWOP_ERR_QUIT(rwops);\n    if (3 != rwops->read(rwops, test_buf, 10, 3))\n        RWOP_ERR_QUIT(rwops);\n    if (SDL_memcmp(test_buf, \"123456789012345678901234567123\", 30))\n        RWOP_ERR_QUIT(rwops);\n    rwops->close(rwops);\n    SDL_Log(\"test5 OK\\n\");\n    cleanup();\n    return 0;                   /* all ok */\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testfilesystem.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple test of filesystem functions. */\n\n#include <stdio.h>\n#include \"SDL.h\"\n\nint\nmain(int argc, char *argv[])\n{\n    char *base_path;\n    char *pref_path;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(0) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_Init() failed: %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n    base_path = SDL_GetBasePath();\n    if(base_path == NULL){\n      SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't find base path: %s\\n\",\n                   SDL_GetError());\n      return 1;\n    }\n    SDL_Log(\"base path: '%s'\\n\", base_path);\n    SDL_free(base_path);\n\n    pref_path = SDL_GetPrefPath(\"libsdl\", \"testfilesystem\");\n    if(pref_path == NULL){\n      SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't find pref path: %s\\n\",\n                   SDL_GetError());\n      return 1;\n    }\n    SDL_Log(\"pref path: '%s'\\n\", pref_path); \n    SDL_free(pref_path);\n\n    pref_path = SDL_GetPrefPath(NULL, \"testfilesystem\");\n    if(pref_path == NULL){\n      SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't find pref path without organization: %s\\n\",\n                   SDL_GetError());\n      return 1;\n    }\n    SDL_Log(\"pref path: '%s'\\n\", pref_path); \n    SDL_free(pref_path);\n\n    SDL_Quit();\n    return 0;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testgamecontroller.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program to test the SDL game controller routines */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#ifndef SDL_JOYSTICK_DISABLED\n\n#ifdef __IPHONEOS__\n#define SCREEN_WIDTH    480\n#define SCREEN_HEIGHT    320\n#else\n#define SCREEN_WIDTH    512\n#define SCREEN_HEIGHT   320\n#endif\n\n/* This is indexed by SDL_GameControllerButton. */\nstatic const struct { int x; int y; } button_positions[] = {\n    {387, 167},  /* A */\n    {431, 132},  /* B */\n    {342, 132},  /* X */\n    {389, 101},  /* Y */\n    {174, 132},  /* BACK */\n    {233, 132},  /* GUIDE */\n    {289, 132},  /* START */\n    {75,  154},  /* LEFTSTICK */\n    {305, 230},  /* RIGHTSTICK */\n    {77,  40},   /* LEFTSHOULDER */\n    {396, 36},   /* RIGHTSHOULDER */\n    {154, 188},  /* DPAD_UP */\n    {154, 249},  /* DPAD_DOWN */\n    {116, 217},  /* DPAD_LEFT */\n    {186, 217},  /* DPAD_RIGHT */\n};\n\n/* This is indexed by SDL_GameControllerAxis. */\nstatic const struct { int x; int y; double angle; } axis_positions[] = {\n    {74,  153, 270.0},  /* LEFTX */\n    {74,  153, 0.0},  /* LEFTY */\n    {306, 231, 270.0},  /* RIGHTX */\n    {306, 231, 0.0},  /* RIGHTY */\n    {91, -20, 0.0},     /* TRIGGERLEFT */\n    {375, -20, 0.0},    /* TRIGGERRIGHT */\n};\n\nSDL_Renderer *screen = NULL;\nSDL_bool retval = SDL_FALSE;\nSDL_bool done = SDL_FALSE;\nSDL_Texture *background, *button, *axis;\n\nstatic SDL_Texture *\nLoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)\n{\n    SDL_Surface *temp = NULL;\n    SDL_Texture *texture = NULL;\n\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n    } else {\n        /* Set transparent pixel as the pixel at (0,0) */\n        if (transparent) {\n            if (temp->format->BytesPerPixel == 1) {\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *)temp->pixels);\n            }\n        }\n\n        texture = SDL_CreateTextureFromSurface(renderer, temp);\n        if (!texture) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        }\n    }\n    if (temp) {\n        SDL_FreeSurface(temp);\n    }\n    return texture;\n}\n\nvoid\nloop(void *arg)\n{\n    SDL_Event event;\n    int i;\n    SDL_GameController *gamecontroller = (SDL_GameController *)arg;\n\n    /* blank screen, set up for drawing this frame. */\n    SDL_SetRenderDrawColor(screen, 0xFF, 0xFF, 0xFF, SDL_ALPHA_OPAQUE);\n    SDL_RenderClear(screen);\n    SDL_RenderCopy(screen, background, NULL, NULL);\n\n    while (SDL_PollEvent(&event)) {\n        switch (event.type) {\n        case SDL_CONTROLLERAXISMOTION:\n            SDL_Log(\"Controller axis %s changed to %d\\n\", SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis)event.caxis.axis), event.caxis.value);\n            break;\n        case SDL_CONTROLLERBUTTONDOWN:\n        case SDL_CONTROLLERBUTTONUP:\n            SDL_Log(\"Controller button %s %s\\n\", SDL_GameControllerGetStringForButton((SDL_GameControllerButton)event.cbutton.button), event.cbutton.state ? \"pressed\" : \"released\");\n            /* First button triggers a 0.5 second full strength rumble */\n            if (event.type == SDL_CONTROLLERBUTTONDOWN &&\n                event.cbutton.button == SDL_CONTROLLER_BUTTON_A) {\n                SDL_GameControllerRumble(gamecontroller, 0xFFFF, 0xFFFF, 500);\n            }\n            break;\n        case SDL_KEYDOWN:\n            if (event.key.keysym.sym != SDLK_ESCAPE) {\n                break;\n            }\n            /* Fall through to signal quit */\n        case SDL_QUIT:\n            done = SDL_TRUE;\n            break;\n        default:\n            break;\n        }\n    }\n\n    /* Update visual controller state */\n    for (i = 0; i < SDL_CONTROLLER_BUTTON_MAX; ++i) {\n        if (SDL_GameControllerGetButton(gamecontroller, (SDL_GameControllerButton)i) == SDL_PRESSED) {\n            const SDL_Rect dst = { button_positions[i].x, button_positions[i].y, 50, 50 };\n            SDL_RenderCopyEx(screen, button, NULL, &dst, 0, NULL, SDL_FLIP_NONE);\n        }\n    }\n\n    for (i = 0; i < SDL_CONTROLLER_AXIS_MAX; ++i) {\n        const Sint16 deadzone = 8000;  /* !!! FIXME: real deadzone */\n        const Sint16 value = SDL_GameControllerGetAxis(gamecontroller, (SDL_GameControllerAxis)(i));\n        if (value < -deadzone) {\n            const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };\n            const double angle = axis_positions[i].angle;\n            SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);\n        } else if (value > deadzone) {\n            const SDL_Rect dst = { axis_positions[i].x, axis_positions[i].y, 50, 50 };\n            const double angle = axis_positions[i].angle + 180.0;\n            SDL_RenderCopyEx(screen, axis, NULL, &dst, angle, NULL, SDL_FLIP_NONE);\n        }\n    }\n\n    SDL_RenderPresent(screen);\n\n    if (!SDL_GameControllerGetAttached(gamecontroller)) {\n        done = SDL_TRUE;\n        retval = SDL_TRUE;  /* keep going, wait for reattach. */\n    }\n\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nSDL_bool\nWatchGameController(SDL_GameController * gamecontroller)\n{\n    const char *name = SDL_GameControllerName(gamecontroller);\n    const char *basetitle = \"Game Controller Test: \";\n    const size_t titlelen = SDL_strlen(basetitle) + SDL_strlen(name) + 1;\n    char *title = (char *)SDL_malloc(titlelen);\n    SDL_Window *window = NULL;\n\n    retval = SDL_FALSE;\n    done = SDL_FALSE;\n\n    if (title) {\n        SDL_snprintf(title, titlelen, \"%s%s\", basetitle, name);\n    }\n\n    /* Create a window to display controller state */\n    window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED,\n                              SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,\n                              SCREEN_HEIGHT, 0);\n    SDL_free(title);\n    title = NULL;\n    if (window == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create window: %s\\n\", SDL_GetError());\n        return SDL_FALSE;\n    }\n\n    screen = SDL_CreateRenderer(window, -1, 0);\n    if (screen == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create renderer: %s\\n\", SDL_GetError());\n        SDL_DestroyWindow(window);\n        return SDL_FALSE;\n    }\n\n    SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0x00, SDL_ALPHA_OPAQUE);\n    SDL_RenderClear(screen);\n    SDL_RenderPresent(screen);\n    SDL_RaiseWindow(window);\n\n    /* scale for platforms that don't give you the window size you asked for. */\n    SDL_RenderSetLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT);\n\n    background = LoadTexture(screen, \"controllermap.bmp\", SDL_FALSE);\n    button = LoadTexture(screen, \"button.bmp\", SDL_TRUE);\n    axis = LoadTexture(screen, \"axis.bmp\", SDL_TRUE);\n\n    if (!background || !button || !axis) {\n        SDL_DestroyRenderer(screen);\n        SDL_DestroyWindow(window);\n        return SDL_FALSE;\n    }\n    SDL_SetTextureColorMod(button, 10, 255, 21);\n    SDL_SetTextureColorMod(axis, 10, 255, 21);\n\n    /* !!! FIXME: */\n    /*SDL_RenderSetLogicalSize(screen, background->w, background->h);*/\n\n    /* Print info about the controller we are watching */\n    SDL_Log(\"Watching controller %s\\n\",  name ? name : \"Unknown Controller\");\n\n    /* Loop, getting controller events! */\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop_arg(loop, gamecontroller, 0, 1);\n#else\n    while (!done) {\n        loop(gamecontroller);\n    }\n#endif\n\n    SDL_DestroyRenderer(screen);\n    screen = NULL;\n    background = NULL;\n    button = NULL;\n    axis = NULL;\n    SDL_DestroyWindow(window);\n    return retval;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    int nController = 0;\n    int retcode = 0;\n    char guid[64];\n    SDL_GameController *gamecontroller;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL (Note: video is required to start event loop) */\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER ) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return 1;\n    }\n    \n    SDL_GameControllerAddMappingsFromFile(\"gamecontrollerdb.txt\");\n\n    /* Print information about the mappings */\n    if (!argv[1]) {\n        SDL_Log(\"Supported mappings:\\n\");\n        for (i = 0; i < SDL_GameControllerNumMappings(); ++i) {\n            char *mapping = SDL_GameControllerMappingForIndex(i);\n            if (mapping) {\n                SDL_Log(\"\\t%s\\n\", mapping);\n                SDL_free(mapping);\n            }\n        }\n        SDL_Log(\"\\n\");\n    }\n\n    /* Print information about the controller */\n    for (i = 0; i < SDL_NumJoysticks(); ++i) {\n        const char *name;\n        const char *description;\n\n        SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i),\n                                  guid, sizeof (guid));\n\n        if ( SDL_IsGameController(i) )\n        {\n            nController++;\n            name = SDL_GameControllerNameForIndex(i);\n            description = \"Controller\";\n        } else {\n            name = SDL_JoystickNameForIndex(i);\n            description = \"Joystick\";\n        }\n        SDL_Log(\"%s %d: %s (guid %s, VID 0x%.4x, PID 0x%.4x)\\n\",\n            description, i, name ? name : \"Unknown\", guid,\n            SDL_JoystickGetDeviceVendor(i), SDL_JoystickGetDeviceProduct(i));\n    }\n    SDL_Log(\"There are %d game controller(s) attached (%d joystick(s))\\n\", nController, SDL_NumJoysticks());\n\n    if (argv[1]) {\n        SDL_bool reportederror = SDL_FALSE;\n        SDL_bool keepGoing = SDL_TRUE;\n        SDL_Event event;\n        int device = atoi(argv[1]);\n        if (device >= SDL_NumJoysticks()) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"%i is an invalid joystick index.\\n\", device);\n            retcode = 1;\n        } else {\n            SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(device),\n                                      guid, sizeof (guid));\n            SDL_Log(\"Attempting to open device %i, guid %s\\n\", device, guid);\n            gamecontroller = SDL_GameControllerOpen(device);\n\n            if (gamecontroller != NULL) {\n                SDL_assert(SDL_GameControllerFromInstanceID(SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller))) == gamecontroller);\n            }\n\n            while (keepGoing) {\n                if (gamecontroller == NULL) {\n                    if (!reportederror) {\n                        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't open gamecontroller %d: %s\\n\", device, SDL_GetError());\n                        retcode = 1;\n                        keepGoing = SDL_FALSE;\n                        reportederror = SDL_TRUE;\n                    }\n                } else {\n                    reportederror = SDL_FALSE;\n                    keepGoing = WatchGameController(gamecontroller);\n                    SDL_GameControllerClose(gamecontroller);\n                }\n\n                gamecontroller = NULL;\n                if (keepGoing) {\n                    SDL_Log(\"Waiting for attach\\n\");\n                }\n                while (keepGoing) {\n                    SDL_WaitEvent(&event);\n                    if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN)\n                        || (event.type == SDL_MOUSEBUTTONDOWN)) {\n                        keepGoing = SDL_FALSE;\n                    } else if (event.type == SDL_CONTROLLERDEVICEADDED) {\n                        gamecontroller = SDL_GameControllerOpen(event.cdevice.which);\n                        if (gamecontroller != NULL) {\n                            SDL_assert(SDL_GameControllerFromInstanceID(SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(gamecontroller))) == gamecontroller);\n                        }\n                        break;\n                    }\n                }\n            }\n        }\n    }\n\n    SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER);\n\n    return retcode;\n}\n\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Joystick support.\\n\");\n    exit(1);\n}\n\n#endif\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testgesture.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/*  Usage:\n *  Spacebar to begin recording a gesture on all touches.\n *  s to save all touches into \"./gestureSave\"\n *  l to load all touches from \"./gestureSave\"\n */\n\n#include \"SDL.h\"\n#include <stdlib.h> /* for exit() */\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test.h\"\n#include \"SDL_test_common.h\"\n\n#define WIDTH 640\n#define HEIGHT 480\n#define BPP 4\n\n/* MUST BE A POWER OF 2! */\n#define EVENT_BUF_SIZE 256\n\n#define VERBOSE 0\n\nstatic SDLTest_CommonState *state;\nstatic SDL_Event events[EVENT_BUF_SIZE];\nstatic int eventWrite;\nstatic int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};\nstatic int quitting = 0;\n\ntypedef struct\n{\n    float x, y;\n} Point;\n\ntypedef struct\n{\n    float ang, r;\n    Point p;\n} Knob;\n\nstatic Knob knob = { 0.0f, 0.1f, { 0.0f, 0.0f } };\n\n\nstatic void\nsetpix(SDL_Surface *screen, float _x, float _y, unsigned int col)\n{\n    Uint32 *pixmem32;\n    Uint32 colour;\n    Uint8 r, g, b;\n    const int x = (int)_x;\n    const int y = (int)_y;\n    float a;\n\n    if ( (x < 0) || (x >= screen->w) || (y < 0) || (y >= screen->h) ) {\n        return;\n    }\n\n    pixmem32 = (Uint32 *) screen->pixels + y * screen->pitch / BPP + x;\n\n    SDL_memcpy(&colour, pixmem32, screen->format->BytesPerPixel);\n\n    SDL_GetRGB(colour,screen->format,&r,&g,&b);\n\n    /* r = 0;g = 0; b = 0; */\n    a = (float) ((col >> 24) & 0xFF);\n    if (a == 0) {\n        a = 0xFF; /* Hack, to make things easier. */\n    }\n\n    a = (a == 0.0f) ? 1 : (a / 255.0f);\n    r = (Uint8) (r * (1 - a) + ((col >> 16) & 0xFF) * a);\n    g = (Uint8) (g * (1 - a) + ((col >> 8) & 0xFF) * a);\n    b = (Uint8) (b * (1 - a) + ((col >> 0) & 0xFF) * a);\n    colour = SDL_MapRGB(screen->format, r, g, b);\n\n    *pixmem32 = colour;\n}\n\nstatic void\ndrawLine(SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned int col)\n{\n    float t;\n    for (t = 0; t < 1; t += (float) (1.0f / SDL_max(SDL_fabs(x0 - x1), SDL_fabs(y0 - y1)))) {\n        setpix(screen, x1 + t * (x0 - x1), y1 + t * (y0 - y1), col);\n    }\n}\n\nstatic void\ndrawCircle(SDL_Surface *screen, float x, float y, float r, unsigned int c)\n{\n    float tx,ty, xr;\n    for (ty = (float) -SDL_fabs(r); ty <= (float) SDL_fabs((int) r); ty++) {\n        xr = (float) SDL_sqrt(r * r - ty * ty);\n        if (r > 0) { /* r > 0 ==> filled circle */\n            for(tx = -xr + 0.5f; tx <= xr - 0.5f; tx++) {\n                setpix(screen, x + tx, y + ty, c);\n            }\n        } else {\n            setpix(screen, x - xr + 0.5f, y + ty, c);\n            setpix(screen, x + xr - 0.5f, y + ty, c);\n        }\n    }\n}\n\nstatic void\ndrawKnob(SDL_Surface *screen, const Knob *k)\n{\n    drawCircle(screen, k->p.x * screen->w, k->p.y * screen->h, k->r * screen->w, 0xFFFFFF);\n    drawCircle(screen, (k->p.x + k->r / 2 * SDL_cosf(k->ang)) * screen->w,\n               (k->p.y + k->r / 2 * SDL_sinf(k->ang)) * screen->h, k->r / 4 * screen->w, 0);\n}\n\nstatic void\nDrawScreen(SDL_Window *window)\n{\n    SDL_Surface *screen = SDL_GetWindowSurface(window);\n    int i;\n\n    if (!screen) {\n        return;\n    }\n\n    SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 75, 75, 75));\n\n    /* draw Touch History */\n    for (i = eventWrite; i < eventWrite + EVENT_BUF_SIZE; ++i) {\n        const SDL_Event *event = &events[i & (EVENT_BUF_SIZE - 1)];\n        const float age = (float)(i - eventWrite) / EVENT_BUF_SIZE;\n        float x, y;\n        unsigned int c, col;\n\n        if ( (event->type == SDL_FINGERMOTION) ||\n             (event->type == SDL_FINGERDOWN) ||\n             (event->type == SDL_FINGERUP) ) {\n            x = event->tfinger.x;\n            y = event->tfinger.y;\n\n            /* draw the touch: */\n            c = colors[event->tfinger.fingerId % 7];\n            col = ((unsigned int) (c * (0.1f + 0.85f))) | (unsigned int) (0xFF * age) << 24;\n\n            if (event->type == SDL_FINGERMOTION) {\n                drawCircle(screen, x * screen->w, y * screen->h, 5, col);\n            } else if (event->type == SDL_FINGERDOWN) {\n                drawCircle(screen, x * screen->w, y * screen->h, -10, col);\n            }\n        }\n    }\n\n    if (knob.p.x > 0) {\n        drawKnob(screen, &knob);\n    }\n\n    SDL_UpdateWindowSurface(window);\n}\n\nstatic void\nloop(void)\n{\n    SDL_Event event;\n    SDL_RWops *stream;\n    int i;\n\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &quitting);\n\n        /* Record _all_ events */\n        events[eventWrite & (EVENT_BUF_SIZE-1)] = event;\n        eventWrite++;\n\n        switch (event.type) {\n            case SDL_KEYDOWN:\n                switch (event.key.keysym.sym) {\n                    case SDLK_i: {\n                        for (i = 0; i < SDL_GetNumTouchDevices(); ++i) {\n                            const SDL_TouchID id = SDL_GetTouchDevice(i);\n                            SDL_Log(\"Fingers Down on device %\"SDL_PRIs64\": %d\", id, SDL_GetNumTouchFingers(id));\n                        }\n                        break;\n                    }\n\n                    case SDLK_SPACE:\n                        SDL_RecordGesture(-1);\n                        break;\n\n                    case SDLK_s:\n                        stream = SDL_RWFromFile(\"gestureSave\", \"w\");\n                        SDL_Log(\"Wrote %i templates\", SDL_SaveAllDollarTemplates(stream));\n                        SDL_RWclose(stream);\n                        break;\n\n                    case SDLK_l:\n                        stream = SDL_RWFromFile(\"gestureSave\", \"r\");\n                        SDL_Log(\"Loaded: %i\", SDL_LoadDollarTemplates(-1, stream));\n                        SDL_RWclose(stream);\n                        break;\n                }\n                break;\n\n#if VERBOSE\n            case SDL_FINGERMOTION:\n                SDL_Log(\"Finger: %\"SDL_PRIs64\",x: %f, y: %f\",event.tfinger.fingerId,\n                        event.tfinger.x,event.tfinger.y);\n                break;\n\n            case SDL_FINGERDOWN:\n                SDL_Log(\"Finger: %\"SDL_PRIs64\" down - x: %f, y: %f\",\n                        event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);\n                break;\n\n            case SDL_FINGERUP:\n                SDL_Log(\"Finger: %\"SDL_PRIs64\" up - x: %f, y: %f\",\n                        event.tfinger.fingerId,event.tfinger.x,event.tfinger.y);\n                break;\n#endif\n\n            case SDL_MULTIGESTURE:\n#if VERBOSE\n                SDL_Log(\"Multi Gesture: x = %f, y = %f, dAng = %f, dR = %f\",\n                        event.mgesture.x, event.mgesture.y,\n                        event.mgesture.dTheta, event.mgesture.dDist);\n                SDL_Log(\"MG: numDownTouch = %i\",event.mgesture.numFingers);\n#endif\n\n                knob.p.x = event.mgesture.x;\n                knob.p.y = event.mgesture.y;\n                knob.ang += event.mgesture.dTheta;\n                knob.r += event.mgesture.dDist;\n                break;\n\n            case SDL_DOLLARGESTURE:\n                SDL_Log(\"Gesture %\"SDL_PRIs64\" performed, error: %f\",\n                        event.dgesture.gestureId, event.dgesture.error);\n                break;\n\n            case SDL_DOLLARRECORD:\n                SDL_Log(\"Recorded gesture: %\"SDL_PRIs64\"\",event.dgesture.gestureId);\n                break;\n        }\n    }\n\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i]) {\n            DrawScreen(state->windows[i]);\n        }\n    }\n\n#ifdef __EMSCRIPTEN__\n    if (quitting) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint main(int argc, char* argv[])\n{\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    state->window_title = \"Gesture Test\";\n    state->window_w = WIDTH;\n    state->window_h = HEIGHT;\n    state->skip_renderer = SDL_TRUE;\n\n    if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {\n        SDLTest_CommonQuit(state);\n        return 1;\n    }\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!quitting) {\n        loop();\n    }\n#endif\n\n    SDLTest_CommonQuit(state);\n    return 0;\n}\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testgl2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#include \"SDL_test_common.h\"\n\n#ifdef __MACOS__\n#define HAVE_OPENGL\n#endif\n\n#ifdef HAVE_OPENGL\n\n#include \"SDL_opengl.h\"\n\ntypedef struct GL_Context\n{\n#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;\n#include \"../src/render/opengl/SDL_glfuncs.h\"\n#undef SDL_PROC\n} GL_Context;\n\n\n/* Undefine this if you want a flat cube instead of a rainbow cube */\n#define SHADED_CUBE\n\nstatic SDLTest_CommonState *state;\nstatic SDL_GLContext context;\nstatic GL_Context ctx;\n\nstatic int LoadContext(GL_Context * data)\n{\n#if SDL_VIDEO_DRIVER_UIKIT\n#define __SDL_NOGETPROCADDR__\n#elif SDL_VIDEO_DRIVER_ANDROID\n#define __SDL_NOGETPROCADDR__\n#elif SDL_VIDEO_DRIVER_PANDORA\n#define __SDL_NOGETPROCADDR__\n#endif\n\n#if defined __SDL_NOGETPROCADDR__\n#define SDL_PROC(ret,func,params) data->func=func;\n#else\n#define SDL_PROC(ret,func,params) \\\n    do { \\\n        data->func = SDL_GL_GetProcAddress(#func); \\\n        if ( ! data->func ) { \\\n            return SDL_SetError(\"Couldn't load GL function %s: %s\", #func, SDL_GetError()); \\\n        } \\\n    } while ( 0 );\n#endif /* __SDL_NOGETPROCADDR__ */\n\n#include \"../src/render/opengl/SDL_glfuncs.h\"\n#undef SDL_PROC\n    return 0;\n}\n\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    if (context) {\n        /* SDL_GL_MakeCurrent(0, NULL); *//* doesn't do anything */\n        SDL_GL_DeleteContext(context);\n    }\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nstatic void\nRender()\n{\n    static float color[8][3] = {\n        {1.0, 1.0, 0.0},\n        {1.0, 0.0, 0.0},\n        {0.0, 0.0, 0.0},\n        {0.0, 1.0, 0.0},\n        {0.0, 1.0, 1.0},\n        {1.0, 1.0, 1.0},\n        {1.0, 0.0, 1.0},\n        {0.0, 0.0, 1.0}\n    };\n    static float cube[8][3] = {\n        {0.5, 0.5, -0.5},\n        {0.5, -0.5, -0.5},\n        {-0.5, -0.5, -0.5},\n        {-0.5, 0.5, -0.5},\n        {-0.5, 0.5, 0.5},\n        {0.5, 0.5, 0.5},\n        {0.5, -0.5, 0.5},\n        {-0.5, -0.5, 0.5}\n    };\n\n    /* Do our drawing, too. */\n    ctx.glClearColor(0.0, 0.0, 0.0, 1.0);\n    ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    ctx.glBegin(GL_QUADS);\n\n#ifdef SHADED_CUBE\n    ctx.glColor3fv(color[0]);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glColor3fv(color[1]);\n    ctx.glVertex3fv(cube[1]);\n    ctx.glColor3fv(color[2]);\n    ctx.glVertex3fv(cube[2]);\n    ctx.glColor3fv(color[3]);\n    ctx.glVertex3fv(cube[3]);\n\n    ctx.glColor3fv(color[3]);\n    ctx.glVertex3fv(cube[3]);\n    ctx.glColor3fv(color[4]);\n    ctx.glVertex3fv(cube[4]);\n    ctx.glColor3fv(color[7]);\n    ctx.glVertex3fv(cube[7]);\n    ctx.glColor3fv(color[2]);\n    ctx.glVertex3fv(cube[2]);\n\n    ctx.glColor3fv(color[0]);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glColor3fv(color[5]);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glColor3fv(color[6]);\n    ctx.glVertex3fv(cube[6]);\n    ctx.glColor3fv(color[1]);\n    ctx.glVertex3fv(cube[1]);\n\n    ctx.glColor3fv(color[5]);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glColor3fv(color[4]);\n    ctx.glVertex3fv(cube[4]);\n    ctx.glColor3fv(color[7]);\n    ctx.glVertex3fv(cube[7]);\n    ctx.glColor3fv(color[6]);\n    ctx.glVertex3fv(cube[6]);\n\n    ctx.glColor3fv(color[5]);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glColor3fv(color[0]);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glColor3fv(color[3]);\n    ctx.glVertex3fv(cube[3]);\n    ctx.glColor3fv(color[4]);\n    ctx.glVertex3fv(cube[4]);\n\n    ctx.glColor3fv(color[6]);\n    ctx.glVertex3fv(cube[6]);\n    ctx.glColor3fv(color[1]);\n    ctx.glVertex3fv(cube[1]);\n    ctx.glColor3fv(color[2]);\n    ctx.glVertex3fv(cube[2]);\n    ctx.glColor3fv(color[7]);\n    ctx.glVertex3fv(cube[7]);\n#else /* flat cube */\n    ctx.glColor3f(1.0, 0.0, 0.0);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glVertex3fv(cube[1]);\n    ctx.glVertex3fv(cube[2]);\n    ctx.glVertex3fv(cube[3]);\n\n    ctx.glColor3f(0.0, 1.0, 0.0);\n    ctx.glVertex3fv(cube[3]);\n    ctx.glVertex3fv(cube[4]);\n    ctx.glVertex3fv(cube[7]);\n    ctx.glVertex3fv(cube[2]);\n\n    ctx.glColor3f(0.0, 0.0, 1.0);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glVertex3fv(cube[6]);\n    ctx.glVertex3fv(cube[1]);\n\n    ctx.glColor3f(0.0, 1.0, 1.0);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glVertex3fv(cube[4]);\n    ctx.glVertex3fv(cube[7]);\n    ctx.glVertex3fv(cube[6]);\n\n    ctx.glColor3f(1.0, 1.0, 0.0);\n    ctx.glVertex3fv(cube[5]);\n    ctx.glVertex3fv(cube[0]);\n    ctx.glVertex3fv(cube[3]);\n    ctx.glVertex3fv(cube[4]);\n\n    ctx.glColor3f(1.0, 0.0, 1.0);\n    ctx.glVertex3fv(cube[6]);\n    ctx.glVertex3fv(cube[1]);\n    ctx.glVertex3fv(cube[2]);\n    ctx.glVertex3fv(cube[7]);\n#endif /* SHADED_CUBE */\n\n    ctx.glEnd();\n\n    ctx.glMatrixMode(GL_MODELVIEW);\n    ctx.glRotatef(5.0, 1.0, 1.0, 1.0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int fsaa, accel;\n    int value;\n    int i, done;\n    SDL_DisplayMode mode;\n    SDL_Event event;\n    Uint32 then, now, frames;\n    int status;\n    int dw, dh;\n    int swap_interval = 0;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize parameters */\n    fsaa = 0;\n    accel = -1;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            if (SDL_strcasecmp(argv[i], \"--fsaa\") == 0 && i+1 < argc) {\n                fsaa = atoi(argv[i+1]);\n                consumed = 2;\n            } else if (SDL_strcasecmp(argv[i], \"--accel\") == 0 && i+1 < argc) {\n                accel = atoi(argv[i+1]);\n                consumed = 2;\n            } else {\n                consumed = -1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--fsaa n]\", \"[--accel n]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n\n    /* Set OpenGL parameters */\n    state->window_flags |= SDL_WINDOW_OPENGL;\n    state->gl_red_size = 5;\n    state->gl_green_size = 5;\n    state->gl_blue_size = 5;\n    state->gl_depth_size = 16;\n    state->gl_double_buffer = 1;\n    if (fsaa) {\n        state->gl_multisamplebuffers = 1;\n        state->gl_multisamplesamples = fsaa;\n    }\n    if (accel >= 0) {\n        state->gl_accelerated = accel;\n    }\n\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    /* Create OpenGL context */\n    context = SDL_GL_CreateContext(state->windows[0]);\n    if (!context) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_GL_CreateContext(): %s\\n\", SDL_GetError());\n        quit(2);\n    }\n    \n    /* Important: call this *after* creating the context */\n    if (LoadContext(&ctx) < 0) {\n        SDL_Log(\"Could not load GL functions\\n\");\n        quit(2);\n        return 0;\n    }\n\n    if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) {\n        /* try late-swap-tearing first. If not supported, try normal vsync. */\n        if (SDL_GL_SetSwapInterval(-1) == 0) {\n            swap_interval = -1;\n        } else {\n            SDL_GL_SetSwapInterval(1);\n            swap_interval = 1;\n        }\n    } else {\n        SDL_GL_SetSwapInterval(0);  /* disable vsync. */\n        swap_interval = 0;\n    }\n\n    SDL_GetCurrentDisplayMode(0, &mode);\n    SDL_Log(\"Screen BPP    : %d\\n\", SDL_BITSPERPIXEL(mode.format));\n    SDL_Log(\"Swap Interval : %d\\n\", SDL_GL_GetSwapInterval());\n    SDL_GetWindowSize(state->windows[0], &dw, &dh);\n    SDL_Log(\"Window Size   : %d,%d\\n\", dw, dh);\n    SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh);\n    SDL_Log(\"Draw Size     : %d,%d\\n\", dw, dh);\n    SDL_Log(\"\\n\");\n    SDL_Log(\"Vendor        : %s\\n\", ctx.glGetString(GL_VENDOR));\n    SDL_Log(\"Renderer      : %s\\n\", ctx.glGetString(GL_RENDERER));\n    SDL_Log(\"Version       : %s\\n\", ctx.glGetString(GL_VERSION));\n    SDL_Log(\"Extensions    : %s\\n\", ctx.glGetString(GL_EXTENSIONS));\n    SDL_Log(\"\\n\");\n\n    status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_RED_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_RED_SIZE: %s\\n\", SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_GREEN_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_GREEN_SIZE: %s\\n\", SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_BLUE_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_BLUE_SIZE: %s\\n\", SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_DEPTH_SIZE: requested %d, got %d\\n\", 16, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_DEPTH_SIZE: %s\\n\", SDL_GetError());\n    }\n    if (fsaa) {\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\\n\", value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\\n\",\n                   SDL_GetError());\n        }\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\\n\", fsaa,\n                   value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\\n\",\n                   SDL_GetError());\n        }\n    }\n    if (accel >= 0) {\n        status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_ACCELERATED_VISUAL: requested %d, got %d\\n\", accel,\n                   value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_ACCELERATED_VISUAL: %s\\n\",\n                   SDL_GetError());\n        }\n    }\n\n    /* Set rendering settings */\n    ctx.glMatrixMode(GL_PROJECTION);\n    ctx.glLoadIdentity();\n    ctx.glOrtho(-2.0, 2.0, -2.0, 2.0, -20.0, 20.0);\n    ctx.glMatrixMode(GL_MODELVIEW);\n    ctx.glLoadIdentity();\n    ctx.glEnable(GL_DEPTH_TEST);\n    ctx.glDepthFunc(GL_LESS);\n    ctx.glShadeModel(GL_SMOOTH);\n    \n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n    while (!done) {\n        SDL_bool update_swap_interval = SDL_FALSE;\n\n        /* Check for events */\n        ++frames;\n        while (SDL_PollEvent(&event)) {\n            SDLTest_CommonEvent(state, &event, &done);\n            if (event.type == SDL_KEYDOWN) {\n                if (event.key.keysym.sym == SDLK_o) {\n                    swap_interval--;\n                    update_swap_interval = SDL_TRUE;\n                } else if (event.key.keysym.sym == SDLK_p) {\n                    swap_interval++;\n                    update_swap_interval = SDL_TRUE;\n                }\n            }\n        }\n\n        if (update_swap_interval) {\n            SDL_Log(\"Swap interval to be set to %d\\n\", swap_interval);\n        }\n\n        for (i = 0; i < state->num_windows; ++i) {\n            int w, h;\n            if (state->windows[i] == NULL)\n                continue;\n            SDL_GL_MakeCurrent(state->windows[i], context);\n            if (update_swap_interval) {\n                SDL_GL_SetSwapInterval(swap_interval);\n            }\n            SDL_GL_GetDrawableSize(state->windows[i], &w, &h);\n            ctx.glViewport(0, 0, w, h);\n            Render();\n            SDL_GL_SwapWindow(state->windows[i]);\n        }\n    }\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        SDL_Log(\"%2.2f frames per second\\n\",\n               ((double) frames * 1000) / (now - then));\n    }\n    quit(0);\n    return 0;\n}\n\n#else /* HAVE_OPENGL */\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No OpenGL support on this system\\n\");\n    return 1;\n}\n\n#endif /* HAVE_OPENGL */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testgles.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#include \"SDL_test_common.h\"\n\n#if defined(__IPHONEOS__) || defined(__ANDROID__)\n#define HAVE_OPENGLES\n#endif\n\n#ifdef HAVE_OPENGLES\n\n#include \"SDL_opengles.h\"\n\nstatic SDLTest_CommonState *state;\nstatic SDL_GLContext *context = NULL;\nstatic int depth = 16;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    int i;\n\n    if (context != NULL) {\n        for (i = 0; i < state->num_windows; i++) {\n            if (context[i]) {\n                SDL_GL_DeleteContext(context[i]);\n            }\n        }\n\n        SDL_free(context);\n    }\n\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nstatic void\nRender()\n{\n    static GLubyte color[8][4] = { {255, 0, 0, 0},\n    {255, 0, 0, 255},\n    {0, 255, 0, 255},\n    {0, 255, 0, 255},\n    {0, 255, 0, 255},\n    {255, 255, 255, 255},\n    {255, 0, 255, 255},\n    {0, 0, 255, 255}\n    };\n    static GLfloat cube[8][3] = { {0.5, 0.5, -0.5},\n    {0.5f, -0.5f, -0.5f},\n    {-0.5f, -0.5f, -0.5f},\n    {-0.5f, 0.5f, -0.5f},\n    {-0.5f, 0.5f, 0.5f},\n    {0.5f, 0.5f, 0.5f},\n    {0.5f, -0.5f, 0.5f},\n    {-0.5f, -0.5f, 0.5f}\n    };\n    static GLubyte indices[36] = { 0, 3, 4,\n        4, 5, 0,\n        0, 5, 6,\n        6, 1, 0,\n        6, 7, 2,\n        2, 1, 6,\n        7, 4, 3,\n        3, 2, 7,\n        5, 4, 7,\n        7, 6, 5,\n        2, 3, 1,\n        3, 0, 1\n    };\n\n\n    /* Do our drawing, too. */\n    glClearColor(0.0, 0.0, 0.0, 1.0);\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    /* Draw the cube */\n    glColorPointer(4, GL_UNSIGNED_BYTE, 0, color);\n    glEnableClientState(GL_COLOR_ARRAY);\n    glVertexPointer(3, GL_FLOAT, 0, cube);\n    glEnableClientState(GL_VERTEX_ARRAY);\n    glDrawElements(GL_TRIANGLES, 36, GL_UNSIGNED_BYTE, indices);\n\n    glMatrixMode(GL_MODELVIEW);\n    glRotatef(5.0, 1.0, 1.0, 1.0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int fsaa, accel;\n    int value;\n    int i, done;\n    SDL_DisplayMode mode;\n    SDL_Event event;\n    Uint32 then, now, frames;\n    int status;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize parameters */\n    fsaa = 0;\n    accel = 0;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            if (SDL_strcasecmp(argv[i], \"--fsaa\") == 0) {\n                ++fsaa;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--accel\") == 0) {\n                ++accel;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--zdepth\") == 0) {\n                i++;\n                if (!argv[i]) {\n                    consumed = -1;\n                } else {\n                    depth = SDL_atoi(argv[i]);\n                    consumed = 1;\n                }\n            } else {\n                consumed = -1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--fsaa]\", \"[--accel]\", \"[--zdepth %d]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n\n    /* Set OpenGL parameters */\n    state->window_flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS;\n    state->gl_red_size = 5;\n    state->gl_green_size = 5;\n    state->gl_blue_size = 5;\n    state->gl_depth_size = depth;\n    state->gl_major_version = 1;\n    state->gl_minor_version = 1;\n    state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES;\n    if (fsaa) {\n        state->gl_multisamplebuffers=1;\n        state->gl_multisamplesamples=fsaa;\n    }\n    if (accel) {\n        state->gl_accelerated=1;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));\n    if (context == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory!\\n\");\n        quit(2);\n    }\n\n    /* Create OpenGL ES contexts */\n    for (i = 0; i < state->num_windows; i++) {\n        context[i] = SDL_GL_CreateContext(state->windows[i]);\n        if (!context[i]) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_GL_CreateContext(): %s\\n\", SDL_GetError());\n            quit(2);\n        }\n    }\n\n    if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) {\n        SDL_GL_SetSwapInterval(1);\n    } else {\n        SDL_GL_SetSwapInterval(0);\n    }\n\n    SDL_GetCurrentDisplayMode(0, &mode);\n    SDL_Log(\"Screen bpp: %d\\n\", SDL_BITSPERPIXEL(mode.format));\n    SDL_Log(\"\\n\");\n    SDL_Log(\"Vendor     : %s\\n\", glGetString(GL_VENDOR));\n    SDL_Log(\"Renderer   : %s\\n\", glGetString(GL_RENDERER));\n    SDL_Log(\"Version    : %s\\n\", glGetString(GL_VERSION));\n    SDL_Log(\"Extensions : %s\\n\", glGetString(GL_EXTENSIONS));\n    SDL_Log(\"\\n\");\n\n    status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_RED_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_RED_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_GREEN_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_GREEN_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_BLUE_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_BLUE_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_DEPTH_SIZE: requested %d, got %d\\n\", depth, value);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_DEPTH_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    if (fsaa) {\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\\n\", value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\\n\",\n                    SDL_GetError());\n        }\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\\n\", fsaa,\n                   value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\\n\",\n                    SDL_GetError());\n        }\n    }\n    if (accel) {\n        status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\\n\", value);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to get SDL_GL_ACCELERATED_VISUAL: %s\\n\",\n                    SDL_GetError());\n        }\n    }\n\n    /* Set rendering settings for each context */\n    for (i = 0; i < state->num_windows; ++i) {\n        float aspectAdjust;\n\n        status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n        if (status) {\n            SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n\n            /* Continue for next window */\n            continue;\n        }\n\n        aspectAdjust = (4.0f / 3.0f) / ((float)state->window_w / state->window_h);\n        glViewport(0, 0, state->window_w, state->window_h);\n        glMatrixMode(GL_PROJECTION);\n        glLoadIdentity();\n        glOrthof(-2.0, 2.0, -2.0 * aspectAdjust, 2.0 * aspectAdjust, -20.0, 20.0);\n        glMatrixMode(GL_MODELVIEW);\n        glLoadIdentity();\n        glEnable(GL_DEPTH_TEST);\n        glDepthFunc(GL_LESS);\n        glShadeModel(GL_SMOOTH);\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n    while (!done) {\n        /* Check for events */\n        ++frames;\n        while (SDL_PollEvent(&event)) {\n            switch (event.type) {\n            case SDL_WINDOWEVENT:\n                switch (event.window.event) {\n                    case SDL_WINDOWEVENT_RESIZED:\n                        for (i = 0; i < state->num_windows; ++i) {\n                            if (event.window.windowID == SDL_GetWindowID(state->windows[i])) {\n                                status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n                                if (status) {\n                                    SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n                                    break;\n                                }\n                                /* Change view port to the new window dimensions */\n                                glViewport(0, 0, event.window.data1, event.window.data2);\n                                /* Update window content */\n                                Render();\n                                SDL_GL_SwapWindow(state->windows[i]);\n                                break;\n                            }\n                        }\n                        break;\n                }\n            }\n            SDLTest_CommonEvent(state, &event, &done);\n        }\n        for (i = 0; i < state->num_windows; ++i) {\n            if (state->windows[i] == NULL)\n                continue;\n            status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n            if (status) {\n                SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n\n                /* Continue for next window */\n                continue;\n            }\n            Render();\n            SDL_GL_SwapWindow(state->windows[i]);\n        }\n    }\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        SDL_Log(\"%2.2f frames per second\\n\",\n               ((double) frames * 1000) / (now - then));\n    }\n#if !defined(__ANDROID__)\n    quit(0);\n#endif        \n    return 0;\n}\n\n#else /* HAVE_OPENGLES */\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No OpenGL ES support on this system\\n\");\n    return 1;\n}\n\n#endif /* HAVE_OPENGLES */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testgles2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n#if defined(__IPHONEOS__) || defined(__ANDROID__) || defined(__EMSCRIPTEN__) || defined(__NACL__) \\\n    || defined(__WINDOWS__) || defined(__LINUX__)\n#define HAVE_OPENGLES2\n#endif\n\n#ifdef HAVE_OPENGLES2\n\n#include \"SDL_opengles2.h\"\n\ntypedef struct GLES2_Context\n{\n#define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;\n#include \"../src/render/opengles2/SDL_gles2funcs.h\"\n#undef SDL_PROC\n} GLES2_Context;\n\n\nstatic SDLTest_CommonState *state;\nstatic SDL_GLContext *context = NULL;\nstatic int depth = 16;\nstatic GLES2_Context ctx;\n\nstatic int LoadContext(GLES2_Context * data)\n{\n#if SDL_VIDEO_DRIVER_UIKIT\n#define __SDL_NOGETPROCADDR__\n#elif SDL_VIDEO_DRIVER_ANDROID\n#define __SDL_NOGETPROCADDR__\n#elif SDL_VIDEO_DRIVER_PANDORA\n#define __SDL_NOGETPROCADDR__\n#endif\n\n#if defined __SDL_NOGETPROCADDR__\n#define SDL_PROC(ret,func,params) data->func=func;\n#else\n#define SDL_PROC(ret,func,params) \\\n    do { \\\n        data->func = SDL_GL_GetProcAddress(#func); \\\n        if ( ! data->func ) { \\\n            return SDL_SetError(\"Couldn't load GLES2 function %s: %s\", #func, SDL_GetError()); \\\n        } \\\n    } while ( 0 );\n#endif /* __SDL_NOGETPROCADDR__ */\n\n#include \"../src/render/opengles2/SDL_gles2funcs.h\"\n#undef SDL_PROC\n    return 0;\n}\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    int i;\n\n    if (context != NULL) {\n        for (i = 0; i < state->num_windows; i++) {\n            if (context[i]) {\n                SDL_GL_DeleteContext(context[i]);\n            }\n        }\n\n        SDL_free(context);\n    }\n\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\n#define GL_CHECK(x) \\\n        x; \\\n        { \\\n          GLenum glError = ctx.glGetError(); \\\n          if(glError != GL_NO_ERROR) { \\\n            SDL_Log(\"glGetError() = %i (0x%.8x) at line %i\\n\", glError, glError, __LINE__); \\\n            quit(1); \\\n          } \\\n        }\n\n/* \n * Simulates desktop's glRotatef. The matrix is returned in column-major \n * order. \n */\nstatic void\nrotate_matrix(float angle, float x, float y, float z, float *r)\n{\n    float radians, c, s, c1, u[3], length;\n    int i, j;\n\n    radians = (float)(angle * M_PI) / 180.0f;\n\n    c = SDL_cosf(radians);\n    s = SDL_sinf(radians);\n\n    c1 = 1.0f - SDL_cosf(radians);\n\n    length = (float)SDL_sqrt(x * x + y * y + z * z);\n\n    u[0] = x / length;\n    u[1] = y / length;\n    u[2] = z / length;\n\n    for (i = 0; i < 16; i++) {\n        r[i] = 0.0;\n    }\n\n    r[15] = 1.0;\n\n    for (i = 0; i < 3; i++) {\n        r[i * 4 + (i + 1) % 3] = u[(i + 2) % 3] * s;\n        r[i * 4 + (i + 2) % 3] = -u[(i + 1) % 3] * s;\n    }\n\n    for (i = 0; i < 3; i++) {\n        for (j = 0; j < 3; j++) {\n            r[i * 4 + j] += c1 * u[i] * u[j] + (i == j ? c : 0.0f);\n        }\n    }\n}\n\n/* \n * Simulates gluPerspectiveMatrix \n */\nstatic void \nperspective_matrix(float fovy, float aspect, float znear, float zfar, float *r)\n{\n    int i;\n    float f;\n\n    f = 1.0f/SDL_tanf(fovy * 0.5f);\n\n    for (i = 0; i < 16; i++) {\n        r[i] = 0.0;\n    }\n\n    r[0] = f / aspect;\n    r[5] = f;\n    r[10] = (znear + zfar) / (znear - zfar);\n    r[11] = -1.0f;\n    r[14] = (2.0f * znear * zfar) / (znear - zfar);\n    r[15] = 0.0f;\n}\n\n/* \n * Multiplies lhs by rhs and writes out to r. All matrices are 4x4 and column\n * major. In-place multiplication is supported.\n */\nstatic void\nmultiply_matrix(float *lhs, float *rhs, float *r)\n{\n    int i, j, k;\n    float tmp[16];\n\n    for (i = 0; i < 4; i++) {\n        for (j = 0; j < 4; j++) {\n            tmp[j * 4 + i] = 0.0;\n\n            for (k = 0; k < 4; k++) {\n                tmp[j * 4 + i] += lhs[k * 4 + i] * rhs[j * 4 + k];\n            }\n        }\n    }\n\n    for (i = 0; i < 16; i++) {\n        r[i] = tmp[i];\n    }\n}\n\n/* \n * Create shader, load in source, compile, dump debug as necessary.\n *\n * shader: Pointer to return created shader ID.\n * source: Passed-in shader source code.\n * shader_type: Passed to GL, e.g. GL_VERTEX_SHADER.\n */\nvoid \nprocess_shader(GLuint *shader, const char * source, GLint shader_type)\n{\n    GLint status = GL_FALSE;\n    const char *shaders[1] = { NULL };\n    char buffer[1024];\n    GLsizei length;\n\n    /* Create shader and load into GL. */\n    *shader = GL_CHECK(ctx.glCreateShader(shader_type));\n\n    shaders[0] = source;\n\n    GL_CHECK(ctx.glShaderSource(*shader, 1, shaders, NULL));\n\n    /* Clean up shader source. */\n    shaders[0] = NULL;\n\n    /* Try compiling the shader. */\n    GL_CHECK(ctx.glCompileShader(*shader));\n    GL_CHECK(ctx.glGetShaderiv(*shader, GL_COMPILE_STATUS, &status));\n\n    /* Dump debug info (source and log) if compilation failed. */\n    if(status != GL_TRUE) {\n        ctx.glGetProgramInfoLog(*shader, sizeof(buffer), &length, &buffer[0]);\n        buffer[length] = '\\0';\n        SDL_Log(\"Shader compilation failed: %s\", buffer);fflush(stderr);\n        quit(-1);\n    }\n}\n\n/* 3D data. Vertex range -0.5..0.5 in all axes.\n* Z -0.5 is near, 0.5 is far. */\nconst float _vertices[] =\n{\n    /* Front face. */\n    /* Bottom left */\n    -0.5,  0.5, -0.5,\n    0.5, -0.5, -0.5,\n    -0.5, -0.5, -0.5,\n    /* Top right */\n    -0.5,  0.5, -0.5,\n    0.5,  0.5, -0.5,\n    0.5, -0.5, -0.5,\n    /* Left face */\n    /* Bottom left */\n    -0.5,  0.5,  0.5,\n    -0.5, -0.5, -0.5,\n    -0.5, -0.5,  0.5,\n    /* Top right */\n    -0.5,  0.5,  0.5,\n    -0.5,  0.5, -0.5,\n    -0.5, -0.5, -0.5,\n    /* Top face */\n    /* Bottom left */\n    -0.5,  0.5,  0.5,\n    0.5,  0.5, -0.5,\n    -0.5,  0.5, -0.5,\n    /* Top right */\n    -0.5,  0.5,  0.5,\n    0.5,  0.5,  0.5,\n    0.5,  0.5, -0.5,\n    /* Right face */\n    /* Bottom left */\n    0.5,  0.5, -0.5,\n    0.5, -0.5,  0.5,\n    0.5, -0.5, -0.5,\n    /* Top right */\n    0.5,  0.5, -0.5,\n    0.5,  0.5,  0.5,\n    0.5, -0.5,  0.5,\n    /* Back face */\n    /* Bottom left */\n    0.5,  0.5,  0.5,\n    -0.5, -0.5,  0.5,\n    0.5, -0.5,  0.5,\n    /* Top right */\n    0.5,  0.5,  0.5,\n    -0.5,  0.5,  0.5,\n    -0.5, -0.5,  0.5,\n    /* Bottom face */\n    /* Bottom left */\n    -0.5, -0.5, -0.5,\n    0.5, -0.5,  0.5,\n    -0.5, -0.5,  0.5,\n    /* Top right */\n    -0.5, -0.5, -0.5,\n    0.5, -0.5, -0.5,\n    0.5, -0.5,  0.5,\n};\n\nconst float _colors[] =\n{\n    /* Front face */\n    /* Bottom left */\n    1.0, 0.0, 0.0, /* red */\n    0.0, 0.0, 1.0, /* blue */\n    0.0, 1.0, 0.0, /* green */\n    /* Top right */\n    1.0, 0.0, 0.0, /* red */\n    1.0, 1.0, 0.0, /* yellow */\n    0.0, 0.0, 1.0, /* blue */\n    /* Left face */\n    /* Bottom left */\n    1.0, 1.0, 1.0, /* white */\n    0.0, 1.0, 0.0, /* green */\n    0.0, 1.0, 1.0, /* cyan */\n    /* Top right */\n    1.0, 1.0, 1.0, /* white */\n    1.0, 0.0, 0.0, /* red */\n    0.0, 1.0, 0.0, /* green */\n    /* Top face */\n    /* Bottom left */\n    1.0, 1.0, 1.0, /* white */\n    1.0, 1.0, 0.0, /* yellow */\n    1.0, 0.0, 0.0, /* red */\n    /* Top right */\n    1.0, 1.0, 1.0, /* white */\n    0.0, 0.0, 0.0, /* black */\n    1.0, 1.0, 0.0, /* yellow */\n    /* Right face */\n    /* Bottom left */\n    1.0, 1.0, 0.0, /* yellow */\n    1.0, 0.0, 1.0, /* magenta */\n    0.0, 0.0, 1.0, /* blue */\n    /* Top right */\n    1.0, 1.0, 0.0, /* yellow */\n    0.0, 0.0, 0.0, /* black */\n    1.0, 0.0, 1.0, /* magenta */\n    /* Back face */\n    /* Bottom left */\n    0.0, 0.0, 0.0, /* black */\n    0.0, 1.0, 1.0, /* cyan */\n    1.0, 0.0, 1.0, /* magenta */\n    /* Top right */\n    0.0, 0.0, 0.0, /* black */\n    1.0, 1.0, 1.0, /* white */\n    0.0, 1.0, 1.0, /* cyan */\n    /* Bottom face */\n    /* Bottom left */\n    0.0, 1.0, 0.0, /* green */\n    1.0, 0.0, 1.0, /* magenta */\n    0.0, 1.0, 1.0, /* cyan */\n    /* Top right */\n    0.0, 1.0, 0.0, /* green */\n    0.0, 0.0, 1.0, /* blue */\n    1.0, 0.0, 1.0, /* magenta */\n};\n\nconst char* _shader_vert_src = \n\" attribute vec4 av4position; \"\n\" attribute vec3 av3color; \"\n\" uniform mat4 mvp; \"\n\" varying vec3 vv3color; \"\n\" void main() { \"\n\"    vv3color = av3color; \"\n\"    gl_Position = mvp * av4position; \"\n\" } \";\n\nconst char* _shader_frag_src = \n\" precision lowp float; \"\n\" varying vec3 vv3color; \"\n\" void main() { \"\n\"    gl_FragColor = vec4(vv3color, 1.0); \"\n\" } \";\n\ntypedef struct shader_data\n{\n    GLuint shader_program, shader_frag, shader_vert;\n\n    GLint attr_position;\n    GLint attr_color, attr_mvp;\n\n    int angle_x, angle_y, angle_z;\n\n} shader_data;\n\nstatic void\nRender(unsigned int width, unsigned int height, shader_data* data)\n{\n    float matrix_rotate[16], matrix_modelview[16], matrix_perspective[16], matrix_mvp[16];\n\n    /* \n    * Do some rotation with Euler angles. It is not a fixed axis as\n    * quaterions would be, but the effect is cool. \n    */\n    rotate_matrix((float)data->angle_x, 1.0f, 0.0f, 0.0f, matrix_modelview);\n    rotate_matrix((float)data->angle_y, 0.0f, 1.0f, 0.0f, matrix_rotate);\n\n    multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview);\n\n    rotate_matrix((float)data->angle_z, 0.0f, 1.0f, 0.0f, matrix_rotate);\n\n    multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview);\n\n    /* Pull the camera back from the cube */\n    matrix_modelview[14] -= 2.5;\n\n    perspective_matrix(45.0f, (float)width/height, 0.01f, 100.0f, matrix_perspective);\n    multiply_matrix(matrix_perspective, matrix_modelview, matrix_mvp);\n\n    GL_CHECK(ctx.glUniformMatrix4fv(data->attr_mvp, 1, GL_FALSE, matrix_mvp));\n\n    data->angle_x += 3;\n    data->angle_y += 2;\n    data->angle_z += 1;\n\n    if(data->angle_x >= 360) data->angle_x -= 360;\n    if(data->angle_x < 0) data->angle_x += 360;\n    if(data->angle_y >= 360) data->angle_y -= 360;\n    if(data->angle_y < 0) data->angle_y += 360;\n    if(data->angle_z >= 360) data->angle_z -= 360;\n    if(data->angle_z < 0) data->angle_z += 360;\n\n    GL_CHECK(ctx.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT));\n    GL_CHECK(ctx.glDrawArrays(GL_TRIANGLES, 0, 36));\n}\n\nint done;\nUint32 frames;\nshader_data *datas;\n\nvoid loop()\n{\n    SDL_Event event;\n    int i;\n    int status;\n\n    /* Check for events */\n    ++frames;\n    while (SDL_PollEvent(&event) && !done) {\n        switch (event.type) {\n        case SDL_WINDOWEVENT:\n            switch (event.window.event) {\n                case SDL_WINDOWEVENT_RESIZED:\n                    for (i = 0; i < state->num_windows; ++i) {\n                        if (event.window.windowID == SDL_GetWindowID(state->windows[i])) {\n                            int w, h;\n                            status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n                            if (status) {\n                                SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n                                break;\n                            }\n                            /* Change view port to the new window dimensions */\n                            SDL_GL_GetDrawableSize(state->windows[i], &w, &h);\n                            ctx.glViewport(0, 0, w, h);\n                            state->window_w = event.window.data1;\n                            state->window_h = event.window.data2;\n                            /* Update window content */\n                            Render(event.window.data1, event.window.data2, &datas[i]);\n                            SDL_GL_SwapWindow(state->windows[i]);\n                            break;\n                        }\n                    }\n                    break;\n            }\n        }\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    if (!done) {\n      for (i = 0; i < state->num_windows; ++i) {\n          status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n          if (status) {\n              SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n\n              /* Continue for next window */\n              continue;\n          }\n          Render(state->window_w, state->window_h, &datas[i]);\n          SDL_GL_SwapWindow(state->windows[i]);\n      }\n    }\n#ifdef __EMSCRIPTEN__\n    else {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int fsaa, accel;\n    int value;\n    int i;\n    SDL_DisplayMode mode;\n    Uint32 then, now;\n    int status;\n    shader_data *data;\n\n    /* Initialize parameters */\n    fsaa = 0;\n    accel = 0;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            if (SDL_strcasecmp(argv[i], \"--fsaa\") == 0) {\n                ++fsaa;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--accel\") == 0) {\n                ++accel;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--zdepth\") == 0) {\n                i++;\n                if (!argv[i]) {\n                    consumed = -1;\n                } else {\n                    depth = SDL_atoi(argv[i]);\n                    consumed = 1;\n                }\n            } else {\n                consumed = -1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--fsaa]\", \"[--accel]\", \"[--zdepth %d]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n\n    /* Set OpenGL parameters */\n    state->window_flags |= SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_BORDERLESS;\n    state->gl_red_size = 5;\n    state->gl_green_size = 5;\n    state->gl_blue_size = 5;\n    state->gl_depth_size = depth;\n    state->gl_major_version = 2;\n    state->gl_minor_version = 0;\n    state->gl_profile_mask = SDL_GL_CONTEXT_PROFILE_ES;\n\n    if (fsaa) {\n        state->gl_multisamplebuffers=1;\n        state->gl_multisamplesamples=fsaa;\n    }\n    if (accel) {\n        state->gl_accelerated=1;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n        return 0;\n    }\n\n    context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));\n    if (context == NULL) {\n        SDL_Log(\"Out of memory!\\n\");\n        quit(2);\n    }\n    \n    /* Create OpenGL ES contexts */\n    for (i = 0; i < state->num_windows; i++) {\n        context[i] = SDL_GL_CreateContext(state->windows[i]);\n        if (!context[i]) {\n            SDL_Log(\"SDL_GL_CreateContext(): %s\\n\", SDL_GetError());\n            quit(2);\n        }\n    }\n\n    /* Important: call this *after* creating the context */\n    if (LoadContext(&ctx) < 0) {\n        SDL_Log(\"Could not load GLES2 functions\\n\");\n        quit(2);\n        return 0;\n    }\n\n\n\n    if (state->render_flags & SDL_RENDERER_PRESENTVSYNC) {\n        SDL_GL_SetSwapInterval(1);\n    } else {\n        SDL_GL_SetSwapInterval(0);\n    }\n\n    SDL_GetCurrentDisplayMode(0, &mode);\n    SDL_Log(\"Screen bpp: %d\\n\", SDL_BITSPERPIXEL(mode.format));\n    SDL_Log(\"\\n\");\n    SDL_Log(\"Vendor     : %s\\n\", ctx.glGetString(GL_VENDOR));\n    SDL_Log(\"Renderer   : %s\\n\", ctx.glGetString(GL_RENDERER));\n    SDL_Log(\"Version    : %s\\n\", ctx.glGetString(GL_VERSION));\n    SDL_Log(\"Extensions : %s\\n\", ctx.glGetString(GL_EXTENSIONS));\n    SDL_Log(\"\\n\");\n\n    status = SDL_GL_GetAttribute(SDL_GL_RED_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_RED_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_Log( \"Failed to get SDL_GL_RED_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_GREEN_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_Log( \"Failed to get SDL_GL_GREEN_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_BLUE_SIZE: requested %d, got %d\\n\", 5, value);\n    } else {\n        SDL_Log( \"Failed to get SDL_GL_BLUE_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    status = SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &value);\n    if (!status) {\n        SDL_Log(\"SDL_GL_DEPTH_SIZE: requested %d, got %d\\n\", depth, value);\n    } else {\n        SDL_Log( \"Failed to get SDL_GL_DEPTH_SIZE: %s\\n\",\n                SDL_GetError());\n    }\n    if (fsaa) {\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\\n\", value);\n        } else {\n            SDL_Log( \"Failed to get SDL_GL_MULTISAMPLEBUFFERS: %s\\n\",\n                    SDL_GetError());\n        }\n        status = SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\\n\", fsaa,\n                   value);\n        } else {\n            SDL_Log( \"Failed to get SDL_GL_MULTISAMPLESAMPLES: %s\\n\",\n                    SDL_GetError());\n        }\n    }\n    if (accel) {\n        status = SDL_GL_GetAttribute(SDL_GL_ACCELERATED_VISUAL, &value);\n        if (!status) {\n            SDL_Log(\"SDL_GL_ACCELERATED_VISUAL: requested 1, got %d\\n\", value);\n        } else {\n            SDL_Log( \"Failed to get SDL_GL_ACCELERATED_VISUAL: %s\\n\",\n                    SDL_GetError());\n        }\n    }\n\n    datas = (shader_data *)SDL_calloc(state->num_windows, sizeof(shader_data));\n\n    /* Set rendering settings for each context */\n    for (i = 0; i < state->num_windows; ++i) {\n\n        int w, h;\n        status = SDL_GL_MakeCurrent(state->windows[i], context[i]);\n        if (status) {\n            SDL_Log(\"SDL_GL_MakeCurrent(): %s\\n\", SDL_GetError());\n\n            /* Continue for next window */\n            continue;\n        }\n        SDL_GL_GetDrawableSize(state->windows[i], &w, &h);\n        ctx.glViewport(0, 0, w, h);\n\n        data = &datas[i];\n        data->angle_x = 0; data->angle_y = 0; data->angle_z = 0;\n\n        /* Shader Initialization */\n        process_shader(&data->shader_vert, _shader_vert_src, GL_VERTEX_SHADER);\n        process_shader(&data->shader_frag, _shader_frag_src, GL_FRAGMENT_SHADER);\n\n        /* Create shader_program (ready to attach shaders) */\n        data->shader_program = GL_CHECK(ctx.glCreateProgram());\n\n        /* Attach shaders and link shader_program */\n        GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_vert));\n        GL_CHECK(ctx.glAttachShader(data->shader_program, data->shader_frag));\n        GL_CHECK(ctx.glLinkProgram(data->shader_program));\n\n        /* Get attribute locations of non-fixed attributes like color and texture coordinates. */\n        data->attr_position = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, \"av4position\"));\n        data->attr_color = GL_CHECK(ctx.glGetAttribLocation(data->shader_program, \"av3color\"));\n\n        /* Get uniform locations */\n        data->attr_mvp = GL_CHECK(ctx.glGetUniformLocation(data->shader_program, \"mvp\"));\n\n        GL_CHECK(ctx.glUseProgram(data->shader_program));\n\n        /* Enable attributes for position, color and texture coordinates etc. */\n        GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_position));\n        GL_CHECK(ctx.glEnableVertexAttribArray(data->attr_color));\n\n        /* Populate attributes for position, color and texture coordinates etc. */\n        GL_CHECK(ctx.glVertexAttribPointer(data->attr_position, 3, GL_FLOAT, GL_FALSE, 0, _vertices));\n        GL_CHECK(ctx.glVertexAttribPointer(data->attr_color, 3, GL_FLOAT, GL_FALSE, 0, _colors));\n\n        GL_CHECK(ctx.glEnable(GL_CULL_FACE));\n        GL_CHECK(ctx.glEnable(GL_DEPTH_TEST));\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        SDL_Log(\"%2.2f frames per second\\n\",\n               ((double) frames * 1000) / (now - then));\n    }\n#if !defined(__ANDROID__) && !defined(__NACL__)  \n    quit(0);\n#endif    \n    return 0;\n}\n\n#else /* HAVE_OPENGLES2 */\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Log(\"No OpenGL ES support on this system\\n\");\n    return 1;\n}\n\n#endif /* HAVE_OPENGLES2 */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testhaptic.c",
    "content": "/*\nCopyright (c) 2008, Edgar Simo Serra\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n    * Neither the name of the Simple Directmedia Layer (SDL) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/*\n * includes\n */\n#include <stdlib.h>\n#include <string.h>             /* strstr */\n#include <ctype.h>              /* isdigit */\n\n#include \"SDL.h\"\n\n#ifndef SDL_HAPTIC_DISABLED\n\nstatic SDL_Haptic *haptic;\n\n\n/*\n * prototypes\n */\nstatic void abort_execution(void);\nstatic void HapticPrintSupported(SDL_Haptic * haptic);\n\n\n/**\n * @brief The entry point of this force feedback demo.\n * @param[in] argc Number of arguments.\n * @param[in] argv Array of argc arguments.\n */\nint\nmain(int argc, char **argv)\n{\n    int i;\n    char *name;\n    int index;\n    SDL_HapticEffect efx[9];\n    int id[9];\n    int nefx;\n    unsigned int supported;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    name = NULL;\n    index = -1;\n    if (argc > 1) {\n        name = argv[1];\n        if ((strcmp(name, \"--help\") == 0) || (strcmp(name, \"-h\") == 0)) {\n            SDL_Log(\"USAGE: %s [device]\\n\"\n                   \"If device is a two-digit number it'll use it as an index, otherwise\\n\"\n                   \"it'll use it as if it were part of the device's name.\\n\",\n                   argv[0]);\n            return 0;\n        }\n\n        i = strlen(name);\n        if ((i < 3) && isdigit(name[0]) && ((i == 1) || isdigit(name[1]))) {\n            index = atoi(name);\n            name = NULL;\n        }\n    }\n\n    /* Initialize the force feedbackness */\n    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK |\n             SDL_INIT_HAPTIC);\n    SDL_Log(\"%d Haptic devices detected.\\n\", SDL_NumHaptics());\n    if (SDL_NumHaptics() > 0) {\n        /* We'll just use index or the first force feedback device found */\n        if (name == NULL) {\n            i = (index != -1) ? index : 0;\n        }\n        /* Try to find matching device */\n        else {\n            for (i = 0; i < SDL_NumHaptics(); i++) {\n                if (strstr(SDL_HapticName(i), name) != NULL)\n                    break;\n            }\n\n            if (i >= SDL_NumHaptics()) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to find device matching '%s', aborting.\\n\",\n                       name);\n                return 1;\n            }\n        }\n\n        haptic = SDL_HapticOpen(i);\n        if (haptic == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to create the haptic device: %s\\n\",\n                   SDL_GetError());\n            return 1;\n        }\n        SDL_Log(\"Device: %s\\n\", SDL_HapticName(i));\n        HapticPrintSupported(haptic);\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No Haptic devices found!\\n\");\n        return 1;\n    }\n\n    /* We only want force feedback errors. */\n    SDL_ClearError();\n\n    /* Create effects. */\n    memset(&efx, 0, sizeof(efx));\n    nefx = 0;\n    supported = SDL_HapticQuery(haptic);\n\n    SDL_Log(\"\\nUploading effects\\n\");\n    /* First we'll try a SINE effect. */\n    if (supported & SDL_HAPTIC_SINE) {\n        SDL_Log(\"   effect %d: Sine Wave\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_SINE;\n        efx[nefx].periodic.period = 1000;\n        efx[nefx].periodic.magnitude = -0x2000;    /* Negative magnitude and ...                      */\n        efx[nefx].periodic.phase = 18000;          /* ... 180 degrees phase shift => cancel eachother */\n        efx[nefx].periodic.length = 5000;\n        efx[nefx].periodic.attack_length = 1000;\n        efx[nefx].periodic.fade_length = 1000;\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    /* Now we'll try a SAWTOOTHUP */\n    if (supported & SDL_HAPTIC_SAWTOOTHUP) {\n        SDL_Log(\"   effect %d: Sawtooth Up\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_SAWTOOTHUP;\n        efx[nefx].periodic.period = 500;\n        efx[nefx].periodic.magnitude = 0x5000;\n        efx[nefx].periodic.length = 5000;\n        efx[nefx].periodic.attack_length = 1000;\n        efx[nefx].periodic.fade_length = 1000;\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    \n    /* Now the classical constant effect. */\n    if (supported & SDL_HAPTIC_CONSTANT) {\n        SDL_Log(\"   effect %d: Constant Force\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_CONSTANT;\n        efx[nefx].constant.direction.type = SDL_HAPTIC_POLAR;\n        efx[nefx].constant.direction.dir[0] = 20000;    /* Force comes from the south-west. */\n        efx[nefx].constant.length = 5000;\n        efx[nefx].constant.level = 0x6000;\n        efx[nefx].constant.attack_length = 1000;\n        efx[nefx].constant.fade_length = 1000;\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    \n    /* The cute spring effect. */\n    if (supported & SDL_HAPTIC_SPRING) {\n        SDL_Log(\"   effect %d: Condition Spring\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_SPRING;\n        efx[nefx].condition.length = 5000;\n        for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {\n            efx[nefx].condition.right_sat[i] = 0xFFFF;\n            efx[nefx].condition.left_sat[i] = 0xFFFF;\n            efx[nefx].condition.right_coeff[i] = 0x2000;\n            efx[nefx].condition.left_coeff[i] = 0x2000;\n            efx[nefx].condition.center[i] = 0x1000;     /* Displace the center for it to move. */\n        }\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    /* The interesting damper effect. */\n    if (supported & SDL_HAPTIC_DAMPER) {\n        SDL_Log(\"   effect %d: Condition Damper\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_DAMPER;\n        efx[nefx].condition.length = 5000;\n        for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {\n            efx[nefx].condition.right_sat[i] = 0xFFFF;\n            efx[nefx].condition.left_sat[i] = 0xFFFF;\n            efx[nefx].condition.right_coeff[i] = 0x2000;\n            efx[nefx].condition.left_coeff[i] = 0x2000;\n        }\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    /* The pretty awesome inertia effect. */\n    if (supported & SDL_HAPTIC_INERTIA) {\n        SDL_Log(\"   effect %d: Condition Inertia\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_INERTIA;\n        efx[nefx].condition.length = 5000;\n        for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {\n            efx[nefx].condition.right_sat[i] = 0xFFFF;\n            efx[nefx].condition.left_sat[i] = 0xFFFF;\n            efx[nefx].condition.right_coeff[i] = 0x2000;\n            efx[nefx].condition.left_coeff[i] = 0x2000;\n            efx[nefx].condition.deadband[i] = 0x1000;    /* 1/16th of axis-range around the center is 'dead'. */\n        }\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    /* The hot friction effect. */\n    if (supported & SDL_HAPTIC_FRICTION) {\n        SDL_Log(\"   effect %d: Condition Friction\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_FRICTION;\n        efx[nefx].condition.length = 5000;\n        for (i = 0; i < SDL_HapticNumAxes(haptic); i++) {\n            efx[nefx].condition.right_sat[i] = 0xFFFF;\n            efx[nefx].condition.left_sat[i] = 0xFFFF;\n            efx[nefx].condition.right_coeff[i] = 0x2000;\n            efx[nefx].condition.left_coeff[i] = 0x2000;\n        }\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n    \n    /* Now we'll try a ramp effect */\n    if (supported & SDL_HAPTIC_RAMP) {\n        SDL_Log(\"   effect %d: Ramp\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_RAMP;\n        efx[nefx].ramp.direction.type = SDL_HAPTIC_CARTESIAN;\n        efx[nefx].ramp.direction.dir[0] = 1;     /* Force comes from                 */\n        efx[nefx].ramp.direction.dir[1] = -1;    /*                  the north-east. */\n        efx[nefx].ramp.length = 5000;\n        efx[nefx].ramp.start = 0x4000;\n        efx[nefx].ramp.end = -0x4000;\n        efx[nefx].ramp.attack_length = 1000;\n        efx[nefx].ramp.fade_length = 1000;\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n\n    /* Finally we'll try a left/right effect. */\n    if (supported & SDL_HAPTIC_LEFTRIGHT) {\n        SDL_Log(\"   effect %d: Left/Right\\n\", nefx);\n        efx[nefx].type = SDL_HAPTIC_LEFTRIGHT;\n        efx[nefx].leftright.length = 5000;\n        efx[nefx].leftright.large_magnitude = 0x3000;\n        efx[nefx].leftright.small_magnitude = 0xFFFF;\n        id[nefx] = SDL_HapticNewEffect(haptic, &efx[nefx]);\n        if (id[nefx] < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"UPLOADING EFFECT ERROR: %s\\n\", SDL_GetError());\n            abort_execution();\n        }\n        nefx++;\n    }\n\n\n    SDL_Log\n        (\"\\nNow playing effects for 5 seconds each with 1 second delay between\\n\");\n    for (i = 0; i < nefx; i++) {\n        SDL_Log(\"   Playing effect %d\\n\", i);\n        SDL_HapticRunEffect(haptic, id[i], 1);\n        SDL_Delay(6000);        /* Effects only have length 5000 */\n    }\n\n    /* Quit */\n    if (haptic != NULL)\n        SDL_HapticClose(haptic);\n    SDL_Quit();\n\n    return 0;\n}\n\n\n/*\n * Cleans up a bit.\n */\nstatic void\nabort_execution(void)\n{\n    SDL_Log(\"\\nAborting program execution.\\n\");\n\n    SDL_HapticClose(haptic);\n    SDL_Quit();\n\n    exit(1);\n}\n\n\n/*\n * Displays information about the haptic device.\n */\nstatic void\nHapticPrintSupported(SDL_Haptic * haptic)\n{\n    unsigned int supported;\n\n    supported = SDL_HapticQuery(haptic);\n    SDL_Log(\"   Supported effects [%d effects, %d playing]:\\n\",\n           SDL_HapticNumEffects(haptic), SDL_HapticNumEffectsPlaying(haptic));\n    if (supported & SDL_HAPTIC_CONSTANT)\n        SDL_Log(\"      constant\\n\");\n    if (supported & SDL_HAPTIC_SINE)\n        SDL_Log(\"      sine\\n\");\n    /* !!! FIXME: put this back when we have more bits in 2.1 */\n    /* if (supported & SDL_HAPTIC_SQUARE)\n        SDL_Log(\"      square\\n\"); */\n    if (supported & SDL_HAPTIC_TRIANGLE)\n        SDL_Log(\"      triangle\\n\");\n    if (supported & SDL_HAPTIC_SAWTOOTHUP)\n        SDL_Log(\"      sawtoothup\\n\");\n    if (supported & SDL_HAPTIC_SAWTOOTHDOWN)\n        SDL_Log(\"      sawtoothdown\\n\");\n    if (supported & SDL_HAPTIC_RAMP)\n        SDL_Log(\"      ramp\\n\");\n    if (supported & SDL_HAPTIC_FRICTION)\n        SDL_Log(\"      friction\\n\");\n    if (supported & SDL_HAPTIC_SPRING)\n        SDL_Log(\"      spring\\n\");\n    if (supported & SDL_HAPTIC_DAMPER)\n        SDL_Log(\"      damper\\n\");\n    if (supported & SDL_HAPTIC_INERTIA)\n        SDL_Log(\"      inertia\\n\");\n    if (supported & SDL_HAPTIC_CUSTOM)\n        SDL_Log(\"      custom\\n\");\n    if (supported & SDL_HAPTIC_LEFTRIGHT)\n        SDL_Log(\"      left/right\\n\");\n    SDL_Log(\"   Supported capabilities:\\n\");\n    if (supported & SDL_HAPTIC_GAIN)\n        SDL_Log(\"      gain\\n\");\n    if (supported & SDL_HAPTIC_AUTOCENTER)\n        SDL_Log(\"      autocenter\\n\");\n    if (supported & SDL_HAPTIC_STATUS)\n        SDL_Log(\"      status\\n\");\n}\n\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Haptic support.\\n\");\n    exit(1);\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testhittesting.c",
    "content": "#include <stdio.h>\n#include \"SDL.h\"\n\n/* !!! FIXME: rewrite this to be wired in to test framework. */\n\n#define RESIZE_BORDER 20\n\nconst SDL_Rect drag_areas[] = {\n    { 20, 20, 100, 100 },\n    { 200, 70, 100, 100 },\n    { 400, 90, 100, 100 }\n};\n\nstatic const SDL_Rect *areas = drag_areas;\nstatic int numareas = SDL_arraysize(drag_areas);\n\nstatic SDL_HitTestResult SDLCALL\nhitTest(SDL_Window *window, const SDL_Point *pt, void *data)\n{\n    int i;\n    int w, h;\n\n    for (i = 0; i < numareas; i++) {\n        if (SDL_PointInRect(pt, &areas[i])) {\n            SDL_Log(\"HIT-TEST: DRAGGABLE\\n\");\n            return SDL_HITTEST_DRAGGABLE;\n        }\n    }\n\n    SDL_GetWindowSize(window, &w, &h);\n\n    #define REPORT_RESIZE_HIT(name) { \\\n        SDL_Log(\"HIT-TEST: RESIZE_\" #name \"\\n\"); \\\n        return SDL_HITTEST_RESIZE_##name; \\\n    }\n\n    if (pt->x < RESIZE_BORDER && pt->y < RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(TOPLEFT);\n    } else if (pt->x > RESIZE_BORDER && pt->x < w - RESIZE_BORDER && pt->y < RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(TOP);\n    } else if (pt->x > w - RESIZE_BORDER && pt->y < RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(TOPRIGHT);\n    } else if (pt->x > w - RESIZE_BORDER && pt->y > RESIZE_BORDER && pt->y < h - RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(RIGHT);\n    } else if (pt->x > w - RESIZE_BORDER && pt->y > h - RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(BOTTOMRIGHT);\n    } else if (pt->x < w - RESIZE_BORDER && pt->x > RESIZE_BORDER && pt->y > h - RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(BOTTOM);\n    } else if (pt->x < RESIZE_BORDER && pt->y > h - RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(BOTTOMLEFT);\n    } else if (pt->x < RESIZE_BORDER && pt->y < h - RESIZE_BORDER && pt->y > RESIZE_BORDER) {\n        REPORT_RESIZE_HIT(LEFT);\n    }\n\n    SDL_Log(\"HIT-TEST: NORMAL\\n\");\n    return SDL_HITTEST_NORMAL;\n}\n\n\nint main(int argc, char **argv)\n{\n    int done = 0;\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n\n    /* !!! FIXME: check for errors. */\n    SDL_Init(SDL_INIT_VIDEO);\n    window = SDL_CreateWindow(\"Drag the red boxes\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE);\n    renderer = SDL_CreateRenderer(window, -1, 0);\n\n    if (SDL_SetWindowHitTest(window, hitTest, NULL) == -1) {\n        SDL_Log(\"Enabling hit-testing failed!\\n\");\n        SDL_Quit();\n        return 1;\n    }\n\n    while (!done)\n    {\n        SDL_Event e;\n        int nothing_to_do = 1;\n\n        SDL_SetRenderDrawColor(renderer, 0, 0, 127, 255);\n        SDL_RenderClear(renderer);\n        SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);\n        SDL_RenderFillRects(renderer, areas, SDL_arraysize(drag_areas));\n        SDL_RenderPresent(renderer);\n\n        while (SDL_PollEvent(&e)) {\n            nothing_to_do = 0;\n\n            switch (e.type)\n            {\n                case SDL_MOUSEBUTTONDOWN:\n                    SDL_Log(\"button down!\\n\");\n                    break;\n\n                case SDL_MOUSEBUTTONUP:\n                    SDL_Log(\"button up!\\n\");\n                    break;\n\n                case SDL_WINDOWEVENT:\n                    if (e.window.event == SDL_WINDOWEVENT_MOVED) {\n                        SDL_Log(\"Window event moved to (%d, %d)!\\n\", (int) e.window.data1, (int) e.window.data2);\n                    }\n                    break;\n\n                case SDL_KEYDOWN:\n                    if (e.key.keysym.sym == SDLK_ESCAPE) {\n                        done = 1;\n                    } else if (e.key.keysym.sym == SDLK_x) {\n                        if (!areas) {\n                            areas = drag_areas;\n                            numareas = SDL_arraysize(drag_areas);\n                        } else {\n                            areas = NULL;\n                            numareas = 0;\n                        }\n                    }\n                    break;\n\n                case SDL_QUIT:\n                    done = 1;\n                    break;\n            }\n        }\n\n        if (nothing_to_do) {\n            SDL_Delay(50);\n        }\n    }\n\n    SDL_Quit();\n    return 0;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testhotplug.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program to test the SDL joystick hotplugging */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\n#if !defined SDL_JOYSTICK_DISABLED && !defined SDL_HAPTIC_DISABLED\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Joystick *joystick = NULL;\n    SDL_Haptic *haptic = NULL;\n    SDL_JoystickID instance = -1;\n    SDL_bool keepGoing = SDL_TRUE;\n    int i;\n    SDL_bool enable_haptic = SDL_TRUE;\n    Uint32 init_subsystems = SDL_INIT_VIDEO | SDL_INIT_JOYSTICK;\n    \n    for (i = 1; i < argc; ++i) {\n        if (SDL_strcasecmp(argv[i], \"--nohaptic\") == 0) {\n            enable_haptic = SDL_FALSE;\n        }\n    }\n\n    if(enable_haptic) {\n        init_subsystems |= SDL_INIT_HAPTIC;\n    }\n    \n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, \"1\");\n\n    /* Initialize SDL (Note: video is required to start event loop) */\n    if (SDL_Init(init_subsystems) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n\n    /*\n    //SDL_CreateWindow(\"Dummy\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 128, 128, 0);\n    */\n\n    SDL_Log(\"There are %d joysticks at startup\\n\", SDL_NumJoysticks());\n    if (enable_haptic)\n        SDL_Log(\"There are %d haptic devices at startup\\n\", SDL_NumHaptics());\n\n    while(keepGoing)\n    {\n        SDL_Event event;\n        while(SDL_PollEvent(&event))\n        {\n            switch(event.type)\n            {\n                case SDL_QUIT:\n                    keepGoing = SDL_FALSE;\n                    break;\n                case SDL_JOYDEVICEADDED:\n                    if (joystick != NULL)\n                    {\n                        SDL_Log(\"Only one joystick supported by this test\\n\");\n                    }\n                    else\n                    {\n                        joystick = SDL_JoystickOpen(event.jdevice.which);\n                        instance = SDL_JoystickInstanceID(joystick);\n                        SDL_Log(\"Joy Added  : %d : %s\\n\", event.jdevice.which, SDL_JoystickName(joystick));\n                        if (enable_haptic)\n                        {\n                            if (SDL_JoystickIsHaptic(joystick))\n                            {\n                                haptic = SDL_HapticOpenFromJoystick(joystick);\n                                if (haptic)\n                                {\n                                    SDL_Log(\"Joy Haptic Opened\\n\");\n                                    if (SDL_HapticRumbleInit( haptic ) != 0)\n                                    {\n                                        SDL_Log(\"Could not init Rumble!: %s\\n\", SDL_GetError());\n                                        SDL_HapticClose(haptic);\n                                        haptic = NULL;\n                                    }\n                                } else {\n                                    SDL_Log(\"Joy haptic open FAILED!: %s\\n\", SDL_GetError());\n                                }\n                            }\n                            else\n                            {\n                                SDL_Log(\"No haptic found\\n\");\n                            }\n                        }\n                    }\n                    break;\n                case SDL_JOYDEVICEREMOVED:\n                    if (instance == event.jdevice.which)\n                    {\n                        SDL_Log(\"Joy Removed: %d\\n\", event.jdevice.which);\n                        instance = -1;\n                        if(enable_haptic && haptic)\n                        {\n                            SDL_HapticClose(haptic);\n                            haptic = NULL;\n                        }\n                        SDL_JoystickClose(joystick);\n                        joystick = NULL;\n                    } else {\n                        SDL_Log(\"Unknown joystick diconnected\\n\");\n                    }\n                    break;\n                case SDL_JOYAXISMOTION:\n/*\n//                    SDL_Log(\"Axis Move: %d\\n\", event.jaxis.axis);\n*/\n                    if (enable_haptic)\n                        SDL_HapticRumblePlay(haptic, 0.25, 250);\n                    break;\n                case SDL_JOYBUTTONDOWN:\n                    SDL_Log(\"Button Press: %d\\n\", event.jbutton.button);\n                    if(enable_haptic && haptic)\n                    {\n                        SDL_HapticRumblePlay(haptic, 0.25, 250);\n                    }\n                    if (event.jbutton.button == 0) {\n                        SDL_Log(\"Exiting due to button press of button 0\\n\");\n                        keepGoing = SDL_FALSE;\n                    }\n                    break;\n                case SDL_JOYBUTTONUP:\n                    SDL_Log(\"Button Release: %d\\n\", event.jbutton.button);\n                    break;\n            }\n        }\n    }\n\n    SDL_Quit();\n\n    return 0;\n}\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Joystick and haptic support.\\n\");\n    return 1;\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testiconv.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n\nstatic size_t\nwidelen(char *data)\n{\n    size_t len = 0;\n    Uint32 *p = (Uint32 *) data;\n    while (*p++) {\n        ++len;\n    }\n    return len;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    const char *formats[] = {\n        \"UTF8\",\n        \"UTF-8\",\n        \"UTF16BE\",\n        \"UTF-16BE\",\n        \"UTF16LE\",\n        \"UTF-16LE\",\n        \"UTF32BE\",\n        \"UTF-32BE\",\n        \"UTF32LE\",\n        \"UTF-32LE\",\n        \"UCS4\",\n        \"UCS-4\",\n    };\n    char buffer[BUFSIZ];\n    char *ucs4;\n    char *test[2];\n    int i;\n    FILE *file;\n    int errors = 0;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (!argv[1]) {\n        argv[1] = \"utf8.txt\";\n    }\n    file = fopen(argv[1], \"rb\");\n    if (!file) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to open %s\\n\", argv[1]);\n        return (1);\n    }\n\n    while (fgets(buffer, sizeof(buffer), file)) {\n        /* Convert to UCS-4 */\n        size_t len;\n        ucs4 =\n            SDL_iconv_string(\"UCS-4\", \"UTF-8\", buffer,\n                             SDL_strlen(buffer) + 1);\n        len = (widelen(ucs4) + 1) * 4;\n        for (i = 0; i < SDL_arraysize(formats); ++i) {\n            test[0] = SDL_iconv_string(formats[i], \"UCS-4\", ucs4, len);\n            test[1] = SDL_iconv_string(\"UCS-4\", formats[i], test[0], len);\n            if (!test[1] || SDL_memcmp(test[1], ucs4, len) != 0) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"FAIL: %s\\n\", formats[i]);\n                ++errors;\n            }\n            SDL_free(test[0]);\n            SDL_free(test[1]);\n        }\n        test[0] = SDL_iconv_string(\"UTF-8\", \"UCS-4\", ucs4, len);\n        SDL_free(ucs4);\n        fputs(test[0], stdout);\n        SDL_free(test[0]);\n    }\n    fclose(file);\n    return (errors ? errors + 1 : 0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testime.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* A simple program to test the Input Method support in the SDL library (2.0+)\n   If you build without SDL_ttf, you can use the GNU Unifont hex file instead.\n   Download at http://unifoundry.com/unifont.html */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n\n#include \"SDL.h\"\n#ifdef HAVE_SDL_TTF\n#include \"SDL_ttf.h\"\n#endif\n\n#include \"SDL_test_common.h\"\n\n#define DEFAULT_PTSIZE 30\n#ifdef HAVE_SDL_TTF\n#ifdef __MACOSX__\n#define DEFAULT_FONT \"/System/Library/Fonts/华文细黑.ttf\"\n#elif __WIN32__\n/* Some japanese font present on at least Windows 8.1. */\n#define DEFAULT_FONT \"C:\\\\Windows\\\\Fonts\\\\yugothic.ttf\"\n#else\n#define DEFAULT_FONT \"NoDefaultFont.ttf\"\n#endif\n#else\n#define DEFAULT_FONT \"unifont-9.0.02.hex\"\n#endif\n#define MAX_TEXT_LENGTH 256\n\nstatic SDLTest_CommonState *state;\nstatic SDL_Rect textRect, markedRect;\nstatic SDL_Color lineColor = {0,0,0,255};\nstatic SDL_Color backColor = {255,255,255,255};\nstatic SDL_Color textColor = {0,0,0,255};\nstatic char text[MAX_TEXT_LENGTH], markedText[SDL_TEXTEDITINGEVENT_TEXT_SIZE];\nstatic int cursor = 0;\n#ifdef HAVE_SDL_TTF\nstatic TTF_Font *font;\n#else\n#define UNIFONT_MAX_CODEPOINT 0x1ffff\n#define UNIFONT_NUM_GLYPHS 0x20000\n/* Using 512x512 textures that are supported everywhere. */\n#define UNIFONT_TEXTURE_WIDTH 512\n#define UNIFONT_GLYPHS_IN_ROW (UNIFONT_TEXTURE_WIDTH / 16)\n#define UNIFONT_GLYPHS_IN_TEXTURE (UNIFONT_GLYPHS_IN_ROW * UNIFONT_GLYPHS_IN_ROW)\n#define UNIFONT_NUM_TEXTURES ((UNIFONT_NUM_GLYPHS + UNIFONT_GLYPHS_IN_TEXTURE - 1) / UNIFONT_GLYPHS_IN_TEXTURE)\n#define UNIFONT_TEXTURE_SIZE (UNIFONT_TEXTURE_WIDTH * UNIFONT_TEXTURE_WIDTH * 4)\n#define UNIFONT_TEXTURE_PITCH (UNIFONT_TEXTURE_WIDTH * 4)\n#define UNIFONT_DRAW_SCALE 2\nstruct UnifontGlyph {\n    Uint8 width;\n    Uint8 data[32];\n} *unifontGlyph;\nstatic SDL_Texture **unifontTexture;\nstatic Uint8 unifontTextureLoaded[UNIFONT_NUM_TEXTURES] = {0};\n\n/* Unifont loading code start */\n\nstatic Uint8 dehex(char c)\n{\n    if (c >= '0' && c <= '9')\n        return c - '0';\n    else if (c >= 'a' && c <= 'f')\n        return c - 'a' + 10;\n    else if (c >= 'A' && c <= 'F')\n        return c - 'A' + 10;\n    return 255;\n}\n\nstatic Uint8 dehex2(char c1, char c2)\n{\n    return (dehex(c1) << 4) | dehex(c2);\n}\n\nstatic Uint8 validate_hex(const char *cp, size_t len, Uint32 *np)\n{\n    Uint32 n = 0;\n    for (; len > 0; cp++, len--)\n    {\n        Uint8 c = dehex(*cp);\n        if (c == 255)\n            return 0;\n        n = (n << 4) | c;\n    }\n    if (np != NULL)\n        *np = n;\n    return 1;\n}\n\nstatic int unifont_init(const char *fontname)\n{\n    Uint8 hexBuffer[65];\n    Uint32 numGlyphs = 0;\n    int lineNumber = 1;\n    size_t bytesRead;\n    SDL_RWops *hexFile;\n    const size_t unifontGlyphSize = UNIFONT_NUM_GLYPHS * sizeof(struct UnifontGlyph);\n    const size_t unifontTextureSize = UNIFONT_NUM_TEXTURES * state->num_windows * sizeof(void *);\n\n    /* Allocate memory for the glyph data so the file can be closed after initialization. */\n    unifontGlyph = (struct UnifontGlyph *)SDL_malloc(unifontGlyphSize);\n    if (unifontGlyph == NULL)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Failed to allocate %d KiB for glyph data.\\n\", (int)(unifontGlyphSize + 1023) / 1024);\n        return -1;\n    }\n    SDL_memset(unifontGlyph, 0, unifontGlyphSize);\n\n    /* Allocate memory for texture pointers for all renderers. */\n    unifontTexture = (SDL_Texture **)SDL_malloc(unifontTextureSize);\n    if (unifontTexture == NULL)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Failed to allocate %d KiB for texture pointer data.\\n\", (int)(unifontTextureSize + 1023) / 1024);\n        return -1;\n    }\n    SDL_memset(unifontTexture, 0, unifontTextureSize);\n\n    hexFile = SDL_RWFromFile(fontname, \"rb\");\n    if (hexFile == NULL)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Failed to open font file: %s\\n\", fontname);\n        return -1;\n    }\n\n    /* Read all the glyph data into memory to make it accessible later when textures are created. */\n    do {\n        int i, codepointHexSize;\n        size_t bytesOverread;\n        Uint8 glyphWidth;\n        Uint32 codepoint;\n\n        bytesRead = SDL_RWread(hexFile, hexBuffer, 1, 9);\n        if (numGlyphs > 0 && bytesRead == 0)\n            break; /* EOF */\n        if ((numGlyphs == 0 && bytesRead == 0) || (numGlyphs > 0 && bytesRead < 9))\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Unexpected end of hex file.\\n\");\n            return -1;\n        }\n\n        /* Looking for the colon that separates the codepoint and glyph data at position 2, 4, 6 and 8. */\n        if (hexBuffer[2] == ':')\n            codepointHexSize = 2;\n        else if (hexBuffer[4] == ':')\n            codepointHexSize = 4;\n        else if (hexBuffer[6] == ':')\n            codepointHexSize = 6;\n        else if (hexBuffer[8] == ':')\n            codepointHexSize = 8;\n        else\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Could not find codepoint and glyph data separator symbol in hex file on line %d.\\n\", lineNumber);\n            return -1;\n        }\n\n        if (!validate_hex((const char *)hexBuffer, codepointHexSize, &codepoint))\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Malformed hexadecimal number in hex file on line %d.\\n\", lineNumber);\n            return -1;\n        }\n        if (codepoint > UNIFONT_MAX_CODEPOINT)\n            SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Codepoint on line %d exceeded limit of 0x%x.\\n\", lineNumber, UNIFONT_MAX_CODEPOINT);\n\n        /* If there was glyph data read in the last file read, move it to the front of the buffer. */\n        bytesOverread = 8 - codepointHexSize;\n        if (codepointHexSize < 8)\n            SDL_memmove(hexBuffer, hexBuffer + codepointHexSize + 1, bytesOverread);\n        bytesRead = SDL_RWread(hexFile, hexBuffer + bytesOverread, 1, 33 - bytesOverread);\n        if (bytesRead < (33 - bytesOverread))\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Unexpected end of hex file.\\n\");\n            return -1;\n        }\n        if (hexBuffer[32] == '\\n')\n            glyphWidth = 8;\n        else\n        {\n            glyphWidth = 16;\n            bytesRead = SDL_RWread(hexFile, hexBuffer + 33, 1, 32);\n            if (bytesRead < 32)\n            {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Unexpected end of hex file.\\n\");\n                return -1;\n            }\n        }\n\n        if (!validate_hex((const char *)hexBuffer, glyphWidth * 4, NULL))\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Malformed hexadecimal glyph data in hex file on line %d.\\n\", lineNumber);\n            return -1;\n        }\n\n        if (codepoint <= UNIFONT_MAX_CODEPOINT)\n        {\n            if (unifontGlyph[codepoint].width > 0)\n                SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Ignoring duplicate codepoint 0x%08x in hex file on line %d.\\n\", codepoint, lineNumber);\n            else\n            {\n                unifontGlyph[codepoint].width = glyphWidth;\n                /* Pack the hex data into a more compact form. */\n                for (i = 0; i < glyphWidth * 2; i++)\n                    unifontGlyph[codepoint].data[i] = dehex2(hexBuffer[i * 2], hexBuffer[i * 2 + 1]);\n                numGlyphs++;\n            }\n        }\n\n        lineNumber++;\n    } while (bytesRead > 0);\n\n    SDL_RWclose(hexFile);\n    SDL_Log(\"unifont: Loaded %u glyphs.\\n\", numGlyphs);\n    return 0;\n}\n\nstatic void unifont_make_rgba(Uint8 *src, Uint8 *dst, Uint8 width)\n{\n    int i, j;\n    Uint8 *row = dst;\n\n    for (i = 0; i < width * 2; i++)\n    {\n        Uint8 data = src[i];\n        for (j = 0; j < 8; j++)\n        {\n            if (data & 0x80)\n            {\n                row[0] = textColor.r;\n                row[1] = textColor.g;\n                row[2] = textColor.b;\n                row[3] = textColor.a;\n            }\n            else\n            {\n                row[0] = 0;\n                row[1] = 0;\n                row[2] = 0;\n                row[3] = 0;\n            }\n            data <<= 1;\n            row += 4;\n        }\n\n        if (width == 8 || (width == 16 && i % 2 == 1))\n        {\n            dst += UNIFONT_TEXTURE_PITCH;\n            row = dst;\n        }\n    }\n}\n\nstatic int unifont_load_texture(Uint32 textureID)\n{\n    int i;\n    Uint8 * textureRGBA;\n\n    if (textureID >= UNIFONT_NUM_TEXTURES)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Tried to load out of range texture %u.\\n\", textureID);\n        return -1;\n    }\n\n    textureRGBA = (Uint8 *)SDL_malloc(UNIFONT_TEXTURE_SIZE);\n    if (textureRGBA == NULL)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Failed to allocate %d MiB for a texture.\\n\", UNIFONT_TEXTURE_SIZE / 1024 / 1024);\n        return -1;\n    }\n    SDL_memset(textureRGBA, 0, UNIFONT_TEXTURE_SIZE);\n\n    /* Copy the glyphs into memory in RGBA format. */\n    for (i = 0; i < UNIFONT_GLYPHS_IN_TEXTURE; i++)\n    {\n        Uint32 codepoint = UNIFONT_GLYPHS_IN_TEXTURE * textureID + i;\n        if (unifontGlyph[codepoint].width > 0)\n        {\n            const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE;\n            const size_t offset = (cInTex / UNIFONT_GLYPHS_IN_ROW) * UNIFONT_TEXTURE_PITCH * 16 + (cInTex % UNIFONT_GLYPHS_IN_ROW) * 16 * 4;\n            unifont_make_rgba(unifontGlyph[codepoint].data, textureRGBA + offset, unifontGlyph[codepoint].width);\n        }\n    }\n\n    /* Create textures and upload the RGBA data from above. */\n    for (i = 0; i < state->num_windows; ++i)\n    {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID];\n        if (state->windows[i] == NULL || renderer == NULL || tex != NULL)\n            continue;\n        tex = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, UNIFONT_TEXTURE_WIDTH, UNIFONT_TEXTURE_WIDTH);\n        if (tex == NULL)\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"unifont: Failed to create texture %u for renderer %d.\\n\", textureID, i);\n            return -1;\n        }\n        unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID] = tex;\n        SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);\n        if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0)\n        {\n            SDL_Log(\"unifont error: Failed to update texture %u data for renderer %d.\\n\", textureID, i);\n        }\n    }\n\n    SDL_free(textureRGBA);\n    unifontTextureLoaded[textureID] = 1;\n    return 0;\n}\n\nstatic Sint32 unifont_draw_glyph(Uint32 codepoint, int rendererID, SDL_Rect *dstrect)\n{\n    SDL_Texture *texture;\n    const Uint32 textureID = codepoint / UNIFONT_GLYPHS_IN_TEXTURE;\n    SDL_Rect srcrect;\n    srcrect.w = srcrect.h = 16;\n    if (codepoint > UNIFONT_MAX_CODEPOINT) {\n        return 0;\n    }\n    if (!unifontTextureLoaded[textureID]) {\n        if (unifont_load_texture(textureID) < 0) {\n            return 0;\n        }\n    }\n    texture = unifontTexture[UNIFONT_NUM_TEXTURES * rendererID + textureID];\n    if (texture != NULL)\n    {\n        const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE;\n        srcrect.x = cInTex % UNIFONT_GLYPHS_IN_ROW * 16;\n        srcrect.y = cInTex / UNIFONT_GLYPHS_IN_ROW * 16;\n        SDL_RenderCopy(state->renderers[rendererID], texture, &srcrect, dstrect);\n    }\n    return unifontGlyph[codepoint].width;\n}\n\nstatic void unifont_cleanup()\n{\n    int i, j;\n    for (i = 0; i < state->num_windows; ++i)\n    {\n        SDL_Renderer *renderer = state->renderers[i];\n        if (state->windows[i] == NULL || renderer == NULL)\n            continue;\n        for (j = 0; j < UNIFONT_NUM_TEXTURES; j++)\n        {\n            SDL_Texture *tex = unifontTexture[UNIFONT_NUM_TEXTURES * i + j];\n            if (tex != NULL)\n                SDL_DestroyTexture(tex);\n        }\n    }\n\n    for (j = 0; j < UNIFONT_NUM_TEXTURES; j++)\n          unifontTextureLoaded[j] = 0;\n\n    SDL_free(unifontTexture);\n    SDL_free(unifontGlyph);\n}\n\n/* Unifont code end */\n#endif\n\nsize_t utf8_length(unsigned char c)\n{\n    c = (unsigned char)(0xff & c);\n    if (c < 0x80)\n        return 1;\n    else if ((c >> 5) ==0x6)\n        return 2;\n    else if ((c >> 4) == 0xe)\n        return 3;\n    else if ((c >> 3) == 0x1e)\n        return 4;\n    else\n        return 0;\n}\n\nchar *utf8_next(char *p)\n{\n    size_t len = utf8_length(*p);\n    size_t i = 0;\n    if (!len)\n        return 0;\n\n    for (; i < len; ++i)\n    {\n        ++p;\n        if (!*p)\n            return 0;\n    }\n    return p;\n}\n\nchar *utf8_advance(char *p, size_t distance)\n{\n    size_t i = 0;\n    for (; i < distance && p; ++i)\n    {\n        p = utf8_next(p);\n    }\n    return p;\n}\n\nUint32 utf8_decode(char *p, size_t len)\n{\n    Uint32 codepoint = 0;\n    size_t i = 0;\n    if (!len)\n        return 0;\n\n    for (; i < len; ++i)\n    {\n        if (i == 0)\n            codepoint = (0xff >> len) & *p;\n        else\n        {\n            codepoint <<= 6;\n            codepoint |= 0x3f & *p;\n        }\n        if (!*p)\n            return 0;\n        p++;\n    }\n\n    return codepoint;\n}\n\nvoid usage()\n{\n    SDL_Log(\"usage: testime [--font fontfile]\\n\");\n}\n\nvoid InitInput()\n{\n    /* Prepare a rect for text input */\n    textRect.x = textRect.y = 100;\n    textRect.w = DEFAULT_WINDOW_WIDTH - 2 * textRect.x;\n    textRect.h = 50;\n\n    text[0] = 0;\n    markedRect = textRect;\n    markedText[0] = 0;\n\n    SDL_StartTextInput();\n}\n\nvoid CleanupVideo()\n{\n    SDL_StopTextInput();\n#ifdef HAVE_SDL_TTF\n    TTF_CloseFont(font);\n    TTF_Quit();\n#else\n    unifont_cleanup();\n#endif\n}\n\nvoid _Redraw(int rendererID)\n{\n    SDL_Renderer * renderer = state->renderers[rendererID];\n    SDL_Rect drawnTextRect, cursorRect, underlineRect;\n    drawnTextRect = textRect;\n    drawnTextRect.w = 0;\n\n    SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);\n    SDL_RenderFillRect(renderer,&textRect);\n\n    if (*text)\n    {\n#ifdef HAVE_SDL_TTF\n        SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, textColor);\n        SDL_Texture *texture;\n\n        /* Vertically center text */\n        drawnTextRect.y = textRect.y + (textRect.h - textSur->h) / 2;\n        drawnTextRect.w = textSur->w;\n        drawnTextRect.h = textSur->h;\n\n        texture = SDL_CreateTextureFromSurface(renderer,textSur);\n        SDL_FreeSurface(textSur);\n\n        SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect);\n        SDL_DestroyTexture(texture);\n#else\n        char *utext = text;\n        Uint32 codepoint;\n        size_t len;\n        SDL_Rect dstrect;\n\n        dstrect.x = textRect.x;\n        dstrect.y = textRect.y + (textRect.h - 16 * UNIFONT_DRAW_SCALE) / 2;\n        dstrect.w = 16 * UNIFONT_DRAW_SCALE;\n        dstrect.h = 16 * UNIFONT_DRAW_SCALE;\n        drawnTextRect.y = dstrect.y;\n        drawnTextRect.h = dstrect.h;\n\n        while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))))\n        {\n            Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE;\n            dstrect.x += advance;\n            drawnTextRect.w += advance;\n            utext += len;\n        }\n#endif\n    }\n\n    markedRect.x = textRect.x + drawnTextRect.w;\n    markedRect.w = textRect.w - drawnTextRect.w;\n    if (markedRect.w < 0)\n    {\n        /* Stop text input because we cannot hold any more characters */\n        SDL_StopTextInput();\n        return;\n    }\n    else\n    {\n        SDL_StartTextInput();\n    }\n\n    cursorRect = drawnTextRect;\n    cursorRect.x += cursorRect.w;\n    cursorRect.w = 2;\n    cursorRect.h = drawnTextRect.h;\n\n    drawnTextRect.x += drawnTextRect.w;\n    drawnTextRect.w = 0;\n\n    SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);\n    SDL_RenderFillRect(renderer,&markedRect);\n\n    if (markedText[0])\n    {\n#ifdef HAVE_SDL_TTF\n        SDL_Surface *textSur;\n        SDL_Texture *texture;\n        if (cursor)\n        {\n            char *p = utf8_advance(markedText, cursor);\n            char c = 0;\n            if (!p)\n                p = &markedText[SDL_strlen(markedText)];\n\n            c = *p;\n            *p = 0;\n            TTF_SizeUTF8(font, markedText, &drawnTextRect.w, NULL);\n            cursorRect.x += drawnTextRect.w;\n            *p = c;\n        }\n        textSur = TTF_RenderUTF8_Blended(font, markedText, textColor);\n        /* Vertically center text */\n        drawnTextRect.y = textRect.y + (textRect.h - textSur->h) / 2;\n        drawnTextRect.w = textSur->w;\n        drawnTextRect.h = textSur->h;\n\n        texture = SDL_CreateTextureFromSurface(renderer,textSur);\n        SDL_FreeSurface(textSur);\n\n        SDL_RenderCopy(renderer,texture,NULL,&drawnTextRect);\n        SDL_DestroyTexture(texture);\n#else\n        int i = 0;\n        char *utext = markedText;\n        Uint32 codepoint;\n        size_t len;\n        SDL_Rect dstrect;\n\n        dstrect.x = drawnTextRect.x;\n        dstrect.y = textRect.y + (textRect.h - 16 * UNIFONT_DRAW_SCALE) / 2;\n        dstrect.w = 16 * UNIFONT_DRAW_SCALE;\n        dstrect.h = 16 * UNIFONT_DRAW_SCALE;\n        drawnTextRect.y = dstrect.y;\n        drawnTextRect.h = dstrect.h;\n\n        while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))))\n        {\n            Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE;\n            dstrect.x += advance;\n            drawnTextRect.w += advance;\n            if (i < cursor)\n                cursorRect.x += advance;\n            i++;\n            utext += len;\n        }\n#endif\n\n        if (cursor > 0)\n        {\n            cursorRect.y = drawnTextRect.y;\n            cursorRect.h = drawnTextRect.h;\n        }\n\n        underlineRect = markedRect;\n        underlineRect.y = drawnTextRect.y + drawnTextRect.h - 2;\n        underlineRect.h = 2;\n        underlineRect.w = drawnTextRect.w;\n\n        SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);\n        SDL_RenderFillRect(renderer, &underlineRect);\n    }\n\n    SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);\n    SDL_RenderFillRect(renderer,&cursorRect);\n\n    SDL_SetTextInputRect(&markedRect);\n}\n\nvoid Redraw()\n{\n    int i;\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        if (state->windows[i] == NULL)\n            continue;\n        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);\n        SDL_RenderClear(renderer);\n\n        /* Sending in the window id to let the font renderers know which one we're working with. */\n        _Redraw(i);\n\n        SDL_RenderPresent(renderer);\n    }\n}\n\nint main(int argc, char *argv[])\n{\n    int i, done;\n    SDL_Event event;\n    const char *fontname = DEFAULT_FONT;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;i++) {\n        SDLTest_CommonArg(state, i);\n    }\n    for (argc--, argv++; argc > 0; argc--, argv++)\n    {\n        if (strcmp(argv[0], \"--help\") == 0) {\n            usage();\n            return 0;\n        }\n\n        else if (strcmp(argv[0], \"--font\") == 0)\n        {\n            argc--;\n            argv++;\n\n            if (argc > 0)\n                fontname = argv[0];\n            else {\n                usage();\n                return 0;\n            }\n        }\n    }\n\n    if (!SDLTest_CommonInit(state)) {\n        return 2;\n    }\n\n\n#ifdef HAVE_SDL_TTF\n    /* Initialize fonts */\n    TTF_Init();\n\n    font = TTF_OpenFont(fontname, DEFAULT_PTSIZE);\n    if (! font)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to find font: %s\\n\", TTF_GetError());\n        return -1;\n    }\n#else\n    if (unifont_init(fontname) < 0) {\n        return -1;\n    }\n#endif\n\n    SDL_Log(\"Using font: %s\\n\", fontname);\n\n    InitInput();\n    /* Create the windows and initialize the renderers */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n    Redraw();\n    /* Main render loop */\n    done = 0;\n    while (!done) {\n        /* Check for events */\n        while (SDL_PollEvent(&event)) {\n            SDLTest_CommonEvent(state, &event, &done);\n            switch(event.type) {\n                case SDL_KEYDOWN: {\n                    switch (event.key.keysym.sym)\n                    {\n                        case SDLK_RETURN:\n                             text[0]=0x00;\n                             Redraw();\n                             break;\n                        case SDLK_BACKSPACE:\n                            /* Only delete text if not in editing mode. */\n                             if (!markedText[0])\n                             {\n                                 size_t textlen = SDL_strlen(text);\n\n                                 do {\n                                     if (textlen==0)\n                                     {\n                                         break;\n                                     }\n                                     if ((text[textlen-1] & 0x80) == 0x00)\n                                     {\n                                         /* One byte */\n                                         text[textlen-1]=0x00;\n                                         break;\n                                     }\n                                     if ((text[textlen-1] & 0xC0) == 0x80)\n                                     {\n                                         /* Byte from the multibyte sequence */\n                                         text[textlen-1]=0x00;\n                                         textlen--;\n                                     }\n                                     if ((text[textlen-1] & 0xC0) == 0xC0)\n                                     {\n                                         /* First byte of multibyte sequence */\n                                         text[textlen-1]=0x00;\n                                         break;\n                                     }\n                                 } while(1);\n\n                                 Redraw();\n                             }\n                             break;\n                    }\n\n                    if (done)\n                    {\n                        break;\n                    }\n\n                    SDL_Log(\"Keyboard: scancode 0x%08X = %s, keycode 0x%08X = %s\\n\",\n                            event.key.keysym.scancode,\n                            SDL_GetScancodeName(event.key.keysym.scancode),\n                            event.key.keysym.sym, SDL_GetKeyName(event.key.keysym.sym));\n                    break;\n\n                case SDL_TEXTINPUT:\n                    if (event.text.text[0] == '\\0' || event.text.text[0] == '\\n' ||\n                        markedRect.w < 0)\n                        break;\n\n                    SDL_Log(\"Keyboard: text input \\\"%s\\\"\\n\", event.text.text);\n\n                    if (SDL_strlen(text) + SDL_strlen(event.text.text) < sizeof(text))\n                        SDL_strlcat(text, event.text.text, sizeof(text));\n\n                    SDL_Log(\"text inputed: %s\\n\", text);\n\n                    /* After text inputed, we can clear up markedText because it */\n                    /* is committed */\n                    markedText[0] = 0;\n                    Redraw();\n                    break;\n\n                case SDL_TEXTEDITING:\n                    SDL_Log(\"text editing \\\"%s\\\", selected range (%d, %d)\\n\",\n                            event.edit.text, event.edit.start, event.edit.length);\n\n                    SDL_strlcpy(markedText, event.edit.text, SDL_TEXTEDITINGEVENT_TEXT_SIZE);\n                    cursor = event.edit.start;\n                    Redraw();\n                    break;\n                }\n                break;\n\n            }\n        }\n    }\n    CleanupVideo();\n    SDLTest_CommonQuit(state);\n    return 0;\n}\n\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testintersections.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program:  draw as many random objects on the screen as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n#define SWAP(typ,a,b) do{typ t=a;a=b;b=t;}while(0)\n#define NUM_OBJECTS 100\n\nstatic SDLTest_CommonState *state;\nstatic int num_objects;\nstatic SDL_bool cycle_color;\nstatic SDL_bool cycle_alpha;\nstatic int cycle_direction = 1;\nstatic int current_alpha = 255;\nstatic int current_color = 255;\nstatic SDL_BlendMode blendMode = SDL_BLENDMODE_NONE;\n\nint mouse_begin_x = -1, mouse_begin_y = -1;\nint done;\n\nvoid\nDrawPoints(SDL_Renderer * renderer)\n{\n    int i;\n    int x, y;\n    SDL_Rect viewport;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    for (i = 0; i < num_objects * 4; ++i) {\n        /* Cycle the color and alpha, if desired */\n        if (cycle_color) {\n            current_color += cycle_direction;\n            if (current_color < 0) {\n                current_color = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_color > 255) {\n                current_color = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        if (cycle_alpha) {\n            current_alpha += cycle_direction;\n            if (current_alpha < 0) {\n                current_alpha = 0;\n                cycle_direction = -cycle_direction;\n            }\n            if (current_alpha > 255) {\n                current_alpha = 255;\n                cycle_direction = -cycle_direction;\n            }\n        }\n        SDL_SetRenderDrawColor(renderer, 255, (Uint8) current_color,\n                               (Uint8) current_color, (Uint8) current_alpha);\n\n        x = rand() % viewport.w;\n        y = rand() % viewport.h;\n        SDL_RenderDrawPoint(renderer, x, y);\n    }\n}\n\n#define MAX_LINES 16\nint num_lines = 0;\nSDL_Rect lines[MAX_LINES];\nstatic int\nadd_line(int x1, int y1, int x2, int y2)\n{\n    if (num_lines >= MAX_LINES)\n        return 0;\n    if ((x1 == x2) && (y1 == y2))\n        return 0;\n\n    SDL_Log(\"adding line (%d, %d), (%d, %d)\\n\", x1, y1, x2, y2);\n    lines[num_lines].x = x1;\n    lines[num_lines].y = y1;\n    lines[num_lines].w = x2;\n    lines[num_lines].h = y2;\n\n    return ++num_lines;\n}\n\n\nvoid\nDrawLines(SDL_Renderer * renderer)\n{\n    int i;\n    SDL_Rect viewport;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);\n\n    for (i = 0; i < num_lines; ++i) {\n        if (i == -1) {\n            SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);\n            SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0);\n            SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2);\n            SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1);\n        } else {\n            SDL_RenderDrawLine(renderer, lines[i].x, lines[i].y, lines[i].w, lines[i].h);\n        }\n    }\n}\n\n#define MAX_RECTS 16\nint num_rects = 0;\nSDL_Rect rects[MAX_RECTS];\nstatic int\nadd_rect(int x1, int y1, int x2, int y2)\n{\n    if (num_rects >= MAX_RECTS)\n        return 0;\n    if ((x1 == x2) || (y1 == y2))\n        return 0;\n\n    if (x1 > x2)\n        SWAP(int, x1, x2);\n    if (y1 > y2)\n        SWAP(int, y1, y2);\n\n    SDL_Log(\"adding rect (%d, %d), (%d, %d) [%dx%d]\\n\", x1, y1, x2, y2,\n           x2 - x1, y2 - y1);\n\n    rects[num_rects].x = x1;\n    rects[num_rects].y = y1;\n    rects[num_rects].w = x2 - x1;\n    rects[num_rects].h = y2 - y1;\n\n    return ++num_rects;\n}\n\nstatic void\nDrawRects(SDL_Renderer * renderer)\n{\n    SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);\n    SDL_RenderFillRects(renderer, rects, num_rects);\n}\n\nstatic void\nDrawRectLineIntersections(SDL_Renderer * renderer)\n{\n    int i, j;\n\n    SDL_SetRenderDrawColor(renderer, 0, 255, 55, 255);\n\n    for (i = 0; i < num_rects; i++)\n        for (j = 0; j < num_lines; j++) {\n            int x1, y1, x2, y2;\n            SDL_Rect r;\n\n            r = rects[i];\n            x1 = lines[j].x;\n            y1 = lines[j].y;\n            x2 = lines[j].w;\n            y2 = lines[j].h;\n\n            if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {\n                SDL_RenderDrawLine(renderer, x1, y1, x2, y2);\n            }\n        }\n}\n\nstatic void\nDrawRectRectIntersections(SDL_Renderer * renderer)\n{\n    int i, j;\n\n    SDL_SetRenderDrawColor(renderer, 255, 200, 0, 255);\n\n    for (i = 0; i < num_rects; i++)\n        for (j = i + 1; j < num_rects; j++) {\n            SDL_Rect r;\n            if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {\n                SDL_RenderFillRect(renderer, &r);\n            }\n        }\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n        switch (event.type) {\n        case SDL_MOUSEBUTTONDOWN:\n            mouse_begin_x = event.button.x;\n            mouse_begin_y = event.button.y;\n            break;\n        case SDL_MOUSEBUTTONUP:\n            if (event.button.button == 3)\n                add_line(mouse_begin_x, mouse_begin_y, event.button.x,\n                         event.button.y);\n            if (event.button.button == 1)\n                add_rect(mouse_begin_x, mouse_begin_y, event.button.x,\n                         event.button.y);\n            break;\n        case SDL_KEYDOWN:\n            switch (event.key.keysym.sym) {\n            case 'l':\n                if (event.key.keysym.mod & KMOD_SHIFT)\n                    num_lines = 0;\n                else\n                    add_line(rand() % 640, rand() % 480, rand() % 640,\n                             rand() % 480);\n                break;\n            case 'r':\n                if (event.key.keysym.mod & KMOD_SHIFT)\n                    num_rects = 0;\n                else\n                    add_rect(rand() % 640, rand() % 480, rand() % 640,\n                             rand() % 480);\n                break;\n            }\n            break;\n        default:\n            break;\n        }\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        if (state->windows[i] == NULL)\n            continue;\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n\n        DrawRects(renderer);\n        DrawPoints(renderer);\n        DrawRectRectIntersections(renderer);\n        DrawLines(renderer);\n        DrawRectLineIntersections(renderer);\n\n        SDL_RenderPresent(renderer);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    Uint32 then, now, frames;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize parameters */\n    num_objects = NUM_OBJECTS;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--blend\") == 0) {\n                if (argv[i + 1]) {\n                    if (SDL_strcasecmp(argv[i + 1], \"none\") == 0) {\n                        blendMode = SDL_BLENDMODE_NONE;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"blend\") == 0) {\n                        blendMode = SDL_BLENDMODE_BLEND;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"add\") == 0) {\n                        blendMode = SDL_BLENDMODE_ADD;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"mod\") == 0) {\n                        blendMode = SDL_BLENDMODE_MOD;\n                        consumed = 2;\n                    }\n                }\n            } else if (SDL_strcasecmp(argv[i], \"--cyclecolor\") == 0) {\n                cycle_color = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--cyclealpha\") == 0) {\n                cycle_alpha = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_isdigit(*argv[i])) {\n                num_objects = SDL_atoi(argv[i]);\n                consumed = 1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--blend none|blend|add|mod]\", \"[--cyclecolor]\", \"[--cyclealpha]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            return 1;\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        return 2;\n    }\n\n    /* Create the windows and initialize the renderers */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawBlendMode(renderer, blendMode);\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    srand(time(NULL));\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n    }\n#endif\n\n    SDLTest_CommonQuit(state);\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testjoystick.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program to test the SDL joystick routines */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#ifndef SDL_JOYSTICK_DISABLED\n\n#ifdef __IPHONEOS__\n#define SCREEN_WIDTH    320\n#define SCREEN_HEIGHT   480\n#else\n#define SCREEN_WIDTH    640\n#define SCREEN_HEIGHT   480\n#endif\n\nSDL_Renderer *screen = NULL;\nSDL_bool retval = SDL_FALSE;\nSDL_bool done = SDL_FALSE;\n\nstatic void\nDrawRect(SDL_Renderer *r, const int x, const int y, const int w, const int h)\n{\n    const SDL_Rect area = { x, y, w, h };\n    SDL_RenderFillRect(r, &area);\n}\n\nvoid\nloop(void *arg)\n{\n    SDL_Event event;\n    int i;\n    SDL_Joystick *joystick = (SDL_Joystick *)arg;\n\n        /* blank screen, set up for drawing this frame. */\n    SDL_SetRenderDrawColor(screen, 0x0, 0x0, 0x0, SDL_ALPHA_OPAQUE);\n        SDL_RenderClear(screen);\n\n        while (SDL_PollEvent(&event)) {\n            switch (event.type) {\n\n            case SDL_JOYDEVICEREMOVED:\n                SDL_Log(\"Joystick device %d removed.\\n\", (int) event.jdevice.which);\n                SDL_Log(\"Our instance ID is %d\\n\", (int) SDL_JoystickInstanceID(joystick));\n                break;\n\n            case SDL_JOYAXISMOTION:\n                SDL_Log(\"Joystick %d axis %d value: %d\\n\",\n                       event.jaxis.which,\n                       event.jaxis.axis, event.jaxis.value);\n                break;\n            case SDL_JOYHATMOTION:\n                SDL_Log(\"Joystick %d hat %d value:\",\n                       event.jhat.which, event.jhat.hat);\n                if (event.jhat.value == SDL_HAT_CENTERED)\n                    SDL_Log(\" centered\");\n                if (event.jhat.value & SDL_HAT_UP)\n                    SDL_Log(\" up\");\n                if (event.jhat.value & SDL_HAT_RIGHT)\n                    SDL_Log(\" right\");\n                if (event.jhat.value & SDL_HAT_DOWN)\n                    SDL_Log(\" down\");\n                if (event.jhat.value & SDL_HAT_LEFT)\n                    SDL_Log(\" left\");\n                SDL_Log(\"\\n\");\n                break;\n            case SDL_JOYBALLMOTION:\n                SDL_Log(\"Joystick %d ball %d delta: (%d,%d)\\n\",\n                       event.jball.which,\n                       event.jball.ball, event.jball.xrel, event.jball.yrel);\n                break;\n            case SDL_JOYBUTTONDOWN:\n                SDL_Log(\"Joystick %d button %d down\\n\",\n                       event.jbutton.which, event.jbutton.button);\n                /* First button triggers a 0.5 second full strength rumble */\n                if (event.jbutton.button == 0) {\n                    SDL_JoystickRumble(joystick, 0xFFFF, 0xFFFF, 500);\n                }\n                break;\n            case SDL_JOYBUTTONUP:\n                SDL_Log(\"Joystick %d button %d up\\n\",\n                       event.jbutton.which, event.jbutton.button);\n                break;\n            case SDL_KEYDOWN:\n                if ((event.key.keysym.sym != SDLK_ESCAPE) &&\n                    (event.key.keysym.sym != SDLK_AC_BACK)) {\n                    break;\n                }\n                /* Fall through to signal quit */\n            case SDL_FINGERDOWN:\n            case SDL_MOUSEBUTTONDOWN:\n            case SDL_QUIT:\n                done = SDL_TRUE;\n                break;\n            default:\n                break;\n            }\n        }\n        /* Update visual joystick state */\n        SDL_SetRenderDrawColor(screen, 0x00, 0xFF, 0x00, SDL_ALPHA_OPAQUE);\n        for (i = 0; i < SDL_JoystickNumButtons(joystick); ++i) {\n            if (SDL_JoystickGetButton(joystick, i) == SDL_PRESSED) {\n                DrawRect(screen, (i%20) * 34, SCREEN_HEIGHT - 68 + (i/20) * 34, 32, 32);\n            }\n        }\n\n        SDL_SetRenderDrawColor(screen, 0xFF, 0x00, 0x00, SDL_ALPHA_OPAQUE);\n        for (i = 0; i < SDL_JoystickNumAxes(joystick); ++i) {\n            /* Draw the X/Y axis */\n            int x, y;\n            x = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768);\n            x *= SCREEN_WIDTH;\n            x /= 65535;\n            if (x < 0) {\n                x = 0;\n            } else if (x > (SCREEN_WIDTH - 16)) {\n                x = SCREEN_WIDTH - 16;\n            }\n            ++i;\n            if (i < SDL_JoystickNumAxes(joystick)) {\n                y = (((int) SDL_JoystickGetAxis(joystick, i)) + 32768);\n            } else {\n                y = 32768;\n            }\n            y *= SCREEN_HEIGHT;\n            y /= 65535;\n            if (y < 0) {\n                y = 0;\n            } else if (y > (SCREEN_HEIGHT - 16)) {\n                y = SCREEN_HEIGHT - 16;\n            }\n\n            DrawRect(screen, x, y, 16, 16);\n        }\n\n        SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0xFF, SDL_ALPHA_OPAQUE);\n        for (i = 0; i < SDL_JoystickNumHats(joystick); ++i) {\n            /* Derive the new position */\n            int x = SCREEN_WIDTH/2;\n            int y = SCREEN_HEIGHT/2;\n            const Uint8 hat_pos = SDL_JoystickGetHat(joystick, i);\n\n            if (hat_pos & SDL_HAT_UP) {\n                y = 0;\n            } else if (hat_pos & SDL_HAT_DOWN) {\n                y = SCREEN_HEIGHT-8;\n            }\n\n            if (hat_pos & SDL_HAT_LEFT) {\n                x = 0;\n            } else if (hat_pos & SDL_HAT_RIGHT) {\n                x = SCREEN_WIDTH-8;\n            }\n\n            DrawRect(screen, x, y, 8, 8);\n        }\n\n        SDL_RenderPresent(screen);\n\n        if (SDL_JoystickGetAttached( joystick ) == 0) {\n            done = SDL_TRUE;\n            retval = SDL_TRUE;  /* keep going, wait for reattach. */\n        }\n\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nstatic SDL_bool\nWatchJoystick(SDL_Joystick * joystick)\n{\n    SDL_Window *window = NULL;\n    const char *name = NULL;\n\n    retval = SDL_FALSE;\n    done = SDL_FALSE;\n\n    /* Create a window to display joystick axis position */\n    window = SDL_CreateWindow(\"Joystick Test\", SDL_WINDOWPOS_CENTERED,\n                              SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,\n                              SCREEN_HEIGHT, 0);\n    if (window == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create window: %s\\n\", SDL_GetError());\n        return SDL_FALSE;\n    }\n\n    screen = SDL_CreateRenderer(window, -1, 0);\n    if (screen == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create renderer: %s\\n\", SDL_GetError());\n        SDL_DestroyWindow(window);\n        return SDL_FALSE;\n    }\n\n    SDL_SetRenderDrawColor(screen, 0x00, 0x00, 0x00, SDL_ALPHA_OPAQUE);\n    SDL_RenderClear(screen);\n    SDL_RenderPresent(screen);\n    SDL_RaiseWindow(window);\n\n    /* Print info about the joystick we are watching */\n    name = SDL_JoystickName(joystick);\n    SDL_Log(\"Watching joystick %d: (%s)\\n\", SDL_JoystickInstanceID(joystick),\n           name ? name : \"Unknown Joystick\");\n    SDL_Log(\"Joystick has %d axes, %d hats, %d balls, and %d buttons\\n\",\n           SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick),\n           SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick));\n\n    /* Loop, getting joystick events! */\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop_arg(loop, joystick, 0, 1);\n#else\n    while (!done) {\n        loop(joystick);\n    }\n#endif\n\n    SDL_DestroyRenderer(screen);\n    screen = NULL;\n    SDL_DestroyWindow(window);\n    return retval;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    const char *name, *type;\n    int i;\n    SDL_Joystick *joystick;\n\n    SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, \"0\");\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL (Note: video is required to start event loop) */\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n\n    /* Print information about the joysticks */\n    SDL_Log(\"There are %d joysticks attached\\n\", SDL_NumJoysticks());\n    for (i = 0; i < SDL_NumJoysticks(); ++i) {\n        name = SDL_JoystickNameForIndex(i);\n        SDL_Log(\"Joystick %d: %s\\n\", i, name ? name : \"Unknown Joystick\");\n        joystick = SDL_JoystickOpen(i);\n        if (joystick == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_JoystickOpen(%d) failed: %s\\n\", i,\n                    SDL_GetError());\n        } else {\n            char guid[64];\n            SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick);\n            SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick),\n                                      guid, sizeof (guid));\n            switch (SDL_JoystickGetType(joystick)) {\n            case SDL_JOYSTICK_TYPE_GAMECONTROLLER:\n                type = \"Game Controller\";\n                break;\n            case SDL_JOYSTICK_TYPE_WHEEL:\n                type = \"Wheel\";\n                break;\n            case SDL_JOYSTICK_TYPE_ARCADE_STICK:\n                type = \"Arcade Stick\";\n                break;\n            case SDL_JOYSTICK_TYPE_FLIGHT_STICK:\n                type = \"Flight Stick\";\n                break;\n            case SDL_JOYSTICK_TYPE_DANCE_PAD:\n                type = \"Dance Pad\";\n                break;\n            case SDL_JOYSTICK_TYPE_GUITAR:\n                type = \"Guitar\";\n                break;\n            case SDL_JOYSTICK_TYPE_DRUM_KIT:\n                type = \"Drum Kit\";\n                break;\n            case SDL_JOYSTICK_TYPE_ARCADE_PAD:\n                type = \"Arcade Pad\";\n                break;\n            case SDL_JOYSTICK_TYPE_THROTTLE:\n                type = \"Throttle\";\n                break;\n            default:\n                type = \"Unknown\";\n                break;\n            }\n            SDL_Log(\"       type: %s\\n\", type);\n            SDL_Log(\"       axes: %d\\n\", SDL_JoystickNumAxes(joystick));\n            SDL_Log(\"      balls: %d\\n\", SDL_JoystickNumBalls(joystick));\n            SDL_Log(\"       hats: %d\\n\", SDL_JoystickNumHats(joystick));\n            SDL_Log(\"    buttons: %d\\n\", SDL_JoystickNumButtons(joystick));\n            SDL_Log(\"instance id: %d\\n\", SDL_JoystickInstanceID(joystick));\n            SDL_Log(\"       guid: %s\\n\", guid);\n            SDL_Log(\"    VID/PID: 0x%.4x/0x%.4x\\n\", SDL_JoystickGetVendor(joystick), SDL_JoystickGetProduct(joystick));\n            SDL_JoystickClose(joystick);\n        }\n    }\n\n#if defined(__ANDROID__) || defined(__IPHONEOS__)\n    if (SDL_NumJoysticks() > 0) {\n#else\n    if (argv[1]) {\n#endif\n        SDL_bool reportederror = SDL_FALSE;\n        SDL_bool keepGoing = SDL_TRUE;\n        SDL_Event event;\n        int device;\n#if defined(__ANDROID__) || defined(__IPHONEOS__)\n        device = 0;\n#else\n        device = atoi(argv[1]);\n#endif\n        joystick = SDL_JoystickOpen(device);\n        if (joystick != NULL) {\n            SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick);\n        }\n\n        while ( keepGoing ) {\n            if (joystick == NULL) {\n                if ( !reportederror ) {\n                    SDL_Log(\"Couldn't open joystick %d: %s\\n\", device, SDL_GetError());\n                    keepGoing = SDL_FALSE;\n                    reportederror = SDL_TRUE;\n                }\n            } else {\n                reportederror = SDL_FALSE;\n                keepGoing = WatchJoystick(joystick);\n                SDL_JoystickClose(joystick);\n            }\n\n            joystick = NULL;\n            if (keepGoing) {\n                SDL_Log(\"Waiting for attach\\n\");\n            }\n            while (keepGoing) {\n                SDL_WaitEvent(&event);\n                if ((event.type == SDL_QUIT) || (event.type == SDL_FINGERDOWN)\n                    || (event.type == SDL_MOUSEBUTTONDOWN)) {\n                    keepGoing = SDL_FALSE;\n                } else if (event.type == SDL_JOYDEVICEADDED) {\n                    device = event.jdevice.which;\n                    joystick = SDL_JoystickOpen(device);\n                    if (joystick != NULL) {\n                        SDL_assert(SDL_JoystickFromInstanceID(SDL_JoystickInstanceID(joystick)) == joystick);\n                    }\n                    break;\n                }\n            }\n        }\n    }\n    SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);\n\n    return 0;\n}\n\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Joystick support.\\n\");\n    exit(1);\n}\n\n#endif\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testkeys.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Print out all the scancodes we have, just to verify them */\n\n#include <stdio.h>\n#include <ctype.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Scancode scancode;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n    for (scancode = 0; scancode < SDL_NUM_SCANCODES; ++scancode) {\n        SDL_Log(\"Scancode #%d, \\\"%s\\\"\\n\", scancode,\n               SDL_GetScancodeName(scancode));\n    }\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testloadso.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Test program to test dynamic loading with the loadso subsystem.\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\ntypedef int (*fntype) (const char *);\n\nint\nmain(int argc, char *argv[])\n{\n    int retval = 0;\n    int hello = 0;\n    const char *libname = NULL;\n    const char *symname = NULL;\n    void *lib = NULL;\n    fntype fn = NULL;\n\n    if (argc != 3) {\n        const char *app = argv[0];\n        SDL_Log(\"USAGE: %s <library> <functionname>\\n\", app);\n        SDL_Log(\"       %s --hello <lib with puts()>\\n\", app);\n        return 1;\n    }\n\n    /* Initialize SDL */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return 2;\n    }\n\n    if (strcmp(argv[1], \"--hello\") == 0) {\n        hello = 1;\n        libname = argv[2];\n        symname = \"puts\";\n    } else {\n        libname = argv[1];\n        symname = argv[2];\n    }\n\n    lib = SDL_LoadObject(libname);\n    if (lib == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_LoadObject('%s') failed: %s\\n\",\n                libname, SDL_GetError());\n        retval = 3;\n    } else {\n        fn = (fntype) SDL_LoadFunction(lib, symname);\n        if (fn == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_LoadFunction('%s') failed: %s\\n\",\n                    symname, SDL_GetError());\n            retval = 4;\n        } else {\n            SDL_Log(\"Found %s in %s at %p\\n\", symname, libname, fn);\n            if (hello) {\n                SDL_Log(\"Calling function...\\n\");\n                fflush(stdout);\n                fn(\"     HELLO, WORLD!\\n\");\n                SDL_Log(\"...apparently, we survived.  :)\\n\");\n                SDL_Log(\"Unloading library...\\n\");\n                fflush(stdout);\n            }\n        }\n        SDL_UnloadObject(lib);\n    }\n    SDL_Quit();\n    return retval;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testlock.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Test the thread and mutex locking functions\n   Also exercises the system's signal/thread interaction\n*/\n\n#include <signal.h>\n#include <stdio.h>\n#include <stdlib.h> /* for atexit() */\n\n#include \"SDL.h\"\n\nstatic SDL_mutex *mutex = NULL;\nstatic SDL_threadID mainthread;\nstatic SDL_Thread *threads[6];\nstatic SDL_atomic_t doterminate;\n\n/*\n * SDL_Quit() shouldn't be used with atexit() directly because\n *  calling conventions may differ...\n */\nstatic void\nSDL_Quit_Wrapper(void)\n{\n    SDL_Quit();\n}\n\nvoid\nprintid(void)\n{\n    SDL_Log(\"Process %lu:  exiting\\n\", SDL_ThreadID());\n}\n\nvoid\nterminate(int sig)\n{\n    signal(SIGINT, terminate);\n    SDL_AtomicSet(&doterminate, 1);\n}\n\nvoid\nclosemutex(int sig)\n{\n    SDL_threadID id = SDL_ThreadID();\n    int i;\n    SDL_Log(\"Process %lu:  Cleaning up...\\n\", id == mainthread ? 0 : id);\n    SDL_AtomicSet(&doterminate, 1);\n    for (i = 0; i < 6; ++i)\n        SDL_WaitThread(threads[i], NULL);\n    SDL_DestroyMutex(mutex);\n    exit(sig);\n}\n\nint SDLCALL\nRun(void *data)\n{\n    if (SDL_ThreadID() == mainthread)\n        signal(SIGTERM, closemutex);\n    while (!SDL_AtomicGet(&doterminate)) {\n        SDL_Log(\"Process %lu ready to work\\n\", SDL_ThreadID());\n        if (SDL_LockMutex(mutex) < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't lock mutex: %s\", SDL_GetError());\n            exit(1);\n        }\n        SDL_Log(\"Process %lu, working!\\n\", SDL_ThreadID());\n        SDL_Delay(1 * 1000);\n        SDL_Log(\"Process %lu, done!\\n\", SDL_ThreadID());\n        if (SDL_UnlockMutex(mutex) < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't unlock mutex: %s\", SDL_GetError());\n            exit(1);\n        }\n        /* If this sleep isn't done, then threads may starve */\n        SDL_Delay(10);\n    }\n    if (SDL_ThreadID() == mainthread && SDL_AtomicGet(&doterminate)) {\n        SDL_Log(\"Process %lu:  raising SIGTERM\\n\", SDL_ThreadID());\n        raise(SIGTERM);\n    }\n    return (0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    int maxproc = 6;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"%s\\n\", SDL_GetError());\n        exit(1);\n    }\n    atexit(SDL_Quit_Wrapper);\n\n    SDL_AtomicSet(&doterminate, 0);\n\n    if ((mutex = SDL_CreateMutex()) == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create mutex: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n\n    mainthread = SDL_ThreadID();\n    SDL_Log(\"Main thread: %lu\\n\", mainthread);\n    atexit(printid);\n    for (i = 0; i < maxproc; ++i) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"Worker%d\", i);\n        if ((threads[i] = SDL_CreateThread(Run, name, NULL)) == NULL)\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create thread!\\n\");\n    }\n    signal(SIGINT, terminate);\n    Run(NULL);\n\n    return (0);                 /* Never reached */\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testmessage.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL MessageBox API */\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"SDL.h\"\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic int SDLCALL\nbutton_messagebox(void *eventNumber)\n{\n    const SDL_MessageBoxButtonData buttons[] = {\n        {\n            SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT,\n            0,\n            \"OK\"\n        },{\n            SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT,\n            1,\n            \"Cancel\"\n        },\n    };\n\n    SDL_MessageBoxData data = {\n        SDL_MESSAGEBOX_INFORMATION,\n        NULL, /* no parent window */\n        \"Custom MessageBox\",\n        \"This is a custom messagebox\",\n        2,\n        NULL,/* buttons */\n        NULL /* Default color scheme */\n    };\n\n    int button = -1;\n    int success = 0;\n    data.buttons = buttons;\n    if (eventNumber) {\n        data.message = \"This is a custom messagebox from a background thread.\";\n    }\n\n    success = SDL_ShowMessageBox(&data, &button);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        if (eventNumber) {\n            SDL_UserEvent event;\n            event.type = (intptr_t)eventNumber;\n            SDL_PushEvent((SDL_Event*)&event);\n            return 1;\n        } else {\n            quit(2);\n        }\n    }\n    SDL_Log(\"Pressed button: %d, %s\\n\", button, button == -1 ? \"[closed]\" : button == 1 ? \"Cancel\" : \"OK\");\n\n    if (eventNumber) {\n        SDL_UserEvent event;\n        event.type = (intptr_t)eventNumber;\n        SDL_PushEvent((SDL_Event*)&event);\n    }\n\n    return 0;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int success;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                \"Simple MessageBox\",\n                \"This is a simple error MessageBox\",\n                NULL);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n\n    success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                \"Simple MessageBox\",\n                \"This is a simple MessageBox with a newline:\\r\\nHello world!\",\n                NULL);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n\n    /* Google says this is Traditional Chinese for \"beef with broccoli\" */\n    success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                \"UTF-8 Simple MessageBox\",\n                \"Unicode text: '牛肉西蘭花' ...\",\n                NULL);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n\n    /* Google says this is Traditional Chinese for \"beef with broccoli\" */\n    success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                \"UTF-8 Simple MessageBox\",\n                \"Unicode text and newline:\\r\\n'牛肉西蘭花'\\n'牛肉西蘭花'\",\n                NULL);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n\n    /* Google says this is Traditional Chinese for \"beef with broccoli\" */\n    success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                \"牛肉西蘭花\",\n                \"Unicode text in the title.\",\n                NULL);\n    if (success == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n\n    button_messagebox(NULL);\n\n    /* Test showing a message box from a background thread.\n\n       On Mac OS X, the video subsystem needs to be initialized for this\n       to work, since the message box events are dispatched by the Cocoa\n       subsystem on the main thread.\n     */\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL video subsystem: %s\\n\", SDL_GetError());\n        return (1);\n    }\n    {\n        int status = 0;\n        SDL_Event event;\n        intptr_t eventNumber = SDL_RegisterEvents(1);\n        SDL_Thread* thread = SDL_CreateThread(&button_messagebox, \"MessageBox\", (void*)eventNumber);\n\n        while (SDL_WaitEvent(&event))\n        {\n            if (event.type == eventNumber) {\n                break;\n            }\n        }\n\n        SDL_WaitThread(thread, &status);\n\n        SDL_Log(\"Message box thread return %i\\n\", status);\n    }\n\n    /* Test showing a message box with a parent window */\n    {\n        SDL_Event event;\n        SDL_Window *window = SDL_CreateWindow(\"Test\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0);\n\n        success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,\n                    \"Simple MessageBox\",\n                    \"This is a simple error MessageBox with a parent window\",\n                    window);\n        if (success == -1) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Error Presenting MessageBox: %s\\n\", SDL_GetError());\n            quit(1);\n        }\n\n        while (SDL_WaitEvent(&event))\n        {\n            if (event.type == SDL_QUIT || event.type == SDL_KEYUP) {\n                break;\n            }\n        }\n    }\n\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testmultiaudio.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include \"SDL.h\"\n\n#include <stdio.h> /* for fflush() and stdout */\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\nstatic SDL_AudioSpec spec;\nstatic Uint8 *sound = NULL;     /* Pointer to wave data */\nstatic Uint32 soundlen = 0;     /* Length of wave data */\n\ntypedef struct\n{\n    SDL_AudioDeviceID dev;\n    int soundpos;\n    SDL_atomic_t done;\n} callback_data;\n\ncallback_data cbd[64];\n\nvoid SDLCALL\nplay_through_once(void *arg, Uint8 * stream, int len)\n{\n    callback_data *cbd = (callback_data *) arg;\n    Uint8 *waveptr = sound + cbd->soundpos;\n    int waveleft = soundlen - cbd->soundpos;\n    int cpy = len;\n    if (cpy > waveleft)\n        cpy = waveleft;\n\n    SDL_memcpy(stream, waveptr, cpy);\n    len -= cpy;\n    cbd->soundpos += cpy;\n    if (len > 0) {\n        stream += cpy;\n        SDL_memset(stream, spec.silence, len);\n        SDL_AtomicSet(&cbd->done, 1);\n    }\n}\n\nvoid\nloop()\n{\n    if (SDL_AtomicGet(&cbd[0].done)) {\n#ifdef __EMSCRIPTEN__\n        emscripten_cancel_main_loop();\n#endif\n        SDL_PauseAudioDevice(cbd[0].dev, 1);\n        SDL_CloseAudioDevice(cbd[0].dev);\n        SDL_FreeWAV(sound);\n        SDL_Quit();\n    }\n}\n\nstatic void\ntest_multi_audio(int devcount)\n{\n    int keep_going = 1;\n    int i;\n    \n#ifdef __ANDROID__  \n    SDL_Event event;\n  \n    /* Create a Window to get fully initialized event processing for testing pause on Android. */\n    SDL_CreateWindow(\"testmultiaudio\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 320, 240, 0);\n#endif\n\n    if (devcount > 64) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Too many devices (%d), clamping to 64...\\n\",\n                devcount);\n        devcount = 64;\n    }\n\n    spec.callback = play_through_once;\n\n    for (i = 0; i < devcount; i++) {\n        const char *devname = SDL_GetAudioDeviceName(i, 0);\n        SDL_Log(\"playing on device #%d: ('%s')...\", i, devname);\n        fflush(stdout);\n\n        SDL_memset(&cbd[0], '\\0', sizeof(callback_data));\n        spec.userdata = &cbd[0];\n        cbd[0].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL, 0);\n        if (cbd[0].dev == 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Open device failed: %s\\n\", SDL_GetError());\n        } else {\n            SDL_PauseAudioDevice(cbd[0].dev, 0);\n#ifdef __EMSCRIPTEN__\n            emscripten_set_main_loop(loop, 0, 1);\n#else\n            while (!SDL_AtomicGet(&cbd[0].done)) {\n                #ifdef __ANDROID__                \n                /* Empty queue, some application events would prevent pause. */\n                while (SDL_PollEvent(&event)){}\n                #endif                \n                SDL_Delay(100);\n            }\n            SDL_PauseAudioDevice(cbd[0].dev, 1);\n#endif\n            SDL_Log(\"done.\\n\");\n            SDL_CloseAudioDevice(cbd[0].dev);\n        }\n    }\n\n    SDL_memset(cbd, '\\0', sizeof(cbd));\n\n    SDL_Log(\"playing on all devices...\\n\");\n    for (i = 0; i < devcount; i++) {\n        const char *devname = SDL_GetAudioDeviceName(i, 0);\n        spec.userdata = &cbd[i];\n        cbd[i].dev = SDL_OpenAudioDevice(devname, 0, &spec, NULL, 0);\n        if (cbd[i].dev == 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Open device %d failed: %s\\n\", i, SDL_GetError());\n        }\n    }\n\n    for (i = 0; i < devcount; i++) {\n        if (cbd[i].dev) {\n            SDL_PauseAudioDevice(cbd[i].dev, 0);\n        }\n    }\n\n    while (keep_going) {\n        keep_going = 0;\n        for (i = 0; i < devcount; i++) {\n            if ((cbd[i].dev) && (!SDL_AtomicGet(&cbd[i].done))) {\n                keep_going = 1;\n            }\n        }\n        #ifdef __ANDROID__        \n        /* Empty queue, some application events would prevent pause. */\n        while (SDL_PollEvent(&event)){}\n        #endif        \n\n        SDL_Delay(100);\n    }\n\n#ifndef __EMSCRIPTEN__\n    for (i = 0; i < devcount; i++) {\n        if (cbd[i].dev) {\n            SDL_PauseAudioDevice(cbd[i].dev, 1);\n            SDL_CloseAudioDevice(cbd[i].dev);\n        }\n    }\n\n    SDL_Log(\"All done!\\n\");\n#endif\n}\n\n\nint\nmain(int argc, char **argv)\n{\n    int devcount = 0;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_AUDIO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    SDL_Log(\"Using audio driver: %s\\n\", SDL_GetCurrentAudioDriver());\n    \n    devcount = SDL_GetNumAudioDevices(0);\n    if (devcount < 1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Don't see any specific audio devices!\\n\");\n    } else {\n        if (argv[1] == NULL) {\n            argv[1] = \"sample.wav\";\n        }\n\n        /* Load the wave file into memory */\n        if (SDL_LoadWAV(argv[1], &spec, &sound, &soundlen) == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", argv[1],\n                    SDL_GetError());\n        } else {\n            test_multi_audio(devcount);\n            SDL_FreeWAV(sound);\n        }\n    }\n\n    SDL_Quit();\n    return 0;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testnative.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Create a native window and attach an SDL renderer */\n\n#include <stdio.h>\n#include <stdlib.h> /* for srand() */\n#include <time.h> /* for time() */\n\n#include \"testnative.h\"\n\n#define WINDOW_W    640\n#define WINDOW_H    480\n#define NUM_SPRITES 100\n#define MAX_SPEED   1\n\nstatic NativeWindowFactory *factories[] = {\n#ifdef TEST_NATIVE_WINDOWS\n    &WindowsWindowFactory,\n#endif\n#ifdef TEST_NATIVE_X11\n    &X11WindowFactory,\n#endif\n#ifdef TEST_NATIVE_COCOA\n    &CocoaWindowFactory,\n#endif\n    NULL\n};\nstatic NativeWindowFactory *factory = NULL;\nstatic void *native_window;\nstatic SDL_Rect *positions, *velocities;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_VideoQuit();\n    if (native_window) {\n        factory->DestroyNativeWindow(native_window);\n    }\n    exit(rc);\n}\n\nSDL_Texture *\nLoadSprite(SDL_Renderer *renderer, char *file)\n{\n    SDL_Surface *temp;\n    SDL_Texture *sprite;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return 0;\n    }\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (temp->format->palette) {\n        SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);\n    }\n\n    /* Create textures from the image */\n    sprite = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!sprite) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return 0;\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return sprite;\n}\n\nvoid\nMoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)\n{\n    int sprite_w, sprite_h;\n    int i;\n    SDL_Rect viewport;\n    SDL_Rect *position, *velocity;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n    SDL_QueryTexture(sprite, NULL, NULL, &sprite_w, &sprite_h);\n\n    /* Draw a gray background */\n    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n    SDL_RenderClear(renderer);\n\n    /* Move the sprite, bounce at the wall, and draw */\n    for (i = 0; i < NUM_SPRITES; ++i) {\n        position = &positions[i];\n        velocity = &velocities[i];\n        position->x += velocity->x;\n        if ((position->x < 0) || (position->x >= (viewport.w - sprite_w))) {\n            velocity->x = -velocity->x;\n            position->x += velocity->x;\n        }\n        position->y += velocity->y;\n        if ((position->y < 0) || (position->y >= (viewport.h - sprite_h))) {\n            velocity->y = -velocity->y;\n            position->y += velocity->y;\n        }\n\n        /* Blit the sprite onto the screen */\n        SDL_RenderCopy(renderer, sprite, NULL, position);\n    }\n\n    /* Update the screen! */\n    SDL_RenderPresent(renderer);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i, done;\n    const char *driver;\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Texture *sprite;\n    int window_w, window_h;\n    int sprite_w, sprite_h;\n    SDL_Event event;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_VideoInit(NULL) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL video: %s\\n\",\n                SDL_GetError());\n        exit(1);\n    }\n    driver = SDL_GetCurrentVideoDriver();\n\n    /* Find a native window driver and create a native window */\n    for (i = 0; factories[i]; ++i) {\n        if (SDL_strcmp(driver, factories[i]->tag) == 0) {\n            factory = factories[i];\n            break;\n        }\n    }\n    if (!factory) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't find native window code for %s driver\\n\",\n                driver);\n        quit(2);\n    }\n    SDL_Log(\"Creating native window for %s driver\\n\", driver);\n    native_window = factory->CreateNativeWindow(WINDOW_W, WINDOW_H);\n    if (!native_window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create native window\\n\");\n        quit(3);\n    }\n    window = SDL_CreateWindowFrom(native_window);\n    if (!window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create SDL window: %s\\n\", SDL_GetError());\n        quit(4);\n    }\n    SDL_SetWindowTitle(window, \"SDL Native Window Test\");\n\n    /* Create the renderer */\n    renderer = SDL_CreateRenderer(window, -1, 0);\n    if (!renderer) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create renderer: %s\\n\", SDL_GetError());\n        quit(5);\n    }\n\n    /* Clear the window, load the sprite and go! */\n    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n    SDL_RenderClear(renderer);\n\n    sprite = LoadSprite(renderer, \"icon.bmp\");\n    if (!sprite) {\n        quit(6);\n    }\n\n    /* Allocate memory for the sprite info */\n    SDL_GetWindowSize(window, &window_w, &window_h);\n    SDL_QueryTexture(sprite, NULL, NULL, &sprite_w, &sprite_h);\n    positions = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect));\n    velocities = (SDL_Rect *) SDL_malloc(NUM_SPRITES * sizeof(SDL_Rect));\n    if (!positions || !velocities) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory!\\n\");\n        quit(2);\n    }\n    srand(time(NULL));\n    for (i = 0; i < NUM_SPRITES; ++i) {\n        positions[i].x = rand() % (window_w - sprite_w);\n        positions[i].y = rand() % (window_h - sprite_h);\n        positions[i].w = sprite_w;\n        positions[i].h = sprite_h;\n        velocities[i].x = 0;\n        velocities[i].y = 0;\n        while (!velocities[i].x && !velocities[i].y) {\n            velocities[i].x = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;\n            velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;\n        }\n    }\n\n    /* Main render loop */\n    done = 0;\n    while (!done) {\n        /* Check for events */\n        while (SDL_PollEvent(&event)) {\n            switch (event.type) {\n            case SDL_WINDOWEVENT:\n                switch (event.window.event) {\n                case SDL_WINDOWEVENT_EXPOSED:\n                    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n                    SDL_RenderClear(renderer);\n                    break;\n                }\n                break;\n            case SDL_QUIT:\n                done = 1;\n                break;\n            default:\n                break;\n            }\n        }\n        MoveSprites(renderer, sprite);\n    }\n\n    quit(0);\n\n    return 0; /* to prevent compiler warning */\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testnative.h",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Definitions for platform dependent windowing functions to test SDL\n   integration with native windows\n*/\n\n#include \"SDL.h\"\n\n/* This header includes all the necessary system headers for native windows */\n#include \"SDL_syswm.h\"\n\ntypedef struct\n{\n    const char *tag;\n    void *(*CreateNativeWindow) (int w, int h);\n    void (*DestroyNativeWindow) (void *window);\n} NativeWindowFactory;\n\n#ifdef SDL_VIDEO_DRIVER_WINDOWS\n#define TEST_NATIVE_WINDOWS\nextern NativeWindowFactory WindowsWindowFactory;\n#endif\n\n#ifdef SDL_VIDEO_DRIVER_X11\n#define TEST_NATIVE_X11\nextern NativeWindowFactory X11WindowFactory;\n#endif\n\n#ifdef SDL_VIDEO_DRIVER_COCOA\n/* Actually, we don't really do this, since it involves adding Objective C\n   support to the build system, which is a little tricky.  You can uncomment\n   it manually though and link testnativecocoa.m into the test application.\n*/\n#define TEST_NATIVE_COCOA\nextern NativeWindowFactory CocoaWindowFactory;\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testnativecocoa.m",
    "content": "\n#include \"testnative.h\"\n\n#ifdef TEST_NATIVE_COCOA\n\n#include <Cocoa/Cocoa.h>\n\nstatic void *CreateWindowCocoa(int w, int h);\nstatic void DestroyWindowCocoa(void *window);\n\nNativeWindowFactory CocoaWindowFactory = {\n    \"cocoa\",\n    CreateWindowCocoa,\n    DestroyWindowCocoa\n};\n\nstatic void *CreateWindowCocoa(int w, int h)\n{\n    NSAutoreleasePool *pool;\n    NSWindow *nswindow;\n    NSRect rect;\n    unsigned int style;\n\n    pool = [[NSAutoreleasePool alloc] init];\n\n    rect.origin.x = 0;\n    rect.origin.y = 0;\n    rect.size.width = w;\n    rect.size.height = h;\n    rect.origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - rect.origin.y - rect.size.height;\n\n    style = (NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask);\n\n    nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE];\n    [nswindow makeKeyAndOrderFront:nil];\n\n    [pool release];\n\n    return nswindow;\n}\n\nstatic void DestroyWindowCocoa(void *window)\n{\n    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\n    NSWindow *nswindow = (NSWindow *)window;\n\n    [nswindow close];\n    [pool release];\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testnativew32.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"testnative.h\"\n\n#ifdef TEST_NATIVE_WINDOWS\n\nstatic void *CreateWindowNative(int w, int h);\nstatic void DestroyWindowNative(void *window);\n\nNativeWindowFactory WindowsWindowFactory = {\n    \"windows\",\n    CreateWindowNative,\n    DestroyWindowNative\n};\n\nLRESULT CALLBACK\nWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)\n{\n    switch (msg) {\n    case WM_CLOSE:\n        DestroyWindow(hwnd);\n        break;\n    case WM_DESTROY:\n        PostQuitMessage(0);\n        break;\n    default:\n        return DefWindowProc(hwnd, msg, wParam, lParam);\n    }\n    return 0;\n}\n\nstatic void *\nCreateWindowNative(int w, int h)\n{\n    HWND hwnd;\n    WNDCLASS wc;\n\n    wc.style = 0;\n    wc.lpfnWndProc = WndProc;\n    wc.cbClsExtra = 0;\n    wc.cbWndExtra = 0;\n    wc.hInstance = GetModuleHandle(NULL);\n    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);\n    wc.hCursor = LoadCursor(NULL, IDC_ARROW);\n    wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);\n    wc.lpszMenuName = NULL;\n    wc.lpszClassName = \"SDL Test\";\n\n    if (!RegisterClass(&wc)) {\n        MessageBox(NULL, \"Window Registration Failed!\", \"Error!\",\n                   MB_ICONEXCLAMATION | MB_OK);\n        return 0;\n    }\n\n    hwnd =\n        CreateWindow(\"SDL Test\", \"\", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,\n                     CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL),\n                     NULL);\n    if (hwnd == NULL) {\n        MessageBox(NULL, \"Window Creation Failed!\", \"Error!\",\n                   MB_ICONEXCLAMATION | MB_OK);\n        return 0;\n    }\n\n    ShowWindow(hwnd, SW_SHOW);\n\n    return hwnd;\n}\n\nstatic void\nDestroyWindowNative(void *window)\n{\n    DestroyWindow((HWND) window);\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testnativex11.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"testnative.h\"\n\n#ifdef TEST_NATIVE_X11\n\nstatic void *CreateWindowX11(int w, int h);\nstatic void DestroyWindowX11(void *window);\n\nNativeWindowFactory X11WindowFactory = {\n    \"x11\",\n    CreateWindowX11,\n    DestroyWindowX11\n};\n\nstatic Display *dpy;\n\nstatic void *\nCreateWindowX11(int w, int h)\n{\n    Window window = 0;\n\n    dpy = XOpenDisplay(NULL);\n    if (dpy) {\n        window =\n            XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, w, h, 0, 0,\n                                0);\n        XMapRaised(dpy, window);\n        XSync(dpy, False);\n    }\n    return (void *) window;\n}\n\nstatic void\nDestroyWindowX11(void *window)\n{\n    if (dpy) {\n        XDestroyWindow(dpy, (Window) window);\n        XCloseDisplay(dpy);\n    }\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testoverlay2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/********************************************************************************\n *                                                                              *\n * Test of the overlay used for moved pictures, test more closed to real life.  *\n * Running trojan moose :) Coded by Mike Gorchak.                               *\n *                                                                              *\n ********************************************************************************/\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\n#include \"testyuv_cvt.h\"\n\n#define MOOSEPIC_W 64\n#define MOOSEPIC_H 88\n\n#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H)\n#define MOOSEFRAMES_COUNT 10\n\nSDL_Color MooseColors[84] = {\n    {49, 49, 49, SDL_ALPHA_OPAQUE}\n    , {66, 24, 0, SDL_ALPHA_OPAQUE}\n    , {66, 33, 0, SDL_ALPHA_OPAQUE}\n    , {66, 66, 66, SDL_ALPHA_OPAQUE}\n    ,\n    {66, 115, 49, SDL_ALPHA_OPAQUE}\n    , {74, 33, 0, SDL_ALPHA_OPAQUE}\n    , {74, 41, 16, SDL_ALPHA_OPAQUE}\n    , {82, 33, 8, SDL_ALPHA_OPAQUE}\n    ,\n    {82, 41, 8, SDL_ALPHA_OPAQUE}\n    , {82, 49, 16, SDL_ALPHA_OPAQUE}\n    , {82, 82, 82, SDL_ALPHA_OPAQUE}\n    , {90, 41, 8, SDL_ALPHA_OPAQUE}\n    ,\n    {90, 41, 16, SDL_ALPHA_OPAQUE}\n    , {90, 57, 24, SDL_ALPHA_OPAQUE}\n    , {99, 49, 16, SDL_ALPHA_OPAQUE}\n    , {99, 66, 24, SDL_ALPHA_OPAQUE}\n    ,\n    {99, 66, 33, SDL_ALPHA_OPAQUE}\n    , {99, 74, 33, SDL_ALPHA_OPAQUE}\n    , {107, 57, 24, SDL_ALPHA_OPAQUE}\n    , {107, 82, 41, SDL_ALPHA_OPAQUE}\n    ,\n    {115, 57, 33, SDL_ALPHA_OPAQUE}\n    , {115, 66, 33, SDL_ALPHA_OPAQUE}\n    , {115, 66, 41, SDL_ALPHA_OPAQUE}\n    , {115, 74, 0, SDL_ALPHA_OPAQUE}\n    ,\n    {115, 90, 49, SDL_ALPHA_OPAQUE}\n    , {115, 115, 115, SDL_ALPHA_OPAQUE}\n    , {123, 82, 0, SDL_ALPHA_OPAQUE}\n    , {123, 99, 57, SDL_ALPHA_OPAQUE}\n    ,\n    {132, 66, 41, SDL_ALPHA_OPAQUE}\n    , {132, 74, 41, SDL_ALPHA_OPAQUE}\n    , {132, 90, 8, SDL_ALPHA_OPAQUE}\n    , {132, 99, 33, SDL_ALPHA_OPAQUE}\n    ,\n    {132, 99, 66, SDL_ALPHA_OPAQUE}\n    , {132, 107, 66, SDL_ALPHA_OPAQUE}\n    , {140, 74, 49, SDL_ALPHA_OPAQUE}\n    , {140, 99, 16, SDL_ALPHA_OPAQUE}\n    ,\n    {140, 107, 74, SDL_ALPHA_OPAQUE}\n    , {140, 115, 74, SDL_ALPHA_OPAQUE}\n    , {148, 107, 24, SDL_ALPHA_OPAQUE}\n    , {148, 115, 82, SDL_ALPHA_OPAQUE}\n    ,\n    {148, 123, 74, SDL_ALPHA_OPAQUE}\n    , {148, 123, 90, SDL_ALPHA_OPAQUE}\n    , {156, 115, 33, SDL_ALPHA_OPAQUE}\n    , {156, 115, 90, SDL_ALPHA_OPAQUE}\n    ,\n    {156, 123, 82, SDL_ALPHA_OPAQUE}\n    , {156, 132, 82, SDL_ALPHA_OPAQUE}\n    , {156, 132, 99, SDL_ALPHA_OPAQUE}\n    , {156, 156, 156, SDL_ALPHA_OPAQUE}\n    ,\n    {165, 123, 49, SDL_ALPHA_OPAQUE}\n    , {165, 123, 90, SDL_ALPHA_OPAQUE}\n    , {165, 132, 82, SDL_ALPHA_OPAQUE}\n    , {165, 132, 90, SDL_ALPHA_OPAQUE}\n    ,\n    {165, 132, 99, SDL_ALPHA_OPAQUE}\n    , {165, 140, 90, SDL_ALPHA_OPAQUE}\n    , {173, 132, 57, SDL_ALPHA_OPAQUE}\n    , {173, 132, 99, SDL_ALPHA_OPAQUE}\n    ,\n    {173, 140, 107, SDL_ALPHA_OPAQUE}\n    , {173, 140, 115, SDL_ALPHA_OPAQUE}\n    , {173, 148, 99, SDL_ALPHA_OPAQUE}\n    , {173, 173, 173, SDL_ALPHA_OPAQUE}\n    ,\n    {181, 140, 74, SDL_ALPHA_OPAQUE}\n    , {181, 148, 115, SDL_ALPHA_OPAQUE}\n    , {181, 148, 123, SDL_ALPHA_OPAQUE}\n    , {181, 156, 107, SDL_ALPHA_OPAQUE}\n    ,\n    {189, 148, 123, SDL_ALPHA_OPAQUE}\n    , {189, 156, 82, SDL_ALPHA_OPAQUE}\n    , {189, 156, 123, SDL_ALPHA_OPAQUE}\n    , {189, 156, 132, SDL_ALPHA_OPAQUE}\n    ,\n    {189, 189, 189, SDL_ALPHA_OPAQUE}\n    , {198, 156, 123, SDL_ALPHA_OPAQUE}\n    , {198, 165, 132, SDL_ALPHA_OPAQUE}\n    , {206, 165, 99, SDL_ALPHA_OPAQUE}\n    ,\n    {206, 165, 132, SDL_ALPHA_OPAQUE}\n    , {206, 173, 140, SDL_ALPHA_OPAQUE}\n    , {206, 206, 206, SDL_ALPHA_OPAQUE}\n    , {214, 173, 115, SDL_ALPHA_OPAQUE}\n    ,\n    {214, 173, 140, SDL_ALPHA_OPAQUE}\n    , {222, 181, 148, SDL_ALPHA_OPAQUE}\n    , {222, 189, 132, SDL_ALPHA_OPAQUE}\n    , {222, 189, 156, SDL_ALPHA_OPAQUE}\n    ,\n    {222, 222, 222, SDL_ALPHA_OPAQUE}\n    , {231, 198, 165, SDL_ALPHA_OPAQUE}\n    , {231, 231, 231, SDL_ALPHA_OPAQUE}\n    , {239, 206, 173, SDL_ALPHA_OPAQUE}\n};\n\nUint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE*2];\nSDL_Texture *MooseTexture;\nSDL_Rect displayrect;\nint window_w;\nint window_h;\nSDL_Window *window;\nSDL_Renderer *renderer;\nint paused = 0;\nint i;\nSDL_bool done = SDL_FALSE;\nstatic int fpsdelay;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic void\nPrintUsage(char *argv0)\n{\n    SDL_Log(\"Usage: %s [arg] [arg] [arg] ...\\n\", argv0);\n    SDL_Log(\"\\n\");\n    SDL_Log(\"Where 'arg' is any of the following options:\\n\");\n    SDL_Log(\"\\n\");\n    SDL_Log(\"    -fps <frames per second>\\n\");\n    SDL_Log(\"    -nodelay\\n\");\n    SDL_Log(\"    -format <fmt> (one of the: YV12, IYUV, YUY2, UYVY, YVYU)\\n\");\n    SDL_Log(\"    -scale <scale factor> (initial scale of the overlay)\\n\");\n    SDL_Log(\"    -help (shows this help)\\n\");\n    SDL_Log(\"\\n\");\n    SDL_Log(\"Press ESC to exit, or SPACE to freeze the movie while application running.\\n\");\n    SDL_Log(\"\\n\");\n}\n\nvoid\nloop()\n{\n    SDL_Event event;\n\n    while (SDL_PollEvent(&event)) {\n        switch (event.type) {\n        case SDL_WINDOWEVENT:\n            if (event.window.event == SDL_WINDOWEVENT_RESIZED) {\n                SDL_RenderSetViewport(renderer, NULL);\n                displayrect.w = window_w = event.window.data1;\n                displayrect.h = window_h = event.window.data2;\n            }\n            break;\n        case SDL_MOUSEBUTTONDOWN:\n            displayrect.x = event.button.x - window_w / 2;\n            displayrect.y = event.button.y - window_h / 2;\n            break;\n        case SDL_MOUSEMOTION:\n            if (event.motion.state) {\n                displayrect.x = event.motion.x - window_w / 2;\n                displayrect.y = event.motion.y - window_h / 2;\n            }\n            break;\n        case SDL_KEYDOWN:\n            if (event.key.keysym.sym == SDLK_SPACE) {\n                paused = !paused;\n                break;\n            }\n            if (event.key.keysym.sym != SDLK_ESCAPE) {\n                break;\n            }\n        case SDL_QUIT:\n            done = SDL_TRUE;\n            break;\n        }\n    }\n\n#ifndef __EMSCRIPTEN__\n    SDL_Delay(fpsdelay);\n#endif\n\n    if (!paused) {\n        i = (i + 1) % MOOSEFRAMES_COUNT;\n\n        SDL_UpdateTexture(MooseTexture, NULL, MooseFrame[i], MOOSEPIC_W);\n    }\n    SDL_RenderClear(renderer);\n    SDL_RenderCopy(renderer, MooseTexture, NULL, &displayrect);\n    SDL_RenderPresent(renderer);\n\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char **argv)\n{\n    Uint8 *RawMooseData;\n    SDL_RWops *handle;\n    SDL_Window *window;\n    int j;\n    int fps = 12;\n    int nodelay = 0;\n    int scale = 5;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return 3;\n    }\n\n    while (argc > 1) {\n        if (SDL_strcmp(argv[1], \"-fps\") == 0) {\n            if (argv[2]) {\n                fps = SDL_atoi(argv[2]);\n                if (fps == 0) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                            \"The -fps option requires an argument [from 1 to 1000], default is 12.\\n\");\n                    quit(10);\n                }\n                if ((fps < 0) || (fps > 1000)) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                            \"The -fps option must be in range from 1 to 1000, default is 12.\\n\");\n                    quit(10);\n                }\n                argv += 2;\n                argc -= 2;\n            } else {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                        \"The -fps option requires an argument [from 1 to 1000], default is 12.\\n\");\n                quit(10);\n            }\n        } else if (SDL_strcmp(argv[1], \"-nodelay\") == 0) {\n            nodelay = 1;\n            argv += 1;\n            argc -= 1;\n        } else if (SDL_strcmp(argv[1], \"-scale\") == 0) {\n            if (argv[2]) {\n                scale = SDL_atoi(argv[2]);\n                if (scale == 0) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                            \"The -scale option requires an argument [from 1 to 50], default is 5.\\n\");\n                    quit(10);\n                }\n                if ((scale < 0) || (scale > 50)) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                            \"The -scale option must be in range from 1 to 50, default is 5.\\n\");\n                    quit(10);\n                }\n                argv += 2;\n                argc -= 2;\n            } else {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                        \"The -fps option requires an argument [from 1 to 1000], default is 12.\\n\");\n                quit(10);\n            }\n        } else if ((SDL_strcmp(argv[1], \"-help\") == 0)\n                   || (SDL_strcmp(argv[1], \"-h\") == 0)) {\n            PrintUsage(argv[0]);\n            quit(0);\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unrecognized option: %s.\\n\", argv[1]);\n            quit(10);\n        }\n        break;\n    }\n\n    RawMooseData = (Uint8 *) SDL_malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT);\n    if (RawMooseData == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Can't allocate memory for movie !\\n\");\n        quit(1);\n    }\n\n    /* load the trojan moose images */\n    handle = SDL_RWFromFile(\"moose.dat\", \"rb\");\n    if (handle == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Can't find the file moose.dat !\\n\");\n        SDL_free(RawMooseData);\n        quit(2);\n    }\n\n    SDL_RWread(handle, RawMooseData, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT);\n\n    SDL_RWclose(handle);\n\n    /* Create the window and renderer */\n    window_w = MOOSEPIC_W * scale;\n    window_h = MOOSEPIC_H * scale;\n    window = SDL_CreateWindow(\"Happy Moose\",\n                              SDL_WINDOWPOS_UNDEFINED,\n                              SDL_WINDOWPOS_UNDEFINED,\n                              window_w, window_h,\n                              SDL_WINDOW_RESIZABLE);\n    if (!window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create window: %s\\n\", SDL_GetError());\n        SDL_free(RawMooseData);\n        quit(4);\n    }\n\n    renderer = SDL_CreateRenderer(window, -1, 0);\n    if (!renderer) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create renderer: %s\\n\", SDL_GetError());\n        SDL_free(RawMooseData);\n        quit(4);\n    }\n\n    MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H);\n    if (!MooseTexture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create texture: %s\\n\", SDL_GetError());\n        SDL_free(RawMooseData);\n        quit(5);\n    }\n    /* Uncomment this to check vertex color with a YUV texture */\n    /* SDL_SetTextureColorMod(MooseTexture, 0xff, 0x80, 0x80); */\n\n    for (i = 0; i < MOOSEFRAMES_COUNT; i++) {\n        Uint8 MooseFrameRGB[MOOSEFRAME_SIZE*3];\n        Uint8 *rgb;\n        Uint8 *frame;\n\n        rgb = MooseFrameRGB;\n        frame = RawMooseData + i * MOOSEFRAME_SIZE;\n        for (j = 0; j < MOOSEFRAME_SIZE; ++j) {\n            rgb[0] = MooseColors[frame[j]].r;\n            rgb[1] = MooseColors[frame[j]].g;\n            rgb[2] = MooseColors[frame[j]].b;\n            rgb += 3;\n        }\n        ConvertRGBtoYUV(SDL_PIXELFORMAT_YV12, MooseFrameRGB, MOOSEPIC_W*3, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H,\n            SDL_GetYUVConversionModeForResolution(MOOSEPIC_W, MOOSEPIC_H),\n            0, 100);\n    }\n\n    SDL_free(RawMooseData);\n\n    /* set the start frame */\n    i = 0;\n    if (nodelay) {\n        fpsdelay = 0;\n    } else {\n        fpsdelay = 1000 / fps;\n    }\n\n    displayrect.x = 0;\n    displayrect.y = 0;\n    displayrect.w = window_w;\n    displayrect.h = window_h;\n\n    /* Ignore key up events, they don't even get filtered */\n    SDL_EventState(SDL_KEYUP, SDL_IGNORE);\n\n    /* Loop, waiting for QUIT or RESIZE */\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, nodelay ? 0 : fps, 1);\n#else\n    while (!done) {\n        loop();\n            }\n#endif\n\n    SDL_DestroyRenderer(renderer);\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testplatform.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdio.h>\n\n#include \"SDL.h\"\n\n/*\n * Watcom C flags these as Warning 201: \"Unreachable code\" if you just\n *  compare them directly, so we push it through a function to keep the\n *  compiler quiet.  --ryan.\n */\nstatic int\nbadsize(size_t sizeoftype, size_t hardcodetype)\n{\n    return sizeoftype != hardcodetype;\n}\n\nint\nTestTypes(SDL_bool verbose)\n{\n    int error = 0;\n\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT8, SDL_MAX_SINT8 == 127);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT8, SDL_MIN_SINT8 == -128);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT8, SDL_MAX_UINT8 == 255);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT8, SDL_MIN_UINT8 == 0);\n\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT16, SDL_MAX_SINT16 == 32767);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT16, SDL_MIN_SINT16 == -32768);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT16, SDL_MAX_UINT16 == 65535);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT16, SDL_MIN_UINT16 == 0);\n\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT32, SDL_MAX_SINT32 == 2147483647);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT32, SDL_MIN_SINT32 == ~0x7fffffff); /* Instead of -2147483648, which is treated as unsigned by some compilers */\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT32, SDL_MAX_UINT32 == 4294967295u);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT32, SDL_MIN_UINT32 == 0);\n\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_SINT64, SDL_MAX_SINT64 == 9223372036854775807ll);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT64, SDL_MIN_SINT64 == ~0x7fffffffffffffffll); /* Instead of -9223372036854775808, which is treated as unsigned by compilers */\n\tSDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == 18446744073709551615ull);\n\tSDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0);\n\n    if (badsize(sizeof(Uint8), 1)) {\n        if (verbose)\n            SDL_Log(\"sizeof(Uint8) != 1, instead = %u\\n\",\n                   (unsigned int)sizeof(Uint8));\n        ++error;\n    }\n    if (badsize(sizeof(Uint16), 2)) {\n        if (verbose)\n            SDL_Log(\"sizeof(Uint16) != 2, instead = %u\\n\",\n                   (unsigned int)sizeof(Uint16));\n        ++error;\n    }\n    if (badsize(sizeof(Uint32), 4)) {\n        if (verbose)\n            SDL_Log(\"sizeof(Uint32) != 4, instead = %u\\n\",\n                   (unsigned int)sizeof(Uint32));\n        ++error;\n    }\n    if (badsize(sizeof(Uint64), 8)) {\n        if (verbose)\n            SDL_Log(\"sizeof(Uint64) != 8, instead = %u\\n\",\n                   (unsigned int)sizeof(Uint64));\n        ++error;\n    }\n    if (verbose && !error)\n        SDL_Log(\"All data types are the expected size.\\n\");\n\n    return (error ? 1 : 0);\n}\n\nint\nTestEndian(SDL_bool verbose)\n{\n    int error = 0;\n    Uint16 value = 0x1234;\n    int real_byteorder;\n    Uint16 value16 = 0xCDAB;\n    Uint16 swapped16 = 0xABCD;\n    Uint32 value32 = 0xEFBEADDE;\n    Uint32 swapped32 = 0xDEADBEEF;\n    Uint64 value64, swapped64;\n\n    value64 = 0xEFBEADDE;\n    value64 <<= 32;\n    value64 |= 0xCDAB3412;\n    swapped64 = 0x1234ABCD;\n    swapped64 <<= 32;\n    swapped64 |= 0xDEADBEEF;\n\n    if (verbose) {\n        SDL_Log(\"Detected a %s endian machine.\\n\",\n               (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? \"little\" : \"big\");\n    }\n    if ((*((char *) &value) >> 4) == 0x1) {\n        real_byteorder = SDL_BIG_ENDIAN;\n    } else {\n        real_byteorder = SDL_LIL_ENDIAN;\n    }\n    if (real_byteorder != SDL_BYTEORDER) {\n        if (verbose) {\n            SDL_Log(\"Actually a %s endian machine!\\n\",\n                   (real_byteorder == SDL_LIL_ENDIAN) ? \"little\" : \"big\");\n        }\n        ++error;\n    }\n    if (verbose) {\n        SDL_Log(\"Value 16 = 0x%X, swapped = 0x%X\\n\", value16,\n               SDL_Swap16(value16));\n    }\n    if (SDL_Swap16(value16) != swapped16) {\n        if (verbose) {\n            SDL_Log(\"16 bit value swapped incorrectly!\\n\");\n        }\n        ++error;\n    }\n    if (verbose) {\n        SDL_Log(\"Value 32 = 0x%X, swapped = 0x%X\\n\", value32,\n               SDL_Swap32(value32));\n    }\n    if (SDL_Swap32(value32) != swapped32) {\n        if (verbose) {\n            SDL_Log(\"32 bit value swapped incorrectly!\\n\");\n        }\n        ++error;\n    }\n    if (verbose) {\n        SDL_Log(\"Value 64 = 0x%\"SDL_PRIX64\", swapped = 0x%\"SDL_PRIX64\"\\n\", value64,\n               SDL_Swap64(value64));\n    }\n    if (SDL_Swap64(value64) != swapped64) {\n        if (verbose) {\n            SDL_Log(\"64 bit value swapped incorrectly!\\n\");\n        }\n        ++error;\n    }\n    return (error ? 1 : 0);\n}\n\nstatic int TST_allmul (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(long long *)result) = ((*(long long *)a) * (*(long long *)b));\n    return (*(long long *)result) == (*(long long *)expected);\n}\n\nstatic int TST_alldiv (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(long long *)result) = ((*(long long *)a) / (*(long long *)b));\n    return (*(long long *)result) == (*(long long *)expected);\n}\n\nstatic int TST_allrem (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(long long *)result) = ((*(long long *)a) % (*(long long *)b));\n    return (*(long long *)result) == (*(long long *)expected);\n}\n\nstatic int TST_ualldiv (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(unsigned long long *)result) = ((*(unsigned long long *)a) / (*(unsigned long long *)b));\n    return (*(unsigned long long *)result) == (*(unsigned long long *)expected);\n}\n\nstatic int TST_uallrem (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(unsigned long long *)result) = ((*(unsigned long long *)a) % (*(unsigned long long *)b));\n    return (*(unsigned long long *)result) == (*(unsigned long long *)expected);\n}\n\nstatic int TST_allshl (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(long long *)result) = (*(long long *)a) << arg;\n    return (*(long long *)result) == (*(long long *)expected);\n}\n\nstatic int TST_aullshl (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(unsigned long long *)result) = (*(unsigned long long *)a) << arg;\n    return (*(unsigned long long *)result) == (*(unsigned long long *)expected);\n}\n\nstatic int TST_allshr (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(long long *)result) = (*(long long *)a) >> arg;\n    return (*(long long *)result) == (*(long long *)expected);\n}\n\nstatic int TST_aullshr (void *a, void *b, int arg, void *result, void *expected)\n{\n    (*(unsigned long long *)result) = (*(unsigned long long *)a) >> arg;\n    return (*(unsigned long long *)result) == (*(unsigned long long *)expected);\n}\n\n\ntypedef int (*LL_Intrinsic)(void *a, void *b, int arg, void *result, void *expected);\n\ntypedef struct {\n    const char *operation;\n    LL_Intrinsic routine;\n    unsigned long long a, b;\n    int arg;\n    unsigned long long expected_result;\n} LL_Test;\n\nstatic LL_Test LL_Tests[] = \n{\n    /* UNDEFINED {\"_allshl\",   &TST_allshl,   0xFFFFFFFFFFFFFFFFll,                  0ll, 65, 0x0000000000000000ll}, */\n    {\"_allshl\",   &TST_allshl,   0xFFFFFFFFFFFFFFFFll,                  0ll,  1, 0xFFFFFFFFFFFFFFFEll},\n    {\"_allshl\",   &TST_allshl,   0xFFFFFFFFFFFFFFFFll,                  0ll, 32, 0xFFFFFFFF00000000ll},\n    {\"_allshl\",   &TST_allshl,   0xFFFFFFFFFFFFFFFFll,                  0ll, 33, 0xFFFFFFFE00000000ll},\n    {\"_allshl\",   &TST_allshl,   0xFFFFFFFFFFFFFFFFll,                  0ll,  0, 0xFFFFFFFFFFFFFFFFll},\n\n    {\"_allshr\",   &TST_allshr,   0xAAAAAAAA55555555ll,                  0ll, 63, 0xFFFFFFFFFFFFFFFFll},\n    /* UNDEFINED {\"_allshr\",   &TST_allshr,   0xFFFFFFFFFFFFFFFFll,                  0ll, 65, 0xFFFFFFFFFFFFFFFFll}, */\n    {\"_allshr\",   &TST_allshr,   0xFFFFFFFFFFFFFFFFll,                  0ll,  1, 0xFFFFFFFFFFFFFFFFll},\n    {\"_allshr\",   &TST_allshr,   0xFFFFFFFFFFFFFFFFll,                  0ll, 32, 0xFFFFFFFFFFFFFFFFll},\n    {\"_allshr\",   &TST_allshr,   0xFFFFFFFFFFFFFFFFll,                  0ll, 33, 0xFFFFFFFFFFFFFFFFll},\n    {\"_allshr\",   &TST_allshr,   0xFFFFFFFFFFFFFFFFll,                  0ll,  0, 0xFFFFFFFFFFFFFFFFll},\n    /* UNDEFINED {\"_allshr\",   &TST_allshr,   0x5F5F5F5F5F5F5F5Fll,                  0ll, 65, 0x0000000000000000ll}, */\n    {\"_allshr\",   &TST_allshr,   0x5F5F5F5F5F5F5F5Fll,                  0ll,  1, 0x2FAFAFAFAFAFAFAFll},\n    {\"_allshr\",   &TST_allshr,   0x5F5F5F5F5F5F5F5Fll,                  0ll, 32, 0x000000005F5F5F5Fll},\n    {\"_allshr\",   &TST_allshr,   0x5F5F5F5F5F5F5F5Fll,                  0ll, 33, 0x000000002FAFAFAFll},\n\n    /* UNDEFINED {\"_aullshl\",  &TST_aullshl,  0xFFFFFFFFFFFFFFFFll,                  0ll, 65, 0x0000000000000000ll}, */\n    {\"_aullshl\",  &TST_aullshl,  0xFFFFFFFFFFFFFFFFll,                  0ll,  1, 0xFFFFFFFFFFFFFFFEll},\n    {\"_aullshl\",  &TST_aullshl,  0xFFFFFFFFFFFFFFFFll,                  0ll, 32, 0xFFFFFFFF00000000ll},\n    {\"_aullshl\",  &TST_aullshl,  0xFFFFFFFFFFFFFFFFll,                  0ll, 33, 0xFFFFFFFE00000000ll},\n    {\"_aullshl\",  &TST_aullshl,  0xFFFFFFFFFFFFFFFFll,                  0ll,  0, 0xFFFFFFFFFFFFFFFFll},\n\n    /* UNDEFINED {\"_aullshr\",  &TST_aullshr,  0xFFFFFFFFFFFFFFFFll,                  0ll, 65, 0x0000000000000000ll}, */\n    {\"_aullshr\",  &TST_aullshr,  0xFFFFFFFFFFFFFFFFll,                  0ll,  1, 0x7FFFFFFFFFFFFFFFll},\n    {\"_aullshr\",  &TST_aullshr,  0xFFFFFFFFFFFFFFFFll,                  0ll, 32, 0x00000000FFFFFFFFll},\n    {\"_aullshr\",  &TST_aullshr,  0xFFFFFFFFFFFFFFFFll,                  0ll, 33, 0x000000007FFFFFFFll},\n    {\"_aullshr\",  &TST_aullshr,  0xFFFFFFFFFFFFFFFFll,                  0ll,  0, 0xFFFFFFFFFFFFFFFFll},\n\n    {\"_allmul\",   &TST_allmul,   0xFFFFFFFFFFFFFFFFll, 0x0000000000000000ll,  0, 0x0000000000000000ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_allmul\",   &TST_allmul,   0x000000000FFFFFFFll, 0x0000000000000001ll,  0, 0x000000000FFFFFFFll},\n    {\"_allmul\",   &TST_allmul,   0x0000000000000001ll, 0x000000000FFFFFFFll,  0, 0x000000000FFFFFFFll},\n    {\"_allmul\",   &TST_allmul,   0x000000000FFFFFFFll, 0x0000000000000010ll,  0, 0x00000000FFFFFFF0ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000000000010ll, 0x000000000FFFFFFFll,  0, 0x00000000FFFFFFF0ll},\n    {\"_allmul\",   &TST_allmul,   0x000000000FFFFFFFll, 0x0000000000000100ll,  0, 0x0000000FFFFFFF00ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000000000100ll, 0x000000000FFFFFFFll,  0, 0x0000000FFFFFFF00ll},\n    {\"_allmul\",   &TST_allmul,   0x000000000FFFFFFFll, 0x0000000010000000ll,  0, 0x00FFFFFFF0000000ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000010000000ll, 0x000000000FFFFFFFll,  0, 0x00FFFFFFF0000000ll},\n    {\"_allmul\",   &TST_allmul,   0x000000000FFFFFFFll, 0x0000000080000000ll,  0, 0x07FFFFFF80000000ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000080000000ll, 0x000000000FFFFFFFll,  0, 0x07FFFFFF80000000ll},\n    {\"_allmul\",   &TST_allmul,   0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll,  0, 0xFFFFFFFF00000000ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000080000000ll, 0xFFFFFFFFFFFFFFFEll,  0, 0xFFFFFFFF00000000ll},\n    {\"_allmul\",   &TST_allmul,   0xFFFFFFFFFFFFFFFEll, 0x0000000080000008ll,  0, 0xFFFFFFFEFFFFFFF0ll},\n    {\"_allmul\",   &TST_allmul,   0x0000000080000008ll, 0xFFFFFFFFFFFFFFFEll,  0, 0xFFFFFFFEFFFFFFF0ll},\n    {\"_allmul\",   &TST_allmul,   0x00000000FFFFFFFFll, 0x00000000FFFFFFFFll,  0, 0xFFFFFFFE00000001ll},\n\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000000ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0xFFFFFFFFFFFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll,  0, 0xFFFFFFFFFFFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0xFFFFFFFFFFFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000001ll, 0x0000000000000001ll,  0, 0x0000000000000001ll},\n    {\"_alldiv\",   &TST_alldiv,   0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000001ll},\n    {\"_alldiv\",   &TST_alldiv,   0x000000000FFFFFFFll, 0x0000000000000001ll,  0, 0x000000000FFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000FFFFFFFFFll, 0x0000000000000010ll,  0, 0x00000000FFFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x0000000000000100ll, 0x000000000FFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_alldiv\",   &TST_alldiv,   0x00FFFFFFF0000000ll, 0x0000000010000000ll,  0, 0x000000000FFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x07FFFFFF80000000ll, 0x0000000080000000ll,  0, 0x000000000FFFFFFFll},\n    {\"_alldiv\",   &TST_alldiv,   0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll,  0, 0x0000000000000000ll},\n    {\"_alldiv\",   &TST_alldiv,   0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x0000000080000008ll},\n    {\"_alldiv\",   &TST_alldiv,   0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0xC000000080000008ll},\n    {\"_alldiv\",   &TST_alldiv,   0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll,  0, 0x0000000000007FFFll},\n    {\"_alldiv\",   &TST_alldiv,   0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll,  0, 0x0000000000000001ll},\n\n    {\"_allrem\",   &TST_allrem,   0x0000000000000000ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x0000000000000001ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x000000000FFFFFFFll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x0000000FFFFFFFFFll, 0x0000000000000010ll,  0, 0x000000000000000Fll},\n    {\"_allrem\",   &TST_allrem,   0x0000000000000100ll, 0x000000000FFFFFFFll,  0, 0x0000000000000100ll},\n    {\"_allrem\",   &TST_allrem,   0x00FFFFFFF0000000ll, 0x0000000010000000ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x07FFFFFF80000000ll, 0x0000000080000000ll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll,  0, 0xFFFFFFFFFFFFFFFEll},\n    {\"_allrem\",   &TST_allrem,   0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x0000000000000000ll},\n    {\"_allrem\",   &TST_allrem,   0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll,  0, 0x0000FFFF0000FFEEll},\n    {\"_allrem\",   &TST_allrem,   0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll,  0, 0x0000000000000000ll},\n\n\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000000ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll,  0, 0xFFFFFFFFFFFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000001ll, 0x0000000000000001ll,  0, 0x0000000000000001ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000001ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x000000000FFFFFFFll, 0x0000000000000001ll,  0, 0x000000000FFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000FFFFFFFFFll, 0x0000000000000010ll,  0, 0x00000000FFFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x0000000000000100ll, 0x000000000FFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x00FFFFFFF0000000ll, 0x0000000010000000ll,  0, 0x000000000FFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x07FFFFFF80000000ll, 0x0000000080000000ll,  0, 0x000000000FFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll,  0, 0x00000001FFFFFFFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x0000000000000000ll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll,  0, 0x0000000000007FFFll},\n    {\"_ualldiv\",  &TST_ualldiv,  0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll,  0, 0x0000000000000001ll},\n\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000000ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000000ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000001ll},\n    {\"_uallrem\",  &TST_uallrem,  0xFFFFFFFFFFFFFFFFll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000001ll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000001ll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000001ll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0xFFFFFFFFFFFFFFFFll, 0xFFFFFFFFFFFFFFFFll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x000000000FFFFFFFll, 0x0000000000000001ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000FFFFFFFFFll, 0x0000000000000010ll,  0, 0x000000000000000Fll},\n    {\"_uallrem\",  &TST_uallrem,  0x0000000000000100ll, 0x000000000FFFFFFFll,  0, 0x0000000000000100ll},\n    {\"_uallrem\",  &TST_uallrem,  0x00FFFFFFF0000000ll, 0x0000000010000000ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0x07FFFFFF80000000ll, 0x0000000080000000ll,  0, 0x0000000000000000ll},\n    {\"_uallrem\",  &TST_uallrem,  0xFFFFFFFFFFFFFFFEll, 0x0000000080000000ll,  0, 0x000000007FFFFFFEll},\n    {\"_uallrem\",  &TST_uallrem,  0xFFFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0xFFFFFFFEFFFFFFF0ll},\n    {\"_uallrem\",  &TST_uallrem,  0x7FFFFFFEFFFFFFF0ll, 0xFFFFFFFFFFFFFFFEll,  0, 0x7FFFFFFEFFFFFFF0ll},\n    {\"_uallrem\",  &TST_uallrem,  0x7FFFFFFEFFFFFFF0ll, 0x0000FFFFFFFFFFFEll,  0, 0x0000FFFF0000FFEEll},\n    {\"_uallrem\",  &TST_uallrem,  0x7FFFFFFEFFFFFFF0ll, 0x7FFFFFFEFFFFFFF0ll,  0, 0x0000000000000000ll},\n\n    {NULL}\n};\n\nint\nTest64Bit (SDL_bool verbose)\n{\n    LL_Test *t;\n    int failed = 0;\n\n    for (t = LL_Tests; t->routine != NULL; t++) {\n        unsigned long long result = 0;\n        unsigned int *al = (unsigned int *)&t->a;\n        unsigned int *bl = (unsigned int *)&t->b;\n        unsigned int *el = (unsigned int *)&t->expected_result;\n        unsigned int *rl = (unsigned int *)&result;\n\n        if (!t->routine(&t->a, &t->b, t->arg, &result, &t->expected_result)) {\n            if (verbose)\n                SDL_Log(\"%s(0x%08X%08X, 0x%08X%08X, %3d, produced: 0x%08X%08X, expected: 0x%08X%08X\\n\",\n                        t->operation, al[1], al[0], bl[1], bl[0], t->arg, rl[1], rl[0], el[1], el[0]);\n            ++failed;\n        }\n    }\n    if (verbose && (failed == 0))\n        SDL_Log(\"All 64bit instrinsic tests passed\\n\");\n    return (failed ? 1 : 0);\n}\n\nint\nTestCPUInfo(SDL_bool verbose)\n{\n    if (verbose) {\n        SDL_Log(\"CPU count: %d\\n\", SDL_GetCPUCount());\n        SDL_Log(\"CPU cache line size: %d\\n\", SDL_GetCPUCacheLineSize());\n        SDL_Log(\"RDTSC %s\\n\", SDL_HasRDTSC()? \"detected\" : \"not detected\");\n        SDL_Log(\"AltiVec %s\\n\", SDL_HasAltiVec()? \"detected\" : \"not detected\");\n        SDL_Log(\"MMX %s\\n\", SDL_HasMMX()? \"detected\" : \"not detected\");\n        SDL_Log(\"3DNow! %s\\n\", SDL_Has3DNow()? \"detected\" : \"not detected\");\n        SDL_Log(\"SSE %s\\n\", SDL_HasSSE()? \"detected\" : \"not detected\");\n        SDL_Log(\"SSE2 %s\\n\", SDL_HasSSE2()? \"detected\" : \"not detected\");\n        SDL_Log(\"SSE3 %s\\n\", SDL_HasSSE3()? \"detected\" : \"not detected\");\n        SDL_Log(\"SSE4.1 %s\\n\", SDL_HasSSE41()? \"detected\" : \"not detected\");\n        SDL_Log(\"SSE4.2 %s\\n\", SDL_HasSSE42()? \"detected\" : \"not detected\");\n        SDL_Log(\"AVX %s\\n\", SDL_HasAVX()? \"detected\" : \"not detected\");\n        SDL_Log(\"AVX2 %s\\n\", SDL_HasAVX2()? \"detected\" : \"not detected\");\n        SDL_Log(\"AVX-512F %s\\n\", SDL_HasAVX512F()? \"detected\" : \"not detected\");\n        SDL_Log(\"NEON %s\\n\", SDL_HasNEON()? \"detected\" : \"not detected\");\n        SDL_Log(\"System RAM %d MB\\n\", SDL_GetSystemRAM());\n    }\n    return (0);\n}\n\nint\nTestAssertions(SDL_bool verbose)\n{\n    SDL_assert(1);\n    SDL_assert_release(1);\n    SDL_assert_paranoid(1);\n    SDL_assert(0 || 1);\n    SDL_assert_release(0 || 1);\n    SDL_assert_paranoid(0 || 1);\n\n#if 0   /* enable this to test assertion failures. */\n    SDL_assert_release(1 == 2);\n    SDL_assert_release(5 < 4);\n    SDL_assert_release(0 && \"This is a test\");\n#endif\n\n    {\n        const SDL_AssertData *item = SDL_GetAssertionReport();\n        while (item) {\n            SDL_Log(\"'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n\",\n                item->condition, item->function, item->filename,\n                item->linenum, item->trigger_count,\n                item->always_ignore ? \"yes\" : \"no\");\n            item = item->next;\n        }\n    }\n    return (0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_bool verbose = SDL_TRUE;\n    int status = 0;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (argv[1] && (SDL_strcmp(argv[1], \"-q\") == 0)) {\n        verbose = SDL_FALSE;\n    }\n    if (verbose) {\n        SDL_Log(\"This system is running %s\\n\", SDL_GetPlatform());\n    }\n\n    status += TestTypes(verbose);\n    status += TestEndian(verbose);\n    status += Test64Bit(verbose);\n    status += TestCPUInfo(verbose);\n    status += TestAssertions(verbose);\n\n    return status;\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testpower.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple test of power subsystem. */\n\n#include <stdio.h>\n#include \"SDL.h\"\n\nstatic void\nreport_power(void)\n{\n    int seconds, percent;\n    const SDL_PowerState state = SDL_GetPowerInfo(&seconds, &percent);\n    char *statestr = NULL;\n\n    SDL_Log(\"SDL-reported power info...\\n\");\n    switch (state) {\n    case SDL_POWERSTATE_UNKNOWN:\n        statestr = \"Unknown\";\n        break;\n    case SDL_POWERSTATE_ON_BATTERY:\n        statestr = \"On battery\";\n        break;\n    case SDL_POWERSTATE_NO_BATTERY:\n        statestr = \"No battery\";\n        break;\n    case SDL_POWERSTATE_CHARGING:\n        statestr = \"Charging\";\n        break;\n    case SDL_POWERSTATE_CHARGED:\n        statestr = \"Charged\";\n        break;\n    default:\n        statestr = \"!!API ERROR!!\";\n        break;\n    }\n\n    SDL_Log(\"State: %s\\n\", statestr);\n\n    if (percent == -1) {\n        SDL_Log(\"Percent left: unknown\\n\");\n    } else {\n        SDL_Log(\"Percent left: %d%%\\n\", percent);\n    }\n\n    if (seconds == -1) {\n        SDL_Log(\"Time left: unknown\\n\");\n    } else {\n        SDL_Log(\"Time left: %d minutes, %d seconds\\n\", (int) (seconds / 60),\n               (int) (seconds % 60));\n    }\n}\n\n\nint\nmain(int argc, char *argv[])\n{\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(0) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_Init() failed: %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n    report_power();\n\n    SDL_Quit();\n    return 0;\n}\n\n/* end of testpower.c ... */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testqsort.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"SDL_test.h\"\n\nstatic int\nnum_compare(const void *_a, const void *_b)\n{\n    const int a = *((const int *) _a);\n    const int b = *((const int *) _b);\n    return (a < b) ? -1 : ((a > b) ? 1 : 0);\n}\n\nstatic void\ntest_sort(const char *desc, int *nums, const int arraylen)\n{\n    int i;\n    int prev;\n\n    SDL_Log(\"test: %s arraylen=%d\", desc, arraylen);\n\n    SDL_qsort(nums, arraylen, sizeof (nums[0]), num_compare);\n\n    prev = nums[0];\n    for (i = 1; i < arraylen; i++) {\n        const int val = nums[i];\n        if (val < prev) {\n            SDL_Log(\"sort is broken!\");\n            return;\n        }\n        prev = val;\n    }\n}\n\nint\nmain(int argc, char *argv[])\n{\n    static int nums[1024 * 100];\n    static const int itervals[] = { SDL_arraysize(nums), 12 };\n    int iteration;\n    SDLTest_RandomContext rndctx;\n\n    if (argc > 1)\n    {\n        int success;\n        Uint64 seed = 0;\n        if (argv[1][0] == '0' && argv[1][1] == 'x')\n            success = SDL_sscanf(argv[1] + 2, \"%llx\", &seed);\n        else\n            success = SDL_sscanf(argv[1], \"%llu\", &seed);\n        if (!success)\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Invalid seed. Use a decimal or hexadecimal number.\\n\");\n            return 1;\n        }\n        if (seed <= 0xffffffff)\n        {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Seed must be equal or greater than 0x100000000.\\n\");\n            return 1;\n        }\n        SDLTest_RandomInit(&rndctx, (unsigned int)(seed >> 32), (unsigned int)(seed & 0xffffffff));\n    }\n    else\n    {\n        SDLTest_RandomInitTime(&rndctx);\n    }\n    SDL_Log(\"Using random seed 0x%08x%08x\\n\", rndctx.x, rndctx.c);\n\n    for (iteration = 0; iteration < SDL_arraysize(itervals); iteration++) {\n        const int arraylen = itervals[iteration];\n        int i;\n\n        for (i = 0; i < arraylen; i++) {\n            nums[i] = i;\n        }\n        test_sort(\"already sorted\", nums, arraylen);\n\n        for (i = 0; i < arraylen; i++) {\n            nums[i] = i;\n        }\n        nums[arraylen-1] = -1;\n        test_sort(\"already sorted except last element\", nums, arraylen);\n\n        for (i = 0; i < arraylen; i++) {\n            nums[i] = (arraylen-1) - i;\n        }\n        test_sort(\"reverse sorted\", nums, arraylen);\n\n        for (i = 0; i < arraylen; i++) {\n            nums[i] = SDLTest_RandomInt(&rndctx);\n        }\n        test_sort(\"random sorted\", nums, arraylen);\n    }\n\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testrelative.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple program:  Test relative mouse motion */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#include \"SDL_test_common.h\"\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\nstatic SDLTest_CommonState *state;\nint i, done;\nSDL_Rect rect;\nSDL_Event event;\n\nstatic void\nDrawRects(SDL_Renderer * renderer, SDL_Rect * rect)\n{\n    SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);\n    SDL_RenderFillRect(renderer, rect);\n}\n\nstatic void\nloop(){\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n        switch(event.type) {\n        case SDL_MOUSEMOTION:\n            {\n                rect.x += event.motion.xrel;\n                rect.y += event.motion.yrel;\n            }\n            break;\n        }\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Rect viewport;\n        SDL_Renderer *renderer = state->renderers[i];\n        if (state->windows[i] == NULL)\n            continue;\n        SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);\n        SDL_RenderClear(renderer);\n\n        /* Wrap the cursor rectangle at the screen edges to keep it visible */\n        SDL_RenderGetViewport(renderer, &viewport);\n        if (rect.x < viewport.x) rect.x += viewport.w;\n        if (rect.y < viewport.y) rect.y += viewport.h;\n        if (rect.x > viewport.x + viewport.w) rect.x -= viewport.w;\n        if (rect.y > viewport.y + viewport.h) rect.y -= viewport.h;\n\n        DrawRects(renderer, &rect);\n\n        SDL_RenderPresent(renderer);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc; ++i) {\n        SDLTest_CommonArg(state, i);\n    }\n    if (!SDLTest_CommonInit(state)) {\n        return 2;\n    }\n\n    /* Create the windows and initialize the renderers */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_NONE);\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    srand((unsigned int)time(NULL));\n    if(SDL_SetRelativeMouseMode(SDL_TRUE) < 0) {\n        return 3;\n    };\n\n    rect.x = DEFAULT_WINDOW_WIDTH / 2;\n    rect.y = DEFAULT_WINDOW_HEIGHT / 2;\n    rect.w = 10;\n    rect.h = 10;\n    /* Main render loop */\n    done = 0;\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n        }\n#endif\n    SDLTest_CommonQuit(state);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testrendercopyex.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Move N sprites around on the screen as fast as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n\nstatic SDLTest_CommonState *state;\n\ntypedef struct {\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Texture *background;\n    SDL_Texture *sprite;\n    SDL_Rect sprite_rect;\n    int scale_direction;\n} DrawState;\n\nDrawState *drawstates;\nint done;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nSDL_Texture *\nLoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)\n{\n    SDL_Surface *temp;\n    SDL_Texture *texture;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return NULL;\n    }\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (transparent) {\n        if (temp->format->palette) {\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels);\n        } else {\n            switch (temp->format->BitsPerPixel) {\n            case 15:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint16 *) temp->pixels) & 0x00007FFF);\n                break;\n            case 16:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels);\n                break;\n            case 24:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint32 *) temp->pixels) & 0x00FFFFFF);\n                break;\n            case 32:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels);\n                break;\n            }\n        }\n    }\n\n    /* Create textures from the image */\n    texture = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!texture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return NULL;\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return texture;\n}\n\nvoid\nDraw(DrawState *s)\n{\n    SDL_Rect viewport;\n    SDL_Texture *target;\n    SDL_Point *center=NULL;\n    SDL_Point origin = {0,0};\n\n    SDL_RenderGetViewport(s->renderer, &viewport);\n\n    target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);\n    SDL_SetRenderTarget(s->renderer, target);\n\n    /* Draw the background */\n    SDL_RenderCopy(s->renderer, s->background, NULL, NULL);\n\n    /* Scale and draw the sprite */\n    s->sprite_rect.w += s->scale_direction;\n    s->sprite_rect.h += s->scale_direction;\n    if (s->scale_direction > 0) {\n        center = &origin;\n        if (s->sprite_rect.w >= viewport.w || s->sprite_rect.h >= viewport.h) {\n            s->scale_direction = -1;\n        }\n    } else {\n        if (s->sprite_rect.w <= 1 || s->sprite_rect.h <= 1) {\n            s->scale_direction = 1;\n        }\n    }\n    s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;\n    s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;\n\n    SDL_RenderCopyEx(s->renderer, s->sprite, NULL, &s->sprite_rect, (double)s->sprite_rect.w, center, (SDL_RendererFlip)s->scale_direction);\n\n    SDL_SetRenderTarget(s->renderer, NULL);\n    SDL_RenderCopy(s->renderer, target, NULL, NULL);\n    SDL_DestroyTexture(target);\n\n    /* Update the screen! */\n    SDL_RenderPresent(s->renderer);\n    /* SDL_Delay(10); */\n}\n\nvoid loop()\n{\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i] == NULL)\n            continue;\n        Draw(&drawstates[i]);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    int frames;\n    Uint32 then, now;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {\n        SDLTest_CommonQuit(state);\n        return 1;\n    }\n\n    drawstates = SDL_stack_alloc(DrawState, state->num_windows);\n    for (i = 0; i < state->num_windows; ++i) {\n        DrawState *drawstate = &drawstates[i];\n\n        drawstate->window = state->windows[i];\n        drawstate->renderer = state->renderers[i];\n        drawstate->sprite = LoadTexture(drawstate->renderer, \"icon.bmp\", SDL_TRUE);\n        drawstate->background = LoadTexture(drawstate->renderer, \"sample.bmp\", SDL_FALSE);\n        if (!drawstate->sprite || !drawstate->background) {\n            quit(2);\n        }\n        SDL_QueryTexture(drawstate->sprite, NULL, NULL,\n                         &drawstate->sprite_rect.w, &drawstate->sprite_rect.h);\n        drawstate->scale_direction = 1;\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n        }\n#endif\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n\n    SDL_stack_free(drawstates);\n\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testrendertarget.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Move N sprites around on the screen as fast as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n\nstatic SDLTest_CommonState *state;\n\ntypedef struct {\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Texture *background;\n    SDL_Texture *sprite;\n    SDL_Rect sprite_rect;\n    int scale_direction;\n} DrawState;\n\nDrawState *drawstates;\nint done;\nSDL_bool test_composite = SDL_FALSE;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nSDL_Texture *\nLoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)\n{\n    SDL_Surface *temp;\n    SDL_Texture *texture;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return NULL;\n    }\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (transparent) {\n        if (temp->format->palette) {\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels);\n        } else {\n            switch (temp->format->BitsPerPixel) {\n            case 15:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint16 *) temp->pixels) & 0x00007FFF);\n                break;\n            case 16:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels);\n                break;\n            case 24:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint32 *) temp->pixels) & 0x00FFFFFF);\n                break;\n            case 32:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels);\n                break;\n            }\n        }\n    }\n\n    /* Create textures from the image */\n    texture = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!texture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return NULL;\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return texture;\n}\n\nSDL_bool\nDrawComposite(DrawState *s)\n{\n    SDL_Rect viewport, R;\n    SDL_Texture *target;\n\n    static SDL_bool blend_tested = SDL_FALSE;\n    if (!blend_tested) {\n        SDL_Texture *A, *B;\n        Uint32 P;\n\n        A = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 1, 1);\n        SDL_SetTextureBlendMode(A, SDL_BLENDMODE_BLEND);\n\n        B = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 1, 1);\n        SDL_SetTextureBlendMode(B, SDL_BLENDMODE_BLEND);\n\n        SDL_SetRenderTarget(s->renderer, A);\n        SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x80);\n        SDL_RenderFillRect(s->renderer, NULL);\n\n        SDL_SetRenderTarget(s->renderer, B);\n        SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00);\n        SDL_RenderFillRect(s->renderer, NULL);\n        SDL_RenderCopy(s->renderer, A, NULL, NULL);\n        SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P));\n\n        SDL_Log(\"Blended pixel: 0x%8.8X\\n\", P);\n\n        SDL_DestroyTexture(A);\n        SDL_DestroyTexture(B);\n        blend_tested = SDL_TRUE;\n    }\n\n    SDL_RenderGetViewport(s->renderer, &viewport);\n\n    target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);\n    SDL_SetTextureBlendMode(target, SDL_BLENDMODE_BLEND);\n    SDL_SetRenderTarget(s->renderer, target);\n\n    /* Draw the background.\n       This is solid black so when the sprite is copied to it, any per-pixel alpha will be blended through.\n     */\n    SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00);\n    SDL_RenderFillRect(s->renderer, NULL);\n\n    /* Scale and draw the sprite */\n    s->sprite_rect.w += s->scale_direction;\n    s->sprite_rect.h += s->scale_direction;\n    if (s->scale_direction > 0) {\n        if (s->sprite_rect.w >= viewport.w || s->sprite_rect.h >= viewport.h) {\n            s->scale_direction = -1;\n        }\n    } else {\n        if (s->sprite_rect.w <= 1 || s->sprite_rect.h <= 1) {\n            s->scale_direction = 1;\n        }\n    }\n    s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;\n    s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;\n\n    SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect);\n\n    SDL_SetRenderTarget(s->renderer, NULL);\n    SDL_RenderCopy(s->renderer, s->background, NULL, NULL);\n\n    SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_BLEND);\n    SDL_SetRenderDrawColor(s->renderer, 0xff, 0x00, 0x00, 0x80);\n    R.x = 0;\n    R.y = 0;\n    R.w = 100;\n    R.h = 100;\n    SDL_RenderFillRect(s->renderer, &R);\n    SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_NONE);\n\n    SDL_RenderCopy(s->renderer, target, NULL, NULL);\n    SDL_DestroyTexture(target);\n\n    /* Update the screen! */\n    SDL_RenderPresent(s->renderer);\n    return SDL_TRUE;\n}\n\nSDL_bool\nDraw(DrawState *s)\n{\n    SDL_Rect viewport;\n    SDL_Texture *target;\n\n    SDL_RenderGetViewport(s->renderer, &viewport);\n\n    target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);\n    if (!target) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create render target texture: %s\\n\", SDL_GetError());\n        return SDL_FALSE;\n    }\n    SDL_SetRenderTarget(s->renderer, target);\n\n    /* Draw the background */\n    SDL_RenderCopy(s->renderer, s->background, NULL, NULL);\n\n    /* Scale and draw the sprite */\n    s->sprite_rect.w += s->scale_direction;\n    s->sprite_rect.h += s->scale_direction;\n    if (s->scale_direction > 0) {\n        if (s->sprite_rect.w >= viewport.w || s->sprite_rect.h >= viewport.h) {\n            s->scale_direction = -1;\n        }\n    } else {\n        if (s->sprite_rect.w <= 1 || s->sprite_rect.h <= 1) {\n            s->scale_direction = 1;\n        }\n    }\n    s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;\n    s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;\n\n    SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect);\n\n    SDL_SetRenderTarget(s->renderer, NULL);\n    SDL_RenderCopy(s->renderer, target, NULL, NULL);\n    SDL_DestroyTexture(target);\n\n    /* Update the screen! */\n    SDL_RenderPresent(s->renderer);\n    return SDL_TRUE;\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i] == NULL)\n            continue;\n        if (test_composite) {\n            if (!DrawComposite(&drawstates[i])) done = 1;\n        } else {\n            if (!Draw(&drawstates[i])) done = 1;\n        }\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    int frames;\n    Uint32 then, now;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--composite\") == 0) {\n                test_composite = SDL_TRUE;\n                consumed = 1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--composite]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    drawstates = SDL_stack_alloc(DrawState, state->num_windows);\n    for (i = 0; i < state->num_windows; ++i) {\n        DrawState *drawstate = &drawstates[i];\n\n        drawstate->window = state->windows[i];\n        drawstate->renderer = state->renderers[i];\n        if (test_composite) {\n            drawstate->sprite = LoadTexture(drawstate->renderer, \"icon-alpha.bmp\", SDL_TRUE);\n        } else {\n            drawstate->sprite = LoadTexture(drawstate->renderer, \"icon.bmp\", SDL_TRUE);\n        }\n        drawstate->background = LoadTexture(drawstate->renderer, \"sample.bmp\", SDL_FALSE);\n        if (!drawstate->sprite || !drawstate->background) {\n            quit(2);\n        }\n        SDL_QueryTexture(drawstate->sprite, NULL, NULL,\n                         &drawstate->sprite_rect.w, &drawstate->sprite_rect.h);\n        drawstate->scale_direction = 1;\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n    }\n#endif\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n\n    SDL_stack_free(drawstates);\n\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testresample.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"SDL.h\"\n\nint\nmain(int argc, char **argv)\n{\n    SDL_AudioSpec spec;\n    SDL_AudioCVT cvt;\n    Uint32 len = 0;\n    Uint8 *data = NULL;\n    int cvtfreq = 0;\n    int cvtchans = 0;\n    int bitsize = 0;\n    int blockalign = 0;\n    int avgbytes = 0;\n    SDL_RWops *io = NULL;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (argc != 5) {\n        SDL_Log(\"USAGE: %s in.wav out.wav newfreq newchans\\n\", argv[0]);\n        return 1;\n    }\n\n    cvtfreq = SDL_atoi(argv[3]);\n    cvtchans = SDL_atoi(argv[4]);\n\n    if (SDL_Init(SDL_INIT_AUDIO) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_Init() failed: %s\\n\", SDL_GetError());\n        return 2;\n    }\n\n    if (SDL_LoadWAV(argv[1], &spec, &data, &len) == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"failed to load %s: %s\\n\", argv[1], SDL_GetError());\n        SDL_Quit();\n        return 3;\n    }\n\n    if (SDL_BuildAudioCVT(&cvt, spec.format, spec.channels, spec.freq,\n                          spec.format, cvtchans, cvtfreq) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"failed to build CVT: %s\\n\", SDL_GetError());\n        SDL_FreeWAV(data);\n        SDL_Quit();\n        return 4;\n    }\n\n    cvt.len = len;\n    cvt.buf = (Uint8 *) SDL_malloc(len * cvt.len_mult);\n    if (cvt.buf == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory.\\n\");\n        SDL_FreeWAV(data);\n        SDL_Quit();\n        return 5;\n    }\n    SDL_memcpy(cvt.buf, data, len);\n\n    if (SDL_ConvertAudio(&cvt) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Conversion failed: %s\\n\", SDL_GetError());\n        SDL_free(cvt.buf);\n        SDL_FreeWAV(data);\n        SDL_Quit();\n        return 6;\n    }\n\n    /* write out a WAV header... */\n    io = SDL_RWFromFile(argv[2], \"wb\");\n    if (io == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"fopen('%s') failed: %s\\n\", argv[2], SDL_GetError());\n        SDL_free(cvt.buf);\n        SDL_FreeWAV(data);\n        SDL_Quit();\n        return 7;\n    }\n\n    bitsize = SDL_AUDIO_BITSIZE(spec.format);\n    blockalign = (bitsize / 8) * cvtchans;\n    avgbytes = cvtfreq * blockalign;\n\n    SDL_WriteLE32(io, 0x46464952);      /* RIFF */\n    SDL_WriteLE32(io, cvt.len_cvt + 36);\n    SDL_WriteLE32(io, 0x45564157);      /* WAVE */\n    SDL_WriteLE32(io, 0x20746D66);      /* fmt */\n    SDL_WriteLE32(io, 16);      /* chunk size */\n    SDL_WriteLE16(io, SDL_AUDIO_ISFLOAT(spec.format) ? 3 : 1);       /* uncompressed */\n    SDL_WriteLE16(io, cvtchans);   /* channels */\n    SDL_WriteLE32(io, cvtfreq); /* sample rate */\n    SDL_WriteLE32(io, avgbytes);        /* average bytes per second */\n    SDL_WriteLE16(io, blockalign);      /* block align */\n    SDL_WriteLE16(io, bitsize); /* significant bits per sample */\n    SDL_WriteLE32(io, 0x61746164);      /* data */\n    SDL_WriteLE32(io, cvt.len_cvt);     /* size */\n    SDL_RWwrite(io, cvt.buf, cvt.len_cvt, 1);\n\n    if (SDL_RWclose(io) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"fclose('%s') failed: %s\\n\", argv[2], SDL_GetError());\n        SDL_free(cvt.buf);\n        SDL_FreeWAV(data);\n        SDL_Quit();\n        return 8;\n    }                           /* if */\n\n    SDL_free(cvt.buf);\n    SDL_FreeWAV(data);\n    SDL_Quit();\n    return 0;\n}                               /* main */\n\n/* end of testresample.c ... */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testrumble.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/*\nCopyright (c) 2011, Edgar Simo Serra\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n    * Neither the name of the Simple Directmedia Layer (SDL) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n/*\n * includes\n */\n#include <stdlib.h>\n#include <string.h>             /* strstr */\n#include <ctype.h>              /* isdigit */\n\n#include \"SDL.h\"\n\n#ifndef SDL_HAPTIC_DISABLED\n\nstatic SDL_Haptic *haptic;\n\n\n/**\n * @brief The entry point of this force feedback demo.\n * @param[in] argc Number of arguments.\n * @param[in] argv Array of argc arguments.\n */\nint\nmain(int argc, char **argv)\n{\n    int i;\n    char *name;\n    int index;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    name = NULL;\n    index = -1;\n    if (argc > 1) {\n        size_t l;\n        name = argv[1];\n        if ((strcmp(name, \"--help\") == 0) || (strcmp(name, \"-h\") == 0)) {\n            SDL_Log(\"USAGE: %s [device]\\n\"\n                   \"If device is a two-digit number it'll use it as an index, otherwise\\n\"\n                   \"it'll use it as if it were part of the device's name.\\n\",\n                   argv[0]);\n            return 0;\n        }\n\n        l = SDL_strlen(name);\n        if ((l < 3) && SDL_isdigit(name[0]) && ((l == 1) || SDL_isdigit(name[1]))) {\n            index = SDL_atoi(name);\n            name = NULL;\n        }\n    }\n\n    /* Initialize the force feedbackness */\n    SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_JOYSTICK |\n             SDL_INIT_HAPTIC);\n    SDL_Log(\"%d Haptic devices detected.\\n\", SDL_NumHaptics());\n    if (SDL_NumHaptics() > 0) {\n        /* We'll just use index or the first force feedback device found */\n        if (name == NULL) {\n            i = (index != -1) ? index : 0;\n        }\n        /* Try to find matching device */\n        else {\n            for (i = 0; i < SDL_NumHaptics(); i++) {\n                if (strstr(SDL_HapticName(i), name) != NULL)\n                    break;\n            }\n\n            if (i >= SDL_NumHaptics()) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to find device matching '%s', aborting.\\n\",\n                       name);\n                return 1;\n            }\n        }\n\n        haptic = SDL_HapticOpen(i);\n        if (haptic == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to create the haptic device: %s\\n\",\n                   SDL_GetError());\n            return 1;\n        }\n        SDL_Log(\"Device: %s\\n\", SDL_HapticName(i));\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No Haptic devices found!\\n\");\n        return 1;\n    }\n\n    /* We only want force feedback errors. */\n    SDL_ClearError();\n\n    if (SDL_HapticRumbleSupported(haptic) == SDL_FALSE) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Rumble not supported!\\n\");\n        return 1;\n    }\n    if (SDL_HapticRumbleInit(haptic) != 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to initialize rumble: %s\\n\", SDL_GetError());\n        return 1;\n    }\n    SDL_Log(\"Playing 2 second rumble at 0.5 magnitude.\\n\");\n    if (SDL_HapticRumblePlay(haptic, 0.5, 5000) != 0) {\n       SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to play rumble: %s\\n\", SDL_GetError() );\n       return 1;\n    }\n    SDL_Delay(2000);\n    SDL_Log(\"Stopping rumble.\\n\");\n    SDL_HapticRumbleStop(haptic);\n    SDL_Delay(2000);\n    SDL_Log(\"Playing 2 second rumble at 0.3 magnitude.\\n\");\n    if (SDL_HapticRumblePlay(haptic, 0.3f, 5000) != 0) {\n       SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to play rumble: %s\\n\", SDL_GetError() );\n       return 1;\n    }\n    SDL_Delay(2000);\n\n    /* Quit */\n    if (haptic != NULL)\n        SDL_HapticClose(haptic);\n    SDL_Quit();\n\n    return 0;\n}\n\n#else\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL compiled without Haptic support.\\n\");\n    exit(1);\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testscale.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Move N sprites around on the screen as fast as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\n#define WINDOW_WIDTH    640\n#define WINDOW_HEIGHT   480\n\nstatic SDLTest_CommonState *state;\n\ntypedef struct {\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Texture *background;\n    SDL_Texture *sprite;\n    SDL_Rect sprite_rect;\n    int scale_direction;\n} DrawState;\n\nDrawState *drawstates;\nint done;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nSDL_Texture *\nLoadTexture(SDL_Renderer *renderer, char *file, SDL_bool transparent)\n{\n    SDL_Surface *temp;\n    SDL_Texture *texture;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return NULL;\n    }\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (transparent) {\n        if (temp->format->palette) {\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels);\n        } else {\n            switch (temp->format->BitsPerPixel) {\n            case 15:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint16 *) temp->pixels) & 0x00007FFF);\n                break;\n            case 16:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels);\n                break;\n            case 24:\n                SDL_SetColorKey(temp, SDL_TRUE,\n                                (*(Uint32 *) temp->pixels) & 0x00FFFFFF);\n                break;\n            case 32:\n                SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels);\n                break;\n            }\n        }\n    }\n\n    /* Create textures from the image */\n    texture = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!texture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return NULL;\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return texture;\n}\n\nvoid\nDraw(DrawState *s)\n{\n    SDL_Rect viewport;\n\n    SDL_RenderGetViewport(s->renderer, &viewport);\n\n    /* Draw the background */\n    SDL_RenderCopy(s->renderer, s->background, NULL, NULL);\n\n    /* Scale and draw the sprite */\n    s->sprite_rect.w += s->scale_direction;\n    s->sprite_rect.h += s->scale_direction;\n    if (s->scale_direction > 0) {\n        if (s->sprite_rect.w >= viewport.w || s->sprite_rect.h >= viewport.h) {\n            s->scale_direction = -1;\n        }\n    } else {\n        if (s->sprite_rect.w <= 1 || s->sprite_rect.h <= 1) {\n            s->scale_direction = 1;\n        }\n    }\n    s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;\n    s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;\n\n    SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect);\n\n    /* Update the screen! */\n    SDL_RenderPresent(s->renderer);\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i] == NULL)\n            continue;\n        Draw(&drawstates[i]);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    int frames;\n    Uint32 then, now;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {\n        SDLTest_CommonQuit(state);\n        return 1;\n    }\n\n    drawstates = SDL_stack_alloc(DrawState, state->num_windows);\n    for (i = 0; i < state->num_windows; ++i) {\n        DrawState *drawstate = &drawstates[i];\n\n        drawstate->window = state->windows[i];\n        drawstate->renderer = state->renderers[i];\n        drawstate->sprite = LoadTexture(drawstate->renderer, \"icon.bmp\", SDL_TRUE);\n        drawstate->background = LoadTexture(drawstate->renderer, \"sample.bmp\", SDL_FALSE);\n        if (!drawstate->sprite || !drawstate->background) {\n            quit(2);\n        }\n        SDL_QueryTexture(drawstate->sprite, NULL, NULL,\n                         &drawstate->sprite_rect.w, &drawstate->sprite_rect.h);\n        drawstate->scale_direction = 1;\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n    }\n#endif\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n\n    SDL_stack_free(drawstates);\n\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testsem.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL semaphore code */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <signal.h>\n\n#include \"SDL.h\"\n\n#define NUM_THREADS 10\n\nstatic SDL_sem *sem;\nint alive = 1;\n\nint SDLCALL\nThreadFunc(void *data)\n{\n    int threadnum = (int) (uintptr_t) data;\n    while (alive) {\n        SDL_SemWait(sem);\n        SDL_Log(\"Thread number %d has got the semaphore (value = %d)!\\n\",\n                threadnum, SDL_SemValue(sem));\n        SDL_Delay(200);\n        SDL_SemPost(sem);\n        SDL_Log(\"Thread number %d has released the semaphore (value = %d)!\\n\",\n                threadnum, SDL_SemValue(sem));\n        SDL_Delay(1);           /* For the scheduler */\n    }\n    SDL_Log(\"Thread number %d exiting.\\n\", threadnum);\n    return 0;\n}\n\nstatic void\nkilled(int sig)\n{\n    alive = 0;\n}\n\nstatic void\nTestWaitTimeout(void)\n{\n    Uint32 start_ticks;\n    Uint32 end_ticks;\n    Uint32 duration;\n    int retval;\n\n    sem = SDL_CreateSemaphore(0);\n    SDL_Log(\"Waiting 2 seconds on semaphore\\n\");\n\n    start_ticks = SDL_GetTicks();\n    retval = SDL_SemWaitTimeout(sem, 2000);\n    end_ticks = SDL_GetTicks();\n\n    duration = end_ticks - start_ticks;\n\n    /* Accept a little offset in the effective wait */\n    if (duration > 1900 && duration < 2050)\n        SDL_Log(\"Wait done.\\n\");\n    else\n        SDL_Log(\"Wait took %d milliseconds\\n\", duration);\n\n    /* Check to make sure the return value indicates timed out */\n    if (retval != SDL_MUTEX_TIMEDOUT)\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_SemWaitTimeout returned: %d; expected: %d\\n\", retval, SDL_MUTEX_TIMEDOUT);\n}\n\nint\nmain(int argc, char **argv)\n{\n    SDL_Thread *threads[NUM_THREADS];\n    uintptr_t i;\n    int init_sem;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (argc < 2) {\n        SDL_Log(\"Usage: %s init_value\\n\", argv[0]);\n        return (1);\n    }\n\n    /* Load the SDL library */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n    signal(SIGTERM, killed);\n    signal(SIGINT, killed);\n\n    init_sem = atoi(argv[1]);\n    sem = SDL_CreateSemaphore(init_sem);\n\n    SDL_Log(\"Running %d threads, semaphore value = %d\\n\", NUM_THREADS,\n           init_sem);\n    /* Create all the threads */\n    for (i = 0; i < NUM_THREADS; ++i) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"Thread%u\", (unsigned int) i);\n        threads[i] = SDL_CreateThread(ThreadFunc, name, (void *) i);\n    }\n\n    /* Wait 10 seconds */\n    SDL_Delay(10 * 1000);\n\n    /* Wait for all threads to finish */\n    SDL_Log(\"Waiting for threads to finish\\n\");\n    alive = 0;\n    for (i = 0; i < NUM_THREADS; ++i) {\n        SDL_WaitThread(threads[i], NULL);\n    }\n    SDL_Log(\"Finished waiting for threads\\n\");\n\n    SDL_DestroySemaphore(sem);\n\n    TestWaitTimeout();\n\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testsensor.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL sensor code */\n\n#include \"SDL.h\"\n\nstatic const char *GetSensorTypeString(SDL_SensorType type)\n{\n    static char unknown_type[64];\n\n    switch (type)\n    {\n    case SDL_SENSOR_INVALID:\n        return \"SDL_SENSOR_INVALID\";\n    case SDL_SENSOR_UNKNOWN:\n        return \"SDL_SENSOR_UNKNOWN\";\n    case SDL_SENSOR_ACCEL:\n        return \"SDL_SENSOR_ACCEL\";\n    case SDL_SENSOR_GYRO:\n        return \"SDL_SENSOR_GYRO\";\n    default:\n        SDL_snprintf(unknown_type, sizeof(unknown_type), \"UNKNOWN (%d)\", type);\n        return unknown_type;\n    }\n}\n\nstatic void HandleSensorEvent(SDL_SensorEvent *event)\n{\n    SDL_Sensor *sensor = SDL_SensorFromInstanceID(event->which);\n    if (!sensor) {\n        SDL_Log(\"Couldn't get sensor for sensor event\\n\");\n        return;\n    }\n\n    switch (SDL_SensorGetType(sensor)) {\n    case SDL_SENSOR_ACCEL:\n        SDL_Log(\"Accelerometer update: %.2f, %.2f, %.2f\\n\", event->data[0], event->data[1], event->data[2]);\n        break;\n    case SDL_SENSOR_GYRO:\n        SDL_Log(\"Gyro update: %.2f, %.2f, %.2f\\n\", event->data[0], event->data[1], event->data[2]);\n        break;\n    default:\n        SDL_Log(\"Sensor update for sensor type %s\\n\", GetSensorTypeString(SDL_SensorGetType(sensor)));\n        break;\n    }\n}\n\nint\nmain(int argc, char **argv)\n{\n    int i;\n    int num_sensors, num_opened;\n\n    /* Load the SDL library */\n    if (SDL_Init(SDL_INIT_SENSOR) < 0) {\n        SDL_Log(\"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    num_sensors = SDL_NumSensors();\n    num_opened = 0;\n\n    SDL_Log(\"There are %d sensors available\\n\", num_sensors);\n    for (i = 0; i < num_sensors; ++i) {\n        SDL_Log(\"Sensor %d: %s, type %s, platform type %d\\n\",\n            SDL_SensorGetDeviceInstanceID(i),\n            SDL_SensorGetDeviceName(i),\n            GetSensorTypeString(SDL_SensorGetDeviceType(i)),\n            SDL_SensorGetDeviceNonPortableType(i));\n\n        if (SDL_SensorGetDeviceType(i) != SDL_SENSOR_UNKNOWN) {\n            SDL_Sensor *sensor = SDL_SensorOpen(i);\n            if (sensor == NULL) {\n                SDL_Log(\"Couldn't open sensor %d: %s\\n\", SDL_SensorGetDeviceInstanceID(i), SDL_GetError());\n            } else {\n                ++num_opened;\n            }\n        }\n    }\n    SDL_Log(\"Opened %d sensors\\n\", num_opened);\n\n    if (num_opened > 0) {\n        SDL_bool done = SDL_FALSE;\n        SDL_Event event;\n\n        SDL_CreateWindow(\"Sensor Test\", 0, 0, 0, 0, SDL_WINDOW_FULLSCREEN_DESKTOP);\n        while (!done) {\n            while (SDL_PollEvent(&event) > 0) {\n                switch (event.type) {\n                case SDL_SENSORUPDATE:\n                    HandleSensorEvent(&event.sensor);\n                    break;\n                case SDL_MOUSEBUTTONUP:\n                case SDL_KEYUP:\n                case SDL_QUIT:\n                    done = SDL_TRUE;\n                    break;\n                default:\n                    break;\n                }\n            }\n        }\n    }\n\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testshader.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* This is a simple example of using GLSL shaders with SDL */\n\n#include \"SDL.h\"\n\n#ifdef HAVE_OPENGL\n\n#include \"SDL_opengl.h\"\n\n\nstatic SDL_bool shaders_supported;\nstatic int      current_shader = 0;\n\nenum {\n    SHADER_COLOR,\n    SHADER_TEXTURE,\n    SHADER_TEXCOORDS,\n    NUM_SHADERS\n};\n\ntypedef struct {\n    GLhandleARB program;\n    GLhandleARB vert_shader;\n    GLhandleARB frag_shader;\n    const char *vert_source;\n    const char *frag_source;\n} ShaderData;\n\nstatic ShaderData shaders[NUM_SHADERS] = {\n\n    /* SHADER_COLOR */\n    { 0, 0, 0,\n        /* vertex shader */\n\"varying vec4 v_color;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\\n\"\n\"    v_color = gl_Color;\\n\"\n\"}\",\n        /* fragment shader */\n\"varying vec4 v_color;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = v_color;\\n\"\n\"}\"\n    },\n\n    /* SHADER_TEXTURE */\n    { 0, 0, 0,\n        /* vertex shader */\n\"varying vec4 v_color;\\n\"\n\"varying vec2 v_texCoord;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\\n\"\n\"    v_color = gl_Color;\\n\"\n\"    v_texCoord = vec2(gl_MultiTexCoord0);\\n\"\n\"}\",\n        /* fragment shader */\n\"varying vec4 v_color;\\n\"\n\"varying vec2 v_texCoord;\\n\"\n\"uniform sampler2D tex0;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_FragColor = texture2D(tex0, v_texCoord) * v_color;\\n\"\n\"}\"\n    },\n\n    /* SHADER_TEXCOORDS */\n    { 0, 0, 0,\n        /* vertex shader */\n\"varying vec2 v_texCoord;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\\n\"\n\"    v_texCoord = vec2(gl_MultiTexCoord0);\\n\"\n\"}\",\n        /* fragment shader */\n\"varying vec2 v_texCoord;\\n\"\n\"\\n\"\n\"void main()\\n\"\n\"{\\n\"\n\"    vec4 color;\\n\"\n\"    vec2 delta;\\n\"\n\"    float dist;\\n\"\n\"\\n\"\n\"    delta = vec2(0.5, 0.5) - v_texCoord;\\n\"\n\"    dist = dot(delta, delta);\\n\"\n\"\\n\"\n\"    color.r = v_texCoord.x;\\n\"\n\"    color.g = v_texCoord.x * v_texCoord.y;\\n\"\n\"    color.b = v_texCoord.y;\\n\"\n\"    color.a = 1.0 - (dist * 4.0);\\n\"\n\"    gl_FragColor = color;\\n\"\n\"}\"\n    },\n};\n\nstatic PFNGLATTACHOBJECTARBPROC glAttachObjectARB;\nstatic PFNGLCOMPILESHADERARBPROC glCompileShaderARB;\nstatic PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;\nstatic PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;\nstatic PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;\nstatic PFNGLGETINFOLOGARBPROC glGetInfoLogARB;\nstatic PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;\nstatic PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;\nstatic PFNGLLINKPROGRAMARBPROC glLinkProgramARB;\nstatic PFNGLSHADERSOURCEARBPROC glShaderSourceARB;\nstatic PFNGLUNIFORM1IARBPROC glUniform1iARB;\nstatic PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;\n\nstatic SDL_bool CompileShader(GLhandleARB shader, const char *source)\n{\n    GLint status;\n\n    glShaderSourceARB(shader, 1, &source, NULL);\n    glCompileShaderARB(shader);\n    glGetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &status);\n    if (status == 0) {\n        GLint length;\n        char *info;\n\n        glGetObjectParameterivARB(shader, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length);\n        info = SDL_stack_alloc(char, length+1);\n        glGetInfoLogARB(shader, length, NULL, info);\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed to compile shader:\\n%s\\n%s\", source, info);\n        SDL_stack_free(info);\n\n        return SDL_FALSE;\n    } else {\n        return SDL_TRUE;\n    }\n}\n\nstatic SDL_bool CompileShaderProgram(ShaderData *data)\n{\n    const int num_tmus_bound = 4;\n    int i;\n    GLint location;\n\n    glGetError();\n\n    /* Create one program object to rule them all */\n    data->program = glCreateProgramObjectARB();\n\n    /* Create the vertex shader */\n    data->vert_shader = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);\n    if (!CompileShader(data->vert_shader, data->vert_source)) {\n        return SDL_FALSE;\n    }\n\n    /* Create the fragment shader */\n    data->frag_shader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);\n    if (!CompileShader(data->frag_shader, data->frag_source)) {\n        return SDL_FALSE;\n    }\n\n    /* ... and in the darkness bind them */\n    glAttachObjectARB(data->program, data->vert_shader);\n    glAttachObjectARB(data->program, data->frag_shader);\n    glLinkProgramARB(data->program);\n\n    /* Set up some uniform variables */\n    glUseProgramObjectARB(data->program);\n    for (i = 0; i < num_tmus_bound; ++i) {\n        char tex_name[5];\n        SDL_snprintf(tex_name, SDL_arraysize(tex_name), \"tex%d\", i);\n        location = glGetUniformLocationARB(data->program, tex_name);\n        if (location >= 0) {\n            glUniform1iARB(location, i);\n        }\n    }\n    glUseProgramObjectARB(0);\n\n    return (glGetError() == GL_NO_ERROR) ? SDL_TRUE : SDL_FALSE;\n}\n\nstatic void DestroyShaderProgram(ShaderData *data)\n{\n    if (shaders_supported) {\n        glDeleteObjectARB(data->vert_shader);\n        glDeleteObjectARB(data->frag_shader);\n        glDeleteObjectARB(data->program);\n    }\n}\n\nstatic SDL_bool InitShaders()\n{\n    int i;\n\n    /* Check for shader support */\n    shaders_supported = SDL_FALSE;\n    if (SDL_GL_ExtensionSupported(\"GL_ARB_shader_objects\") &&\n        SDL_GL_ExtensionSupported(\"GL_ARB_shading_language_100\") &&\n        SDL_GL_ExtensionSupported(\"GL_ARB_vertex_shader\") &&\n        SDL_GL_ExtensionSupported(\"GL_ARB_fragment_shader\")) {\n        glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) SDL_GL_GetProcAddress(\"glAttachObjectARB\");\n        glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) SDL_GL_GetProcAddress(\"glCompileShaderARB\");\n        glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress(\"glCreateProgramObjectARB\");\n        glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) SDL_GL_GetProcAddress(\"glCreateShaderObjectARB\");\n        glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) SDL_GL_GetProcAddress(\"glDeleteObjectARB\");\n        glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) SDL_GL_GetProcAddress(\"glGetInfoLogARB\");\n        glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) SDL_GL_GetProcAddress(\"glGetObjectParameterivARB\");\n        glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) SDL_GL_GetProcAddress(\"glGetUniformLocationARB\");\n        glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) SDL_GL_GetProcAddress(\"glLinkProgramARB\");\n        glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) SDL_GL_GetProcAddress(\"glShaderSourceARB\");\n        glUniform1iARB = (PFNGLUNIFORM1IARBPROC) SDL_GL_GetProcAddress(\"glUniform1iARB\");\n        glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) SDL_GL_GetProcAddress(\"glUseProgramObjectARB\");\n        if (glAttachObjectARB &&\n            glCompileShaderARB &&\n            glCreateProgramObjectARB &&\n            glCreateShaderObjectARB &&\n            glDeleteObjectARB &&\n            glGetInfoLogARB &&\n            glGetObjectParameterivARB &&\n            glGetUniformLocationARB &&\n            glLinkProgramARB &&\n            glShaderSourceARB &&\n            glUniform1iARB &&\n            glUseProgramObjectARB) {\n            shaders_supported = SDL_TRUE;\n        }\n    }\n\n    if (!shaders_supported) {\n        return SDL_FALSE;\n    }\n\n    /* Compile all the shaders */\n    for (i = 0; i < NUM_SHADERS; ++i) {\n        if (!CompileShaderProgram(&shaders[i])) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to compile shader!\\n\");\n            return SDL_FALSE;\n        }\n    }\n\n    /* We're done! */\n    return SDL_TRUE;\n}\n\nstatic void QuitShaders()\n{\n    int i;\n\n    for (i = 0; i < NUM_SHADERS; ++i) {\n        DestroyShaderProgram(&shaders[i]);\n    }\n}\n\n/* Quick utility function for texture creation */\nstatic int\npower_of_two(int input)\n{\n    int value = 1;\n\n    while (value < input) {\n        value <<= 1;\n    }\n    return value;\n}\n\nGLuint\nSDL_GL_LoadTexture(SDL_Surface * surface, GLfloat * texcoord)\n{\n    GLuint texture;\n    int w, h;\n    SDL_Surface *image;\n    SDL_Rect area;\n    SDL_BlendMode saved_mode;\n\n    /* Use the surface width and height expanded to powers of 2 */\n    w = power_of_two(surface->w);\n    h = power_of_two(surface->h);\n    texcoord[0] = 0.0f;         /* Min X */\n    texcoord[1] = 0.0f;         /* Min Y */\n    texcoord[2] = (GLfloat) surface->w / w;     /* Max X */\n    texcoord[3] = (GLfloat) surface->h / h;     /* Max Y */\n\n    image = SDL_CreateRGBSurface(SDL_SWSURFACE, w, h, 32,\n#if SDL_BYTEORDER == SDL_LIL_ENDIAN     /* OpenGL RGBA masks */\n                                 0x000000FF,\n                                 0x0000FF00, 0x00FF0000, 0xFF000000\n#else\n                                 0xFF000000,\n                                 0x00FF0000, 0x0000FF00, 0x000000FF\n#endif\n        );\n    if (image == NULL) {\n        return 0;\n    }\n\n    /* Save the alpha blending attributes */\n    SDL_GetSurfaceBlendMode(surface, &saved_mode);\n    SDL_SetSurfaceBlendMode(surface, SDL_BLENDMODE_NONE);\n\n    /* Copy the surface into the GL texture image */\n    area.x = 0;\n    area.y = 0;\n    area.w = surface->w;\n    area.h = surface->h;\n    SDL_BlitSurface(surface, &area, image, &area);\n\n    /* Restore the alpha blending attributes */\n    SDL_SetSurfaceBlendMode(surface, saved_mode);\n\n    /* Create an OpenGL texture for the image */\n    glGenTextures(1, &texture);\n    glBindTexture(GL_TEXTURE_2D, texture);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n    glTexImage2D(GL_TEXTURE_2D,\n                 0,\n                 GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, image->pixels);\n    SDL_FreeSurface(image);     /* No longer needed */\n\n    return texture;\n}\n\n/* A general OpenGL initialization function.    Sets all of the initial parameters. */\nvoid InitGL(int Width, int Height)                    /* We call this right after our OpenGL window is created. */\n{\n    GLdouble aspect;\n\n    glViewport(0, 0, Width, Height);\n    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);        /* This Will Clear The Background Color To Black */\n    glClearDepth(1.0);                /* Enables Clearing Of The Depth Buffer */\n    glDepthFunc(GL_LESS);                /* The Type Of Depth Test To Do */\n    glEnable(GL_DEPTH_TEST);            /* Enables Depth Testing */\n    glShadeModel(GL_SMOOTH);            /* Enables Smooth Color Shading */\n\n    glMatrixMode(GL_PROJECTION);\n    glLoadIdentity();                /* Reset The Projection Matrix */\n\n    aspect = (GLdouble)Width / Height;\n    glOrtho(-3.0, 3.0, -3.0 / aspect, 3.0 / aspect, 0.0, 1.0);\n\n    glMatrixMode(GL_MODELVIEW);\n}\n\n/* The main drawing function. */\nvoid DrawGLScene(SDL_Window *window, GLuint texture, GLfloat * texcoord)\n{\n    /* Texture coordinate lookup, to make it simple */\n    enum {\n        MINX,\n        MINY,\n        MAXX,\n        MAXY\n    };\n\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);        /* Clear The Screen And The Depth Buffer */\n    glLoadIdentity();                /* Reset The View */\n\n    glTranslatef(-1.5f,0.0f,0.0f);        /* Move Left 1.5 Units */\n\n    /* draw a triangle (in smooth coloring mode) */\n    glBegin(GL_POLYGON);                /* start drawing a polygon */\n    glColor3f(1.0f,0.0f,0.0f);            /* Set The Color To Red */\n    glVertex3f( 0.0f, 1.0f, 0.0f);        /* Top */\n    glColor3f(0.0f,1.0f,0.0f);            /* Set The Color To Green */\n    glVertex3f( 1.0f,-1.0f, 0.0f);        /* Bottom Right */\n    glColor3f(0.0f,0.0f,1.0f);            /* Set The Color To Blue */\n    glVertex3f(-1.0f,-1.0f, 0.0f);        /* Bottom Left */\n    glEnd();                    /* we're done with the polygon (smooth color interpolation) */\n\n    glTranslatef(3.0f,0.0f,0.0f);         /* Move Right 3 Units */\n\n    /* Enable blending */\n    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);\n    glEnable(GL_BLEND);\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\n    /* draw a textured square (quadrilateral) */\n    glEnable(GL_TEXTURE_2D);\n    glBindTexture(GL_TEXTURE_2D, texture);\n    glColor3f(1.0f,1.0f,1.0f);\n    if (shaders_supported) {\n        glUseProgramObjectARB(shaders[current_shader].program);\n    }\n\n    glBegin(GL_QUADS);                /* start drawing a polygon (4 sided) */\n    glTexCoord2f(texcoord[MINX], texcoord[MINY]);\n    glVertex3f(-1.0f, 1.0f, 0.0f);        /* Top Left */\n    glTexCoord2f(texcoord[MAXX], texcoord[MINY]);\n    glVertex3f( 1.0f, 1.0f, 0.0f);        /* Top Right */\n    glTexCoord2f(texcoord[MAXX], texcoord[MAXY]);\n    glVertex3f( 1.0f,-1.0f, 0.0f);        /* Bottom Right */\n    glTexCoord2f(texcoord[MINX], texcoord[MAXY]);\n    glVertex3f(-1.0f,-1.0f, 0.0f);        /* Bottom Left */\n    glEnd();                    /* done with the polygon */\n\n    if (shaders_supported) {\n        glUseProgramObjectARB(0);\n    }\n    glDisable(GL_TEXTURE_2D);\n\n    /* swap buffers to display, since we're double buffered. */\n    SDL_GL_SwapWindow(window);\n}\n\nint main(int argc, char **argv)\n{\n    int done;\n    SDL_Window *window;\n    SDL_Surface *surface;\n    GLuint texture;\n    GLfloat texcoords[4];\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize SDL for video output */\n    if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to initialize SDL: %s\\n\", SDL_GetError());\n        exit(1);\n    }\n\n    /* Create a 640x480 OpenGL screen */\n    window = SDL_CreateWindow( \"Shader Demo\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_OPENGL );\n    if ( !window ) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to create OpenGL window: %s\\n\", SDL_GetError());\n        SDL_Quit();\n        exit(2);\n    }\n\n    if ( !SDL_GL_CreateContext(window)) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to create OpenGL context: %s\\n\", SDL_GetError());\n        SDL_Quit();\n        exit(2);\n    }\n\n    surface = SDL_LoadBMP(\"icon.bmp\");\n    if ( ! surface ) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Unable to load icon.bmp: %s\\n\", SDL_GetError());\n        SDL_Quit();\n        exit(3);\n    }\n    texture = SDL_GL_LoadTexture(surface, texcoords);\n    SDL_FreeSurface(surface);\n\n    /* Loop, drawing and checking events */\n    InitGL(640, 480);\n    if (InitShaders()) {\n        SDL_Log(\"Shaders supported, press SPACE to cycle them.\\n\");\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Shaders not supported!\\n\");\n    }\n    done = 0;\n    while ( ! done ) {\n        DrawGLScene(window, texture, texcoords);\n\n        /* This could go in a separate function */\n        { SDL_Event event;\n            while ( SDL_PollEvent(&event) ) {\n                if ( event.type == SDL_QUIT ) {\n                    done = 1;\n                }\n                if ( event.type == SDL_KEYDOWN ) {\n                    if ( event.key.keysym.sym == SDLK_SPACE ) {\n                        current_shader = (current_shader + 1) % NUM_SHADERS;\n                    }\n                    if ( event.key.keysym.sym == SDLK_ESCAPE ) {\n                        done = 1;\n                    }\n                }\n            }\n        }\n    }\n    QuitShaders();\n    SDL_Quit();\n    return 1;\n}\n\n#else /* HAVE_OPENGL */\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No OpenGL support on this system\\n\");\n    return 1;\n}\n\n#endif /* HAVE_OPENGL */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testshape.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <math.h>\n#include <stdio.h>\n#include \"SDL.h\"\n#include \"SDL_shape.h\"\n\n#define SHAPED_WINDOW_X 150\n#define SHAPED_WINDOW_Y 150\n#define SHAPED_WINDOW_DIMENSION 640\n\ntypedef struct LoadedPicture {\n    SDL_Surface *surface;\n    SDL_Texture *texture;\n    SDL_WindowShapeMode mode;\n    const char* name;\n} LoadedPicture;\n\nvoid render(SDL_Renderer *renderer,SDL_Texture *texture,SDL_Rect texture_dimensions)\n{\n    /* Clear render-target to blue. */\n    SDL_SetRenderDrawColor(renderer,0x00,0x00,0xff,0xff);\n    SDL_RenderClear(renderer);\n\n    /* Render the texture. */\n    SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions);\n\n    SDL_RenderPresent(renderer);\n}\n\nint main(int argc,char** argv)\n{\n    Uint8 num_pictures;\n    LoadedPicture* pictures;\n    int i, j;\n    SDL_PixelFormat* format = NULL;\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Color black = {0,0,0,0xff};\n    SDL_Event event;\n    int should_exit = 0;\n    unsigned int current_picture;\n    int button_down;\n    Uint32 pixelFormat = 0;\n    int access = 0;\n    SDL_Rect texture_dimensions;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if(argc < 2) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"SDL_Shape requires at least one bitmap file as argument.\");\n        exit(-1);\n    }\n\n    if(SDL_VideoInit(NULL) == -1) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not initialize SDL video.\");\n        exit(-2);\n    }\n\n    num_pictures = argc - 1;\n    pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures);\n    if (!pictures) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not allocate memory.\");\n        exit(1);\n    }\n    for(i=0;i<num_pictures;i++)\n        pictures[i].surface = NULL;\n    for(i=0;i<num_pictures;i++) {\n        pictures[i].surface = SDL_LoadBMP(argv[i+1]);\n        pictures[i].name = argv[i+1];\n        if(pictures[i].surface == NULL) {\n            for(j=0;j<num_pictures;j++)\n                SDL_FreeSurface(pictures[j].surface);\n            SDL_free(pictures);\n            SDL_VideoQuit();\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not load surface from named bitmap file: %s\", argv[i+1]);\n            exit(-3);\n        }\n\n        format = pictures[i].surface->format;\n        if(SDL_ISPIXELFORMAT_ALPHA(format->format)) {\n            pictures[i].mode.mode = ShapeModeBinarizeAlpha;\n            pictures[i].mode.parameters.binarizationCutoff = 255;\n        }\n        else {\n            pictures[i].mode.mode = ShapeModeColorKey;\n            pictures[i].mode.parameters.colorKey = black;\n        }\n    }\n\n    window = SDL_CreateShapedWindow(\"SDL_Shape test\",\n        SHAPED_WINDOW_X, SHAPED_WINDOW_Y,\n        SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,\n        0);\n    SDL_SetWindowPosition(window, SHAPED_WINDOW_X, SHAPED_WINDOW_Y);\n    if(window == NULL) {\n        for(i=0;i<num_pictures;i++)\n            SDL_FreeSurface(pictures[i].surface);\n        SDL_free(pictures);\n        SDL_VideoQuit();\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not create shaped window for SDL_Shape.\");\n        exit(-4);\n    }\n    renderer = SDL_CreateRenderer(window,-1,0);\n    if (!renderer) {\n        SDL_DestroyWindow(window);\n        for(i=0;i<num_pictures;i++)\n            SDL_FreeSurface(pictures[i].surface);\n        SDL_free(pictures);\n        SDL_VideoQuit();\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not create rendering context for SDL_Shape window.\");\n        exit(-5);\n    }\n\n    for(i=0;i<num_pictures;i++)\n        pictures[i].texture = NULL;\n    for(i=0;i<num_pictures;i++) {\n        pictures[i].texture = SDL_CreateTextureFromSurface(renderer,pictures[i].surface);\n        if(pictures[i].texture == NULL) {\n            for(i=0;i<num_pictures;i++)\n                if(pictures[i].texture != NULL)\n                    SDL_DestroyTexture(pictures[i].texture);\n            for(i=0;i<num_pictures;i++)\n                SDL_FreeSurface(pictures[i].surface);\n            SDL_free(pictures);\n            SDL_DestroyRenderer(renderer);\n            SDL_DestroyWindow(window);\n            SDL_VideoQuit();\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Could not create texture for SDL_shape.\");\n            exit(-6);\n        }\n    }\n\n    should_exit = 0;\n    current_picture = 0;\n    button_down = 0;\n    texture_dimensions.h = 0;\n    texture_dimensions.w = 0;\n    texture_dimensions.x = 0;\n    texture_dimensions.y = 0;\n    SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, \"Changing to shaped bmp: %s\", pictures[current_picture].name);\n    SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h);\n    SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h);\n    SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode);\n    while(should_exit == 0) {\n        while (SDL_PollEvent(&event)) {\n            if(event.type == SDL_KEYDOWN) {\n                button_down = 1;\n                if(event.key.keysym.sym == SDLK_ESCAPE) {\n                    should_exit = 1;\n                    break;\n                }\n            }\n            if(button_down && event.type == SDL_KEYUP) {\n                button_down = 0;\n                current_picture += 1;\n                if(current_picture >= num_pictures)\n                    current_picture = 0;\n                SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, \"Changing to shaped bmp: %s\", pictures[current_picture].name);\n                SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h);\n                SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h);\n                SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode);\n            }\n            if (event.type == SDL_QUIT) {\n                should_exit = 1;\n                break;\n            }\n        }\n        render(renderer,pictures[current_picture].texture,texture_dimensions);\n        SDL_Delay(10);\n    }\n\n    /* Free the textures. */\n    for(i=0;i<num_pictures;i++)\n        SDL_DestroyTexture(pictures[i].texture);\n    SDL_DestroyRenderer(renderer);\n    /* Destroy the window. */\n    SDL_DestroyWindow(window);\n    /* Free the original surfaces backing the textures. */\n    for(i=0;i<num_pictures;i++)\n        SDL_FreeSurface(pictures[i].surface);\n    SDL_free(pictures);\n    /* Call SDL_VideoQuit() before quitting. */\n    SDL_VideoQuit();\n\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testsprite2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Move N sprites around on the screen as fast as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test.h\"\n#include \"SDL_test_common.h\"\n\n#define NUM_SPRITES    100\n#define MAX_SPEED     1\n\nstatic SDLTest_CommonState *state;\nstatic int num_sprites;\nstatic SDL_Texture **sprites;\nstatic SDL_bool cycle_color;\nstatic SDL_bool cycle_alpha;\nstatic int cycle_direction = 1;\nstatic int current_alpha = 0;\nstatic int current_color = 0;\nstatic SDL_Rect *positions;\nstatic SDL_Rect *velocities;\nstatic int sprite_w, sprite_h;\nstatic SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND;\nstatic Uint32 next_fps_check, frames;\nstatic const Uint32 fps_check_delay = 5000;\n\n/* Number of iterations to move sprites - used for visual tests. */\n/* -1: infinite random moves (default); >=0: enables N deterministic moves */\nstatic int iterations = -1;\n\nint done;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_free(sprites);\n    SDL_free(positions);\n    SDL_free(velocities);\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nint\nLoadSprite(const char *file)\n{\n    int i;\n    SDL_Surface *temp;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\", file, SDL_GetError());\n        return (-1);\n    }\n    sprite_w = temp->w;\n    sprite_h = temp->h;\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (temp->format->palette) {\n        SDL_SetColorKey(temp, 1, *(Uint8 *) temp->pixels);\n    } else {\n        switch (temp->format->BitsPerPixel) {\n        case 15:\n            SDL_SetColorKey(temp, 1, (*(Uint16 *) temp->pixels) & 0x00007FFF);\n            break;\n        case 16:\n            SDL_SetColorKey(temp, 1, *(Uint16 *) temp->pixels);\n            break;\n        case 24:\n            SDL_SetColorKey(temp, 1, (*(Uint32 *) temp->pixels) & 0x00FFFFFF);\n            break;\n        case 32:\n            SDL_SetColorKey(temp, 1, *(Uint32 *) temp->pixels);\n            break;\n        }\n    }\n\n    /* Create textures from the image */\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        sprites[i] = SDL_CreateTextureFromSurface(renderer, temp);\n        if (!sprites[i]) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n            SDL_FreeSurface(temp);\n            return (-1);\n        }\n        if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set blend mode: %s\\n\", SDL_GetError());\n            SDL_FreeSurface(temp);\n            SDL_DestroyTexture(sprites[i]);\n            return (-1);\n        }\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return (0);\n}\n\nvoid\nMoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)\n{\n    int i;\n    SDL_Rect viewport, temp;\n    SDL_Rect *position, *velocity;\n\n    /* Query the sizes */\n    SDL_RenderGetViewport(renderer, &viewport);\n\n    /* Cycle the color and alpha, if desired */\n    if (cycle_color) {\n        current_color += cycle_direction;\n        if (current_color < 0) {\n            current_color = 0;\n            cycle_direction = -cycle_direction;\n        }\n        if (current_color > 255) {\n            current_color = 255;\n            cycle_direction = -cycle_direction;\n        }\n        SDL_SetTextureColorMod(sprite, 255, (Uint8) current_color,\n                               (Uint8) current_color);\n    }\n    if (cycle_alpha) {\n        current_alpha += cycle_direction;\n        if (current_alpha < 0) {\n            current_alpha = 0;\n            cycle_direction = -cycle_direction;\n        }\n        if (current_alpha > 255) {\n            current_alpha = 255;\n            cycle_direction = -cycle_direction;\n        }\n        SDL_SetTextureAlphaMod(sprite, (Uint8) current_alpha);\n    }\n\n    /* Draw a gray background */\n    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n    SDL_RenderClear(renderer);\n\n    /* Test points */\n    SDL_SetRenderDrawColor(renderer, 0xFF, 0x00, 0x00, 0xFF);\n    SDL_RenderDrawPoint(renderer, 0, 0);\n    SDL_RenderDrawPoint(renderer, viewport.w-1, 0);\n    SDL_RenderDrawPoint(renderer, 0, viewport.h-1);\n    SDL_RenderDrawPoint(renderer, viewport.w-1, viewport.h-1);\n\n    /* Test horizontal and vertical lines */\n    SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);\n    SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0);\n    SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1);\n    SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2);\n    SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2);\n\n    /* Test fill and copy */\n    SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);\n    temp.x = 1;\n    temp.y = 1;\n    temp.w = sprite_w;\n    temp.h = sprite_h;\n    SDL_RenderFillRect(renderer, &temp);\n    SDL_RenderCopy(renderer, sprite, NULL, &temp);\n    temp.x = viewport.w-sprite_w-1;\n    temp.y = 1;\n    temp.w = sprite_w;\n    temp.h = sprite_h;\n    SDL_RenderFillRect(renderer, &temp);\n    SDL_RenderCopy(renderer, sprite, NULL, &temp);\n    temp.x = 1;\n    temp.y = viewport.h-sprite_h-1;\n    temp.w = sprite_w;\n    temp.h = sprite_h;\n    SDL_RenderFillRect(renderer, &temp);\n    SDL_RenderCopy(renderer, sprite, NULL, &temp);\n    temp.x = viewport.w-sprite_w-1;\n    temp.y = viewport.h-sprite_h-1;\n    temp.w = sprite_w;\n    temp.h = sprite_h;\n    SDL_RenderFillRect(renderer, &temp);\n    SDL_RenderCopy(renderer, sprite, NULL, &temp);\n\n    /* Test diagonal lines */\n    SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);\n    SDL_RenderDrawLine(renderer, sprite_w, sprite_h,\n                       viewport.w-sprite_w-2, viewport.h-sprite_h-2);\n    SDL_RenderDrawLine(renderer, viewport.w-sprite_w-2, sprite_h,\n                       sprite_w, viewport.h-sprite_h-2);\n\n    /* Conditionally move the sprites, bounce at the wall */\n    if (iterations == -1 || iterations > 0) {\n        for (i = 0; i < num_sprites; ++i) {\n            position = &positions[i];\n            velocity = &velocities[i];\n            position->x += velocity->x;\n            if ((position->x < 0) || (position->x >= (viewport.w - sprite_w))) {\n                velocity->x = -velocity->x;\n                position->x += velocity->x;\n            }\n            position->y += velocity->y;\n            if ((position->y < 0) || (position->y >= (viewport.h - sprite_h))) {\n                velocity->y = -velocity->y;\n                position->y += velocity->y;\n            }\n\n        }\n        \n        /* Countdown sprite-move iterations and disable color changes at iteration end - used for visual tests. */\n        if (iterations > 0) {\n            iterations--;\n            if (iterations == 0) {\n                cycle_alpha = SDL_FALSE;\n                cycle_color = SDL_FALSE;\n            }\n        }\n    }\n\n    /* Draw sprites */\n    for (i = 0; i < num_sprites; ++i) {\n        position = &positions[i];\n\n        /* Blit the sprite onto the screen */\n        SDL_RenderCopy(renderer, sprite, NULL, position);\n    }\n\n    /* Update the screen! */\n    SDL_RenderPresent(renderer);\n}\n\nvoid\nloop()\n{\n    Uint32 now;\n    int i;\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i] == NULL)\n            continue;\n        MoveSprites(state->renderers[i], sprites[i]);\n    }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n\n    frames++;\n    now = SDL_GetTicks();\n    if (SDL_TICKS_PASSED(now, next_fps_check)) {\n        /* Print out some timing information */\n        const Uint32 then = next_fps_check - fps_check_delay;\n        const double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n        next_fps_check = now + fps_check_delay;\n        frames = 0;\n    }\n\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    Uint64 seed;\n    const char *icon = \"icon.bmp\";\n\n    /* Initialize parameters */\n    num_sprites = NUM_SPRITES;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--blend\") == 0) {\n                if (argv[i + 1]) {\n                    if (SDL_strcasecmp(argv[i + 1], \"none\") == 0) {\n                        blendMode = SDL_BLENDMODE_NONE;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"blend\") == 0) {\n                        blendMode = SDL_BLENDMODE_BLEND;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"add\") == 0) {\n                        blendMode = SDL_BLENDMODE_ADD;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"mod\") == 0) {\n                        blendMode = SDL_BLENDMODE_MOD;\n                        consumed = 2;\n                    } else if (SDL_strcasecmp(argv[i + 1], \"sub\") == 0) {\n                        blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT);\n                        consumed = 2;\n                    }\n                }\n            } else if (SDL_strcasecmp(argv[i], \"--iterations\") == 0) {\n                if (argv[i + 1]) {\n                    iterations = SDL_atoi(argv[i + 1]);\n                    if (iterations < -1) iterations = -1;\n                    consumed = 2;\n                }\n            } else if (SDL_strcasecmp(argv[i], \"--cyclecolor\") == 0) {\n                cycle_color = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_strcasecmp(argv[i], \"--cyclealpha\") == 0) {\n                cycle_alpha = SDL_TRUE;\n                consumed = 1;\n            } else if (SDL_isdigit(*argv[i])) {\n                num_sprites = SDL_atoi(argv[i]);\n                consumed = 1;\n            } else if (argv[i][0] != '-') {\n                icon = argv[i];\n                consumed = 1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--blend none|blend|add|mod]\", \"[--cyclecolor]\", \"[--cyclealpha]\", \"[--iterations N]\", \"[num_sprites]\", \"[icon.bmp]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    /* Create the windows, initialize the renderers, and load the textures */\n    sprites =\n        (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));\n    if (!sprites) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory!\\n\");\n        quit(2);\n    }\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n    if (LoadSprite(icon) < 0) {\n        quit(2);\n    }\n\n    /* Allocate memory for the sprite info */\n    positions = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect));\n    velocities = (SDL_Rect *) SDL_malloc(num_sprites * sizeof(SDL_Rect));\n    if (!positions || !velocities) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory!\\n\");\n        quit(2);\n    }\n\n    /* Position sprites and set their velocities using the fuzzer */ \n    if (iterations >= 0) {\n        /* Deterministic seed - used for visual tests */\n        seed = (Uint64)iterations;\n    } else {\n        /* Pseudo-random seed generated from the time */\n        seed = (Uint64)time(NULL);\n    }\n    SDLTest_FuzzerInit(seed);\n    for (i = 0; i < num_sprites; ++i) {\n        positions[i].x = SDLTest_RandomIntegerInRange(0, state->window_w - sprite_w);\n        positions[i].y = SDLTest_RandomIntegerInRange(0, state->window_h - sprite_h);\n        positions[i].w = sprite_w;\n        positions[i].h = sprite_h;\n        velocities[i].x = 0;\n        velocities[i].y = 0;\n        while (!velocities[i].x && !velocities[i].y) {\n            velocities[i].x = SDLTest_RandomIntegerInRange(-MAX_SPEED, MAX_SPEED);\n            velocities[i].y = SDLTest_RandomIntegerInRange(-MAX_SPEED, MAX_SPEED);\n        }\n    }\n\n    /* Main render loop */\n    frames = 0;\n    next_fps_check = SDL_GetTicks() + fps_check_delay;\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testspriteminimal.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Move N sprites around on the screen as fast as possible */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\n#define WINDOW_WIDTH    640\n#define WINDOW_HEIGHT   480\n#define NUM_SPRITES     100\n#define MAX_SPEED       1\n\nstatic SDL_Texture *sprite;\nstatic SDL_Rect positions[NUM_SPRITES];\nstatic SDL_Rect velocities[NUM_SPRITES];\nstatic int sprite_w, sprite_h;\n\nSDL_Renderer *renderer;\nint done;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    exit(rc);\n}\n\nint\nLoadSprite(char *file, SDL_Renderer *renderer)\n{\n    SDL_Surface *temp;\n\n    /* Load the sprite image */\n    temp = SDL_LoadBMP(file);\n    if (temp == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", file, SDL_GetError());\n        return (-1);\n    }\n    sprite_w = temp->w;\n    sprite_h = temp->h;\n\n    /* Set transparent pixel as the pixel at (0,0) */\n    if (temp->format->palette) {\n        SDL_SetColorKey(temp, SDL_TRUE, *(Uint8 *) temp->pixels);\n    } else {\n        switch (temp->format->BitsPerPixel) {\n        case 15:\n            SDL_SetColorKey(temp, SDL_TRUE,\n                            (*(Uint16 *) temp->pixels) & 0x00007FFF);\n            break;\n        case 16:\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint16 *) temp->pixels);\n            break;\n        case 24:\n            SDL_SetColorKey(temp, SDL_TRUE,\n                            (*(Uint32 *) temp->pixels) & 0x00FFFFFF);\n            break;\n        case 32:\n            SDL_SetColorKey(temp, SDL_TRUE, *(Uint32 *) temp->pixels);\n            break;\n        }\n    }\n\n    /* Create textures from the image */\n    sprite = SDL_CreateTextureFromSurface(renderer, temp);\n    if (!sprite) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create texture: %s\\n\", SDL_GetError());\n        SDL_FreeSurface(temp);\n        return (-1);\n    }\n    SDL_FreeSurface(temp);\n\n    /* We're ready to roll. :) */\n    return (0);\n}\n\nvoid\nMoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)\n{\n    int i;\n    int window_w = WINDOW_WIDTH;\n    int window_h = WINDOW_HEIGHT;\n    SDL_Rect *position, *velocity;\n\n    /* Draw a gray background */\n    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n    SDL_RenderClear(renderer);\n\n    /* Move the sprite, bounce at the wall, and draw */\n    for (i = 0; i < NUM_SPRITES; ++i) {\n        position = &positions[i];\n        velocity = &velocities[i];\n        position->x += velocity->x;\n        if ((position->x < 0) || (position->x >= (window_w - sprite_w))) {\n            velocity->x = -velocity->x;\n            position->x += velocity->x;\n        }\n        position->y += velocity->y;\n        if ((position->y < 0) || (position->y >= (window_h - sprite_h))) {\n            velocity->y = -velocity->y;\n            position->y += velocity->y;\n        }\n\n        /* Blit the sprite onto the screen */\n        SDL_RenderCopy(renderer, sprite, NULL, position);\n    }\n\n    /* Update the screen! */\n    SDL_RenderPresent(renderer);\n}\n\nvoid loop()\n{\n    SDL_Event event;\n\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        if (event.type == SDL_QUIT || event.type == SDL_KEYDOWN) {\n            done = 1;\n        }\n    }\n    MoveSprites(renderer, sprite);\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Window *window;\n    int i;\n\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {\n        quit(2);\n    }\n\n    if (LoadSprite(\"icon.bmp\", renderer) < 0) {\n        quit(2);\n    }\n\n    /* Initialize the sprite positions */\n    srand(time(NULL));\n    for (i = 0; i < NUM_SPRITES; ++i) {\n        positions[i].x = rand() % (WINDOW_WIDTH - sprite_w);\n        positions[i].y = rand() % (WINDOW_HEIGHT - sprite_h);\n        positions[i].w = sprite_w;\n        positions[i].h = sprite_h;\n        velocities[i].x = 0;\n        velocities[i].y = 0;\n        while (!velocities[i].x && !velocities[i].y) {\n            velocities[i].x = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;\n            velocities[i].y = (rand() % (MAX_SPEED * 2 + 1)) - MAX_SPEED;\n        }\n    }\n\n    /* Main render loop */\n    done = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n    quit(0);\n\n    return 0; /* to prevent compiler warning */\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/teststreaming.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/********************************************************************************\n *                                                                              *\n * Running moose :) Coded by Mike Gorchak.                                      *\n *                                                                              *\n ********************************************************************************/\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL.h\"\n\n#define MOOSEPIC_W 64\n#define MOOSEPIC_H 88\n\n#define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H)\n#define MOOSEFRAMES_COUNT 10\n\nSDL_Color MooseColors[84] = {\n    {49, 49, 49, 255}, {66, 24, 0, 255}, {66, 33, 0, 255}, {66, 66, 66, 255},\n    {66, 115, 49, 255}, {74, 33, 0, 255}, {74, 41, 16, 255}, {82, 33, 8, 255},\n    {82, 41, 8, 255}, {82, 49, 16, 255}, {82, 82, 82, 255}, {90, 41, 8, 255},\n    {90, 41, 16, 255}, {90, 57, 24, 255}, {99, 49, 16, 255}, {99, 66, 24, 255},\n    {99, 66, 33, 255}, {99, 74, 33, 255}, {107, 57, 24, 255}, {107, 82, 41, 255},\n    {115, 57, 33, 255}, {115, 66, 33, 255}, {115, 66, 41, 255}, {115, 74, 0, 255},\n    {115, 90, 49, 255}, {115, 115, 115, 255}, {123, 82, 0, 255}, {123, 99, 57, 255},\n    {132, 66, 41, 255}, {132, 74, 41, 255}, {132, 90, 8, 255}, {132, 99, 33, 255},\n    {132, 99, 66, 255}, {132, 107, 66, 255}, {140, 74, 49, 255}, {140, 99, 16, 255},\n    {140, 107, 74, 255}, {140, 115, 74, 255}, {148, 107, 24, 255}, {148, 115, 82, 255},\n    {148, 123, 74, 255}, {148, 123, 90, 255}, {156, 115, 33, 255}, {156, 115, 90, 255},\n    {156, 123, 82, 255}, {156, 132, 82, 255}, {156, 132, 99, 255}, {156, 156, 156, 255},\n    {165, 123, 49, 255}, {165, 123, 90, 255}, {165, 132, 82, 255}, {165, 132, 90, 255},\n    {165, 132, 99, 255}, {165, 140, 90, 255}, {173, 132, 57, 255}, {173, 132, 99, 255},\n    {173, 140, 107, 255}, {173, 140, 115, 255}, {173, 148, 99, 255}, {173, 173, 173, 255},\n    {181, 140, 74, 255}, {181, 148, 115, 255}, {181, 148, 123, 255}, {181, 156, 107, 255},\n    {189, 148, 123, 255}, {189, 156, 82, 255}, {189, 156, 123, 255}, {189, 156, 132, 255},\n    {189, 189, 189, 255}, {198, 156, 123, 255}, {198, 165, 132, 255}, {206, 165, 99, 255},\n    {206, 165, 132, 255}, {206, 173, 140, 255}, {206, 206, 206, 255}, {214, 173, 115, 255},\n    {214, 173, 140, 255}, {222, 181, 148, 255}, {222, 189, 132, 255}, {222, 189, 156, 255},\n    {222, 222, 222, 255}, {231, 198, 165, 255}, {231, 231, 231, 255}, {239, 206, 173, 255}\n};\n\nUint8 MooseFrames[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE];\n\nSDL_Renderer *renderer;\nint frame;\nSDL_Texture *MooseTexture;\nSDL_bool done = SDL_FALSE;\n\nvoid quit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nvoid UpdateTexture(SDL_Texture *texture, int frame)\n{\n    SDL_Color *color;\n    Uint8 *src;\n    Uint32 *dst;\n    int row, col;\n    void *pixels;\n    int pitch;\n\n    if (SDL_LockTexture(texture, NULL, &pixels, &pitch) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't lock texture: %s\\n\", SDL_GetError());\n        quit(5);\n    }\n    src = MooseFrames[frame];\n    for (row = 0; row < MOOSEPIC_H; ++row) {\n        dst = (Uint32*)((Uint8*)pixels + row * pitch);\n        for (col = 0; col < MOOSEPIC_W; ++col) {\n            color = &MooseColors[*src++];\n            *dst++ = (0xFF000000|(color->r<<16)|(color->g<<8)|color->b);\n        }\n    }\n    SDL_UnlockTexture(texture);\n}\n\nvoid\nloop()\n{\n    SDL_Event event;\n\n    while (SDL_PollEvent(&event)) {\n        switch (event.type) {\n        case SDL_KEYDOWN:\n            if (event.key.keysym.sym == SDLK_ESCAPE) {\n                done = SDL_TRUE;\n            }\n            break;\n        case SDL_QUIT:\n            done = SDL_TRUE;\n            break;\n        }\n    }\n\n    frame = (frame + 1) % MOOSEFRAMES_COUNT;\n    UpdateTexture(MooseTexture, frame);\n\n    SDL_RenderClear(renderer);\n    SDL_RenderCopy(renderer, MooseTexture, NULL, NULL);\n    SDL_RenderPresent(renderer);\n\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char **argv)\n{\n    SDL_Window *window;\n    SDL_RWops *handle;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(SDL_INIT_VIDEO) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return 1;\n    }\n\n    /* load the moose images */\n    handle = SDL_RWFromFile(\"moose.dat\", \"rb\");\n    if (handle == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Can't find the file moose.dat !\\n\");\n        quit(2);\n    }\n    SDL_RWread(handle, MooseFrames, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT);\n    SDL_RWclose(handle);\n\n\n    /* Create the window and renderer */\n    window = SDL_CreateWindow(\"Happy Moose\",\n                              SDL_WINDOWPOS_UNDEFINED,\n                              SDL_WINDOWPOS_UNDEFINED,\n                              MOOSEPIC_W*4, MOOSEPIC_H*4,\n                              SDL_WINDOW_RESIZABLE);\n    if (!window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create window: %s\\n\", SDL_GetError());\n        quit(3);\n    }\n\n    renderer = SDL_CreateRenderer(window, -1, 0);\n    if (!renderer) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create renderer: %s\\n\", SDL_GetError());\n        quit(4);\n    }\n\n    MooseTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H);\n    if (!MooseTexture) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create texture: %s\\n\", SDL_GetError());\n        quit(5);\n    }\n\n    /* Loop, waiting for QUIT or the escape key */\n    frame = 0;\n\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n        }\n#endif\n\n    SDL_DestroyRenderer(renderer);\n\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testthread.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL threading code */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <signal.h>\n\n#include \"SDL.h\"\n\nstatic SDL_TLSID tls;\nstatic int alive = 0;\nstatic int testprio = 0;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nstatic const char *\ngetprioritystr(SDL_ThreadPriority priority)\n{\n    switch(priority)\n    {\n    case SDL_THREAD_PRIORITY_LOW: return \"SDL_THREAD_PRIORITY_LOW\";\n    case SDL_THREAD_PRIORITY_NORMAL: return \"SDL_THREAD_PRIORITY_NORMAL\";\n    case SDL_THREAD_PRIORITY_HIGH: return \"SDL_THREAD_PRIORITY_HIGH\";\n    case SDL_THREAD_PRIORITY_TIME_CRITICAL: return \"SDL_THREAD_PRIORITY_TIME_CRITICAL\";\n    }\n\n    return \"???\";\n}\n\nint SDLCALL\nThreadFunc(void *data)\n{\n    SDL_ThreadPriority prio = SDL_THREAD_PRIORITY_NORMAL;\n\n    SDL_TLSSet(tls, \"baby thread\", NULL);\n    SDL_Log(\"Started thread %s: My thread id is %lu, thread data = %s\\n\",\n           (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls));\n    while (alive) {\n        SDL_Log(\"Thread '%s' is alive!\\n\", (char *) data);\n\n        if (testprio) {\n            SDL_Log(\"SDL_SetThreadPriority(%s):%d\\n\", getprioritystr(prio), SDL_SetThreadPriority(prio));\n            if (++prio > SDL_THREAD_PRIORITY_TIME_CRITICAL)\n                prio = SDL_THREAD_PRIORITY_LOW;\n        }\n\n        SDL_Delay(1 * 1000);\n    }\n    SDL_Log(\"Thread '%s' exiting!\\n\", (char *) data);\n    return (0);\n}\n\nstatic void\nkilled(int sig)\n{\n    SDL_Log(\"Killed with SIGTERM, waiting 5 seconds to exit\\n\");\n    SDL_Delay(5 * 1000);\n    alive = 0;\n    quit(0);\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int arg = 1;\n    SDL_Thread *thread;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    while (argv[arg] && *argv[arg] == '-') {\n        if (SDL_strcmp(argv[arg], \"--prio\") == 0) {\n            testprio = 1;\n        }\n        ++arg;\n    }\n\n    tls = SDL_TLSCreate();\n    SDL_assert(tls);\n    SDL_TLSSet(tls, \"main thread\", NULL);\n    SDL_Log(\"Main thread data initially: %s\\n\", (const char *)SDL_TLSGet(tls));\n\n    alive = 1;\n    thread = SDL_CreateThread(ThreadFunc, \"One\", \"#1\");\n    if (thread == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create thread: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n    SDL_Delay(5 * 1000);\n    SDL_Log(\"Waiting for thread #1\\n\");\n    alive = 0;\n    SDL_WaitThread(thread, NULL);\n\n    SDL_Log(\"Main thread data finally: %s\\n\", (const char *)SDL_TLSGet(tls));\n\n    alive = 1;\n    signal(SIGTERM, killed);\n    thread = SDL_CreateThread(ThreadFunc, \"Two\", \"#2\");\n    if (thread == NULL) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create thread: %s\\n\", SDL_GetError());\n        quit(1);\n    }\n    raise(SIGTERM);\n\n    SDL_Quit();                 /* Never reached */\n    return (0);                 /* Never reached */\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testtimer.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Test program to check the resolution of the SDL timer on the current\n   platform\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#include \"SDL.h\"\n\n#define DEFAULT_RESOLUTION  1\n\nstatic int ticks = 0;\n\nstatic Uint32 SDLCALL\nticktock(Uint32 interval, void *param)\n{\n    ++ticks;\n    return (interval);\n}\n\nstatic Uint32 SDLCALL\ncallback(Uint32 interval, void *param)\n{\n    SDL_Log(\"Timer %d : param = %d\\n\", interval, (int) (uintptr_t) param);\n    return interval;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i, desired;\n    SDL_TimerID t1, t2, t3;\n    Uint32 start32, now32;\n    Uint64 start, now;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    if (SDL_Init(SDL_INIT_TIMER) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    /* Start the timer */\n    desired = 0;\n    if (argv[1]) {\n        desired = atoi(argv[1]);\n    }\n    if (desired == 0) {\n        desired = DEFAULT_RESOLUTION;\n    }\n    t1 = SDL_AddTimer(desired, ticktock, NULL);\n\n    /* Wait 10 seconds */\n    SDL_Log(\"Waiting 10 seconds\\n\");\n    SDL_Delay(10 * 1000);\n\n    /* Stop the timer */\n    SDL_RemoveTimer(t1);\n\n    /* Print the results */\n    if (ticks) {\n        SDL_Log(\"Timer resolution: desired = %d ms, actual = %f ms\\n\",\n                desired, (double) (10 * 1000) / ticks);\n    }\n\n    /* Test multiple timers */\n    SDL_Log(\"Testing multiple timers...\\n\");\n    t1 = SDL_AddTimer(100, callback, (void *) 1);\n    if (!t1)\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\"Could not create timer 1: %s\\n\", SDL_GetError());\n    t2 = SDL_AddTimer(50, callback, (void *) 2);\n    if (!t2)\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\"Could not create timer 2: %s\\n\", SDL_GetError());\n    t3 = SDL_AddTimer(233, callback, (void *) 3);\n    if (!t3)\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\"Could not create timer 3: %s\\n\", SDL_GetError());\n\n    /* Wait 10 seconds */\n    SDL_Log(\"Waiting 10 seconds\\n\");\n    SDL_Delay(10 * 1000);\n\n    SDL_Log(\"Removing timer 1 and waiting 5 more seconds\\n\");\n    SDL_RemoveTimer(t1);\n\n    SDL_Delay(5 * 1000);\n\n    SDL_RemoveTimer(t2);\n    SDL_RemoveTimer(t3);\n\n    start = SDL_GetPerformanceCounter();\n    for (i = 0; i < 1000000; ++i) {\n        ticktock(0, NULL);\n    }\n    now = SDL_GetPerformanceCounter();\n    SDL_Log(\"1 million iterations of ticktock took %f ms\\n\", (double)((now - start)*1000) / SDL_GetPerformanceFrequency());\n\n    SDL_Log(\"Performance counter frequency: %\"SDL_PRIu64\"\\n\", (unsigned long long) SDL_GetPerformanceFrequency());\n    start32 = SDL_GetTicks();\n    start = SDL_GetPerformanceCounter();\n    SDL_Delay(1000);\n    now = SDL_GetPerformanceCounter();\n    now32 = SDL_GetTicks();\n    SDL_Log(\"Delay 1 second = %d ms in ticks, %f ms according to performance counter\\n\", (now32-start32), (double)((now - start)*1000) / SDL_GetPerformanceFrequency());\n\n    SDL_Quit();\n    return (0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testver.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Test program to compare the compile-time version of SDL with the linked\n   version of SDL\n*/\n\n#include <stdio.h>\n#include <stdlib.h>\n\n#include \"SDL.h\"\n#include \"SDL_revision.h\"\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_version compiled;\n    SDL_version linked;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n#if SDL_VERSION_ATLEAST(2, 0, 0)\n    SDL_Log(\"Compiled with SDL 2.0 or newer\\n\");\n#else\n    SDL_Log(\"Compiled with SDL older than 2.0\\n\");\n#endif\n    SDL_VERSION(&compiled);\n    SDL_Log(\"Compiled version: %d.%d.%d.%d (%s)\\n\",\n           compiled.major, compiled.minor, compiled.patch,\n           SDL_REVISION_NUMBER, SDL_REVISION);\n    SDL_GetVersion(&linked);\n    SDL_Log(\"Linked version: %d.%d.%d.%d (%s)\\n\",\n           linked.major, linked.minor, linked.patch,\n           SDL_GetRevisionNumber(), SDL_GetRevision());\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testviewport.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n/* Simple program:  Check viewports */\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <time.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test.h\"\n#include \"SDL_test_common.h\"\n\n\nstatic SDLTest_CommonState *state;\n\nSDL_Rect viewport;\nint done, j;\nSDL_bool use_target = SDL_FALSE;\n#ifdef __EMSCRIPTEN__\nUint32 wait_start;\n#endif\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nvoid\nDrawOnViewport(SDL_Renderer * renderer, SDL_Rect viewport)\n{    \n    SDL_Rect rect;\n\n    /* Set the viewport */\n    SDL_RenderSetViewport(renderer, &viewport);\n    \n    /* Draw a gray background */\n    SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF);\n    SDL_RenderClear(renderer);\n\n    /* Test inside points */\n    SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF);\n    SDL_RenderDrawPoint(renderer, viewport.h/2 + 10, viewport.w/2);\n    SDL_RenderDrawPoint(renderer, viewport.h/2 - 10, viewport.w/2);\n    SDL_RenderDrawPoint(renderer, viewport.h/2     , viewport.w/2 - 10);\n    SDL_RenderDrawPoint(renderer, viewport.h/2     , viewport.w/2 + 10);\n\n    /* Test horizontal and vertical lines */\n    SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);\n    SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0);\n    SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1);\n    SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2);\n    SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2);\n\n    /* Test diagonal lines */\n    SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF);\n    SDL_RenderDrawLine(renderer, 0, 0,\n                       viewport.w-1, viewport.h-1);\n    SDL_RenderDrawLine(renderer, viewport.w-1, 0,\n                       0, viewport.h-1);                      \n\n    /* Test outside points */\n    SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xF, 0xFF);\n    SDL_RenderDrawPoint(renderer, viewport.h/2 + viewport.h, viewport.w/2);\n    SDL_RenderDrawPoint(renderer, viewport.h/2 - viewport.h, viewport.w/2);\n    SDL_RenderDrawPoint(renderer, viewport.h/2     , viewport.w/2 - viewport.w);\n    SDL_RenderDrawPoint(renderer, viewport.h/2     , viewport.w/2 + viewport.w);\n\n    /* Add a box at the top */\n    rect.w = 8;\n    rect.h = 8;\n    rect.x = (viewport.w - rect.w) / 2;\n    rect.y = 0;\n    SDL_RenderFillRect(renderer, &rect);\n}\n\nvoid\nloop()\n{\n#ifdef __EMSCRIPTEN__\n    /* Avoid using delays */\n    if(SDL_GetTicks() - wait_start < 1000)\n        return;\n    wait_start = SDL_GetTicks();\n#endif\n    SDL_Event event;\n    int i;\n    /* Check for events */\n    while (SDL_PollEvent(&event)) {\n        SDLTest_CommonEvent(state, &event, &done);\n    }\n\n    /* Move a viewport box in steps around the screen */\n    viewport.x = j * 100;\n    viewport.y = viewport.x;\n    viewport.w = 100 + j * 50;\n    viewport.h = 100 + j * 50;\n    j = (j + 1) % 4;\n    SDL_Log(\"Current Viewport x=%i y=%i w=%i h=%i\", viewport.x, viewport.y, viewport.w, viewport.h);\n\n    for (i = 0; i < state->num_windows; ++i) {\n        if (state->windows[i] == NULL)\n            continue;\n\n        /* Draw using viewport */\n        DrawOnViewport(state->renderers[i], viewport);\n\n        /* Update the screen! */\n        if (use_target) {\n            SDL_SetRenderTarget(state->renderers[i], NULL);\n            SDL_RenderCopy(state->renderers[i], state->targets[i], NULL, NULL);\n            SDL_RenderPresent(state->renderers[i]);\n            SDL_SetRenderTarget(state->renderers[i], state->targets[i]);\n        } else {\n            SDL_RenderPresent(state->renderers[i]);\n        }\n    }\n\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n    Uint32 then, now, frames;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    for (i = 1; i < argc;) {\n        int consumed;\n\n        consumed = SDLTest_CommonArg(state, i);\n        if (consumed == 0) {\n            consumed = -1;\n            if (SDL_strcasecmp(argv[i], \"--target\") == 0) {\n                use_target = SDL_TRUE;\n                consumed = 1;\n            }\n        }\n        if (consumed < 0) {\n            static const char *options[] = { \"[--target]\", NULL };\n            SDLTest_CommonLogUsage(state, argv[0], options);\n            quit(1);\n        }\n        i += consumed;\n    }\n    if (!SDLTest_CommonInit(state)) {\n        quit(2);\n    }\n\n    if (use_target) {\n        int w, h;\n\n        for (i = 0; i < state->num_windows; ++i) {\n            SDL_GetWindowSize(state->windows[i], &w, &h);\n            state->targets[i] = SDL_CreateTexture(state->renderers[i], SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h);\n            SDL_SetRenderTarget(state->renderers[i], state->targets[i]);\n        }\n    }\n\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n    j = 0;\n\n#ifdef __EMSCRIPTEN__\n    wait_start = SDL_GetTicks();\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        ++frames;\n        loop();\n        SDL_Delay(1000);\n    }\n#endif\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if (now > then) {\n        double fps = ((double) frames * 1000) / (now - then);\n        SDL_Log(\"%2.2f frames per second\\n\", fps);\n    }\n    quit(0);\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testvulkan.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n#include <math.h>\n\n#include \"SDL_test_common.h\"\n\n#if defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__)\n\nint main(int argc, char *argv[])\n{\n    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"No Vulkan support on this system\\n\");\n    return 1;\n}\n\n#else\n\n#define VK_NO_PROTOTYPES\n#ifdef HAVE_VULKAN_H\n#include <vulkan/vulkan.h>\n#else\n/* SDL includes a copy for building on systems without the Vulkan SDK */\n#include \"../src/video/khronos/vulkan/vulkan.h\"\n#endif\n#include \"SDL_vulkan.h\"\n\n#ifndef UINT64_MAX /* VS2008 */\n#define UINT64_MAX 18446744073709551615\n#endif\n\n#define VULKAN_FUNCTIONS()                                              \\\n    VULKAN_DEVICE_FUNCTION(vkAcquireNextImageKHR)                       \\\n    VULKAN_DEVICE_FUNCTION(vkAllocateCommandBuffers)                    \\\n    VULKAN_DEVICE_FUNCTION(vkBeginCommandBuffer)                        \\\n    VULKAN_DEVICE_FUNCTION(vkCmdClearColorImage)                        \\\n    VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier)                        \\\n    VULKAN_DEVICE_FUNCTION(vkCreateCommandPool)                         \\\n    VULKAN_DEVICE_FUNCTION(vkCreateFence)                               \\\n    VULKAN_DEVICE_FUNCTION(vkCreateImageView)                           \\\n    VULKAN_DEVICE_FUNCTION(vkCreateSemaphore)                           \\\n    VULKAN_DEVICE_FUNCTION(vkCreateSwapchainKHR)                        \\\n    VULKAN_DEVICE_FUNCTION(vkDestroyCommandPool)                        \\\n    VULKAN_DEVICE_FUNCTION(vkDestroyDevice)                             \\\n    VULKAN_DEVICE_FUNCTION(vkDestroyFence)                              \\\n    VULKAN_DEVICE_FUNCTION(vkDestroyImageView)                          \\\n    VULKAN_DEVICE_FUNCTION(vkDestroySemaphore)                          \\\n    VULKAN_DEVICE_FUNCTION(vkDestroySwapchainKHR)                       \\\n    VULKAN_DEVICE_FUNCTION(vkDeviceWaitIdle)                            \\\n    VULKAN_DEVICE_FUNCTION(vkEndCommandBuffer)                          \\\n    VULKAN_DEVICE_FUNCTION(vkFreeCommandBuffers)                        \\\n    VULKAN_DEVICE_FUNCTION(vkGetDeviceQueue)                            \\\n    VULKAN_DEVICE_FUNCTION(vkGetFenceStatus)                            \\\n    VULKAN_DEVICE_FUNCTION(vkGetSwapchainImagesKHR)                     \\\n    VULKAN_DEVICE_FUNCTION(vkQueuePresentKHR)                           \\\n    VULKAN_DEVICE_FUNCTION(vkQueueSubmit)                               \\\n    VULKAN_DEVICE_FUNCTION(vkResetCommandBuffer)                        \\\n    VULKAN_DEVICE_FUNCTION(vkResetFences)                               \\\n    VULKAN_DEVICE_FUNCTION(vkWaitForFences)                             \\\n    VULKAN_GLOBAL_FUNCTION(vkCreateInstance)                            \\\n    VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceExtensionProperties)      \\\n    VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceLayerProperties)          \\\n    VULKAN_INSTANCE_FUNCTION(vkCreateDevice)                            \\\n    VULKAN_INSTANCE_FUNCTION(vkDestroyInstance)                         \\\n    VULKAN_INSTANCE_FUNCTION(vkDestroySurfaceKHR)                       \\\n    VULKAN_INSTANCE_FUNCTION(vkEnumerateDeviceExtensionProperties)      \\\n    VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices)                \\\n    VULKAN_INSTANCE_FUNCTION(vkGetDeviceProcAddr)                       \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFeatures)               \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties)             \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties)  \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR)      \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR) \\\n    VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR)\n\n#define VULKAN_DEVICE_FUNCTION(name) static PFN_##name name = NULL;\n#define VULKAN_GLOBAL_FUNCTION(name) static PFN_##name name = NULL;\n#define VULKAN_INSTANCE_FUNCTION(name) static PFN_##name name = NULL;\nVULKAN_FUNCTIONS()\n#undef VULKAN_DEVICE_FUNCTION\n#undef VULKAN_GLOBAL_FUNCTION\n#undef VULKAN_INSTANCE_FUNCTION\nstatic PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = NULL;\n\n/* Based on the headers found in\n * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers\n */\n#if VK_HEADER_VERSION < 22\nenum\n{\n    VK_ERROR_FRAGMENTED_POOL = -12,\n};\n#endif\n#if VK_HEADER_VERSION < 38\nenum {\n    VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000\n};\n#endif\n\nstatic const char *getVulkanResultString(VkResult result)\n{\n    switch((int)result)\n    {\n    case VK_SUCCESS:\n        return \"VK_SUCCESS\";\n    case VK_NOT_READY:\n        return \"VK_NOT_READY\";\n    case VK_TIMEOUT:\n        return \"VK_TIMEOUT\";\n    case VK_EVENT_SET:\n        return \"VK_EVENT_SET\";\n    case VK_EVENT_RESET:\n        return \"VK_EVENT_RESET\";\n    case VK_INCOMPLETE:\n        return \"VK_INCOMPLETE\";\n    case VK_ERROR_OUT_OF_HOST_MEMORY:\n        return \"VK_ERROR_OUT_OF_HOST_MEMORY\";\n    case VK_ERROR_OUT_OF_DEVICE_MEMORY:\n        return \"VK_ERROR_OUT_OF_DEVICE_MEMORY\";\n    case VK_ERROR_INITIALIZATION_FAILED:\n        return \"VK_ERROR_INITIALIZATION_FAILED\";\n    case VK_ERROR_DEVICE_LOST:\n        return \"VK_ERROR_DEVICE_LOST\";\n    case VK_ERROR_MEMORY_MAP_FAILED:\n        return \"VK_ERROR_MEMORY_MAP_FAILED\";\n    case VK_ERROR_LAYER_NOT_PRESENT:\n        return \"VK_ERROR_LAYER_NOT_PRESENT\";\n    case VK_ERROR_EXTENSION_NOT_PRESENT:\n        return \"VK_ERROR_EXTENSION_NOT_PRESENT\";\n    case VK_ERROR_FEATURE_NOT_PRESENT:\n        return \"VK_ERROR_FEATURE_NOT_PRESENT\";\n    case VK_ERROR_INCOMPATIBLE_DRIVER:\n        return \"VK_ERROR_INCOMPATIBLE_DRIVER\";\n    case VK_ERROR_TOO_MANY_OBJECTS:\n        return \"VK_ERROR_TOO_MANY_OBJECTS\";\n    case VK_ERROR_FORMAT_NOT_SUPPORTED:\n        return \"VK_ERROR_FORMAT_NOT_SUPPORTED\";\n    case VK_ERROR_FRAGMENTED_POOL:\n        return \"VK_ERROR_FRAGMENTED_POOL\";\n    case VK_ERROR_SURFACE_LOST_KHR:\n        return \"VK_ERROR_SURFACE_LOST_KHR\";\n    case VK_ERROR_NATIVE_WINDOW_IN_USE_KHR:\n        return \"VK_ERROR_NATIVE_WINDOW_IN_USE_KHR\";\n    case VK_SUBOPTIMAL_KHR:\n        return \"VK_SUBOPTIMAL_KHR\";\n    case VK_ERROR_OUT_OF_DATE_KHR:\n        return \"VK_ERROR_OUT_OF_DATE_KHR\";\n    case VK_ERROR_INCOMPATIBLE_DISPLAY_KHR:\n        return \"VK_ERROR_INCOMPATIBLE_DISPLAY_KHR\";\n    case VK_ERROR_VALIDATION_FAILED_EXT:\n        return \"VK_ERROR_VALIDATION_FAILED_EXT\";\n    case VK_ERROR_OUT_OF_POOL_MEMORY_KHR:\n        return \"VK_ERROR_OUT_OF_POOL_MEMORY_KHR\";\n    case VK_ERROR_INVALID_SHADER_NV:\n        return \"VK_ERROR_INVALID_SHADER_NV\";\n    case VK_RESULT_MAX_ENUM:\n    case VK_RESULT_RANGE_SIZE:\n        break;\n    }\n    if(result < 0)\n        return \"VK_ERROR_<Unknown>\";\n    return \"VK_<Unknown>\";\n}\n\ntypedef struct VulkanContext\n{\n    VkInstance instance;\n    VkDevice device;\n    VkSurfaceKHR surface;\n    VkSwapchainKHR swapchain;\n    VkPhysicalDeviceProperties physicalDeviceProperties;\n    VkPhysicalDeviceFeatures physicalDeviceFeatures;\n    uint32_t graphicsQueueFamilyIndex;\n    uint32_t presentQueueFamilyIndex;\n    VkPhysicalDevice physicalDevice;\n    VkQueue graphicsQueue;\n    VkQueue presentQueue;\n    VkSemaphore imageAvailableSemaphore;\n    VkSemaphore renderingFinishedSemaphore;\n    VkSurfaceCapabilitiesKHR surfaceCapabilities;\n    VkSurfaceFormatKHR *surfaceFormats;\n    uint32_t surfaceFormatsAllocatedCount;\n    uint32_t surfaceFormatsCount;\n    uint32_t swapchainDesiredImageCount;\n    VkSurfaceFormatKHR surfaceFormat;\n    VkExtent2D swapchainSize;\n    VkCommandPool commandPool;\n    uint32_t swapchainImageCount;\n    VkImage *swapchainImages;\n    VkCommandBuffer *commandBuffers;\n    VkFence *fences;\n} VulkanContext;\n\nstatic SDLTest_CommonState *state;\nstatic VulkanContext vulkanContext = {0};\n\nstatic void shutdownVulkan(void);\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void quit(int rc)\n{\n    shutdownVulkan();\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nstatic void loadGlobalFunctions(void)\n{\n    vkGetInstanceProcAddr = SDL_Vulkan_GetVkGetInstanceProcAddr();\n    if(!vkGetInstanceProcAddr)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"SDL_Vulkan_GetVkGetInstanceProcAddr(): %s\\n\",\n                     SDL_GetError());\n        quit(2);\n    }\n\n#define VULKAN_DEVICE_FUNCTION(name)\n#define VULKAN_GLOBAL_FUNCTION(name)                                                   \\\n    name = (PFN_##name)vkGetInstanceProcAddr(VK_NULL_HANDLE, #name);                   \\\n    if(!name)                                                                          \\\n    {                                                                                  \\\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,                                     \\\n                     \"vkGetInstanceProcAddr(VK_NULL_HANDLE, \\\"\" #name \"\\\") failed\\n\"); \\\n        quit(2);                                                                       \\\n    }\n#define VULKAN_INSTANCE_FUNCTION(name)\n    VULKAN_FUNCTIONS()\n#undef VULKAN_DEVICE_FUNCTION\n#undef VULKAN_GLOBAL_FUNCTION\n#undef VULKAN_INSTANCE_FUNCTION\n}\n\nstatic void createInstance(void)\n{\n    VkApplicationInfo appInfo = {0};\n    VkInstanceCreateInfo instanceCreateInfo = {0};\n    const char **extensions = NULL;\n    unsigned extensionCount = 0;\n\tVkResult result;\n\n\n\tappInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;\n    appInfo.apiVersion = VK_API_VERSION_1_0;\n    instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;\n    instanceCreateInfo.pApplicationInfo = &appInfo;\n    if(!SDL_Vulkan_GetInstanceExtensions(NULL, &extensionCount, NULL))\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"SDL_Vulkan_GetInstanceExtensions(): %s\\n\",\n                     SDL_GetError());\n        quit(2);\n    }\n    extensions = SDL_malloc(sizeof(const char *) * extensionCount);\n    if(!extensions)\n    {\n        SDL_OutOfMemory();\n        quit(2);\n    }\n    if(!SDL_Vulkan_GetInstanceExtensions(NULL, &extensionCount, extensions))\n    {\n        SDL_free((void*)extensions);\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"SDL_Vulkan_GetInstanceExtensions(): %s\\n\",\n                     SDL_GetError());\n        quit(2);\n    }\n    instanceCreateInfo.enabledExtensionCount = extensionCount;\n    instanceCreateInfo.ppEnabledExtensionNames = extensions;\n    result = vkCreateInstance(&instanceCreateInfo, NULL, &vulkanContext.instance);\n    SDL_free((void*)extensions);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.instance = VK_NULL_HANDLE;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkCreateInstance(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void loadInstanceFunctions(void)\n{\n#define VULKAN_DEVICE_FUNCTION(name)\n#define VULKAN_GLOBAL_FUNCTION(name)\n#define VULKAN_INSTANCE_FUNCTION(name)                                           \\\n    name = (PFN_##name)vkGetInstanceProcAddr(vulkanContext.instance, #name);     \\\n    if(!name)                                                                    \\\n    {                                                                            \\\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,                               \\\n                     \"vkGetInstanceProcAddr(instance, \\\"\" #name \"\\\") failed\\n\"); \\\n        quit(2);                                                                 \\\n    }\n    VULKAN_FUNCTIONS()\n#undef VULKAN_DEVICE_FUNCTION\n#undef VULKAN_GLOBAL_FUNCTION\n#undef VULKAN_INSTANCE_FUNCTION\n}\n\nstatic void createSurface(void)\n{\n    if(!SDL_Vulkan_CreateSurface(state->windows[0],\n                                 vulkanContext.instance,\n                                 &vulkanContext.surface))\n    {\n        vulkanContext.surface = VK_NULL_HANDLE;\n        SDL_LogError(\n            SDL_LOG_CATEGORY_APPLICATION, \"SDL_Vulkan_CreateSurface(): %s\\n\", SDL_GetError());\n        quit(2);\n    }\n}\n\nstatic void findPhysicalDevice(void)\n{\n    uint32_t physicalDeviceCount = 0;\n\tVkPhysicalDevice *physicalDevices;\n\tVkQueueFamilyProperties *queueFamiliesProperties = NULL;\n    uint32_t queueFamiliesPropertiesAllocatedSize = 0;\n    VkExtensionProperties *deviceExtensions = NULL;\n    uint32_t deviceExtensionsAllocatedSize = 0;\n\tuint32_t physicalDeviceIndex;\n\n    VkResult result =\n        vkEnumeratePhysicalDevices(vulkanContext.instance, &physicalDeviceCount, NULL);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkEnumeratePhysicalDevices(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    if(physicalDeviceCount == 0)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkEnumeratePhysicalDevices(): no physical devices\\n\");\n        quit(2);\n    }\n    physicalDevices = SDL_malloc(sizeof(VkPhysicalDevice) * physicalDeviceCount);\n    if(!physicalDevices)\n    {\n        SDL_OutOfMemory();\n        quit(2);\n    }\n    result =\n        vkEnumeratePhysicalDevices(vulkanContext.instance, &physicalDeviceCount, physicalDevices);\n    if(result != VK_SUCCESS)\n    {\n        SDL_free(physicalDevices);\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkEnumeratePhysicalDevices(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    vulkanContext.physicalDevice = NULL;\n    for(physicalDeviceIndex = 0; physicalDeviceIndex < physicalDeviceCount;\n        physicalDeviceIndex++)\n    {\n        uint32_t queueFamiliesCount = 0;\n\t\tuint32_t queueFamilyIndex;\n        uint32_t deviceExtensionCount = 0;\n\t\tSDL_bool hasSwapchainExtension = SDL_FALSE;\n\t\tuint32_t i;\n\n\n\t\tVkPhysicalDevice physicalDevice = physicalDevices[physicalDeviceIndex];\n        vkGetPhysicalDeviceProperties(physicalDevice, &vulkanContext.physicalDeviceProperties);\n        if(VK_VERSION_MAJOR(vulkanContext.physicalDeviceProperties.apiVersion) < 1)\n            continue;\n        vkGetPhysicalDeviceFeatures(physicalDevice, &vulkanContext.physicalDeviceFeatures);\n        vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamiliesCount, NULL);\n        if(queueFamiliesCount == 0)\n            continue;\n        if(queueFamiliesPropertiesAllocatedSize < queueFamiliesCount)\n        {\n            SDL_free(queueFamiliesProperties);\n            queueFamiliesPropertiesAllocatedSize = queueFamiliesCount;\n            queueFamiliesProperties =\n                SDL_malloc(sizeof(VkQueueFamilyProperties) * queueFamiliesPropertiesAllocatedSize);\n            if(!queueFamiliesProperties)\n            {\n                SDL_free(physicalDevices);\n                SDL_free(deviceExtensions);\n                SDL_OutOfMemory();\n                quit(2);\n            }\n        }\n        vkGetPhysicalDeviceQueueFamilyProperties(\n            physicalDevice, &queueFamiliesCount, queueFamiliesProperties);\n        vulkanContext.graphicsQueueFamilyIndex = queueFamiliesCount;\n        vulkanContext.presentQueueFamilyIndex = queueFamiliesCount;\n        for(queueFamilyIndex = 0; queueFamilyIndex < queueFamiliesCount;\n            queueFamilyIndex++)\n        {\n            VkBool32 supported = 0;\n\n\t\t\tif(queueFamiliesProperties[queueFamilyIndex].queueCount == 0)\n                continue;\n            if(queueFamiliesProperties[queueFamilyIndex].queueFlags & VK_QUEUE_GRAPHICS_BIT)\n                vulkanContext.graphicsQueueFamilyIndex = queueFamilyIndex;\n            result = vkGetPhysicalDeviceSurfaceSupportKHR(\n                physicalDevice, queueFamilyIndex, vulkanContext.surface, &supported);\n            if(result != VK_SUCCESS)\n            {\n                SDL_free(physicalDevices);\n                SDL_free(queueFamiliesProperties);\n                SDL_free(deviceExtensions);\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                             \"vkGetPhysicalDeviceSurfaceSupportKHR(): %s\\n\",\n                             getVulkanResultString(result));\n                quit(2);\n            }\n            if(supported)\n            {\n                vulkanContext.presentQueueFamilyIndex = queueFamilyIndex;\n                if(queueFamiliesProperties[queueFamilyIndex].queueFlags & VK_QUEUE_GRAPHICS_BIT)\n                    break; // use this queue because it can present and do graphics\n            }\n        }\n        if(vulkanContext.graphicsQueueFamilyIndex == queueFamiliesCount) // no good queues found\n            continue;\n        if(vulkanContext.presentQueueFamilyIndex == queueFamiliesCount) // no good queues found\n            continue;\n        result =\n            vkEnumerateDeviceExtensionProperties(physicalDevice, NULL, &deviceExtensionCount, NULL);\n        if(result != VK_SUCCESS)\n        {\n            SDL_free(physicalDevices);\n            SDL_free(queueFamiliesProperties);\n            SDL_free(deviceExtensions);\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                         \"vkEnumerateDeviceExtensionProperties(): %s\\n\",\n                         getVulkanResultString(result));\n            quit(2);\n        }\n        if(deviceExtensionCount == 0)\n            continue;\n        if(deviceExtensionsAllocatedSize < deviceExtensionCount)\n        {\n            SDL_free(deviceExtensions);\n            deviceExtensionsAllocatedSize = deviceExtensionCount;\n            deviceExtensions =\n                SDL_malloc(sizeof(VkExtensionProperties) * deviceExtensionsAllocatedSize);\n            if(!deviceExtensions)\n            {\n                SDL_free(physicalDevices);\n                SDL_free(queueFamiliesProperties);\n                SDL_OutOfMemory();\n                quit(2);\n            }\n        }\n        result = vkEnumerateDeviceExtensionProperties(\n            physicalDevice, NULL, &deviceExtensionCount, deviceExtensions);\n        if(result != VK_SUCCESS)\n        {\n            SDL_free(physicalDevices);\n            SDL_free(queueFamiliesProperties);\n            SDL_free(deviceExtensions);\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                         \"vkEnumerateDeviceExtensionProperties(): %s\\n\",\n                         getVulkanResultString(result));\n            quit(2);\n        }\n        for(i = 0; i < deviceExtensionCount; i++)\n        {\n            if(0 == SDL_strcmp(deviceExtensions[i].extensionName, VK_KHR_SWAPCHAIN_EXTENSION_NAME))\n            {\n                hasSwapchainExtension = SDL_TRUE;\n                break;\n            }\n        }\n        if(!hasSwapchainExtension)\n            continue;\n        vulkanContext.physicalDevice = physicalDevice;\n        break;\n    }\n    SDL_free(physicalDevices);\n    SDL_free(queueFamiliesProperties);\n    SDL_free(deviceExtensions);\n    if(!vulkanContext.physicalDevice)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Vulkan: no viable physical devices found\");\n        quit(2);\n    }\n}\n\nstatic void createDevice(void)\n{\n    VkDeviceQueueCreateInfo deviceQueueCreateInfo[1] = {0};\n    static const float queuePriority[] = {1.0f};\n    VkDeviceCreateInfo deviceCreateInfo = {0};\n    static const char *const deviceExtensionNames[] = {\n        VK_KHR_SWAPCHAIN_EXTENSION_NAME,\n    };\n\tVkResult result;\n\n\tdeviceQueueCreateInfo->sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;\n    deviceQueueCreateInfo->queueFamilyIndex = vulkanContext.graphicsQueueFamilyIndex;\n    deviceQueueCreateInfo->queueCount = 1;\n    deviceQueueCreateInfo->pQueuePriorities = &queuePriority[0];\n\n    deviceCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;\n    deviceCreateInfo.queueCreateInfoCount = 1;\n    deviceCreateInfo.pQueueCreateInfos = deviceQueueCreateInfo;\n    deviceCreateInfo.pEnabledFeatures = NULL;\n    deviceCreateInfo.enabledExtensionCount = SDL_arraysize(deviceExtensionNames);\n    deviceCreateInfo.ppEnabledExtensionNames = deviceExtensionNames;\n    result = vkCreateDevice(\n        vulkanContext.physicalDevice, &deviceCreateInfo, NULL, &vulkanContext.device);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.device = VK_NULL_HANDLE;\n        SDL_LogError(\n            SDL_LOG_CATEGORY_APPLICATION, \"vkCreateDevice(): %s\\n\", getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void loadDeviceFunctions(void)\n{\n#define VULKAN_DEVICE_FUNCTION(name)                                         \\\n    name = (PFN_##name)vkGetDeviceProcAddr(vulkanContext.device, #name);     \\\n    if(!name)                                                                \\\n    {                                                                        \\\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,                           \\\n                     \"vkGetDeviceProcAddr(device, \\\"\" #name \"\\\") failed\\n\"); \\\n        quit(2);                                                             \\\n    }\n#define VULKAN_GLOBAL_FUNCTION(name)\n#define VULKAN_INSTANCE_FUNCTION(name)\n    VULKAN_FUNCTIONS()\n#undef VULKAN_DEVICE_FUNCTION\n#undef VULKAN_GLOBAL_FUNCTION\n#undef VULKAN_INSTANCE_FUNCTION\n}\n\n#undef VULKAN_FUNCTIONS\n\nstatic void getQueues(void)\n{\n    vkGetDeviceQueue(vulkanContext.device,\n                     vulkanContext.graphicsQueueFamilyIndex,\n                     0,\n                     &vulkanContext.graphicsQueue);\n    if(vulkanContext.graphicsQueueFamilyIndex != vulkanContext.presentQueueFamilyIndex)\n        vkGetDeviceQueue(vulkanContext.device,\n                         vulkanContext.presentQueueFamilyIndex,\n                         0,\n                         &vulkanContext.presentQueue);\n    else\n        vulkanContext.presentQueue = vulkanContext.graphicsQueue;\n}\n\nstatic void createSemaphore(VkSemaphore *semaphore)\n{\n\tVkResult result;\n\n    VkSemaphoreCreateInfo createInfo = {0};\n    createInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;\n    result = vkCreateSemaphore(vulkanContext.device, &createInfo, NULL, semaphore);\n    if(result != VK_SUCCESS)\n    {\n        *semaphore = VK_NULL_HANDLE;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkCreateSemaphore(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void createSemaphores(void)\n{\n    createSemaphore(&vulkanContext.imageAvailableSemaphore);\n    createSemaphore(&vulkanContext.renderingFinishedSemaphore);\n}\n\nstatic void getSurfaceCaps(void)\n{\n    VkResult result = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(\n        vulkanContext.physicalDevice, vulkanContext.surface, &vulkanContext.surfaceCapabilities);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkGetPhysicalDeviceSurfaceCapabilitiesKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n\n    // check surface usage\n    if(!(vulkanContext.surfaceCapabilities.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_DST_BIT))\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"Vulkan surface doesn't support VK_IMAGE_USAGE_TRANSFER_DST_BIT\\n\");\n        quit(2);\n    }\n}\n\nstatic void getSurfaceFormats(void)\n{\n    VkResult result = vkGetPhysicalDeviceSurfaceFormatsKHR(vulkanContext.physicalDevice,\n                                                           vulkanContext.surface,\n                                                           &vulkanContext.surfaceFormatsCount,\n                                                           NULL);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.surfaceFormatsCount = 0;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkGetPhysicalDeviceSurfaceFormatsKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    if(vulkanContext.surfaceFormatsCount > vulkanContext.surfaceFormatsAllocatedCount)\n    {\n        vulkanContext.surfaceFormatsAllocatedCount = vulkanContext.surfaceFormatsCount;\n        SDL_free(vulkanContext.surfaceFormats);\n        vulkanContext.surfaceFormats =\n            SDL_malloc(sizeof(VkSurfaceFormatKHR) * vulkanContext.surfaceFormatsAllocatedCount);\n        if(!vulkanContext.surfaceFormats)\n        {\n            vulkanContext.surfaceFormatsCount = 0;\n            SDL_OutOfMemory();\n            quit(2);\n        }\n    }\n    result = vkGetPhysicalDeviceSurfaceFormatsKHR(vulkanContext.physicalDevice,\n                                                  vulkanContext.surface,\n                                                  &vulkanContext.surfaceFormatsCount,\n                                                  vulkanContext.surfaceFormats);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.surfaceFormatsCount = 0;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkGetPhysicalDeviceSurfaceFormatsKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void getSwapchainImages(void)\n{\n\tVkResult result;\n\n    SDL_free(vulkanContext.swapchainImages);\n    vulkanContext.swapchainImages = NULL;\n    result = vkGetSwapchainImagesKHR(\n        vulkanContext.device, vulkanContext.swapchain, &vulkanContext.swapchainImageCount, NULL);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.swapchainImageCount = 0;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkGetSwapchainImagesKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    vulkanContext.swapchainImages = SDL_malloc(sizeof(VkImage) * vulkanContext.swapchainImageCount);\n    if(!vulkanContext.swapchainImages)\n    {\n        SDL_OutOfMemory();\n        quit(2);\n    }\n    result = vkGetSwapchainImagesKHR(vulkanContext.device,\n                                     vulkanContext.swapchain,\n                                     &vulkanContext.swapchainImageCount,\n                                     vulkanContext.swapchainImages);\n    if(result != VK_SUCCESS)\n    {\n        SDL_free(vulkanContext.swapchainImages);\n        vulkanContext.swapchainImages = NULL;\n        vulkanContext.swapchainImageCount = 0;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkGetSwapchainImagesKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic SDL_bool createSwapchain(void)\n{\n\tuint32_t i;\n\tint w, h;\n\tVkSwapchainCreateInfoKHR createInfo = {0};\n\tVkResult result;\n\n    // pick an image count\n    vulkanContext.swapchainDesiredImageCount = vulkanContext.surfaceCapabilities.minImageCount + 1;\n    if(vulkanContext.swapchainDesiredImageCount > vulkanContext.surfaceCapabilities.maxImageCount\n       && vulkanContext.surfaceCapabilities.maxImageCount > 0)\n        vulkanContext.swapchainDesiredImageCount = vulkanContext.surfaceCapabilities.maxImageCount;\n\n    // pick a format\n    if(vulkanContext.surfaceFormatsCount == 1\n       && vulkanContext.surfaceFormats[0].format == VK_FORMAT_UNDEFINED)\n    {\n        // aren't any preferred formats, so we pick\n        vulkanContext.surfaceFormat.colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;\n        vulkanContext.surfaceFormat.format = VK_FORMAT_R8G8B8A8_UNORM;\n    }\n    else\n    {\n        vulkanContext.surfaceFormat = vulkanContext.surfaceFormats[0];\n        for(i = 0; i < vulkanContext.surfaceFormatsCount; i++)\n        {\n            if(vulkanContext.surfaceFormats[i].format == VK_FORMAT_R8G8B8A8_UNORM)\n            {\n                vulkanContext.surfaceFormat = vulkanContext.surfaceFormats[i];\n                break;\n            }\n        }\n    }\n\n    // get size\n    SDL_Vulkan_GetDrawableSize(state->windows[0], &w, &h);\n    vulkanContext.swapchainSize.width = w;\n    vulkanContext.swapchainSize.height = h;\n    if(w == 0 || h == 0)\n        return SDL_FALSE;\n\n    createInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;\n    createInfo.surface = vulkanContext.surface;\n    createInfo.minImageCount = vulkanContext.swapchainDesiredImageCount;\n    createInfo.imageFormat = vulkanContext.surfaceFormat.format;\n    createInfo.imageColorSpace = vulkanContext.surfaceFormat.colorSpace;\n    createInfo.imageExtent = vulkanContext.swapchainSize;\n    createInfo.imageArrayLayers = 1;\n    createInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;\n    createInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;\n    createInfo.preTransform = vulkanContext.surfaceCapabilities.currentTransform;\n    createInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;\n    createInfo.presentMode = VK_PRESENT_MODE_FIFO_KHR;\n    createInfo.clipped = VK_TRUE;\n    createInfo.oldSwapchain = vulkanContext.swapchain;\n    result =\n        vkCreateSwapchainKHR(vulkanContext.device, &createInfo, NULL, &vulkanContext.swapchain);\n    if(createInfo.oldSwapchain)\n        vkDestroySwapchainKHR(vulkanContext.device, createInfo.oldSwapchain, NULL);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.swapchain = VK_NULL_HANDLE;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkCreateSwapchainKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    getSwapchainImages();\n    return SDL_TRUE;\n}\n\nstatic void destroySwapchain(void)\n{\n    if(vulkanContext.swapchain)\n        vkDestroySwapchainKHR(vulkanContext.device, vulkanContext.swapchain, NULL);\n    vulkanContext.swapchain = VK_NULL_HANDLE;\n    SDL_free(vulkanContext.swapchainImages);\n    vulkanContext.swapchainImages = NULL;\n}\n\nstatic void destroyCommandBuffers(void)\n{\n    if(vulkanContext.commandBuffers)\n        vkFreeCommandBuffers(vulkanContext.device,\n                             vulkanContext.commandPool,\n                             vulkanContext.swapchainImageCount,\n                             vulkanContext.commandBuffers);\n    SDL_free(vulkanContext.commandBuffers);\n    vulkanContext.commandBuffers = NULL;\n}\n\nstatic void destroyCommandPool(void)\n{\n    if(vulkanContext.commandPool)\n        vkDestroyCommandPool(vulkanContext.device, vulkanContext.commandPool, NULL);\n    vulkanContext.commandPool = VK_NULL_HANDLE;\n}\n\nstatic void createCommandPool(void)\n{\n\tVkResult result;\n\n    VkCommandPoolCreateInfo createInfo = {0};\n    createInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;\n    createInfo.flags =\n        VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT;\n    createInfo.queueFamilyIndex = vulkanContext.graphicsQueueFamilyIndex;\n    result =\n        vkCreateCommandPool(vulkanContext.device, &createInfo, NULL, &vulkanContext.commandPool);\n    if(result != VK_SUCCESS)\n    {\n        vulkanContext.commandPool = VK_NULL_HANDLE;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkCreateCommandPool(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void createCommandBuffers(void)\n{\n\tVkResult result;\n\n    VkCommandBufferAllocateInfo allocateInfo = {0};\n    allocateInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;\n    allocateInfo.commandPool = vulkanContext.commandPool;\n    allocateInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;\n    allocateInfo.commandBufferCount = vulkanContext.swapchainImageCount;\n    vulkanContext.commandBuffers =\n        SDL_malloc(sizeof(VkCommandBuffer) * vulkanContext.swapchainImageCount);\n    result =\n        vkAllocateCommandBuffers(vulkanContext.device, &allocateInfo, vulkanContext.commandBuffers);\n    if(result != VK_SUCCESS)\n    {\n        SDL_free(vulkanContext.commandBuffers);\n        vulkanContext.commandBuffers = NULL;\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkAllocateCommandBuffers(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void createFences(void)\n{\n\tuint32_t i;\n\n    vulkanContext.fences = SDL_malloc(sizeof(VkFence) * vulkanContext.swapchainImageCount);\n    if(!vulkanContext.fences)\n    {\n        SDL_OutOfMemory();\n        quit(2);\n    }\n    for(i = 0; i < vulkanContext.swapchainImageCount; i++)\n    {\n\t\tVkResult result;\n\n        VkFenceCreateInfo createInfo = {0};\n        createInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;\n        createInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT;\n        result =\n            vkCreateFence(vulkanContext.device, &createInfo, NULL, &vulkanContext.fences[i]);\n        if(result != VK_SUCCESS)\n        {\n            for(; i > 0; i--)\n            {\n                vkDestroyFence(vulkanContext.device, vulkanContext.fences[i - 1], NULL);\n            }\n            SDL_free(vulkanContext.fences);\n            vulkanContext.fences = NULL;\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                         \"vkCreateFence(): %s\\n\",\n                         getVulkanResultString(result));\n            quit(2);\n        }\n    }\n}\n\nstatic void destroyFences(void)\n{\n\tuint32_t i;\n\n    if(!vulkanContext.fences)\n        return;\n    for(i = 0; i < vulkanContext.swapchainImageCount; i++)\n    {\n        vkDestroyFence(vulkanContext.device, vulkanContext.fences[i], NULL);\n    }\n    SDL_free(vulkanContext.fences);\n    vulkanContext.fences = NULL;\n}\n\nstatic void recordPipelineImageBarrier(VkCommandBuffer commandBuffer,\n                                       VkAccessFlags sourceAccessMask,\n                                       VkAccessFlags destAccessMask,\n                                       VkImageLayout sourceLayout,\n                                       VkImageLayout destLayout,\n                                       VkImage image)\n{\n    VkImageMemoryBarrier barrier = {0};\n    barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;\n    barrier.srcAccessMask = sourceAccessMask;\n    barrier.dstAccessMask = destAccessMask;\n    barrier.oldLayout = sourceLayout;\n    barrier.newLayout = destLayout;\n    barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;\n    barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;\n    barrier.image = image;\n    barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;\n    barrier.subresourceRange.baseMipLevel = 0;\n    barrier.subresourceRange.levelCount = 1;\n    barrier.subresourceRange.baseArrayLayer = 0;\n    barrier.subresourceRange.layerCount = 1;\n    vkCmdPipelineBarrier(commandBuffer,\n                         VK_PIPELINE_STAGE_TRANSFER_BIT,\n                         VK_PIPELINE_STAGE_TRANSFER_BIT,\n                         0,\n                         0,\n                         NULL,\n                         0,\n                         NULL,\n                         1,\n                         &barrier);\n}\n\nstatic void rerecordCommandBuffer(uint32_t frameIndex, const VkClearColorValue *clearColor)\n{\n    VkCommandBuffer commandBuffer = vulkanContext.commandBuffers[frameIndex];\n    VkImage image = vulkanContext.swapchainImages[frameIndex];\n\tVkCommandBufferBeginInfo beginInfo = {0};\n    VkImageSubresourceRange clearRange = {0};\n\n    VkResult result = vkResetCommandBuffer(commandBuffer, 0);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkResetCommandBuffer(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;\n    beginInfo.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT;\n    result = vkBeginCommandBuffer(commandBuffer, &beginInfo);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkBeginCommandBuffer(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    recordPipelineImageBarrier(commandBuffer,\n                               0,\n                               VK_ACCESS_TRANSFER_WRITE_BIT,\n                               VK_IMAGE_LAYOUT_UNDEFINED,\n                               VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,\n                               image);\n    clearRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;\n    clearRange.baseMipLevel = 0;\n    clearRange.levelCount = 1;\n    clearRange.baseArrayLayer = 0;\n    clearRange.layerCount = 1;\n    vkCmdClearColorImage(\n        commandBuffer, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, clearColor, 1, &clearRange);\n    recordPipelineImageBarrier(commandBuffer,\n                               VK_ACCESS_TRANSFER_WRITE_BIT,\n                               VK_ACCESS_MEMORY_READ_BIT,\n                               VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,\n                               VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,\n                               image);\n    result = vkEndCommandBuffer(commandBuffer);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkEndCommandBuffer(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n}\n\nstatic void destroySwapchainAndSwapchainSpecificStuff(SDL_bool doDestroySwapchain)\n{\n    destroyFences();\n    destroyCommandBuffers();\n    destroyCommandPool();\n    if(doDestroySwapchain)\n        destroySwapchain();\n}\n\nstatic SDL_bool createNewSwapchainAndSwapchainSpecificStuff(void)\n{\n    destroySwapchainAndSwapchainSpecificStuff(SDL_FALSE);\n    getSurfaceCaps();\n    getSurfaceFormats();\n    if(!createSwapchain())\n        return SDL_FALSE;\n    createCommandPool();\n    createCommandBuffers();\n    createFences();\n    return SDL_TRUE;\n}\n\nstatic void initVulkan(void)\n{\n    SDL_Vulkan_LoadLibrary(NULL);\n    SDL_memset(&vulkanContext, 0, sizeof(VulkanContext));\n    loadGlobalFunctions();\n    createInstance();\n    loadInstanceFunctions();\n    createSurface();\n    findPhysicalDevice();\n    createDevice();\n    loadDeviceFunctions();\n    getQueues();\n    createSemaphores();\n    createNewSwapchainAndSwapchainSpecificStuff();\n}\n\nstatic void shutdownVulkan(void)\n{\n    if(vulkanContext.device && vkDeviceWaitIdle)\n        vkDeviceWaitIdle(vulkanContext.device);\n    destroySwapchainAndSwapchainSpecificStuff(SDL_TRUE);\n    if(vulkanContext.imageAvailableSemaphore && vkDestroySemaphore)\n        vkDestroySemaphore(vulkanContext.device, vulkanContext.imageAvailableSemaphore, NULL);\n    if(vulkanContext.renderingFinishedSemaphore && vkDestroySemaphore)\n        vkDestroySemaphore(vulkanContext.device, vulkanContext.renderingFinishedSemaphore, NULL);\n    if(vulkanContext.device && vkDestroyDevice)\n        vkDestroyDevice(vulkanContext.device, NULL);\n    if(vulkanContext.surface && vkDestroySurfaceKHR)\n        vkDestroySurfaceKHR(vulkanContext.instance, vulkanContext.surface, NULL);\n    if(vulkanContext.instance && vkDestroyInstance)\n        vkDestroyInstance(vulkanContext.instance, NULL);\n    SDL_free(vulkanContext.surfaceFormats);\n    SDL_Vulkan_UnloadLibrary();\n}\n\nstatic SDL_bool render(void)\n{\n    uint32_t frameIndex;\n    VkResult result;\n    double currentTime;\n    VkClearColorValue clearColor = {0};\n    VkPipelineStageFlags waitDestStageMask = VK_PIPELINE_STAGE_TRANSFER_BIT;\n    VkSubmitInfo submitInfo = {0};\n    VkPresentInfoKHR presentInfo = {0};\n    int w, h;\n\n    if(!vulkanContext.swapchain)\n    {\n        SDL_bool retval = createNewSwapchainAndSwapchainSpecificStuff();\n        if(!retval)\n            SDL_Delay(100);\n        return retval;\n    }\n    result = vkAcquireNextImageKHR(vulkanContext.device,\n                                            vulkanContext.swapchain,\n                                            UINT64_MAX,\n                                            vulkanContext.imageAvailableSemaphore,\n                                            VK_NULL_HANDLE,\n                                            &frameIndex);\n    if(result == VK_ERROR_OUT_OF_DATE_KHR)\n        return createNewSwapchainAndSwapchainSpecificStuff();\n    if(result != VK_SUBOPTIMAL_KHR && result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkAcquireNextImageKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    result = vkWaitForFences(\n        vulkanContext.device, 1, &vulkanContext.fences[frameIndex], VK_FALSE, UINT64_MAX);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(\n            SDL_LOG_CATEGORY_APPLICATION, \"vkWaitForFences(): %s\\n\", getVulkanResultString(result));\n        quit(2);\n    }\n    result = vkResetFences(vulkanContext.device, 1, &vulkanContext.fences[frameIndex]);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(\n            SDL_LOG_CATEGORY_APPLICATION, \"vkResetFences(): %s\\n\", getVulkanResultString(result));\n        quit(2);\n    }\n    currentTime = (double)SDL_GetPerformanceCounter() / SDL_GetPerformanceFrequency();\n    clearColor.float32[0] = (float)(0.5 + 0.5 * SDL_sin(currentTime));\n    clearColor.float32[1] = (float)(0.5 + 0.5 * SDL_sin(currentTime + M_PI * 2 / 3));\n    clearColor.float32[2] = (float)(0.5 + 0.5 * SDL_sin(currentTime + M_PI * 4 / 3));\n    clearColor.float32[3] = 1;\n    rerecordCommandBuffer(frameIndex, &clearColor);\n    submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;\n    submitInfo.waitSemaphoreCount = 1;\n    submitInfo.pWaitSemaphores = &vulkanContext.imageAvailableSemaphore;\n    submitInfo.pWaitDstStageMask = &waitDestStageMask;\n    submitInfo.commandBufferCount = 1;\n    submitInfo.pCommandBuffers = &vulkanContext.commandBuffers[frameIndex];\n    submitInfo.signalSemaphoreCount = 1;\n    submitInfo.pSignalSemaphores = &vulkanContext.renderingFinishedSemaphore;\n    result = vkQueueSubmit(\n        vulkanContext.graphicsQueue, 1, &submitInfo, vulkanContext.fences[frameIndex]);\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(\n            SDL_LOG_CATEGORY_APPLICATION, \"vkQueueSubmit(): %s\\n\", getVulkanResultString(result));\n        quit(2);\n    }\n    presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;\n    presentInfo.waitSemaphoreCount = 1;\n    presentInfo.pWaitSemaphores = &vulkanContext.renderingFinishedSemaphore;\n    presentInfo.swapchainCount = 1;\n    presentInfo.pSwapchains = &vulkanContext.swapchain;\n    presentInfo.pImageIndices = &frameIndex;\n    result = vkQueuePresentKHR(vulkanContext.presentQueue, &presentInfo);\n    if(result == VK_ERROR_OUT_OF_DATE_KHR || result == VK_SUBOPTIMAL_KHR)\n    {\n        return createNewSwapchainAndSwapchainSpecificStuff();\n    }\n    if(result != VK_SUCCESS)\n    {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,\n                     \"vkQueuePresentKHR(): %s\\n\",\n                     getVulkanResultString(result));\n        quit(2);\n    }\n    SDL_Vulkan_GetDrawableSize(state->windows[0], &w, &h);\n    if(w != (int)vulkanContext.swapchainSize.width || h != (int)vulkanContext.swapchainSize.height)\n    {\n        return createNewSwapchainAndSwapchainSpecificStuff();\n    }\n    return SDL_TRUE;\n}\n\nint main(int argc, char *argv[])\n{\n    int fsaa, accel;\n    int done;\n    SDL_DisplayMode mode;\n    SDL_Event event;\n    Uint32 then, now, frames;\n    int dw, dh;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Initialize parameters */\n    fsaa = 0;\n    accel = -1;\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if(!state)\n    {\n        return 1;\n    }\n\n    /* Set Vulkan parameters */\n    state->window_flags |= SDL_WINDOW_VULKAN;\n    state->num_windows = 1;\n    state->skip_renderer = 1;\n\n    if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {\n        SDLTest_CommonQuit(state);\n        return 1;\n    }\n\n    SDL_GetCurrentDisplayMode(0, &mode);\n    SDL_Log(\"Screen BPP    : %d\\n\", SDL_BITSPERPIXEL(mode.format));\n    SDL_GetWindowSize(state->windows[0], &dw, &dh);\n    SDL_Log(\"Window Size   : %d,%d\\n\", dw, dh);\n    SDL_Vulkan_GetDrawableSize(state->windows[0], &dw, &dh);\n    SDL_Log(\"Draw Size     : %d,%d\\n\", dw, dh);\n    SDL_Log(\"\\n\");\n\n    initVulkan();\n\n    /* Main render loop */\n    frames = 0;\n    then = SDL_GetTicks();\n    done = 0;\n    while(!done)\n    {\n        /* Check for events */\n        ++frames;\n        while(SDL_PollEvent(&event))\n        {\n            SDLTest_CommonEvent(state, &event, &done);\n        }\n\n        if(!done)\n            render();\n    }\n\n    /* Print out some timing information */\n    now = SDL_GetTicks();\n    if(now > then)\n    {\n        SDL_Log(\"%2.2f frames per second\\n\", ((double)frames * 1000) / (now - then));\n    }\n    quit(0);\n    return 0;\n}\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testwm2.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include <stdlib.h>\n#include <stdio.h>\n\n#ifdef __EMSCRIPTEN__\n#include <emscripten/emscripten.h>\n#endif\n\n#include \"SDL_test_common.h\"\n\nstatic SDLTest_CommonState *state;\nint done;\n\nstatic const char *cursorNames[] = {\n        \"arrow\",\n        \"ibeam\",\n        \"wait\",\n        \"crosshair\",\n        \"waitarrow\",\n        \"sizeNWSE\",\n        \"sizeNESW\",\n        \"sizeWE\",\n        \"sizeNS\",\n        \"sizeALL\",\n        \"NO\",\n        \"hand\",\n};\nint system_cursor = -1;\nSDL_Cursor *cursor = NULL;\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDLTest_CommonQuit(state);\n    exit(rc);\n}\n\nvoid\nloop()\n{\n    int i;\n    SDL_Event event;\n        /* Check for events */\n        while (SDL_PollEvent(&event)) {\n            SDLTest_CommonEvent(state, &event, &done);\n\n            if (event.type == SDL_WINDOWEVENT) {\n                if (event.window.event == SDL_WINDOWEVENT_RESIZED) {\n                    SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);\n                    if (window) {\n                        SDL_Log(\"Window %d resized to %dx%d\\n\",\n                            event.window.windowID,\n                            event.window.data1,\n                            event.window.data2);\n                    }\n                }\n                if (event.window.event == SDL_WINDOWEVENT_MOVED) {\n                    SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);\n                    if (window) {\n                        SDL_Log(\"Window %d moved to %d,%d (display %s)\\n\",\n                            event.window.windowID,\n                            event.window.data1,\n                            event.window.data2,\n                            SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window)));\n                    }\n                }\n            }\n            if (event.type == SDL_KEYUP) {\n                SDL_bool updateCursor = SDL_FALSE;\n\n                if (event.key.keysym.sym == SDLK_LEFT) {\n                    --system_cursor;\n                    if (system_cursor < 0) {\n                        system_cursor = SDL_NUM_SYSTEM_CURSORS - 1;\n                    }\n                    updateCursor = SDL_TRUE;\n                } else if (event.key.keysym.sym == SDLK_RIGHT) {\n                    ++system_cursor;\n                    if (system_cursor >= SDL_NUM_SYSTEM_CURSORS) {\n                        system_cursor = 0;\n                    }\n                    updateCursor = SDL_TRUE;\n                }\n                if (updateCursor) {\n                    SDL_Log(\"Changing cursor to \\\"%s\\\"\", cursorNames[system_cursor]);\n                    SDL_FreeCursor(cursor);\n                    cursor = SDL_CreateSystemCursor((SDL_SystemCursor)system_cursor);\n                    SDL_SetCursor(cursor);\n                }\n            }\n        }\n\n        for (i = 0; i < state->num_windows; ++i) {\n            SDL_Renderer *renderer = state->renderers[i];\n            SDL_RenderClear(renderer);\n            SDL_RenderPresent(renderer);\n        }\n#ifdef __EMSCRIPTEN__\n    if (done) {\n        emscripten_cancel_main_loop();\n    }\n#endif\n}\n\nint\nmain(int argc, char *argv[])\n{\n    int i;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    SDL_assert(SDL_arraysize(cursorNames) == SDL_NUM_SYSTEM_CURSORS);\n\n    /* Initialize test framework */\n    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);\n    if (!state) {\n        return 1;\n    }\n\n    if (!SDLTest_CommonDefaultArgs(state, argc, argv) || !SDLTest_CommonInit(state)) {\n        SDLTest_CommonQuit(state);\n        return 1;\n    }\n\n    SDL_EventState(SDL_DROPFILE, SDL_ENABLE);\n    SDL_EventState(SDL_DROPTEXT, SDL_ENABLE);\n\n    for (i = 0; i < state->num_windows; ++i) {\n        SDL_Renderer *renderer = state->renderers[i];\n        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);\n        SDL_RenderClear(renderer);\n    }\n \n    /* Main render loop */\n    done = 0;\n#ifdef __EMSCRIPTEN__\n    emscripten_set_main_loop(loop, 0, 1);\n#else\n    while (!done) {\n        loop();\n    }\n#endif\n    SDL_FreeCursor(cursor);\n\n    quit(0);\n    /* keep the compiler happy ... */\n    return(0);\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testyuv.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n\n#include \"SDL.h\"\n#include \"SDL_test_font.h\"\n#include \"testyuv_cvt.h\"\n\n\n/* 422 (YUY2, etc) formats are the largest */\n#define MAX_YUV_SURFACE_SIZE(W, H, P)  (H*4*(W+P+1)/2)\n\n\n/* Return true if the YUV format is packed pixels */\nstatic SDL_bool is_packed_yuv_format(Uint32 format)\n{\n    return (format == SDL_PIXELFORMAT_YUY2 ||\n            format == SDL_PIXELFORMAT_UYVY ||\n            format == SDL_PIXELFORMAT_YVYU);\n}\n\n/* Create a surface with a good pattern for verifying YUV conversion */\nstatic SDL_Surface *generate_test_pattern(int pattern_size)\n{\n    SDL_Surface *pattern = SDL_CreateRGBSurfaceWithFormat(0, pattern_size, pattern_size, 0, SDL_PIXELFORMAT_RGB24);\n\n    if (pattern) {\n        int i, x, y;\n        Uint8 *p, c;\n        const int thickness = 2;    /* Important so 2x2 blocks of color are the same, to avoid Cr/Cb interpolation over pixels */\n\n        /* R, G, B in alternating horizontal bands */\n        for (y = 0; y < pattern->h; y += thickness) {\n            for (i = 0; i < thickness; ++i) {\n                p = (Uint8 *)pattern->pixels + (y + i) * pattern->pitch + ((y/thickness) % 3);\n                for (x = 0; x < pattern->w; ++x) {\n                    *p = 0xFF;\n                    p += 3;\n                }\n            }\n        }\n\n        /* Black and white in alternating vertical bands */\n        c = 0xFF;\n        for (x = 1*thickness; x < pattern->w; x += 2*thickness) {\n            for (i = 0; i < thickness; ++i) {\n                p = (Uint8 *)pattern->pixels + (x + i)*3;\n                for (y = 0; y < pattern->h; ++y) {\n                    SDL_memset(p, c, 3);\n                    p += pattern->pitch;\n                }\n            }\n            if (c) {\n                c = 0x00;\n            } else {\n                c = 0xFF;\n            }\n        }\n    }\n    return pattern;\n}\n\nstatic SDL_bool verify_yuv_data(Uint32 format, const Uint8 *yuv, int yuv_pitch, SDL_Surface *surface)\n{\n    const int tolerance = 20;\n    const int size = (surface->h * surface->pitch);\n    Uint8 *rgb;\n    SDL_bool result = SDL_FALSE;\n\n    rgb = (Uint8 *)SDL_malloc(size);\n    if (!rgb) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Out of memory\");\n        return SDL_FALSE;\n    }\n\n    if (SDL_ConvertPixels(surface->w, surface->h, format, yuv, yuv_pitch, surface->format->format, rgb, surface->pitch) == 0) {\n        int x, y;\n        result = SDL_TRUE;\n        for (y = 0; y < surface->h; ++y) {\n            const Uint8 *actual = rgb + y * surface->pitch;\n            const Uint8 *expected = (const Uint8 *)surface->pixels + y * surface->pitch;\n            for (x = 0; x < surface->w; ++x) {\n                int deltaR = (int)actual[0] - expected[0];\n                int deltaG = (int)actual[1] - expected[1];\n                int deltaB = (int)actual[2] - expected[2];\n                int distance = (deltaR * deltaR + deltaG * deltaG + deltaB * deltaB);\n                if (distance > tolerance) {\n                    SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Pixel at %d,%d was 0x%.2x,0x%.2x,0x%.2x, expected 0x%.2x,0x%.2x,0x%.2x, distance = %d\\n\", x, y, actual[0], actual[1], actual[2], expected[0], expected[1], expected[2], distance);\n                    result = SDL_FALSE;\n                }\n                actual += 3;\n                expected += 3;\n            }\n        }\n    } else {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(format), SDL_GetPixelFormatName(surface->format->format), SDL_GetError());\n    }\n    SDL_free(rgb);\n\n    return result;\n}\n\nstatic int run_automated_tests(int pattern_size, int extra_pitch)\n{\n    const Uint32 formats[] = {\n        SDL_PIXELFORMAT_YV12,\n        SDL_PIXELFORMAT_IYUV,\n        SDL_PIXELFORMAT_NV12,\n        SDL_PIXELFORMAT_NV21,\n        SDL_PIXELFORMAT_YUY2,\n        SDL_PIXELFORMAT_UYVY,\n        SDL_PIXELFORMAT_YVYU\n    };\n    int i, j;\n    SDL_Surface *pattern = generate_test_pattern(pattern_size);\n    const int yuv_len = MAX_YUV_SURFACE_SIZE(pattern->w, pattern->h, extra_pitch);\n    Uint8 *yuv1 = (Uint8 *)SDL_malloc(yuv_len);\n    Uint8 *yuv2 = (Uint8 *)SDL_malloc(yuv_len);\n    int yuv1_pitch, yuv2_pitch;\n    int result = -1;\n    \n    if (!pattern || !yuv1 || !yuv2) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't allocate test surfaces\");\n        goto done;\n    }\n\n    /* Verify conversion from YUV formats */\n    for (i = 0; i < SDL_arraysize(formats); ++i) {\n        if (!ConvertRGBtoYUV(formats[i], pattern->pixels, pattern->pitch, yuv1, pattern->w, pattern->h, SDL_GetYUVConversionModeForResolution(pattern->w, pattern->h), 0, 100)) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"ConvertRGBtoYUV() doesn't support converting to %s\\n\", SDL_GetPixelFormatName(formats[i]));\n            goto done;\n        }\n        yuv1_pitch = CalculateYUVPitch(formats[i], pattern->w);\n        if (!verify_yuv_data(formats[i], yuv1, yuv1_pitch, pattern)) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed conversion from %s to RGB\\n\", SDL_GetPixelFormatName(formats[i]));\n            goto done;\n        }\n    }\n\n    /* Verify conversion to YUV formats */\n    for (i = 0; i < SDL_arraysize(formats); ++i) {\n        yuv1_pitch = CalculateYUVPitch(formats[i], pattern->w) + extra_pitch;\n        if (SDL_ConvertPixels(pattern->w, pattern->h, pattern->format->format, pattern->pixels, pattern->pitch, formats[i], yuv1, yuv1_pitch) < 0) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(pattern->format->format), SDL_GetPixelFormatName(formats[i]), SDL_GetError());\n            goto done;\n        }\n        if (!verify_yuv_data(formats[i], yuv1, yuv1_pitch, pattern)) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed conversion from RGB to %s\\n\", SDL_GetPixelFormatName(formats[i]));\n            goto done;\n        }\n    }\n\n    /* Verify conversion between YUV formats */\n    for (i = 0; i < SDL_arraysize(formats); ++i) {\n        for (j = 0; j < SDL_arraysize(formats); ++j) {\n            yuv1_pitch = CalculateYUVPitch(formats[i], pattern->w) + extra_pitch;\n            yuv2_pitch = CalculateYUVPitch(formats[j], pattern->w) + extra_pitch;\n            if (SDL_ConvertPixels(pattern->w, pattern->h, pattern->format->format, pattern->pixels, pattern->pitch, formats[i], yuv1, yuv1_pitch) < 0) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(pattern->format->format), SDL_GetPixelFormatName(formats[i]), SDL_GetError());\n                goto done;\n            }\n            if (SDL_ConvertPixels(pattern->w, pattern->h, formats[i], yuv1, yuv1_pitch, formats[j], yuv2, yuv2_pitch) < 0) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(formats[i]), SDL_GetPixelFormatName(formats[j]), SDL_GetError());\n                goto done;\n            }\n            if (!verify_yuv_data(formats[j], yuv2, yuv2_pitch, pattern)) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed conversion from %s to %s\\n\", SDL_GetPixelFormatName(formats[i]), SDL_GetPixelFormatName(formats[j]));\n                goto done;\n            }\n        }\n    }\n\n    /* Verify conversion between YUV formats in-place */\n    for (i = 0; i < SDL_arraysize(formats); ++i) {\n        for (j = 0; j < SDL_arraysize(formats); ++j) {\n            if (is_packed_yuv_format(formats[i]) != is_packed_yuv_format(formats[j])) {\n                /* Can't change plane vs packed pixel layout in-place */\n                continue;\n            }\n\n            yuv1_pitch = CalculateYUVPitch(formats[i], pattern->w) + extra_pitch;\n            yuv2_pitch = CalculateYUVPitch(formats[j], pattern->w) + extra_pitch;\n            if (SDL_ConvertPixels(pattern->w, pattern->h, pattern->format->format, pattern->pixels, pattern->pitch, formats[i], yuv1, yuv1_pitch) < 0) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(pattern->format->format), SDL_GetPixelFormatName(formats[i]), SDL_GetError());\n                goto done;\n            }\n            if (SDL_ConvertPixels(pattern->w, pattern->h, formats[i], yuv1, yuv1_pitch, formats[j], yuv1, yuv2_pitch) < 0) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't convert %s to %s: %s\\n\", SDL_GetPixelFormatName(formats[i]), SDL_GetPixelFormatName(formats[j]), SDL_GetError());\n                goto done;\n            }\n            if (!verify_yuv_data(formats[j], yuv1, yuv2_pitch, pattern)) {\n                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Failed conversion from %s to %s\\n\", SDL_GetPixelFormatName(formats[i]), SDL_GetPixelFormatName(formats[j]));\n                goto done;\n            }\n        }\n    }\n\n\n    result = 0;\n\ndone:\n    SDL_free(yuv1);\n    SDL_free(yuv2);\n    SDL_FreeSurface(pattern);\n    return result;\n}\n\nint\nmain(int argc, char **argv)\n{\n    struct {\n        SDL_bool enable_intrinsics;\n        int pattern_size;\n        int extra_pitch;\n    } automated_test_params[] = {\n        /* Test: even width and height */\n        { SDL_FALSE, 2, 0 },\n        { SDL_FALSE, 4, 0 },\n        /* Test: odd width and height */\n        { SDL_FALSE, 1, 0 },\n        { SDL_FALSE, 3, 0 },\n        /* Test: even width and height, extra pitch */\n        { SDL_FALSE, 2, 3 },\n        { SDL_FALSE, 4, 3 },\n        /* Test: odd width and height, extra pitch */\n        { SDL_FALSE, 1, 3 },\n        { SDL_FALSE, 3, 3 },\n        /* Test: even width and height with intrinsics */\n        { SDL_TRUE, 32, 0 },\n        /* Test: odd width and height with intrinsics */\n        { SDL_TRUE, 33, 0 },\n        { SDL_TRUE, 37, 0 },\n        /* Test: even width and height with intrinsics, extra pitch */\n        { SDL_TRUE, 32, 3 },\n        /* Test: odd width and height with intrinsics, extra pitch */\n        { SDL_TRUE, 33, 3 },\n        { SDL_TRUE, 37, 3 },\n    };\n    int arg = 1;\n    const char *filename;\n    SDL_Surface *original;\n    SDL_Surface *converted;\n    SDL_Window *window;\n    SDL_Renderer *renderer;\n    SDL_Texture *output[3];\n    const char *titles[3] = { \"ORIGINAL\", \"SOFTWARE\", \"HARDWARE\" };\n    char title[128];\n    const char *yuv_name;\n    const char *yuv_mode;\n    Uint32 rgb_format = SDL_PIXELFORMAT_RGBX8888;\n    Uint32 yuv_format = SDL_PIXELFORMAT_YV12;\n    int current = 0;\n    int pitch;\n    Uint8 *raw_yuv;\n    Uint32 then, now, i, iterations = 100;\n    SDL_bool should_run_automated_tests = SDL_FALSE;\n\n    while (argv[arg] && *argv[arg] == '-') {\n        if (SDL_strcmp(argv[arg], \"--jpeg\") == 0) {\n            SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_JPEG);\n        } else if (SDL_strcmp(argv[arg], \"--bt601\") == 0) {\n            SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_BT601);\n        } else if (SDL_strcmp(argv[arg], \"--bt709\") == 0) {\n            SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_BT709);\n        } else if (SDL_strcmp(argv[arg], \"--auto\") == 0) {\n            SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_AUTOMATIC);\n        } else if (SDL_strcmp(argv[arg], \"--yv12\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_YV12;\n        } else if (SDL_strcmp(argv[arg], \"--iyuv\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_IYUV;\n        } else if (SDL_strcmp(argv[arg], \"--yuy2\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_YUY2;\n        } else if (SDL_strcmp(argv[arg], \"--uyvy\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_UYVY;\n        } else if (SDL_strcmp(argv[arg], \"--yvyu\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_YVYU;\n        } else if (SDL_strcmp(argv[arg], \"--nv12\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_NV12;\n        } else if (SDL_strcmp(argv[arg], \"--nv21\") == 0) {\n            yuv_format = SDL_PIXELFORMAT_NV21;\n        } else if (SDL_strcmp(argv[arg], \"--rgb555\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_RGB555;\n        } else if (SDL_strcmp(argv[arg], \"--rgb565\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_RGB565;\n        } else if (SDL_strcmp(argv[arg], \"--rgb24\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_RGB24;\n        } else if (SDL_strcmp(argv[arg], \"--argb\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_ARGB8888;\n        } else if (SDL_strcmp(argv[arg], \"--abgr\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_ABGR8888;\n        } else if (SDL_strcmp(argv[arg], \"--rgba\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_RGBA8888;\n        } else if (SDL_strcmp(argv[arg], \"--bgra\") == 0) {\n            rgb_format = SDL_PIXELFORMAT_BGRA8888;\n        } else if (SDL_strcmp(argv[arg], \"--automated\") == 0) {\n            should_run_automated_tests = SDL_TRUE;\n        } else {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Usage: %s [--jpeg|--bt601|-bt709|--auto] [--yv12|--iyuv|--yuy2|--uyvy|--yvyu|--nv12|--nv21] [--rgb555|--rgb565|--rgb24|--argb|--abgr|--rgba|--bgra] [image_filename]\\n\", argv[0]);\n            return 1;\n        }\n        ++arg;\n    }\n\n    /* Run automated tests */\n    if (should_run_automated_tests) {\n        for (i = 0; i < SDL_arraysize(automated_test_params); ++i) {\n            SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, \"Running automated test, pattern size %d, extra pitch %d, intrinsics %s\\n\", \n                automated_test_params[i].pattern_size,\n                automated_test_params[i].extra_pitch,\n                automated_test_params[i].enable_intrinsics ? \"enabled\" : \"disabled\");\n            if (run_automated_tests(automated_test_params[i].pattern_size, automated_test_params[i].extra_pitch) < 0) {\n                return 2;\n            }\n        }\n        return 0;\n    }\n\n    if (argv[arg]) {\n        filename = argv[arg];\n    } else {\n        filename = \"testyuv.bmp\";\n    }\n    original = SDL_ConvertSurfaceFormat(SDL_LoadBMP(filename), SDL_PIXELFORMAT_RGB24, 0);\n    if (!original) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't load %s: %s\\n\", filename, SDL_GetError());\n        return 3;\n    }\n\n    raw_yuv = SDL_calloc(1, MAX_YUV_SURFACE_SIZE(original->w, original->h, 0));\n    ConvertRGBtoYUV(yuv_format, original->pixels, original->pitch, raw_yuv, original->w, original->h,\n        SDL_GetYUVConversionModeForResolution(original->w, original->h),\n        0, 100);\n    pitch = CalculateYUVPitch(yuv_format, original->w);\n\n    converted = SDL_CreateRGBSurfaceWithFormat(0, original->w, original->h, 0, rgb_format);\n    if (!converted) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create converted surface: %s\\n\", SDL_GetError());\n        return 3;\n    }\n\n    then = SDL_GetTicks();\n    for ( i = 0; i < iterations; ++i ) {\n        SDL_ConvertPixels(original->w, original->h, yuv_format, raw_yuv, pitch, rgb_format, converted->pixels, converted->pitch);\n    }\n    now = SDL_GetTicks();\n    SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, \"%d iterations in %d ms, %.2fms each\\n\", iterations, (now - then), (float)(now - then)/iterations);\n\n    window = SDL_CreateWindow(\"YUV test\",\n                              SDL_WINDOWPOS_UNDEFINED,\n                              SDL_WINDOWPOS_UNDEFINED,\n                              original->w, original->h,\n                              0);\n    if (!window) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create window: %s\\n\", SDL_GetError());\n        return 4;\n    }\n\n    renderer = SDL_CreateRenderer(window, -1, 0);\n    if (!renderer) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create renderer: %s\\n\", SDL_GetError());\n        return 4;\n    }\n\n    output[0] = SDL_CreateTextureFromSurface(renderer, original);\n    output[1] = SDL_CreateTextureFromSurface(renderer, converted);\n    output[2] = SDL_CreateTexture(renderer, yuv_format, SDL_TEXTUREACCESS_STREAMING, original->w, original->h);\n    if (!output[0] || !output[1] || !output[2]) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't set create texture: %s\\n\", SDL_GetError());\n        return 5;\n    }\n    SDL_UpdateTexture(output[2], NULL, raw_yuv, pitch);\n    \n    yuv_name = SDL_GetPixelFormatName(yuv_format);\n    if (SDL_strncmp(yuv_name, \"SDL_PIXELFORMAT_\", 16) == 0) {\n        yuv_name += 16;\n    }\n\n    switch (SDL_GetYUVConversionModeForResolution(original->w, original->h)) {\n    case SDL_YUV_CONVERSION_JPEG:\n        yuv_mode = \"JPEG\";\n        break;\n    case SDL_YUV_CONVERSION_BT601:\n        yuv_mode = \"BT.601\";\n        break;\n    case SDL_YUV_CONVERSION_BT709:\n        yuv_mode = \"BT.709\";\n        break;\n    default:\n        yuv_mode = \"UNKNOWN\";\n        break;\n    }\n\n    { int done = 0;\n        while ( !done )\n        {\n            SDL_Event event;\n            while (SDL_PollEvent(&event) > 0) {\n                if (event.type == SDL_QUIT) {\n                    done = 1;\n                }\n                if (event.type == SDL_KEYDOWN) {\n                    if (event.key.keysym.sym == SDLK_ESCAPE) {\n                        done = 1;\n                    } else if (event.key.keysym.sym == SDLK_LEFT) {\n                        --current;\n                    } else if (event.key.keysym.sym == SDLK_RIGHT) {\n                        ++current;\n                    }\n                }\n                if (event.type == SDL_MOUSEBUTTONDOWN) {\n                    if (event.button.x < (original->w/2)) {\n                        --current;\n                    } else {\n                        ++current;\n                    }\n                }\n            }\n\n            /* Handle wrapping */\n            if (current < 0) {\n                current += SDL_arraysize(output);\n            }\n            if (current >= SDL_arraysize(output)) {\n                current -= SDL_arraysize(output);\n            }\n\n            SDL_RenderClear(renderer);\n            SDL_RenderCopy(renderer, output[current], NULL, NULL);\n            SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);\n            if (current == 0) {\n                SDLTest_DrawString(renderer, 4, 4, titles[current]);\n            } else {\n                SDL_snprintf(title, sizeof(title), \"%s %s %s\", titles[current], yuv_name, yuv_mode);\n                SDLTest_DrawString(renderer, 4, 4, title);\n            }\n            SDL_RenderPresent(renderer);\n            SDL_Delay(10);\n        }\n    }\n    SDL_Quit();\n    return 0;\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testyuv_cvt.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n#include \"SDL.h\"\n\n#include \"testyuv_cvt.h\"\n\n\nstatic float clip3(float x, float y, float z)\n{\n    return ((z < x) ? x : ((z > y) ? y : z));\n}\n\nstatic void RGBtoYUV(Uint8 * rgb, int *yuv, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance)\n{\n    if (mode == SDL_YUV_CONVERSION_JPEG) {\n        /* Full range YUV */\n        yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);\n        yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);\n        yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);\n    } else {\n        // This formula is from Microsoft's documentation:\n        // https://msdn.microsoft.com/en-us/library/windows/desktop/dd206750(v=vs.85).aspx\n        // L = Kr * R + Kb * B + (1 - Kr - Kb) * G\n        // Y =                   floor(2^(M-8) * (219*(L-Z)/S + 16) + 0.5);\n        // U = clip3(0, (2^M)-1, floor(2^(M-8) * (112*(B-L) / ((1-Kb)*S) + 128) + 0.5));\n        // V = clip3(0, (2^M)-1, floor(2^(M-8) * (112*(R-L) / ((1-Kr)*S) + 128) + 0.5));\n        float S, Z, R, G, B, L, Kr, Kb, Y, U, V;\n\n        if (mode == SDL_YUV_CONVERSION_BT709) {\n            /* BT.709 */\n            Kr = 0.2126f;\n            Kb = 0.0722f;\n        } else {\n            /* BT.601 */\n            Kr = 0.299f;\n            Kb = 0.114f;\n        }\n\n        S = 255.0f;\n        Z = 0.0f;\n        R = rgb[0];\n        G = rgb[1];\n        B = rgb[2];\n        L = Kr * R + Kb * B + (1 - Kr - Kb) * G;\n        Y = (Uint8)SDL_floorf((219*(L-Z)/S + 16) + 0.5f);\n        U = (Uint8)clip3(0, 255, SDL_floorf((112.0f*(B-L) / ((1.0f-Kb)*S) + 128) + 0.5f));\n        V = (Uint8)clip3(0, 255, SDL_floorf((112.0f*(R-L) / ((1.0f-Kr)*S) + 128) + 0.5f));\n\n        yuv[0] = (Uint8)Y;\n        yuv[1] = (Uint8)U;\n        yuv[2] = (Uint8)V;\n    }\n\n    if (monochrome) {\n        yuv[1] = 128;\n        yuv[2] = 128;\n    }\n\n    if (luminance != 100) {\n        yuv[0] = yuv[0] * luminance / 100;\n        if (yuv[0] > 255)\n            yuv[0] = 255;\n    }\n}\n\nstatic void ConvertRGBtoPlanar2x2(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance)\n{\n    int x, y;\n    int yuv[4][3];\n    Uint8 *Y1, *Y2, *U, *V;\n    Uint8 *rgb1, *rgb2;\n    int rgb_row_advance = (pitch - w*3) + pitch;\n    int UV_advance;\n\n    rgb1 = src;\n    rgb2 = src + pitch;\n\n    Y1 = out;\n    Y2 = Y1 + w;\n    switch (format) {\n    case SDL_PIXELFORMAT_YV12:\n        V = (Y1 + h * w);\n        U = V + ((h + 1)/2)*((w + 1)/2);\n        UV_advance = 1;\n        break;\n    case SDL_PIXELFORMAT_IYUV:\n        U = (Y1 + h * w);\n        V = U + ((h + 1)/2)*((w + 1)/2);\n        UV_advance = 1;\n        break;\n    case SDL_PIXELFORMAT_NV12:\n        U = (Y1 + h * w);\n        V = U + 1;\n        UV_advance = 2;\n        break;\n    case SDL_PIXELFORMAT_NV21:\n        V = (Y1 + h * w);\n        U = V + 1;\n        UV_advance = 2;\n        break;\n    default:\n        SDL_assert(!\"Unsupported planar YUV format\");\n        return;\n    }\n\n    for (y = 0; y < (h - 1); y += 2) {\n        for (x = 0; x < (w - 1); x += 2) {\n            RGBtoYUV(rgb1, yuv[0], mode, monochrome, luminance);\n            rgb1 += 3;\n            *Y1++ = (Uint8)yuv[0][0];\n\n            RGBtoYUV(rgb1, yuv[1], mode, monochrome, luminance);\n            rgb1 += 3;\n            *Y1++ = (Uint8)yuv[1][0];\n\n            RGBtoYUV(rgb2, yuv[2], mode, monochrome, luminance);\n            rgb2 += 3;\n            *Y2++ = (Uint8)yuv[2][0];\n\n            RGBtoYUV(rgb2, yuv[3], mode, monochrome, luminance);\n            rgb2 += 3;\n            *Y2++ = (Uint8)yuv[3][0];\n\n            *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1] + yuv[2][1] + yuv[3][1])/4.0f + 0.5f);\n            U += UV_advance;\n\n            *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2] + yuv[2][2] + yuv[3][2])/4.0f + 0.5f);\n            V += UV_advance;\n        }\n        /* Last column */\n        if (x == (w - 1)) {\n            RGBtoYUV(rgb1, yuv[0], mode, monochrome, luminance);\n            rgb1 += 3;\n            *Y1++ = (Uint8)yuv[0][0];\n\n            RGBtoYUV(rgb2, yuv[2], mode, monochrome, luminance);\n            rgb2 += 3;\n            *Y2++ = (Uint8)yuv[2][0];\n\n            *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[2][1])/2.0f + 0.5f);\n            U += UV_advance;\n\n            *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[2][2])/2.0f + 0.5f);\n            V += UV_advance;\n        }\n        Y1 += w;\n        Y2 += w;\n        rgb1 += rgb_row_advance;\n        rgb2 += rgb_row_advance;\n    }\n    /* Last row */\n    if (y == (h - 1)) {\n        for (x = 0; x < (w - 1); x += 2) {\n            RGBtoYUV(rgb1, yuv[0], mode, monochrome, luminance);\n            rgb1 += 3;\n            *Y1++ = (Uint8)yuv[0][0];\n\n            RGBtoYUV(rgb1, yuv[1], mode, monochrome, luminance);\n            rgb1 += 3;\n            *Y1++ = (Uint8)yuv[1][0];\n\n            *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1])/2.0f + 0.5f);\n            U += UV_advance;\n\n            *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2])/2.0f + 0.5f);\n            V += UV_advance;\n        }\n        /* Last column */\n        if (x == (w - 1)) {\n            RGBtoYUV(rgb1, yuv[0], mode, monochrome, luminance);\n            *Y1++ = (Uint8)yuv[0][0];\n\n            *U = (Uint8)yuv[0][1];\n            U += UV_advance;\n\n            *V = (Uint8)yuv[0][2];\n            V += UV_advance;\n        }\n    }\n}\n\nstatic void ConvertRGBtoPacked4(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance)\n{\n    int x, y;\n    int yuv[2][3];\n    Uint8 *Y1, *Y2, *U, *V;\n    Uint8 *rgb;\n    int rgb_row_advance = (pitch - w*3);\n\n    rgb = src;\n\n    switch (format) {\n    case SDL_PIXELFORMAT_YUY2:\n        Y1 = out;\n        U = out+1;\n        Y2 = out+2;\n        V = out+3;\n        break;\n    case SDL_PIXELFORMAT_UYVY:\n        U = out;\n        Y1 = out+1;\n        V = out+2;\n        Y2 = out+3;\n        break;\n    case SDL_PIXELFORMAT_YVYU:\n        Y1 = out;\n        V = out+1;\n        Y2 = out+2;\n        U = out+3;\n        break;\n    default:\n        SDL_assert(!\"Unsupported packed YUV format\");\n        return;\n    }\n\n    for (y = 0; y < h; ++y) {\n        for (x = 0; x < (w - 1); x += 2) {\n            RGBtoYUV(rgb, yuv[0], mode, monochrome, luminance);\n            rgb += 3;\n            *Y1 = (Uint8)yuv[0][0];\n            Y1 += 4;\n\n            RGBtoYUV(rgb, yuv[1], mode, monochrome, luminance);\n            rgb += 3;\n            *Y2 = (Uint8)yuv[1][0];\n            Y2 += 4;\n\n            *U = (Uint8)SDL_floorf((yuv[0][1] + yuv[1][1])/2.0f + 0.5f);\n            U += 4;\n\n            *V = (Uint8)SDL_floorf((yuv[0][2] + yuv[1][2])/2.0f + 0.5f);\n            V += 4;\n        }\n        /* Last column */\n        if (x == (w - 1)) {\n            RGBtoYUV(rgb, yuv[0], mode, monochrome, luminance);\n            rgb += 3;\n            *Y2 = *Y1 = (Uint8)yuv[0][0];\n            Y1 += 4;\n            Y2 += 4;\n\n            *U = (Uint8)yuv[0][1];\n            U += 4;\n\n            *V = (Uint8)yuv[0][2];\n            V += 4;\n        }\n        rgb += rgb_row_advance;\n    }\n}\n\nSDL_bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance)\n{\n    switch (format)\n    {\n    case SDL_PIXELFORMAT_YV12:\n    case SDL_PIXELFORMAT_IYUV:\n    case SDL_PIXELFORMAT_NV12:\n    case SDL_PIXELFORMAT_NV21:\n        ConvertRGBtoPlanar2x2(format, src, pitch, out, w, h, mode, monochrome, luminance);\n        return SDL_TRUE;\n    case SDL_PIXELFORMAT_YUY2:\n    case SDL_PIXELFORMAT_UYVY:\n    case SDL_PIXELFORMAT_YVYU:\n        ConvertRGBtoPacked4(format, src, pitch, out, w, h, mode, monochrome, luminance);\n        return SDL_TRUE;\n    default:\n        return SDL_FALSE;\n    }\n}\n\nint CalculateYUVPitch(Uint32 format, int width)\n{\n    switch (format)\n    {\n    case SDL_PIXELFORMAT_YV12:\n    case SDL_PIXELFORMAT_IYUV:\n    case SDL_PIXELFORMAT_NV12:\n    case SDL_PIXELFORMAT_NV21:\n        return width;\n    case SDL_PIXELFORMAT_YUY2:\n    case SDL_PIXELFORMAT_UYVY:\n    case SDL_PIXELFORMAT_YVYU:\n        return 4*((width + 1)/2);\n    default:\n        return 0;\n    }\n}\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/testyuv_cvt.h",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* These functions are designed for testing correctness, not for speed */\n\nextern SDL_bool ConvertRGBtoYUV(Uint32 format, Uint8 *src, int pitch, Uint8 *out, int w, int h, SDL_YUV_CONVERSION_MODE mode, int monochrome, int luminance);\nextern int CalculateYUVPitch(Uint32 format, int width);\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/torturethread.c",
    "content": "/*\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely.\n*/\n\n/* Simple test of the SDL threading code */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <signal.h>\n#include <string.h>\n\n#include \"SDL.h\"\n\n#define NUMTHREADS 10\n\nstatic SDL_atomic_t time_for_threads_to_die[NUMTHREADS];\n\n/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */\nstatic void\nquit(int rc)\n{\n    SDL_Quit();\n    exit(rc);\n}\n\nint SDLCALL\nSubThreadFunc(void *data)\n{\n    while (!*(int volatile *) data) {\n        ;                       /* SDL_Delay(10); *//* do nothing */\n    }\n    return 0;\n}\n\nint SDLCALL\nThreadFunc(void *data)\n{\n    SDL_Thread *sub_threads[NUMTHREADS];\n    int flags[NUMTHREADS];\n    int i;\n    int tid = (int) (uintptr_t) data;\n\n    SDL_Log(\"Creating Thread %d\\n\", tid);\n\n    for (i = 0; i < NUMTHREADS; i++) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"Child%d_%d\", tid, i);\n        flags[i] = 0;\n        sub_threads[i] = SDL_CreateThread(SubThreadFunc, name, &flags[i]);\n    }\n\n    SDL_Log(\"Thread '%d' waiting for signal\\n\", tid);\n    while (SDL_AtomicGet(&time_for_threads_to_die[tid]) != 1) {\n        ;                       /* do nothing */\n    }\n\n    SDL_Log(\"Thread '%d' sending signals to subthreads\\n\", tid);\n    for (i = 0; i < NUMTHREADS; i++) {\n        flags[i] = 1;\n        SDL_WaitThread(sub_threads[i], NULL);\n    }\n\n    SDL_Log(\"Thread '%d' exiting!\\n\", tid);\n\n    return 0;\n}\n\nint\nmain(int argc, char *argv[])\n{\n    SDL_Thread *threads[NUMTHREADS];\n    int i;\n\n    /* Enable standard application logging */\n    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);\n\n    /* Load the SDL library */\n    if (SDL_Init(0) < 0) {\n        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't initialize SDL: %s\\n\", SDL_GetError());\n        return (1);\n    }\n\n    signal(SIGSEGV, SIG_DFL);\n    for (i = 0; i < NUMTHREADS; i++) {\n        char name[64];\n        SDL_snprintf(name, sizeof (name), \"Parent%d\", i);\n        SDL_AtomicSet(&time_for_threads_to_die[i], 0);\n        threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i);\n\n        if (threads[i] == NULL) {\n            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, \"Couldn't create thread: %s\\n\", SDL_GetError());\n            quit(1);\n        }\n    }\n\n    for (i = 0; i < NUMTHREADS; i++) {\n        SDL_AtomicSet(&time_for_threads_to_die[i], 1);\n    }\n\n    for (i = 0; i < NUMTHREADS; i++) {\n        SDL_WaitThread(threads[i], NULL);\n    }\n    SDL_Quit();\n    return (0);\n}\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/test/utf8.txt",
    "content": "UTF-8 decoder capability and stress test\n----------------------------------------\n\nMarkus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2003-02-19\n\nThis test file can help you examine, how your UTF-8 decoder handles\nvarious types of correct, malformed, or otherwise interesting UTF-8\nsequences. This file is not meant to be a conformance test. It does\nnot prescribes any particular outcome and therefore there is no way to\n\"pass\" or \"fail\" this test file, even though the texts suggests a\npreferable decoder behaviour at some places. The aim is instead to\nhelp you think about and test the behaviour of your UTF-8 on a\nsystematic collection of unusual inputs. Experience so far suggests\nthat most first-time authors of UTF-8 decoders find at least one\nserious problem in their decoder by using this file.\n\nThe test lines below cover boundary conditions, malformed UTF-8\nsequences as well as correctly encoded UTF-8 sequences of Unicode code\npoints that should never occur in a correct UTF-8 file.\n\nAccording to ISO 10646-1:2000, sections D.7 and 2.3c, a device\nreceiving UTF-8 shall interpret a \"malformed sequence in the same way\nthat it interprets a character that is outside the adopted subset\" and\n\"characters that are not within the adopted subset shall be indicated\nto the user\" by a receiving device. A quite commonly used approach in\nUTF-8 decoders is to replace any malformed UTF-8 sequence by a\nreplacement character (U+FFFD), which looks a bit like an inverted\nquestion mark, or a similar symbol. It might be a good idea to\nvisually distinguish a malformed UTF-8 sequence from a correctly\nencoded Unicode character that is just not available in the current\nfont but otherwise fully legal, even though ISO 10646-1 doesn't\nmandate this. In any case, just ignoring malformed sequences or\nunavailable characters does not conform to ISO 10646, will make\ndebugging more difficult, and can lead to user confusion.\n\nPlease check, whether a malformed UTF-8 sequence is (1) represented at\nall, (2) represented by exactly one single replacement character (or\nequivalent signal), and (3) the following quotation mark after an\nillegal UTF-8 sequence is correctly displayed, i.e. proper\nresynchronization takes place immageately after any malformed\nsequence. This file says \"THE END\" in the last line, so if you don't\nsee that, your decoder crashed somehow before, which should always be\ncause for concern.\n\nAll lines in this file are exactly 79 characters long (plus the line\nfeed). In addition, all lines end with \"|\", except for the two test\nlines 2.1.1 and 2.2.1, which contain non-printable ASCII controls\nU+0000 and U+007F. If you display this file with a fixed-width font,\nthese \"|\" characters should all line up in column 79 (right margin).\nThis allows you to test quickly, whether your UTF-8 decoder finds the\ncorrect number of characters in every line, that is whether each\nmalformed sequences is replaced by a single replacement character.\n\nNote that as an alternative to the notion of malformed sequence used\nhere, it is also a perfectly acceptable (and in some situations even\npreferable) solution to represent each individual byte of a malformed\nsequence by a replacement character. If you follow this strategy in\nyour decoder, then please ignore the \"|\" column.\n\n\nHere come the tests:                                                          |\n                                                                              |\n1  Some correct UTF-8 text                                                    |\n                                                                              |\n(The codepoints for this test are:                                            |\n  U+03BA U+1F79 U+03C3 U+03BC U+03B5  --ryan.)                                |\n                                                                              |\nYou should see the Greek word 'kosme':       \"κόσμε\"                          |\n                                                                              |\n                                                                              |\n2  Boundary condition test cases                                              |\n                                                                              |\n2.1  First possible sequence of a certain length                              |\n                                                                              |\n(byte zero skipped...there's a null added at the end of the test. --ryan.)    |\n                                                                              |\n2.1.2  2 bytes (U-00000080):        \"\"                                       |\n2.1.3  3 bytes (U-00000800):        \"ࠀ\"                                       |\n2.1.4  4 bytes (U-00010000):        \"𐀀\"                                       |\n                                                                              |\n(5 and 6 byte sequences were made illegal in rfc3629. --ryan.)                |\n2.1.5  5 bytes (U-00200000):        \"\"                                       |\n2.1.6  6 bytes (U-04000000):        \"\"                                       |\n                                                                              |\n2.2  Last possible sequence of a certain length                               |\n                                                                              |\n2.2.1  1 byte  (U-0000007F):        \"\"                                       |\n2.2.2  2 bytes (U-000007FF):        \"߿\"                                       |\n                                                                              |\n(Section 5.3.2 below calls this illegal. --ryan.)                             |\n2.2.3  3 bytes (U-0000FFFF):        \"￿\"                                       |\n                                                                              |\n(5 and 6 bytes sequences, and 4 bytes sequences > 0x10FFFF were made illegal  |\n in rfc3629, so these next three should be replaced with a invalid            |\n character codepoint. --ryan.)                                                |\n2.2.4  4 bytes (U-001FFFFF):        \"\"                                       |\n2.2.5  5 bytes (U-03FFFFFF):        \"\"                                       |\n2.2.6  6 bytes (U-7FFFFFFF):        \"\"                                       |\n                                                                              |\n2.3  Other boundary conditions                                                |\n                                                                              |\n2.3.1  U-0000D7FF = ed 9f bf = \"퟿\"                                            |\n2.3.2  U-0000E000 = ee 80 80 = \"\"                                            |\n2.3.3  U-0000FFFD = ef bf bd = \"�\"                                            |\n2.3.4  U-0010FFFF = f4 8f bf bf = \"􏿿\"                                         |\n                                                                              |\n(This one is bogus in rfc3629. --ryan.)                                       |\n2.3.5  U-00110000 = f4 90 80 80 = \"\"                                         |\n                                                                              |\n3  Malformed sequences                                                        |\n                                                                              |\n3.1  Unexpected continuation bytes                                            |\n                                                                              |\nEach unexpected continuation byte should be separately signalled as a         |\nmalformed sequence of its own.                                                |\n                                                                              |\n3.1.1  First continuation byte 0x80: \"\"                                      |\n3.1.2  Last  continuation byte 0xbf: \"\"                                      |\n                                                                              |\n3.1.3  2 continuation bytes: \"\"                                             |\n3.1.4  3 continuation bytes: \"\"                                            |\n3.1.5  4 continuation bytes: \"\"                                           |\n3.1.6  5 continuation bytes: \"\"                                          |\n3.1.7  6 continuation bytes: \"\"                                         |\n3.1.8  7 continuation bytes: \"\"                                        |\n                                                                              |\n3.1.9  Sequence of all 64 possible continuation bytes (0x80-0xbf):            |\n                                                                              |\n   \"                                                          |\n                                                              |\n                                                              |\n    \"                                                         |\n                                                                              |\n3.2  Lonely start characters                                                  |\n                                                                              |\n3.2.1  All 32 first bytes of 2-byte sequences (0xc0-0xdf),                    |\n       each followed by a space character:                                    |\n                                                                              |\n   \"                                                          |\n                    \"                                         |\n                                                                              |\n3.2.2  All 16 first bytes of 3-byte sequences (0xe0-0xef),                    |\n       each followed by a space character:                                    |\n                                                                              |\n   \"                \"                                         |\n                                                                              |\n3.2.3  All 8 first bytes of 4-byte sequences (0xf0-0xf7),                     |\n       each followed by a space character:                                    |\n                                                                              |\n   \"        \"                                                         |\n                                                                              |\n3.2.4  All 4 first bytes of 5-byte sequences (0xf8-0xfb),                     |\n       each followed by a space character:                                    |\n                                                                              |\n   \"    \"                                                                 |\n                                                                              |\n3.2.5  All 2 first bytes of 6-byte sequences (0xfc-0xfd),                     |\n       each followed by a space character:                                    |\n                                                                              |\n   \"  \"                                                                     |\n                                                                              |\n3.3  Sequences with last continuation byte missing                            |\n                                                                              |\nAll bytes of an incomplete sequence should be signalled as a single           |\nmalformed sequence, i.e., you should see only a single replacement            |\ncharacter in each of the next 10 tests. (Characters as in section 2)          |\n                                                                              |\n3.3.1  2-byte sequence with last byte missing (U+0000):     \"\"               |\n3.3.2  3-byte sequence with last byte missing (U+0000):     \"\"               |\n3.3.3  4-byte sequence with last byte missing (U+0000):     \"\"               |\n3.3.4  5-byte sequence with last byte missing (U+0000):     \"\"               |\n3.3.5  6-byte sequence with last byte missing (U+0000):     \"\"               |\n3.3.6  2-byte sequence with last byte missing (U-000007FF): \"\"               |\n3.3.7  3-byte sequence with last byte missing (U-0000FFFF): \"\"               |\n3.3.8  4-byte sequence with last byte missing (U-001FFFFF): \"\"               |\n3.3.9  5-byte sequence with last byte missing (U-03FFFFFF): \"\"               |\n3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\"               |\n                                                                              |\n3.4  Concatenation of incomplete sequences                                    |\n                                                                              |\nAll the 10 sequences of 3.3 concatenated, you should see 10 malformed         |\nsequences being signalled:                                                    |\n                                                                              |\n   \"\"                                                               |\n                                                                              |\n3.5  Impossible bytes                                                         |\n                                                                              |\nThe following two bytes cannot appear in a correct UTF-8 string               |\n                                                                              |\n3.5.1  fe = \"\"                                                               |\n3.5.2  ff = \"\"                                                               |\n3.5.3  fe fe ff ff = \"\"                                                   |\n                                                                              |\n4  Overlong sequences                                                         |\n                                                                              |\nThe following sequences are not malformed according to the letter of          |\nthe Unicode 2.0 standard. However, they are longer then necessary and         |\na correct UTF-8 encoder is not allowed to produce them. A \"safe UTF-8         |\ndecoder\" should reject them just like malformed sequences for two             |\nreasons: (1) It helps to debug applications if overlong sequences are         |\nnot treated as valid representations of characters, because this helps        |\nto spot problems more quickly. (2) Overlong sequences provide                 |\nalternative representations of characters, that could maliciously be          |\nused to bypass filters that check only for ASCII characters. For              |\ninstance, a 2-byte encoded line feed (LF) would not be caught by a            |\nline counter that counts only 0x0a bytes, but it would still be               |\nprocessed as a line feed by an unsafe UTF-8 decoder later in the              |\npipeline. From a security point of view, ASCII compatibility of UTF-8         |\nsequences means also, that ASCII characters are *only* allowed to be          |\nrepresented by ASCII bytes in the range 0x00-0x7f. To ensure this             |\naspect of ASCII compatibility, use only \"safe UTF-8 decoders\" that            |\nreject overlong UTF-8 sequences for which a shorter encoding exists.          |\n                                                                              |\n4.1  Examples of an overlong ASCII character                                  |\n                                                                              |\nWith a safe UTF-8 decoder, all of the following five overlong                 |\nrepresentations of the ASCII character slash (\"/\") should be rejected         |\nlike a malformed UTF-8 sequence, for instance by substituting it with         |\na replacement character. If you see a slash below, you do not have a          |\nsafe UTF-8 decoder!                                                           |\n                                                                              |\n4.1.1 U+002F = c0 af             = \"\"                                        |\n4.1.2 U+002F = e0 80 af          = \"\"                                        |\n4.1.3 U+002F = f0 80 80 af       = \"\"                                        |\n4.1.4 U+002F = f8 80 80 80 af    = \"\"                                        |\n4.1.5 U+002F = fc 80 80 80 80 af = \"\"                                        |\n                                                                              |\n4.2  Maximum overlong sequences                                               |\n                                                                              |\nBelow you see the highest Unicode value that is still resulting in an         |\noverlong sequence if represented with the given number of bytes. This         |\nis a boundary test for safe UTF-8 decoders. All five characters should        |\nbe rejected like malformed UTF-8 sequences.                                   |\n                                                                              |\n4.2.1  U-0000007F = c1 bf             = \"\"                                   |\n4.2.2  U-000007FF = e0 9f bf          = \"\"                                   |\n4.2.3  U-0000FFFF = f0 8f bf bf       = \"\"                                   |\n4.2.4  U-001FFFFF = f8 87 bf bf bf    = \"\"                                   |\n4.2.5  U-03FFFFFF = fc 83 bf bf bf bf = \"\"                                   |\n                                                                              |\n4.3  Overlong representation of the NUL character                             |\n                                                                              |\nThe following five sequences should also be rejected like malformed           |\nUTF-8 sequences and should not be treated like the ASCII NUL                  |\ncharacter.                                                                    |\n                                                                              |\n4.3.1  U+0000 = c0 80             = \"\"                                       |\n4.3.2  U+0000 = e0 80 80          = \"\"                                       |\n4.3.3  U+0000 = f0 80 80 80       = \"\"                                       |\n4.3.4  U+0000 = f8 80 80 80 80    = \"\"                                       |\n4.3.5  U+0000 = fc 80 80 80 80 80 = \"\"                                       |\n                                                                              |\n5  Illegal code positions                                                     |\n                                                                              |\nThe following UTF-8 sequences should be rejected like malformed               |\nsequences, because they never represent valid ISO 10646 characters and        |\na UTF-8 decoder that accepts them might introduce security problems           |\ncomparable to overlong UTF-8 sequences.                                       |\n                                                                              |\n5.1 Single UTF-16 surrogates                                                  |\n                                                                              |\n5.1.1  U+D800 = ed a0 80 = \"\"                                                |\n5.1.2  U+DB7F = ed ad bf = \"\"                                                |\n5.1.3  U+DB80 = ed ae 80 = \"\"                                                |\n5.1.4  U+DBFF = ed af bf = \"\"                                                |\n5.1.5  U+DC00 = ed b0 80 = \"\"                                                |\n5.1.6  U+DF80 = ed be 80 = \"\"                                                |\n5.1.7  U+DFFF = ed bf bf = \"\"                                                |\n                                                                              |\n5.2 Paired UTF-16 surrogates                                                  |\n                                                                              |\n5.2.1  U+D800 U+DC00 = ed a0 80 ed b0 80 = \"\"                               |\n5.2.2  U+D800 U+DFFF = ed a0 80 ed bf bf = \"\"                               |\n5.2.3  U+DB7F U+DC00 = ed ad bf ed b0 80 = \"\"                               |\n5.2.4  U+DB7F U+DFFF = ed ad bf ed bf bf = \"\"                               |\n5.2.5  U+DB80 U+DC00 = ed ae 80 ed b0 80 = \"\"                               |\n5.2.6  U+DB80 U+DFFF = ed ae 80 ed bf bf = \"\"                               |\n5.2.7  U+DBFF U+DC00 = ed af bf ed b0 80 = \"\"                               |\n5.2.8  U+DBFF U+DFFF = ed af bf ed bf bf = \"\"                               |\n                                                                              |\n5.3 Other illegal code positions                                              |\n                                                                              |\n5.3.1  U+FFFE = ef bf be = \"￾\"                                                |\n5.3.2  U+FFFF = ef bf bf = \"￿\"                                                |\n                                                                              |\nTHE END                                                                       |\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/bin/sdl2-config",
    "content": "#!/bin/sh\n\nprefix=/opt/local/x86_64-w64-mingw32\nexec_prefix=${prefix}\nexec_prefix_set=no\nlibdir=${exec_prefix}/lib\n\n#usage=\"\\\n#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]\"\nusage=\"\\\nUsage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]\"\n\nif test $# -eq 0; then\n      echo \"${usage}\" 1>&2\n      exit 1\nfi\n\nwhile test $# -gt 0; do\n  case \"$1\" in\n  -*=*) optarg=`echo \"$1\" | sed 's/[-_a-zA-Z0-9]*=//'` ;;\n  *) optarg= ;;\n  esac\n\n  case $1 in\n    --prefix=*)\n      prefix=$optarg\n      if test $exec_prefix_set = no ; then\n        exec_prefix=$optarg\n      fi\n      ;;\n    --prefix)\n      echo $prefix\n      ;;\n    --exec-prefix=*)\n      exec_prefix=$optarg\n      exec_prefix_set=yes\n      ;;\n    --exec-prefix)\n      echo $exec_prefix\n      ;;\n    --version)\n      echo 2.0.10\n      ;;\n    --cflags)\n      echo -I${prefix}/include/SDL2  -Dmain=SDL_main\n      ;;\n    --libs)\n      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2 -mwindows\n      ;;\n    --static-libs)\n#    --libs|--static-libs)\n      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2 -mwindows  -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc\n      ;;\n    *)\n      echo \"${usage}\" 1>&2\n      exit 1\n      ;;\n  esac\n  shift\ndone\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL.h\n *\n *  Main include header for the SDL library\n */\n\n\n#ifndef SDL_h_\n#define SDL_h_\n\n#include \"SDL_main.h\"\n#include \"SDL_stdinc.h\"\n#include \"SDL_assert.h\"\n#include \"SDL_atomic.h\"\n#include \"SDL_audio.h\"\n#include \"SDL_clipboard.h\"\n#include \"SDL_cpuinfo.h\"\n#include \"SDL_endian.h\"\n#include \"SDL_error.h\"\n#include \"SDL_events.h\"\n#include \"SDL_filesystem.h\"\n#include \"SDL_gamecontroller.h\"\n#include \"SDL_haptic.h\"\n#include \"SDL_hints.h\"\n#include \"SDL_joystick.h\"\n#include \"SDL_loadso.h\"\n#include \"SDL_log.h\"\n#include \"SDL_messagebox.h\"\n#include \"SDL_mutex.h\"\n#include \"SDL_power.h\"\n#include \"SDL_render.h\"\n#include \"SDL_rwops.h\"\n#include \"SDL_sensor.h\"\n#include \"SDL_shape.h\"\n#include \"SDL_system.h\"\n#include \"SDL_thread.h\"\n#include \"SDL_timer.h\"\n#include \"SDL_version.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* As of version 0.5, SDL is loaded dynamically into the application */\n\n/**\n *  \\name SDL_INIT_*\n *\n *  These are the flags which may be passed to SDL_Init().  You should\n *  specify the subsystems which you will be using in your application.\n */\n/* @{ */\n#define SDL_INIT_TIMER          0x00000001u\n#define SDL_INIT_AUDIO          0x00000010u\n#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */\n#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */\n#define SDL_INIT_HAPTIC         0x00001000u\n#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */\n#define SDL_INIT_EVENTS         0x00004000u\n#define SDL_INIT_SENSOR         0x00008000u\n#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */\n#define SDL_INIT_EVERYTHING ( \\\n                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \\\n                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \\\n            )\n/* @} */\n\n/**\n *  This function initializes  the subsystems specified by \\c flags\n */\nextern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);\n\n/**\n *  This function initializes specific SDL subsystems\n *\n *  Subsystem initialization is ref-counted, you must call\n *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly\n *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).\n *  If a subsystem is already loaded then this call will\n *  increase the ref-count and return.\n */\nextern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);\n\n/**\n *  This function cleans up specific SDL subsystems\n */\nextern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);\n\n/**\n *  This function returns a mask of the specified subsystems which have\n *  previously been initialized.\n *\n *  If \\c flags is 0, it returns a mask of all initialized subsystems.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);\n\n/**\n *  This function cleans up all initialized subsystems. You should\n *  call it upon all exit conditions.\n */\nextern DECLSPEC void SDLCALL SDL_Quit(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_assert.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_assert_h_\n#define SDL_assert_h_\n\n#include \"SDL_config.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef SDL_ASSERT_LEVEL\n#ifdef SDL_DEFAULT_ASSERT_LEVEL\n#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL\n#elif defined(_DEBUG) || defined(DEBUG) || \\\n      (defined(__GNUC__) && !defined(__OPTIMIZE__))\n#define SDL_ASSERT_LEVEL 2\n#else\n#define SDL_ASSERT_LEVEL 1\n#endif\n#endif /* SDL_ASSERT_LEVEL */\n\n/*\nThese are macros and not first class functions so that the debugger breaks\non the assertion line and not in some random guts of SDL, and so each\nassert can have unique static variables associated with it.\n*/\n\n#if defined(_MSC_VER)\n/* Don't include intrin.h here because it contains C++ code */\n    extern void __cdecl __debugbreak(void);\n    #define SDL_TriggerBreakpoint() __debugbreak()\n#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )\n    #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( \"int $3\\n\\t\" )\n#elif defined(__386__) && defined(__WATCOMC__)\n    #define SDL_TriggerBreakpoint() { _asm { int 0x03 } }\n#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)\n    #include <signal.h>\n    #define SDL_TriggerBreakpoint() raise(SIGTRAP)\n#else\n    /* How do we trigger breakpoints on this platform? */\n    #define SDL_TriggerBreakpoint()\n#endif\n\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */\n#   define SDL_FUNCTION __func__\n#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))\n#   define SDL_FUNCTION __FUNCTION__\n#else\n#   define SDL_FUNCTION \"???\"\n#endif\n#define SDL_FILE    __FILE__\n#define SDL_LINE    __LINE__\n\n/*\nsizeof (x) makes the compiler still parse the expression even without\nassertions enabled, so the code is always checked at compile time, but\ndoesn't actually generate code for it, so there are no side effects or\nexpensive checks at run time, just the constant size of what x WOULD be,\nwhich presumably gets optimized out as unused.\nThis also solves the problem of...\n\n    int somevalue = blah();\n    SDL_assert(somevalue == 1);\n\n...which would cause compiles to complain that somevalue is unused if we\ndisable assertions.\n*/\n\n/* \"while (0,0)\" fools Microsoft's compiler's /W4 warning level into thinking\n    this condition isn't constant. And looks like an owl's face! */\n#ifdef _MSC_VER  /* stupid /W4 warnings. */\n#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)\n#else\n#define SDL_NULL_WHILE_LOOP_CONDITION (0)\n#endif\n\n#define SDL_disabled_assert(condition) \\\n    do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)\n\ntypedef enum\n{\n    SDL_ASSERTION_RETRY,  /**< Retry the assert immediately. */\n    SDL_ASSERTION_BREAK,  /**< Make the debugger trigger a breakpoint. */\n    SDL_ASSERTION_ABORT,  /**< Terminate the program. */\n    SDL_ASSERTION_IGNORE,  /**< Ignore the assert. */\n    SDL_ASSERTION_ALWAYS_IGNORE  /**< Ignore the assert from now on. */\n} SDL_AssertState;\n\ntypedef struct SDL_AssertData\n{\n    int always_ignore;\n    unsigned int trigger_count;\n    const char *condition;\n    const char *filename;\n    int linenum;\n    const char *function;\n    const struct SDL_AssertData *next;\n} SDL_AssertData;\n\n#if (SDL_ASSERT_LEVEL > 0)\n\n/* Never call this directly. Use the SDL_assert* macros. */\nextern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,\n                                                             const char *,\n                                                             const char *, int)\n#if defined(__clang__)\n#if __has_feature(attribute_analyzer_noreturn)\n/* this tells Clang's static analysis that we're a custom assert function,\n   and that the analyzer should assume the condition was always true past this\n   SDL_assert test. */\n   __attribute__((analyzer_noreturn))\n#endif\n#endif\n;\n\n/* the do {} while(0) avoids dangling else problems:\n    if (x) SDL_assert(y); else blah();\n       ... without the do/while, the \"else\" could attach to this macro's \"if\".\n   We try to handle just the minimum we need here in a macro...the loop,\n   the static vars, and break points. The heavy lifting is handled in\n   SDL_ReportAssertion(), in SDL_assert.c.\n*/\n#define SDL_enabled_assert(condition) \\\n    do { \\\n        while ( !(condition) ) { \\\n            static struct SDL_AssertData sdl_assert_data = { \\\n                0, 0, #condition, 0, 0, 0, 0 \\\n            }; \\\n            const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \\\n            if (sdl_assert_state == SDL_ASSERTION_RETRY) { \\\n                continue; /* go again. */ \\\n            } else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \\\n                SDL_TriggerBreakpoint(); \\\n            } \\\n            break; /* not retrying. */ \\\n        } \\\n    } while (SDL_NULL_WHILE_LOOP_CONDITION)\n\n#endif  /* enabled assertions support code */\n\n/* Enable various levels of assertions. */\n#if SDL_ASSERT_LEVEL == 0   /* assertions disabled */\n#   define SDL_assert(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 1  /* release settings. */\n#   define SDL_assert(condition) SDL_disabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 2  /* normal settings. */\n#   define SDL_assert(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)\n#elif SDL_ASSERT_LEVEL == 3  /* paranoid settings. */\n#   define SDL_assert(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_release(condition) SDL_enabled_assert(condition)\n#   define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)\n#else\n#   error Unknown assertion level.\n#endif\n\n/* this assertion is never disabled at any level. */\n#define SDL_assert_always(condition) SDL_enabled_assert(condition)\n\n\ntypedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(\n                                 const SDL_AssertData* data, void* userdata);\n\n/**\n *  \\brief Set an application-defined assertion handler.\n *\n *  This allows an app to show its own assertion UI and/or force the\n *  response to an assertion failure. If the app doesn't provide this, SDL\n *  will try to do the right thing, popping up a system-specific GUI dialog,\n *  and probably minimizing any fullscreen windows.\n *\n *  This callback may fire from any thread, but it runs wrapped in a mutex, so\n *  it will only fire from one thread at a time.\n *\n *  Setting the callback to NULL restores SDL's original internal handler.\n *\n *  This callback is NOT reset to SDL's internal handler upon SDL_Quit()!\n *\n *  Return SDL_AssertState value of how to handle the assertion failure.\n *\n *  \\param handler Callback function, called when an assertion fails.\n *  \\param userdata A pointer passed to the callback as-is.\n */\nextern DECLSPEC void SDLCALL SDL_SetAssertionHandler(\n                                            SDL_AssertionHandler handler,\n                                            void *userdata);\n\n/**\n *  \\brief Get the default assertion handler.\n *\n *  This returns the function pointer that is called by default when an\n *   assertion is triggered. This is an internal function provided by SDL,\n *   that is used for assertions when SDL_SetAssertionHandler() hasn't been\n *   used to provide a different function.\n *\n *  \\return The default SDL_AssertionHandler that is called when an assert triggers.\n */\nextern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);\n\n/**\n *  \\brief Get the current assertion handler.\n *\n *  This returns the function pointer that is called when an assertion is\n *   triggered. This is either the value last passed to\n *   SDL_SetAssertionHandler(), or if no application-specified function is\n *   set, is equivalent to calling SDL_GetDefaultAssertionHandler().\n *\n *   \\param puserdata Pointer to a void*, which will store the \"userdata\"\n *                    pointer that was passed to SDL_SetAssertionHandler().\n *                    This value will always be NULL for the default handler.\n *                    If you don't care about this data, it is safe to pass\n *                    a NULL pointer to this function to ignore it.\n *  \\return The SDL_AssertionHandler that is called when an assert triggers.\n */\nextern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);\n\n/**\n *  \\brief Get a list of all assertion failures.\n *\n *  Get all assertions triggered since last call to SDL_ResetAssertionReport(),\n *  or the start of the program.\n *\n *  The proper way to examine this data looks something like this:\n *\n *  <code>\n *  const SDL_AssertData *item = SDL_GetAssertionReport();\n *  while (item) {\n *      printf(\"'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\\\n\",\n *             item->condition, item->function, item->filename,\n *             item->linenum, item->trigger_count,\n *             item->always_ignore ? \"yes\" : \"no\");\n *      item = item->next;\n *  }\n *  </code>\n *\n *  \\return List of all assertions.\n *  \\sa SDL_ResetAssertionReport\n */\nextern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);\n\n/**\n *  \\brief Reset the list of all assertion failures.\n *\n *  Reset list of all assertions triggered.\n *\n *  \\sa SDL_GetAssertionReport\n */\nextern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);\n\n\n/* these had wrong naming conventions until 2.0.4. Please update your app! */\n#define SDL_assert_state SDL_AssertState\n#define SDL_assert_data SDL_AssertData\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_assert_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_atomic.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n * \\file SDL_atomic.h\n *\n * Atomic operations.\n *\n * IMPORTANT:\n * If you are not an expert in concurrent lockless programming, you should\n * only be using the atomic lock and reference counting functions in this\n * file.  In all other cases you should be protecting your data structures\n * with full mutexes.\n *\n * The list of \"safe\" functions to use are:\n *  SDL_AtomicLock()\n *  SDL_AtomicUnlock()\n *  SDL_AtomicIncRef()\n *  SDL_AtomicDecRef()\n *\n * Seriously, here be dragons!\n * ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n *\n * You can find out a little more about lockless programming and the\n * subtle issues that can arise here:\n * http://msdn.microsoft.com/en-us/library/ee418650%28v=vs.85%29.aspx\n *\n * There's also lots of good information here:\n * http://www.1024cores.net/home/lock-free-algorithms\n * http://preshing.com/\n *\n * These operations may or may not actually be implemented using\n * processor specific atomic operations. When possible they are\n * implemented as true processor specific atomic operations. When that\n * is not possible the are implemented using locks that *do* use the\n * available atomic operations.\n *\n * All of the atomic operations that modify memory are full memory barriers.\n */\n\n#ifndef SDL_atomic_h_\n#define SDL_atomic_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_platform.h\"\n\n#include \"begin_code.h\"\n\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\name SDL AtomicLock\n *\n * The atomic locks are efficient spinlocks using CPU instructions,\n * but are vulnerable to starvation and can spin forever if a thread\n * holding a lock has been terminated.  For this reason you should\n * minimize the code executed inside an atomic lock and never do\n * expensive things like API or system calls while holding them.\n *\n * The atomic locks are not safe to lock recursively.\n *\n * Porting Note:\n * The spin lock functions and type are required and can not be\n * emulated because they are used in the atomic emulation code.\n */\n/* @{ */\n\ntypedef int SDL_SpinLock;\n\n/**\n * \\brief Try to lock a spin lock by setting it to a non-zero value.\n *\n * \\param lock Points to the lock.\n *\n * \\return SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already held.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);\n\n/**\n * \\brief Lock a spin lock by setting it to a non-zero value.\n *\n * \\param lock Points to the lock.\n */\nextern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);\n\n/**\n * \\brief Unlock a spin lock by setting it to 0. Always returns immediately\n *\n * \\param lock Points to the lock.\n */\nextern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);\n\n/* @} *//* SDL AtomicLock */\n\n\n/**\n * The compiler barrier prevents the compiler from reordering\n * reads and writes to globally visible variables across the call.\n */\n#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)\nvoid _ReadWriteBarrier(void);\n#pragma intrinsic(_ReadWriteBarrier)\n#define SDL_CompilerBarrier()   _ReadWriteBarrier()\n#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))\n/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */\n#define SDL_CompilerBarrier()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#elif defined(__WATCOMC__)\nextern _inline void SDL_CompilerBarrier (void);\n#pragma aux SDL_CompilerBarrier = \"\" parm [] modify exact [];\n#else\n#define SDL_CompilerBarrier()   \\\n{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }\n#endif\n\n/**\n * Memory barriers are designed to prevent reads and writes from being\n * reordered by the compiler and being seen out of order on multi-core CPUs.\n *\n * A typical pattern would be for thread A to write some data and a flag,\n * and for thread B to read the flag and get the data. In this case you\n * would insert a release barrier between writing the data and the flag,\n * guaranteeing that the data write completes no later than the flag is\n * written, and you would insert an acquire barrier between reading the\n * flag and reading the data, to ensure that all the reads associated\n * with the flag have completed.\n *\n * In this pattern you should always see a release barrier paired with\n * an acquire barrier and you should gate the data reads/writes with a\n * single flag variable.\n *\n * For more information on these semantics, take a look at the blog post:\n * http://preshing.com/20120913/acquire-and-release-semantics\n */\nextern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);\nextern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);\n\n#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"lwsync\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"lwsync\" : : : \"memory\")\n#elif defined(__GNUC__) && defined(__aarch64__)\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#elif defined(__GNUC__) && defined(__arm__)\n#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */\n/* Information from:\n   https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19\n\n   The Linux kernel provides a helper function which provides the right code for a memory barrier,\n   hard-coded at address 0xffff0fa0\n*/\ntypedef void (*SDL_KernelMemoryBarrierFunc)();\n#define SDL_MemoryBarrierRelease()\t((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()\n#define SDL_MemoryBarrierAcquire()\t((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()\n#elif 0 /* defined(__QNXNTO__) */\n#include <sys/cpuinline.h>\n\n#define SDL_MemoryBarrierRelease()   __cpu_membarrier()\n#define SDL_MemoryBarrierAcquire()   __cpu_membarrier()\n#else\n#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"dmb ish\" : : : \"memory\")\n#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)\n#ifdef __thumb__\n/* The mcr instruction isn't available in thumb mode, use real functions */\n#define SDL_MEMORY_BARRIER_USES_FUNCTION\n#define SDL_MemoryBarrierRelease()   SDL_MemoryBarrierReleaseFunction()\n#define SDL_MemoryBarrierAcquire()   SDL_MemoryBarrierAcquireFunction()\n#else\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"mcr p15, 0, %0, c7, c10, 5\" : : \"r\"(0) : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"mcr p15, 0, %0, c7, c10, 5\" : : \"r\"(0) : \"memory\")\n#endif /* __thumb__ */\n#else\n#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ (\"\" : : : \"memory\")\n#endif /* __LINUX__ || __ANDROID__ */\n#endif /* __GNUC__ && __arm__ */\n#else\n#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))\n/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */\n#include <mbarrier.h>\n#define SDL_MemoryBarrierRelease()  __machine_rel_barrier()\n#define SDL_MemoryBarrierAcquire()  __machine_acq_barrier()\n#else\n/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */\n#define SDL_MemoryBarrierRelease()  SDL_CompilerBarrier()\n#define SDL_MemoryBarrierAcquire()  SDL_CompilerBarrier()\n#endif\n#endif\n\n/**\n * \\brief A type representing an atomic integer value.  It is a struct\n *        so people don't accidentally use numeric operations on it.\n */\ntypedef struct { int value; } SDL_atomic_t;\n\n/**\n * \\brief Set an atomic variable to a new value if it is currently an old value.\n *\n * \\return SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.\n *\n * \\note If you don't know what this function is for, you shouldn't use it!\n*/\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);\n\n/**\n * \\brief Set an atomic variable to a value.\n *\n * \\return The previous value of the atomic variable.\n */\nextern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);\n\n/**\n * \\brief Get the value of an atomic variable\n */\nextern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);\n\n/**\n * \\brief Add to an atomic variable.\n *\n * \\return The previous value of the atomic variable.\n *\n * \\note This same style can be used for any number operation\n */\nextern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);\n\n/**\n * \\brief Increment an atomic variable used as a reference count.\n */\n#ifndef SDL_AtomicIncRef\n#define SDL_AtomicIncRef(a)    SDL_AtomicAdd(a, 1)\n#endif\n\n/**\n * \\brief Decrement an atomic variable used as a reference count.\n *\n * \\return SDL_TRUE if the variable reached zero after decrementing,\n *         SDL_FALSE otherwise\n */\n#ifndef SDL_AtomicDecRef\n#define SDL_AtomicDecRef(a)    (SDL_AtomicAdd(a, -1) == 1)\n#endif\n\n/**\n * \\brief Set a pointer to a new value if it is currently an old value.\n *\n * \\return SDL_TRUE if the pointer was set, SDL_FALSE otherwise.\n *\n * \\note If you don't know what this function is for, you shouldn't use it!\n*/\nextern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);\n\n/**\n * \\brief Set a pointer to a value atomically.\n *\n * \\return The previous value of the pointer.\n */\nextern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);\n\n/**\n * \\brief Get the value of a pointer atomically.\n */\nextern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n\n#include \"close_code.h\"\n\n#endif /* SDL_atomic_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_audio.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_audio.h\n *\n *  Access to the raw audio mixing buffer for the SDL library.\n */\n\n#ifndef SDL_audio_h_\n#define SDL_audio_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_endian.h\"\n#include \"SDL_mutex.h\"\n#include \"SDL_thread.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Audio format flags.\n *\n *  These are what the 16 bits in SDL_AudioFormat currently mean...\n *  (Unspecified bits are always zero).\n *\n *  \\verbatim\n    ++-----------------------sample is signed if set\n    ||\n    ||       ++-----------sample is bigendian if set\n    ||       ||\n    ||       ||          ++---sample is float if set\n    ||       ||          ||\n    ||       ||          || +---sample bit size---+\n    ||       ||          || |                     |\n    15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00\n    \\endverbatim\n *\n *  There are macros in SDL 2.0 and later to query these bits.\n */\ntypedef Uint16 SDL_AudioFormat;\n\n/**\n *  \\name Audio flags\n */\n/* @{ */\n\n#define SDL_AUDIO_MASK_BITSIZE       (0xFF)\n#define SDL_AUDIO_MASK_DATATYPE      (1<<8)\n#define SDL_AUDIO_MASK_ENDIAN        (1<<12)\n#define SDL_AUDIO_MASK_SIGNED        (1<<15)\n#define SDL_AUDIO_BITSIZE(x)         (x & SDL_AUDIO_MASK_BITSIZE)\n#define SDL_AUDIO_ISFLOAT(x)         (x & SDL_AUDIO_MASK_DATATYPE)\n#define SDL_AUDIO_ISBIGENDIAN(x)     (x & SDL_AUDIO_MASK_ENDIAN)\n#define SDL_AUDIO_ISSIGNED(x)        (x & SDL_AUDIO_MASK_SIGNED)\n#define SDL_AUDIO_ISINT(x)           (!SDL_AUDIO_ISFLOAT(x))\n#define SDL_AUDIO_ISLITTLEENDIAN(x)  (!SDL_AUDIO_ISBIGENDIAN(x))\n#define SDL_AUDIO_ISUNSIGNED(x)      (!SDL_AUDIO_ISSIGNED(x))\n\n/**\n *  \\name Audio format flags\n *\n *  Defaults to LSB byte order.\n */\n/* @{ */\n#define AUDIO_U8        0x0008  /**< Unsigned 8-bit samples */\n#define AUDIO_S8        0x8008  /**< Signed 8-bit samples */\n#define AUDIO_U16LSB    0x0010  /**< Unsigned 16-bit samples */\n#define AUDIO_S16LSB    0x8010  /**< Signed 16-bit samples */\n#define AUDIO_U16MSB    0x1010  /**< As above, but big-endian byte order */\n#define AUDIO_S16MSB    0x9010  /**< As above, but big-endian byte order */\n#define AUDIO_U16       AUDIO_U16LSB\n#define AUDIO_S16       AUDIO_S16LSB\n/* @} */\n\n/**\n *  \\name int32 support\n */\n/* @{ */\n#define AUDIO_S32LSB    0x8020  /**< 32-bit integer samples */\n#define AUDIO_S32MSB    0x9020  /**< As above, but big-endian byte order */\n#define AUDIO_S32       AUDIO_S32LSB\n/* @} */\n\n/**\n *  \\name float32 support\n */\n/* @{ */\n#define AUDIO_F32LSB    0x8120  /**< 32-bit floating point samples */\n#define AUDIO_F32MSB    0x9120  /**< As above, but big-endian byte order */\n#define AUDIO_F32       AUDIO_F32LSB\n/* @} */\n\n/**\n *  \\name Native audio byte ordering\n */\n/* @{ */\n#if SDL_BYTEORDER == SDL_LIL_ENDIAN\n#define AUDIO_U16SYS    AUDIO_U16LSB\n#define AUDIO_S16SYS    AUDIO_S16LSB\n#define AUDIO_S32SYS    AUDIO_S32LSB\n#define AUDIO_F32SYS    AUDIO_F32LSB\n#else\n#define AUDIO_U16SYS    AUDIO_U16MSB\n#define AUDIO_S16SYS    AUDIO_S16MSB\n#define AUDIO_S32SYS    AUDIO_S32MSB\n#define AUDIO_F32SYS    AUDIO_F32MSB\n#endif\n/* @} */\n\n/**\n *  \\name Allow change flags\n *\n *  Which audio format changes are allowed when opening a device.\n */\n/* @{ */\n#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    0x00000001\n#define SDL_AUDIO_ALLOW_FORMAT_CHANGE       0x00000002\n#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE     0x00000004\n#define SDL_AUDIO_ALLOW_SAMPLES_CHANGE      0x00000008\n#define SDL_AUDIO_ALLOW_ANY_CHANGE          (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)\n/* @} */\n\n/* @} *//* Audio flags */\n\n/**\n *  This function is called when the audio device needs more data.\n *\n *  \\param userdata An application-specific parameter saved in\n *                  the SDL_AudioSpec structure\n *  \\param stream A pointer to the audio data buffer.\n *  \\param len    The length of that buffer in bytes.\n *\n *  Once the callback returns, the buffer will no longer be valid.\n *  Stereo samples are stored in a LRLRLR ordering.\n *\n *  You can choose to avoid callbacks and use SDL_QueueAudio() instead, if\n *  you like. Just open your audio device with a NULL callback.\n */\ntypedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,\n                                            int len);\n\n/**\n *  The calculated values in this structure are calculated by SDL_OpenAudio().\n *\n *  For multi-channel audio, the default SDL channel mapping is:\n *  2:  FL FR                       (stereo)\n *  3:  FL FR LFE                   (2.1 surround)\n *  4:  FL FR BL BR                 (quad)\n *  5:  FL FR FC BL BR              (quad + center)\n *  6:  FL FR FC LFE SL SR          (5.1 surround - last two can also be BL BR)\n *  7:  FL FR FC LFE BC SL SR       (6.1 surround)\n *  8:  FL FR FC LFE BL BR SL SR    (7.1 surround)\n */\ntypedef struct SDL_AudioSpec\n{\n    int freq;                   /**< DSP frequency -- samples per second */\n    SDL_AudioFormat format;     /**< Audio data format */\n    Uint8 channels;             /**< Number of channels: 1 mono, 2 stereo */\n    Uint8 silence;              /**< Audio buffer silence value (calculated) */\n    Uint16 samples;             /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */\n    Uint16 padding;             /**< Necessary for some compile environments */\n    Uint32 size;                /**< Audio buffer size in bytes (calculated) */\n    SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */\n    void *userdata;             /**< Userdata passed to callback (ignored for NULL callbacks). */\n} SDL_AudioSpec;\n\n\nstruct SDL_AudioCVT;\ntypedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,\n                                          SDL_AudioFormat format);\n\n/**\n *  \\brief Upper limit of filters in SDL_AudioCVT\n *\n *  The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is\n *  currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers,\n *  one of which is the terminating NULL pointer.\n */\n#define SDL_AUDIOCVT_MAX_FILTERS 9\n\n/**\n *  \\struct SDL_AudioCVT\n *  \\brief A structure to hold a set of audio conversion filters and buffers.\n *\n *  Note that various parts of the conversion pipeline can take advantage\n *  of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require\n *  you to pass it aligned data, but can possibly run much faster if you\n *  set both its (buf) field to a pointer that is aligned to 16 bytes, and its\n *  (len) field to something that's a multiple of 16, if possible.\n */\n#ifdef __GNUC__\n/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't\n   pad it out to 88 bytes to guarantee ABI compatibility between compilers.\n   vvv\n   The next time we rev the ABI, make sure to size the ints and add padding.\n*/\n#define SDL_AUDIOCVT_PACKED __attribute__((packed))\n#else\n#define SDL_AUDIOCVT_PACKED\n#endif\n/* */\ntypedef struct SDL_AudioCVT\n{\n    int needed;                 /**< Set to 1 if conversion possible */\n    SDL_AudioFormat src_format; /**< Source audio format */\n    SDL_AudioFormat dst_format; /**< Target audio format */\n    double rate_incr;           /**< Rate conversion increment */\n    Uint8 *buf;                 /**< Buffer to hold entire audio data */\n    int len;                    /**< Length of original audio buffer */\n    int len_cvt;                /**< Length of converted audio buffer */\n    int len_mult;               /**< buffer must be len*len_mult big */\n    double len_ratio;           /**< Given len, final size is len*len_ratio */\n    SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */\n    int filter_index;           /**< Current audio conversion function */\n} SDL_AUDIOCVT_PACKED SDL_AudioCVT;\n\n\n/* Function prototypes */\n\n/**\n *  \\name Driver discovery functions\n *\n *  These functions return the list of built in audio drivers, in the\n *  order that they are normally initialized by default.\n */\n/* @{ */\nextern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void);\nextern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index);\n/* @} */\n\n/**\n *  \\name Initialization and cleanup\n *\n *  \\internal These functions are used internally, and should not be used unless\n *            you have a specific need to specify the audio driver you want to\n *            use.  You should normally use SDL_Init() or SDL_InitSubSystem().\n */\n/* @{ */\nextern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name);\nextern DECLSPEC void SDLCALL SDL_AudioQuit(void);\n/* @} */\n\n/**\n *  This function returns the name of the current audio driver, or NULL\n *  if no driver has been initialized.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);\n\n/**\n *  This function opens the audio device with the desired parameters, and\n *  returns 0 if successful, placing the actual hardware parameters in the\n *  structure pointed to by \\c obtained.  If \\c obtained is NULL, the audio\n *  data passed to the callback function will be guaranteed to be in the\n *  requested format, and will be automatically converted to the hardware\n *  audio format if necessary.  This function returns -1 if it failed\n *  to open the audio device, or couldn't set up the audio thread.\n *\n *  When filling in the desired audio spec structure,\n *    - \\c desired->freq should be the desired audio frequency in samples-per-\n *      second.\n *    - \\c desired->format should be the desired audio format.\n *    - \\c desired->samples is the desired size of the audio buffer, in\n *      samples.  This number should be a power of two, and may be adjusted by\n *      the audio driver to a value more suitable for the hardware.  Good values\n *      seem to range between 512 and 8096 inclusive, depending on the\n *      application and CPU speed.  Smaller values yield faster response time,\n *      but can lead to underflow if the application is doing heavy processing\n *      and cannot fill the audio buffer in time.  A stereo sample consists of\n *      both right and left channels in LR ordering.\n *      Note that the number of samples is directly related to time by the\n *      following formula:  \\code ms = (samples*1000)/freq \\endcode\n *    - \\c desired->size is the size in bytes of the audio buffer, and is\n *      calculated by SDL_OpenAudio().\n *    - \\c desired->silence is the value used to set the buffer to silence,\n *      and is calculated by SDL_OpenAudio().\n *    - \\c desired->callback should be set to a function that will be called\n *      when the audio device is ready for more data.  It is passed a pointer\n *      to the audio buffer, and the length in bytes of the audio buffer.\n *      This function usually runs in a separate thread, and so you should\n *      protect data structures that it accesses by calling SDL_LockAudio()\n *      and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL\n *      pointer here, and call SDL_QueueAudio() with some frequency, to queue\n *      more audio samples to be played (or for capture devices, call\n *      SDL_DequeueAudio() with some frequency, to obtain audio samples).\n *    - \\c desired->userdata is passed as the first parameter to your callback\n *      function. If you passed a NULL callback, this value is ignored.\n *\n *  The audio device starts out playing silence when it's opened, and should\n *  be enabled for playing by calling \\c SDL_PauseAudio(0) when you are ready\n *  for your audio callback function to be called.  Since the audio driver\n *  may modify the requested size of the audio buffer, you should allocate\n *  any local mixing buffers after you open the audio device.\n */\nextern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,\n                                          SDL_AudioSpec * obtained);\n\n/**\n *  SDL Audio Device IDs.\n *\n *  A successful call to SDL_OpenAudio() is always device id 1, and legacy\n *  SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls\n *  always returns devices >= 2 on success. The legacy calls are good both\n *  for backwards compatibility and when you don't care about multiple,\n *  specific, or capture devices.\n */\ntypedef Uint32 SDL_AudioDeviceID;\n\n/**\n *  Get the number of available devices exposed by the current driver.\n *  Only valid after a successfully initializing the audio subsystem.\n *  Returns -1 if an explicit list of devices can't be determined; this is\n *  not an error. For example, if SDL is set up to talk to a remote audio\n *  server, it can't list every one available on the Internet, but it will\n *  still allow a specific host to be specified to SDL_OpenAudioDevice().\n *\n *  In many common cases, when this function returns a value <= 0, it can still\n *  successfully open the default device (NULL for first argument of\n *  SDL_OpenAudioDevice()).\n */\nextern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture);\n\n/**\n *  Get the human-readable name of a specific audio device.\n *  Must be a value between 0 and (number of audio devices-1).\n *  Only valid after a successfully initializing the audio subsystem.\n *  The values returned by this function reflect the latest call to\n *  SDL_GetNumAudioDevices(); recall that function to redetect available\n *  hardware.\n *\n *  The string returned by this function is UTF-8 encoded, read-only, and\n *  managed internally. You are not to free it. If you need to keep the\n *  string for any length of time, you should make your own copy of it, as it\n *  will be invalid next time any of several other SDL functions is called.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,\n                                                           int iscapture);\n\n\n/**\n *  Open a specific audio device. Passing in a device name of NULL requests\n *  the most reasonable default (and is equivalent to calling SDL_OpenAudio()).\n *\n *  The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but\n *  some drivers allow arbitrary and driver-specific strings, such as a\n *  hostname/IP address for a remote audio server, or a filename in the\n *  diskaudio driver.\n *\n *  \\return 0 on error, a valid device ID that is >= 2 on success.\n *\n *  SDL_OpenAudio(), unlike this function, always acts on device ID 1.\n */\nextern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char\n                                                              *device,\n                                                              int iscapture,\n                                                              const\n                                                              SDL_AudioSpec *\n                                                              desired,\n                                                              SDL_AudioSpec *\n                                                              obtained,\n                                                              int\n                                                              allowed_changes);\n\n\n\n/**\n *  \\name Audio state\n *\n *  Get the current audio state.\n */\n/* @{ */\ntypedef enum\n{\n    SDL_AUDIO_STOPPED = 0,\n    SDL_AUDIO_PLAYING,\n    SDL_AUDIO_PAUSED\n} SDL_AudioStatus;\nextern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void);\n\nextern DECLSPEC SDL_AudioStatus SDLCALL\nSDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);\n/* @} *//* Audio State */\n\n/**\n *  \\name Pause audio functions\n *\n *  These functions pause and unpause the audio callback processing.\n *  They should be called with a parameter of 0 after opening the audio\n *  device to start playing sound.  This is so you can safely initialize\n *  data for your callback function after opening the audio device.\n *  Silence will be written to the audio device during the pause.\n */\n/* @{ */\nextern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on);\nextern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev,\n                                                  int pause_on);\n/* @} *//* Pause audio functions */\n\n/**\n *  \\brief Load the audio data of a WAVE file into memory\n *\n *  Loading a WAVE file requires \\c src, \\c spec, \\c audio_buf and \\c audio_len\n *  to be valid pointers. The entire data portion of the file is then loaded\n *  into memory and decoded if necessary.\n *\n *  If \\c freesrc is non-zero, the data source gets automatically closed and\n *  freed before the function returns.\n *\n *  Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),\n *  IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and\n *  µ-law (8 bits). Other formats are currently unsupported and cause an error.\n *\n *  If this function succeeds, the pointer returned by it is equal to \\c spec\n *  and the pointer to the audio data allocated by the function is written to\n *  \\c audio_buf and its length in bytes to \\c audio_len. The \\ref SDL_AudioSpec\n *  members \\c freq, \\c channels, and \\c format are set to the values of the\n *  audio data in the buffer. The \\c samples member is set to a sane default and\n *  all others are set to zero.\n *\n *  It's necessary to use SDL_FreeWAV() to free the audio data returned in\n *  \\c audio_buf when it is no longer used.\n *\n *  Because of the underspecification of the Waveform format, there are many\n *  problematic files in the wild that cause issues with strict decoders. To\n *  provide compatibility with these files, this decoder is lenient in regards\n *  to the truncation of the file, the fact chunk, and the size of the RIFF\n *  chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,\n *  and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the\n *  loading process.\n *\n *  Any file that is invalid (due to truncation, corruption, or wrong values in\n *  the headers), too big, or unsupported causes an error. Additionally, any\n *  critical I/O error from the data source will terminate the loading process\n *  with an error. The function returns NULL on error and in all cases (with the\n *  exception of \\c src being NULL), an appropriate error message will be set.\n *\n *  It is required that the data source supports seeking.\n *\n *  Example:\n *  \\code\n *      SDL_LoadWAV_RW(SDL_RWFromFile(\"sample.wav\", \"rb\"), 1, ...);\n *  \\endcode\n *\n *  \\param src The data source with the WAVE data\n *  \\param freesrc A integer value that makes the function close the data source if non-zero\n *  \\param spec A pointer filled with the audio format of the audio data\n *  \\param audio_buf A pointer filled with the audio data allocated by the function\n *  \\param audio_len A pointer filled with the length of the audio data buffer in bytes\n *  \\return NULL on error, or non-NULL on success.\n */\nextern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,\n                                                      int freesrc,\n                                                      SDL_AudioSpec * spec,\n                                                      Uint8 ** audio_buf,\n                                                      Uint32 * audio_len);\n\n/**\n *  Loads a WAV from a file.\n *  Compatibility convenience function.\n */\n#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \\\n    SDL_LoadWAV_RW(SDL_RWFromFile(file, \"rb\"),1, spec,audio_buf,audio_len)\n\n/**\n *  This function frees data previously allocated with SDL_LoadWAV_RW()\n */\nextern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf);\n\n/**\n *  This function takes a source format and rate and a destination format\n *  and rate, and initializes the \\c cvt structure with information needed\n *  by SDL_ConvertAudio() to convert a buffer of audio data from one format\n *  to the other. An unsupported format causes an error and -1 will be returned.\n *\n *  \\return 0 if no conversion is needed, 1 if the audio filter is set up,\n *  or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,\n                                              SDL_AudioFormat src_format,\n                                              Uint8 src_channels,\n                                              int src_rate,\n                                              SDL_AudioFormat dst_format,\n                                              Uint8 dst_channels,\n                                              int dst_rate);\n\n/**\n *  Once you have initialized the \\c cvt structure using SDL_BuildAudioCVT(),\n *  created an audio buffer \\c cvt->buf, and filled it with \\c cvt->len bytes of\n *  audio data in the source format, this function will convert it in-place\n *  to the desired format.\n *\n *  The data conversion may expand the size of the audio data, so the buffer\n *  \\c cvt->buf should be allocated after the \\c cvt structure is initialized by\n *  SDL_BuildAudioCVT(), and should be \\c cvt->len*cvt->len_mult bytes long.\n *\n *  \\return 0 on success or -1 if \\c cvt->buf is NULL.\n */\nextern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt);\n\n/* SDL_AudioStream is a new audio conversion interface.\n   The benefits vs SDL_AudioCVT:\n    - it can handle resampling data in chunks without generating\n      artifacts, when it doesn't have the complete buffer available.\n    - it can handle incoming data in any variable size.\n    - You push data as you have it, and pull it when you need it\n */\n/* this is opaque to the outside world. */\nstruct _SDL_AudioStream;\ntypedef struct _SDL_AudioStream SDL_AudioStream;\n\n/**\n *  Create a new audio stream\n *\n *  \\param src_format The format of the source audio\n *  \\param src_channels The number of channels of the source audio\n *  \\param src_rate The sampling rate of the source audio\n *  \\param dst_format The format of the desired audio output\n *  \\param dst_channels The number of channels of the desired audio output\n *  \\param dst_rate The sampling rate of the desired audio output\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,\n                                           const Uint8 src_channels,\n                                           const int src_rate,\n                                           const SDL_AudioFormat dst_format,\n                                           const Uint8 dst_channels,\n                                           const int dst_rate);\n\n/**\n *  Add data to be converted/resampled to the stream\n *\n *  \\param stream The stream the audio data is being added to\n *  \\param buf A pointer to the audio data to add\n *  \\param len The number of bytes to write to the stream\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len);\n\n/**\n *  Get converted/resampled data from the stream\n *\n *  \\param stream The stream the audio is being requested from\n *  \\param buf A buffer to fill with audio data\n *  \\param len The maximum number of bytes to fill\n *  \\return The number of bytes read from the stream, or -1 on error\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len);\n\n/**\n * Get the number of converted/resampled bytes available. The stream may be\n *  buffering data behind the scenes until it has enough to resample\n *  correctly, so this number might be lower than what you expect, or even\n *  be zero. Add more data or flush the stream if you need the data now.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream);\n\n/**\n * Tell the stream that you're done sending data, and anything being buffered\n *  should be converted/resampled and made available immediately.\n *\n * It is legal to add more data to a stream after flushing, but there will\n *  be audio gaps in the output. Generally this is intended to signal the\n *  end of input, so the complete output becomes available.\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamClear\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream);\n\n/**\n *  Clear any pending data in the stream without converting it\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_FreeAudioStream\n */\nextern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream);\n\n/**\n * Free an audio stream\n *\n *  \\sa SDL_NewAudioStream\n *  \\sa SDL_AudioStreamPut\n *  \\sa SDL_AudioStreamGet\n *  \\sa SDL_AudioStreamAvailable\n *  \\sa SDL_AudioStreamFlush\n *  \\sa SDL_AudioStreamClear\n */\nextern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream);\n\n#define SDL_MIX_MAXVOLUME 128\n/**\n *  This takes two audio buffers of the playing audio format and mixes\n *  them, performing addition, volume adjustment, and overflow clipping.\n *  The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME\n *  for full audio volume.  Note this does not change hardware volume.\n *  This is provided for convenience -- you can mix your own audio data.\n */\nextern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src,\n                                          Uint32 len, int volume);\n\n/**\n *  This works like SDL_MixAudio(), but you specify the audio format instead of\n *  using the format of audio device 1. Thus it can be used when no audio\n *  device is open at all.\n */\nextern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,\n                                                const Uint8 * src,\n                                                SDL_AudioFormat format,\n                                                Uint32 len, int volume);\n\n/**\n *  Queue more audio on non-callback devices.\n *\n *  (If you are looking to retrieve queued audio from a non-callback capture\n *  device, you want SDL_DequeueAudio() instead. This will return -1 to\n *  signify an error if you use it with capture devices.)\n *\n *  SDL offers two ways to feed audio to the device: you can either supply a\n *  callback that SDL triggers with some frequency to obtain more audio\n *  (pull method), or you can supply no callback, and then SDL will expect\n *  you to supply data at regular intervals (push method) with this function.\n *\n *  There are no limits on the amount of data you can queue, short of\n *  exhaustion of address space. Queued data will drain to the device as\n *  necessary without further intervention from you. If the device needs\n *  audio but there is not enough queued, it will play silence to make up\n *  the difference. This means you will have skips in your audio playback\n *  if you aren't routinely queueing sufficient data.\n *\n *  This function copies the supplied data, so you are safe to free it when\n *  the function returns. This function is thread-safe, but queueing to the\n *  same device from two threads at once does not promise which buffer will\n *  be queued first.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; doing so returns an error. You have to use the audio callback\n *  or queue audio with this function, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before queueing; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID to which we will queue audio.\n *  \\param data The data to queue to the device for later playback.\n *  \\param len The number of bytes (not samples!) to which (data) points.\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetQueuedAudioSize\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);\n\n/**\n *  Dequeue more audio on non-callback devices.\n *\n *  (If you are looking to queue audio for output on a non-callback playback\n *  device, you want SDL_QueueAudio() instead. This will always return 0\n *  if you use it with playback devices.)\n *\n *  SDL offers two ways to retrieve audio from a capture device: you can\n *  either supply a callback that SDL triggers with some frequency as the\n *  device records more audio data, (push method), or you can supply no\n *  callback, and then SDL will expect you to retrieve data at regular\n *  intervals (pull method) with this function.\n *\n *  There are no limits on the amount of data you can queue, short of\n *  exhaustion of address space. Data from the device will keep queuing as\n *  necessary without further intervention from you. This means you will\n *  eventually run out of memory if you aren't routinely dequeueing data.\n *\n *  Capture devices will not queue data when paused; if you are expecting\n *  to not need captured audio for some length of time, use\n *  SDL_PauseAudioDevice() to stop the capture device from queueing more\n *  data. This can be useful during, say, level loading times. When\n *  unpaused, capture devices will start queueing data from that point,\n *  having flushed any capturable data available while paused.\n *\n *  This function is thread-safe, but dequeueing from the same device from\n *  two threads at once does not promise which thread will dequeued data\n *  first.\n *\n *  You may not dequeue audio from a device that is using an\n *  application-supplied callback; doing so returns an error. You have to use\n *  the audio callback, or dequeue audio with this function, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before queueing; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID from which we will dequeue audio.\n *  \\param data A pointer into where audio data should be copied.\n *  \\param len The number of bytes (not samples!) to which (data) points.\n *  \\return number of bytes dequeued, which could be less than requested.\n *\n *  \\sa SDL_GetQueuedAudioSize\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, void *data, Uint32 len);\n\n/**\n *  Get the number of bytes of still-queued audio.\n *\n *  For playback device:\n *\n *    This is the number of bytes that have been queued for playback with\n *    SDL_QueueAudio(), but have not yet been sent to the hardware. This\n *    number may shrink at any time, so this only informs of pending data.\n *\n *    Once we've sent it to the hardware, this function can not decide the\n *    exact byte boundary of what has been played. It's possible that we just\n *    gave the hardware several kilobytes right before you called this\n *    function, but it hasn't played any of it yet, or maybe half of it, etc.\n *\n *  For capture devices:\n *\n *    This is the number of bytes that have been captured by the device and\n *    are waiting for you to dequeue. This number may grow at any time, so\n *    this only informs of the lower-bound of available data.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; calling this function on such a device always returns 0.\n *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use\n *  the audio callback, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before querying; SDL\n *  handles locking internally for this function.\n *\n *  \\param dev The device ID of which we will query queued audio size.\n *  \\return Number of bytes (not samples!) of queued audio.\n *\n *  \\sa SDL_QueueAudio\n *  \\sa SDL_ClearQueuedAudio\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);\n\n/**\n *  Drop any queued audio data. For playback devices, this is any queued data\n *  still waiting to be submitted to the hardware. For capture devices, this\n *  is any data that was queued by the device that hasn't yet been dequeued by\n *  the application.\n *\n *  Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For\n *  playback devices, the hardware will start playing silence if more audio\n *  isn't queued. Unpaused capture devices will start filling the queue again\n *  as soon as they have more data available (which, depending on the state\n *  of the hardware and the thread, could be before this function call\n *  returns!).\n *\n *  This will not prevent playback of queued audio that's already been sent\n *  to the hardware, as we can not undo that, so expect there to be some\n *  fraction of a second of audio that might still be heard. This can be\n *  useful if you want to, say, drop any pending music during a level change\n *  in your game.\n *\n *  You may not queue audio on a device that is using an application-supplied\n *  callback; calling this function on such a device is always a no-op.\n *  You have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use\n *  the audio callback, but not both.\n *\n *  You should not call SDL_LockAudio() on the device before clearing the\n *  queue; SDL handles locking internally for this function.\n *\n *  This function always succeeds and thus returns void.\n *\n *  \\param dev The device ID of which to clear the audio queue.\n *\n *  \\sa SDL_QueueAudio\n *  \\sa SDL_GetQueuedAudioSize\n */\nextern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);\n\n\n/**\n *  \\name Audio lock functions\n *\n *  The lock manipulated by these functions protects the callback function.\n *  During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that\n *  the callback function is not running.  Do not call these from the callback\n *  function or you will cause deadlock.\n */\n/* @{ */\nextern DECLSPEC void SDLCALL SDL_LockAudio(void);\nextern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev);\nextern DECLSPEC void SDLCALL SDL_UnlockAudio(void);\nextern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev);\n/* @} *//* Audio lock functions */\n\n/**\n *  This function shuts down audio processing and closes the audio device.\n */\nextern DECLSPEC void SDLCALL SDL_CloseAudio(void);\nextern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_audio_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_bits.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_bits.h\n *\n *  Functions for fiddling with bits and bitmasks.\n */\n\n#ifndef SDL_bits_h_\n#define SDL_bits_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_bits.h\n */\n\n/**\n *  Get the index of the most significant bit. Result is undefined when called\n *  with 0. This operation can also be stated as \"count leading zeroes\" and\n *  \"log base 2\".\n *\n *  \\return Index of the most significant bit, or -1 if the value is 0.\n */\n#if defined(__WATCOMC__) && defined(__386__)\nextern _inline int _SDL_clz_watcom (Uint32);\n#pragma aux _SDL_clz_watcom = \\\n    \"bsr eax, eax\" \\\n    \"xor eax, 31\" \\\n    parm [eax] nomemory \\\n    value [eax] \\\n    modify exact [eax] nomemory;\n#endif\n\nSDL_FORCE_INLINE int\nSDL_MostSignificantBitIndex32(Uint32 x)\n{\n#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))\n    /* Count Leading Zeroes builtin in GCC.\n     * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html\n     */\n    if (x == 0) {\n        return -1;\n    }\n    return 31 - __builtin_clz(x);\n#elif defined(__WATCOMC__) && defined(__386__)\n    if (x == 0) {\n        return -1;\n    }\n    return 31 - _SDL_clz_watcom(x);\n#else\n    /* Based off of Bit Twiddling Hacks by Sean Eron Anderson\n     * <seander@cs.stanford.edu>, released in the public domain.\n     * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog\n     */\n    const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};\n    const int    S[] = {1, 2, 4, 8, 16};\n\n    int msbIndex = 0;\n    int i;\n\n    if (x == 0) {\n        return -1;\n    }\n\n    for (i = 4; i >= 0; i--)\n    {\n        if (x & b[i])\n        {\n            x >>= S[i];\n            msbIndex |= S[i];\n        }\n    }\n\n    return msbIndex;\n#endif\n}\n\nSDL_FORCE_INLINE SDL_bool\nSDL_HasExactlyOneBitSet32(Uint32 x)\n{\n    if (x && !(x & (x - 1))) {\n        return SDL_TRUE;\n    }\n    return SDL_FALSE;\n}\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_bits_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_blendmode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_blendmode.h\n *\n *  Header file declaring the SDL_BlendMode enumeration\n */\n\n#ifndef SDL_blendmode_h_\n#define SDL_blendmode_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The blend mode used in SDL_RenderCopy() and drawing operations.\n */\ntypedef enum\n{\n    SDL_BLENDMODE_NONE = 0x00000000,     /**< no blending\n                                              dstRGBA = srcRGBA */\n    SDL_BLENDMODE_BLEND = 0x00000001,    /**< alpha blending\n                                              dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))\n                                              dstA = srcA + (dstA * (1-srcA)) */\n    SDL_BLENDMODE_ADD = 0x00000002,      /**< additive blending\n                                              dstRGB = (srcRGB * srcA) + dstRGB\n                                              dstA = dstA */\n    SDL_BLENDMODE_MOD = 0x00000004,      /**< color modulate\n                                              dstRGB = srcRGB * dstRGB\n                                              dstA = dstA */\n    SDL_BLENDMODE_INVALID = 0x7FFFFFFF\n\n    /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */\n\n} SDL_BlendMode;\n\n/**\n *  \\brief The blend operation used when combining source and destination pixel components\n */\ntypedef enum\n{\n    SDL_BLENDOPERATION_ADD              = 0x1,  /**< dst + src: supported by all renderers */\n    SDL_BLENDOPERATION_SUBTRACT         = 0x2,  /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */\n    SDL_BLENDOPERATION_REV_SUBTRACT     = 0x3,  /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */\n    SDL_BLENDOPERATION_MINIMUM          = 0x4,  /**< min(dst, src) : supported by D3D11 */\n    SDL_BLENDOPERATION_MAXIMUM          = 0x5   /**< max(dst, src) : supported by D3D11 */\n\n} SDL_BlendOperation;\n\n/**\n *  \\brief The normalized factor used to multiply pixel components\n */\ntypedef enum\n{\n    SDL_BLENDFACTOR_ZERO                = 0x1,  /**< 0, 0, 0, 0 */\n    SDL_BLENDFACTOR_ONE                 = 0x2,  /**< 1, 1, 1, 1 */\n    SDL_BLENDFACTOR_SRC_COLOR           = 0x3,  /**< srcR, srcG, srcB, srcA */\n    SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4,  /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */\n    SDL_BLENDFACTOR_SRC_ALPHA           = 0x5,  /**< srcA, srcA, srcA, srcA */\n    SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6,  /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */\n    SDL_BLENDFACTOR_DST_COLOR           = 0x7,  /**< dstR, dstG, dstB, dstA */\n    SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8,  /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */\n    SDL_BLENDFACTOR_DST_ALPHA           = 0x9,  /**< dstA, dstA, dstA, dstA */\n    SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA   /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */\n\n} SDL_BlendFactor;\n\n/**\n *  \\brief Create a custom blend mode, which may or may not be supported by a given renderer\n *\n *  \\param srcColorFactor source color factor\n *  \\param dstColorFactor destination color factor\n *  \\param colorOperation color operation\n *  \\param srcAlphaFactor source alpha factor\n *  \\param dstAlphaFactor destination alpha factor\n *  \\param alphaOperation alpha operation\n *\n *  The result of the blend mode operation will be:\n *      dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor\n *  and\n *      dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor\n */\nextern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,\n                                                                 SDL_BlendFactor dstColorFactor,\n                                                                 SDL_BlendOperation colorOperation,\n                                                                 SDL_BlendFactor srcAlphaFactor,\n                                                                 SDL_BlendFactor dstAlphaFactor,\n                                                                 SDL_BlendOperation alphaOperation);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_blendmode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_clipboard.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n * \\file SDL_clipboard.h\n *\n * Include file for SDL clipboard handling\n */\n\n#ifndef SDL_clipboard_h_\n#define SDL_clipboard_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n/**\n * \\brief Put UTF-8 text into the clipboard\n *\n * \\sa SDL_GetClipboardText()\n */\nextern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);\n\n/**\n * \\brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()\n *\n * \\sa SDL_SetClipboardText()\n */\nextern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);\n\n/**\n * \\brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty\n *\n * \\sa SDL_GetClipboardText()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_clipboard_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_config.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_config_windows_h_\n#define SDL_config_windows_h_\n#define SDL_config_h_\n\n#include \"SDL_platform.h\"\n\n/* This is a set of defines to configure the SDL features */\n\n#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)\n#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)\n#define HAVE_STDINT_H   1\n#elif defined(_MSC_VER)\ntypedef signed __int8 int8_t;\ntypedef unsigned __int8 uint8_t;\ntypedef signed __int16 int16_t;\ntypedef unsigned __int16 uint16_t;\ntypedef signed __int32 int32_t;\ntypedef unsigned __int32 uint32_t;\ntypedef signed __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#ifndef _UINTPTR_T_DEFINED\n#ifdef  _WIN64\ntypedef unsigned __int64 uintptr_t;\n#else\ntypedef unsigned int uintptr_t;\n#endif\n#define _UINTPTR_T_DEFINED\n#endif\n/* Older Visual C++ headers don't have the Win64-compatible typedefs... */\n#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))\n#define DWORD_PTR DWORD\n#endif\n#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))\n#define LONG_PTR LONG\n#endif\n#else /* !__GNUC__ && !_MSC_VER */\ntypedef signed char int8_t;\ntypedef unsigned char uint8_t;\ntypedef signed short int16_t;\ntypedef unsigned short uint16_t;\ntypedef signed int int32_t;\ntypedef unsigned int uint32_t;\ntypedef signed long long int64_t;\ntypedef unsigned long long uint64_t;\n#ifndef _SIZE_T_DEFINED_\n#define _SIZE_T_DEFINED_\ntypedef unsigned int size_t;\n#endif\ntypedef unsigned int uintptr_t;\n#endif /* __GNUC__ || _MSC_VER */\n#endif /* !_STDINT_H_ && !HAVE_STDINT_H */\n\n#ifdef _WIN64\n# define SIZEOF_VOIDP 8\n#else\n# define SIZEOF_VOIDP 4\n#endif\n\n#define HAVE_DDRAW_H 1\n#define HAVE_DINPUT_H 1\n#define HAVE_DSOUND_H 1\n#define HAVE_DXGI_H 1\n#define HAVE_XINPUT_H 1\n#define HAVE_MMDEVICEAPI_H 1\n#define HAVE_AUDIOCLIENT_H 1\n#define HAVE_ENDPOINTVOLUME_H 1\n\n/* This is disabled by default to avoid C runtime dependencies and manifest requirements */\n#ifdef HAVE_LIBC\n/* Useful headers */\n#define STDC_HEADERS 1\n#define HAVE_CTYPE_H 1\n#define HAVE_FLOAT_H 1\n#define HAVE_LIMITS_H 1\n#define HAVE_MATH_H 1\n#define HAVE_SIGNAL_H 1\n#define HAVE_STDIO_H 1\n#define HAVE_STRING_H 1\n\n/* C library functions */\n#define HAVE_MALLOC 1\n#define HAVE_CALLOC 1\n#define HAVE_REALLOC 1\n#define HAVE_FREE 1\n#define HAVE_ALLOCA 1\n#define HAVE_QSORT 1\n#define HAVE_ABS 1\n#define HAVE_MEMSET 1\n#define HAVE_MEMCPY 1\n#define HAVE_MEMMOVE 1\n#define HAVE_MEMCMP 1\n#define HAVE_STRLEN 1\n#define HAVE__STRREV 1\n/* These functions have security warnings, so we won't use them */\n/* #undef HAVE__STRUPR */\n/* #undef HAVE__STRLWR */\n#define HAVE_STRCHR 1\n#define HAVE_STRRCHR 1\n#define HAVE_STRSTR 1\n/* These functions have security warnings, so we won't use them */\n/* #undef HAVE__LTOA */\n/* #undef HAVE__ULTOA */\n#define HAVE_STRTOL 1\n#define HAVE_STRTOUL 1\n#define HAVE_STRTOD 1\n#define HAVE_ATOI 1\n#define HAVE_ATOF 1\n#define HAVE_STRCMP 1\n#define HAVE_STRNCMP 1\n#define HAVE__STRICMP 1\n#define HAVE__STRNICMP 1\n#define HAVE_ACOS   1\n#define HAVE_ACOSF  1\n#define HAVE_ASIN   1\n#define HAVE_ASINF  1\n#define HAVE_ATAN   1\n#define HAVE_ATANF  1\n#define HAVE_ATAN2  1\n#define HAVE_ATAN2F 1\n#define HAVE_CEILF  1\n#define HAVE__COPYSIGN  1\n#define HAVE_COS    1\n#define HAVE_COSF   1\n#define HAVE_EXP    1\n#define HAVE_EXPF   1\n#define HAVE_FABS   1\n#define HAVE_FABSF  1\n#define HAVE_FLOOR  1\n#define HAVE_FLOORF 1\n#define HAVE_FMOD   1\n#define HAVE_FMODF  1\n#define HAVE_LOG    1\n#define HAVE_LOGF   1\n#define HAVE_LOG10  1\n#define HAVE_LOG10F 1\n#define HAVE_POW    1\n#define HAVE_POWF   1\n#define HAVE_SIN    1\n#define HAVE_SINF   1\n#define HAVE_SQRT   1\n#define HAVE_SQRTF  1\n#define HAVE_TAN    1\n#define HAVE_TANF   1\n#if defined(_MSC_VER)\n/* These functions were added with the VC++ 2013 C runtime library */\n#if _MSC_VER >= 1800\n#define HAVE_STRTOLL 1\n#define HAVE_VSSCANF 1\n#define HAVE_SCALBN 1\n#define HAVE_SCALBNF    1\n#endif\n/* This function is available with at least the VC++ 2008 C runtime library */\n#if _MSC_VER >= 1400\n#define HAVE__FSEEKI64 1\n#endif\n#endif\n#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)\n#define HAVE_M_PI 1\n#endif\n#else\n#define HAVE_STDARG_H   1\n#define HAVE_STDDEF_H   1\n#endif\n\n/* Enable various audio drivers */\n#define SDL_AUDIO_DRIVER_WASAPI 1\n#define SDL_AUDIO_DRIVER_DSOUND 1\n#define SDL_AUDIO_DRIVER_WINMM  1\n#define SDL_AUDIO_DRIVER_DISK   1\n#define SDL_AUDIO_DRIVER_DUMMY  1\n\n/* Enable various input drivers */\n#define SDL_JOYSTICK_DINPUT 1\n#define SDL_JOYSTICK_XINPUT 1\n#define SDL_JOYSTICK_HIDAPI 1\n#define SDL_HAPTIC_DINPUT   1\n#define SDL_HAPTIC_XINPUT   1\n\n/* Enable the dummy sensor driver */\n#define SDL_SENSOR_DUMMY  1\n\n/* Enable various shared object loading systems */\n#define SDL_LOADSO_WINDOWS  1\n\n/* Enable various threading systems */\n#define SDL_THREAD_WINDOWS  1\n\n/* Enable various timer systems */\n#define SDL_TIMER_WINDOWS   1\n\n/* Enable various video drivers */\n#define SDL_VIDEO_DRIVER_DUMMY  1\n#define SDL_VIDEO_DRIVER_WINDOWS    1\n\n#ifndef SDL_VIDEO_RENDER_D3D\n#define SDL_VIDEO_RENDER_D3D    1\n#endif\n#ifndef SDL_VIDEO_RENDER_D3D11\n#define SDL_VIDEO_RENDER_D3D11  0\n#endif\n\n/* Enable OpenGL support */\n#ifndef SDL_VIDEO_OPENGL\n#define SDL_VIDEO_OPENGL    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_WGL\n#define SDL_VIDEO_OPENGL_WGL    1\n#endif\n#ifndef SDL_VIDEO_RENDER_OGL\n#define SDL_VIDEO_RENDER_OGL    1\n#endif\n#ifndef SDL_VIDEO_RENDER_OGL_ES2\n#define SDL_VIDEO_RENDER_OGL_ES2    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_ES2\n#define SDL_VIDEO_OPENGL_ES2    1\n#endif\n#ifndef SDL_VIDEO_OPENGL_EGL\n#define SDL_VIDEO_OPENGL_EGL    1\n#endif\n\n/* Enable Vulkan support */\n#define SDL_VIDEO_VULKAN 1\n\n/* Enable system power support */\n#define SDL_POWER_WINDOWS 1\n\n/* Enable filesystem support */\n#define SDL_FILESYSTEM_WINDOWS  1\n\n/* Enable assembly routines (Win64 doesn't have inline asm) */\n#ifndef _WIN64\n#define SDL_ASSEMBLY_ROUTINES   1\n#endif\n\n#endif /* SDL_config_windows_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_cpuinfo.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_cpuinfo.h\n *\n *  CPU feature detection for SDL.\n */\n\n#ifndef SDL_cpuinfo_h_\n#define SDL_cpuinfo_h_\n\n#include \"SDL_stdinc.h\"\n\n/* Need to do this here because intrin.h has C++ code in it */\n/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */\n#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))\n#ifdef __clang__\n/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */\n#undef __MMX__\n#undef __SSE__\n#undef __SSE2__\n#else\n#include <intrin.h>\n#ifndef _WIN64\n#ifndef __MMX__\n#define __MMX__\n#endif\n#ifndef __3dNOW__\n#define __3dNOW__\n#endif\n#endif\n#ifndef __SSE__\n#define __SSE__\n#endif\n#ifndef __SSE2__\n#define __SSE2__\n#endif\n#endif /* __clang__ */\n#elif defined(__MINGW64_VERSION_MAJOR)\n#include <intrin.h>\n#else\n/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */\n#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)\n#include <altivec.h>\n#endif\n#if !defined(SDL_DISABLE_ARM_NEON_H)\n#  if defined(__ARM_NEON)\n#    include <arm_neon.h>\n#  elif defined(__WINDOWS__) || defined(__WINRT__)\n/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */\n#    if defined(_M_ARM)\n#      include <armintr.h>\n#      include <arm_neon.h>\n#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */\n#    endif\n#    if defined (_M_ARM64)\n#      include <armintr.h>\n#      include <arm_neon.h>\n#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */\n#    endif\n#  endif\n#endif\n#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)\n#include <mm3dnow.h>\n#endif\n#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)\n#include <immintrin.h>\n#else\n#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)\n#include <mmintrin.h>\n#endif\n#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)\n#include <xmmintrin.h>\n#endif\n#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)\n#include <emmintrin.h>\n#endif\n#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)\n#include <pmmintrin.h>\n#endif\n#endif /* HAVE_IMMINTRIN_H */\n#endif /* compiler version */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* This is a guess for the cacheline size used for padding.\n * Most x86 processors have a 64 byte cache line.\n * The 64-bit PowerPC processors have a 128 byte cache line.\n * We'll use the larger value to be generally safe.\n */\n#define SDL_CACHELINE_SIZE  128\n\n/**\n *  This function returns the number of CPU cores available.\n */\nextern DECLSPEC int SDLCALL SDL_GetCPUCount(void);\n\n/**\n *  This function returns the L1 cache line size of the CPU\n *\n *  This is useful for determining multi-threaded structure padding\n *  or SIMD prefetch sizes.\n */\nextern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);\n\n/**\n *  This function returns true if the CPU has the RDTSC instruction.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);\n\n/**\n *  This function returns true if the CPU has AltiVec features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);\n\n/**\n *  This function returns true if the CPU has MMX features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);\n\n/**\n *  This function returns true if the CPU has 3DNow! features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);\n\n/**\n *  This function returns true if the CPU has SSE features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);\n\n/**\n *  This function returns true if the CPU has SSE2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);\n\n/**\n *  This function returns true if the CPU has SSE3 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);\n\n/**\n *  This function returns true if the CPU has SSE4.1 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);\n\n/**\n *  This function returns true if the CPU has SSE4.2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);\n\n/**\n *  This function returns true if the CPU has AVX features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);\n\n/**\n *  This function returns true if the CPU has AVX2 features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);\n\n/**\n *  This function returns true if the CPU has AVX-512F (foundation) features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);\n\n/**\n *  This function returns true if the CPU has NEON (ARM SIMD) features.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);\n\n/**\n *  This function returns the amount of RAM configured in the system, in MB.\n */\nextern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);\n\n/**\n * \\brief Report the alignment this system needs for SIMD allocations.\n *\n * This will return the minimum number of bytes to which a pointer must be\n *  aligned to be compatible with SIMD instructions on the current machine.\n *  For example, if the machine supports SSE only, it will return 16, but if\n *  it supports AVX-512F, it'll return 64 (etc). This only reports values for\n *  instruction sets SDL knows about, so if your SDL build doesn't have\n *  SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and\n *  not 64 for the AVX-512 instructions that exist but SDL doesn't know about.\n *  Plan accordingly.\n */\nextern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);\n\n/**\n * \\brief Allocate memory in a SIMD-friendly way.\n *\n * This will allocate a block of memory that is suitable for use with SIMD\n *  instructions. Specifically, it will be properly aligned and padded for\n *  the system's supported vector instructions.\n *\n * The memory returned will be padded such that it is safe to read or write\n *  an incomplete vector at the end of the memory block. This can be useful\n *  so you don't have to drop back to a scalar fallback at the end of your\n *  SIMD processing loop to deal with the final elements without overflowing\n *  the allocated buffer.\n *\n * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()\n *  or delete[], etc.\n *\n * Note that SDL will only deal with SIMD instruction sets it is aware of;\n *  for example, SDL 2.0.8 knows that SSE wants 16-byte vectors\n *  (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't\n *  know that AVX-512 wants 64. To be clear: if you can't decide to use an\n *  instruction set with an SDL_Has*() function, don't use that instruction\n *  set with memory allocated through here.\n *\n * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't\n *  out of memory.\n *\n *  \\param len The length, in bytes, of the block to allocated. The actual\n *             allocated block might be larger due to padding, etc.\n * \\return Pointer to newly-allocated block, NULL if out of memory.\n *\n * \\sa SDL_SIMDAlignment\n * \\sa SDL_SIMDFree\n */\nextern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);\n\n/**\n * \\brief Deallocate memory obtained from SDL_SIMDAlloc\n *\n * It is not valid to use this function on a pointer from anything but\n *  SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,\n *  SDL_malloc, memalign, new[], etc.\n *\n * However, SDL_SIMDFree(NULL) is a legal no-op.\n *\n * \\sa SDL_SIMDAlloc\n */\nextern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);\n\n/* vi: set ts=4 sw=4 expandtab: */\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_cpuinfo_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_egl.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_egl.h\n *\n *  This is a simple file to encapsulate the EGL API headers.\n */\n#if !defined(_MSC_VER) && !defined(__ANDROID__)\n\n#include <EGL/egl.h>\n#include <EGL/eglext.h>\n\n#else /* _MSC_VER */\n\n/* EGL headers for Visual Studio */\n\n#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Khronos platform-specific types and definitions.\n*\n* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $\n*\n* Adopters may modify this file to suit their platform. Adopters are\n* encouraged to submit platform specific modifications to the Khronos\n* group so that they can be included in future versions of this file.\n* Please submit changes by sending them to the public Khronos Bugzilla\n* (http://khronos.org/bugzilla) by filing a bug against product\n* \"Khronos (general)\" component \"Registry\".\n*\n* A predefined template which fills in some of the bug fields can be\n* reached using http://tinyurl.com/khrplatform-h-bugreport, but you\n* must create a Bugzilla login first.\n*\n*\n* See the Implementer's Guidelines for information about where this file\n* should be located on your system and for more details of its use:\n*    http://www.khronos.org/registry/implementers_guide.pdf\n*\n* This file should be included as\n*        #include <KHR/khrplatform.h>\n* by Khronos client API header files that use its types and defines.\n*\n* The types in khrplatform.h should only be used to define API-specific types.\n*\n* Types defined in khrplatform.h:\n*    khronos_int8_t              signed   8  bit\n*    khronos_uint8_t             unsigned 8  bit\n*    khronos_int16_t             signed   16 bit\n*    khronos_uint16_t            unsigned 16 bit\n*    khronos_int32_t             signed   32 bit\n*    khronos_uint32_t            unsigned 32 bit\n*    khronos_int64_t             signed   64 bit\n*    khronos_uint64_t            unsigned 64 bit\n*    khronos_intptr_t            signed   same number of bits as a pointer\n*    khronos_uintptr_t           unsigned same number of bits as a pointer\n*    khronos_ssize_t             signed   size\n*    khronos_usize_t             unsigned size\n*    khronos_float_t             signed   32 bit floating point\n*    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\n*    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\n*                                         nanoseconds\n*    khronos_stime_nanoseconds_t signed time interval in nanoseconds\n*    khronos_boolean_enum_t      enumerated boolean type. This should\n*      only be used as a base type when a client API's boolean type is\n*      an enum. Client APIs which use an integer or other type for\n*      booleans cannot use this as the base type for their boolean.\n*\n* Tokens defined in khrplatform.h:\n*\n*    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\n*\n*    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\n*    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\n*\n* Calling convention macros defined in this file:\n*    KHRONOS_APICALL\n*    KHRONOS_APIENTRY\n*    KHRONOS_APIATTRIBUTES\n*\n* These may be used in function prototypes as:\n*\n*      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\n*                                  int arg1,\n*                                  int arg2) KHRONOS_APIATTRIBUTES;\n*/\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APICALL\n*-------------------------------------------------------------------------\n* This precedes the return type of the function in the function prototype.\n*/\n#if defined(_WIN32) && !defined(__SCITECH_SNAP__) && !defined(SDL_VIDEO_STATIC_ANGLE)\n#   define KHRONOS_APICALL __declspec(dllimport)\n#elif defined (__SYMBIAN32__)\n#   define KHRONOS_APICALL IMPORT_C\n#else\n#   define KHRONOS_APICALL\n#endif\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APIENTRY\n*-------------------------------------------------------------------------\n* This follows the return type of the function  and precedes the function\n* name in the function prototype.\n*/\n#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\n/* Win32 but not WinCE */\n#   define KHRONOS_APIENTRY __stdcall\n#else\n#   define KHRONOS_APIENTRY\n#endif\n\n/*-------------------------------------------------------------------------\n* Definition of KHRONOS_APIATTRIBUTES\n*-------------------------------------------------------------------------\n* This follows the closing parenthesis of the function prototype arguments.\n*/\n#if defined (__ARMCC_2__)\n#define KHRONOS_APIATTRIBUTES __softfp\n#else\n#define KHRONOS_APIATTRIBUTES\n#endif\n\n/*-------------------------------------------------------------------------\n* basic type definitions\n*-----------------------------------------------------------------------*/\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\n\n\n/*\n* Using <stdint.h>\n*/\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__VMS ) || defined(__sgi)\n\n/*\n* Using <inttypes.h>\n*/\n#include <inttypes.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\n\n/*\n* Win32\n*/\ntypedef __int32                 khronos_int32_t;\ntypedef unsigned __int32        khronos_uint32_t;\ntypedef __int64                 khronos_int64_t;\ntypedef unsigned __int64        khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__sun__) || defined(__digital__)\n\n/*\n* Sun or Digital\n*/\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int                khronos_int64_t;\ntypedef unsigned long int       khronos_uint64_t;\n#else\ntypedef long long int           khronos_int64_t;\ntypedef unsigned long long int  khronos_uint64_t;\n#endif /* __arch64__ */\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif 0\n\n/*\n* Hypothetical platform with no float or int64 support\n*/\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#define KHRONOS_SUPPORT_INT64   0\n#define KHRONOS_SUPPORT_FLOAT   0\n\n#else\n\n/*\n* Generic fallback\n*/\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#endif\n\n\n/*\n* Types that are (so far) the same on all platforms\n*/\ntypedef signed   char          khronos_int8_t;\ntypedef unsigned char          khronos_uint8_t;\ntypedef signed   short int     khronos_int16_t;\ntypedef unsigned short int     khronos_uint16_t;\n\n/*\n* Types that differ between LLP64 and LP64 architectures - in LLP64,\n* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears\n* to be the only LLP64 architecture in current use.\n*/\n#ifdef _WIN64\ntypedef signed   long long int khronos_intptr_t;\ntypedef unsigned long long int khronos_uintptr_t;\ntypedef signed   long long int khronos_ssize_t;\ntypedef unsigned long long int khronos_usize_t;\n#else\ntypedef signed   long  int     khronos_intptr_t;\ntypedef unsigned long  int     khronos_uintptr_t;\ntypedef signed   long  int     khronos_ssize_t;\ntypedef unsigned long  int     khronos_usize_t;\n#endif\n\n#if KHRONOS_SUPPORT_FLOAT\n/*\n* Float type\n*/\ntypedef          float         khronos_float_t;\n#endif\n\n#if KHRONOS_SUPPORT_INT64\n/* Time types\n*\n* These types can be used to represent a time interval in nanoseconds or\n* an absolute Unadjusted System Time.  Unadjusted System Time is the number\n* of nanoseconds since some arbitrary system event (e.g. since the last\n* time the system booted).  The Unadjusted System Time is an unsigned\n* 64 bit value that wraps back to 0 every 584 years.  Time intervals\n* may be either signed or unsigned.\n*/\ntypedef khronos_uint64_t       khronos_utime_nanoseconds_t;\ntypedef khronos_int64_t        khronos_stime_nanoseconds_t;\n#endif\n\n/*\n* Dummy value used to pad enum types to 32 bits.\n*/\n#ifndef KHRONOS_MAX_ENUM\n#define KHRONOS_MAX_ENUM 0x7FFFFFFF\n#endif\n\n/*\n* Enumerated boolean type\n*\n* Values other than zero should be considered to be true.  Therefore\n* comparisons should not be made against KHRONOS_TRUE.\n*/\ntypedef enum {\n    KHRONOS_FALSE = 0,\n    KHRONOS_TRUE = 1,\n    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\n} khronos_boolean_enum_t;\n\n#endif /* __khrplatform_h_ */\n\n\n#ifndef __eglplatform_h_\n#define __eglplatform_h_\n\n/*\n** Copyright (c) 2007-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Platform-specific types and definitions for egl.h\n* $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $\n*\n* Adopters may modify khrplatform.h and this file to suit their platform.\n* You are encouraged to submit all modifications to the Khronos group so that\n* they can be included in future versions of this file.  Please submit changes\n* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)\n* by filing a bug against product \"EGL\" component \"Registry\".\n*/\n\n/*#include <KHR/khrplatform.h>*/\n\n/* Macros used in EGL function prototype declarations.\n*\n* EGL functions should be prototyped as:\n*\n* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);\n* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);\n*\n* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h\n*/\n\n#ifndef EGLAPI\n#define EGLAPI KHRONOS_APICALL\n#endif\n\n#ifndef EGLAPIENTRY\n#define EGLAPIENTRY  KHRONOS_APIENTRY\n#endif\n#define EGLAPIENTRYP EGLAPIENTRY*\n\n/* The types NativeDisplayType, NativeWindowType, and NativePixmapType\n* are aliases of window-system-dependent types, such as X Display * or\n* Windows Device Context. They must be defined in platform-specific\n* code below. The EGL-prefixed versions of Native*Type are the same\n* types, renamed in EGL 1.3 so all types in the API start with \"EGL\".\n*\n* Khronos STRONGLY RECOMMENDS that you use the default definitions\n* provided below, since these changes affect both binary and source\n* portability of applications using EGL running on different EGL\n* implementations.\n*/\n\n#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#include <windows.h>\n\n#if __WINRT__\n#include <Unknwn.h>\ntypedef IUnknown * EGLNativeWindowType;\ntypedef IUnknown * EGLNativePixmapType;\ntypedef IUnknown * EGLNativeDisplayType;\n#else\ntypedef HDC     EGLNativeDisplayType;\ntypedef HBITMAP EGLNativePixmapType;\ntypedef HWND    EGLNativeWindowType;\n#endif\n\n#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */\n\ntypedef int   EGLNativeDisplayType;\ntypedef void *EGLNativeWindowType;\ntypedef void *EGLNativePixmapType;\n\n#elif defined(WL_EGL_PLATFORM)\n\ntypedef struct wl_display     *EGLNativeDisplayType;\ntypedef struct wl_egl_pixmap  *EGLNativePixmapType;\ntypedef struct wl_egl_window  *EGLNativeWindowType;\n\n#elif defined(__GBM__)\n\ntypedef struct gbm_device  *EGLNativeDisplayType;\ntypedef struct gbm_bo      *EGLNativePixmapType;\ntypedef void               *EGLNativeWindowType;\n\n#elif defined(__ANDROID__) /* Android */\n\nstruct ANativeWindow;\nstruct egl_native_pixmap_t;\n\ntypedef struct ANativeWindow        *EGLNativeWindowType;\ntypedef struct egl_native_pixmap_t  *EGLNativePixmapType;\ntypedef void                        *EGLNativeDisplayType;\n\n#elif defined(MIR_EGL_PLATFORM)\n\n#include <mir_toolkit/mir_client_library.h>\ntypedef MirEGLNativeDisplayType EGLNativeDisplayType;\ntypedef void                   *EGLNativePixmapType;\ntypedef MirEGLNativeWindowType  EGLNativeWindowType;\n\n#elif defined(__unix__)\n\n#ifdef MESA_EGL_NO_X11_HEADERS\n\ntypedef void            *EGLNativeDisplayType;\ntypedef khronos_uintptr_t EGLNativePixmapType;\ntypedef khronos_uintptr_t EGLNativeWindowType;\n\n#else\n\n/* X11 (tentative)  */\n#include <X11/Xlib.h>\n#include <X11/Xutil.h>\n\ntypedef Display *EGLNativeDisplayType;\ntypedef Pixmap   EGLNativePixmapType;\ntypedef Window   EGLNativeWindowType;\n\n#endif /* MESA_EGL_NO_X11_HEADERS */\n\n#else\n#error \"Platform not recognized\"\n#endif\n\n/* EGL 1.2 types, renamed for consistency in EGL 1.3 */\ntypedef EGLNativeDisplayType NativeDisplayType;\ntypedef EGLNativePixmapType  NativePixmapType;\ntypedef EGLNativeWindowType  NativeWindowType;\n\n\n/* Define EGLint. This must be a signed integral type large enough to contain\n* all legal attribute names and values passed into and out of EGL, whether\n* their type is boolean, bitmask, enumerant (symbolic constant), integer,\n* handle, or other.  While in general a 32-bit integer will suffice, if\n* handles are 64 bit types, then EGLint should be defined as a signed 64-bit\n* integer type.\n*/\ntypedef khronos_int32_t EGLint;\n\n#endif /* __eglplatform_h */\n\n#ifndef __egl_h_\n#define __egl_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2015 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $\n*/\n\n/*#include <EGL/eglplatform.h>*/\n\n/* Generated on date 20150623 */\n\n/* Generated C header for:\n * API: egl\n * Versions considered: .*\n * Versions emitted: .*\n * Default extensions included: None\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef EGL_VERSION_1_0\n#define EGL_VERSION_1_0 1\ntypedef unsigned int EGLBoolean;\ntypedef void *EGLDisplay;\ntypedef void *EGLConfig;\ntypedef void *EGLSurface;\ntypedef void *EGLContext;\ntypedef void (*__eglMustCastToProperFunctionPointerType)(void);\n#define EGL_ALPHA_SIZE                    0x3021\n#define EGL_BAD_ACCESS                    0x3002\n#define EGL_BAD_ALLOC                     0x3003\n#define EGL_BAD_ATTRIBUTE                 0x3004\n#define EGL_BAD_CONFIG                    0x3005\n#define EGL_BAD_CONTEXT                   0x3006\n#define EGL_BAD_CURRENT_SURFACE           0x3007\n#define EGL_BAD_DISPLAY                   0x3008\n#define EGL_BAD_MATCH                     0x3009\n#define EGL_BAD_NATIVE_PIXMAP             0x300A\n#define EGL_BAD_NATIVE_WINDOW             0x300B\n#define EGL_BAD_PARAMETER                 0x300C\n#define EGL_BAD_SURFACE                   0x300D\n#define EGL_BLUE_SIZE                     0x3022\n#define EGL_BUFFER_SIZE                   0x3020\n#define EGL_CONFIG_CAVEAT                 0x3027\n#define EGL_CONFIG_ID                     0x3028\n#define EGL_CORE_NATIVE_ENGINE            0x305B\n#define EGL_DEPTH_SIZE                    0x3025\n#define EGL_DONT_CARE                     ((EGLint)-1)\n#define EGL_DRAW                          0x3059\n#define EGL_EXTENSIONS                    0x3055\n#define EGL_FALSE                         0\n#define EGL_GREEN_SIZE                    0x3023\n#define EGL_HEIGHT                        0x3056\n#define EGL_LARGEST_PBUFFER               0x3058\n#define EGL_LEVEL                         0x3029\n#define EGL_MAX_PBUFFER_HEIGHT            0x302A\n#define EGL_MAX_PBUFFER_PIXELS            0x302B\n#define EGL_MAX_PBUFFER_WIDTH             0x302C\n#define EGL_NATIVE_RENDERABLE             0x302D\n#define EGL_NATIVE_VISUAL_ID              0x302E\n#define EGL_NATIVE_VISUAL_TYPE            0x302F\n#define EGL_NONE                          0x3038\n#define EGL_NON_CONFORMANT_CONFIG         0x3051\n#define EGL_NOT_INITIALIZED               0x3001\n#define EGL_NO_CONTEXT                    ((EGLContext)0)\n#define EGL_NO_DISPLAY                    ((EGLDisplay)0)\n#define EGL_NO_SURFACE                    ((EGLSurface)0)\n#define EGL_PBUFFER_BIT                   0x0001\n#define EGL_PIXMAP_BIT                    0x0002\n#define EGL_READ                          0x305A\n#define EGL_RED_SIZE                      0x3024\n#define EGL_SAMPLES                       0x3031\n#define EGL_SAMPLE_BUFFERS                0x3032\n#define EGL_SLOW_CONFIG                   0x3050\n#define EGL_STENCIL_SIZE                  0x3026\n#define EGL_SUCCESS                       0x3000\n#define EGL_SURFACE_TYPE                  0x3033\n#define EGL_TRANSPARENT_BLUE_VALUE        0x3035\n#define EGL_TRANSPARENT_GREEN_VALUE       0x3036\n#define EGL_TRANSPARENT_RED_VALUE         0x3037\n#define EGL_TRANSPARENT_RGB               0x3052\n#define EGL_TRANSPARENT_TYPE              0x3034\n#define EGL_TRUE                          1\n#define EGL_VENDOR                        0x3053\n#define EGL_VERSION                       0x3054\n#define EGL_WIDTH                         0x3057\n#define EGL_WINDOW_BIT                    0x0004\nEGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);\nEGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);\nEGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);\nEGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);\nEGLAPI EGLint EGLAPIENTRY eglGetError (void);\nEGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);\nEGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);\nEGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);\nEGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);\nEGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);\n#endif /* EGL_VERSION_1_0 */\n\n#ifndef EGL_VERSION_1_1\n#define EGL_VERSION_1_1 1\n#define EGL_BACK_BUFFER                   0x3084\n#define EGL_BIND_TO_TEXTURE_RGB           0x3039\n#define EGL_BIND_TO_TEXTURE_RGBA          0x303A\n#define EGL_CONTEXT_LOST                  0x300E\n#define EGL_MIN_SWAP_INTERVAL             0x303B\n#define EGL_MAX_SWAP_INTERVAL             0x303C\n#define EGL_MIPMAP_TEXTURE                0x3082\n#define EGL_MIPMAP_LEVEL                  0x3083\n#define EGL_NO_TEXTURE                    0x305C\n#define EGL_TEXTURE_2D                    0x305F\n#define EGL_TEXTURE_FORMAT                0x3080\n#define EGL_TEXTURE_RGB                   0x305D\n#define EGL_TEXTURE_RGBA                  0x305E\n#define EGL_TEXTURE_TARGET                0x3081\nEGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);\nEGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);\nEGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);\n#endif /* EGL_VERSION_1_1 */\n\n#ifndef EGL_VERSION_1_2\n#define EGL_VERSION_1_2 1\ntypedef unsigned int EGLenum;\ntypedef void *EGLClientBuffer;\n#define EGL_ALPHA_FORMAT                  0x3088\n#define EGL_ALPHA_FORMAT_NONPRE           0x308B\n#define EGL_ALPHA_FORMAT_PRE              0x308C\n#define EGL_ALPHA_MASK_SIZE               0x303E\n#define EGL_BUFFER_PRESERVED              0x3094\n#define EGL_BUFFER_DESTROYED              0x3095\n#define EGL_CLIENT_APIS                   0x308D\n#define EGL_COLORSPACE                    0x3087\n#define EGL_COLORSPACE_sRGB               0x3089\n#define EGL_COLORSPACE_LINEAR             0x308A\n#define EGL_COLOR_BUFFER_TYPE             0x303F\n#define EGL_CONTEXT_CLIENT_TYPE           0x3097\n#define EGL_DISPLAY_SCALING               10000\n#define EGL_HORIZONTAL_RESOLUTION         0x3090\n#define EGL_LUMINANCE_BUFFER              0x308F\n#define EGL_LUMINANCE_SIZE                0x303D\n#define EGL_OPENGL_ES_BIT                 0x0001\n#define EGL_OPENVG_BIT                    0x0002\n#define EGL_OPENGL_ES_API                 0x30A0\n#define EGL_OPENVG_API                    0x30A1\n#define EGL_OPENVG_IMAGE                  0x3096\n#define EGL_PIXEL_ASPECT_RATIO            0x3092\n#define EGL_RENDERABLE_TYPE               0x3040\n#define EGL_RENDER_BUFFER                 0x3086\n#define EGL_RGB_BUFFER                    0x308E\n#define EGL_SINGLE_BUFFER                 0x3085\n#define EGL_SWAP_BEHAVIOR                 0x3093\n#define EGL_UNKNOWN                       ((EGLint)-1)\n#define EGL_VERTICAL_RESOLUTION           0x3091\nEGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);\nEGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);\n#endif /* EGL_VERSION_1_2 */\n\n#ifndef EGL_VERSION_1_3\n#define EGL_VERSION_1_3 1\n#define EGL_CONFORMANT                    0x3042\n#define EGL_CONTEXT_CLIENT_VERSION        0x3098\n#define EGL_MATCH_NATIVE_PIXMAP           0x3041\n#define EGL_OPENGL_ES2_BIT                0x0004\n#define EGL_VG_ALPHA_FORMAT               0x3088\n#define EGL_VG_ALPHA_FORMAT_NONPRE        0x308B\n#define EGL_VG_ALPHA_FORMAT_PRE           0x308C\n#define EGL_VG_ALPHA_FORMAT_PRE_BIT       0x0040\n#define EGL_VG_COLORSPACE                 0x3087\n#define EGL_VG_COLORSPACE_sRGB            0x3089\n#define EGL_VG_COLORSPACE_LINEAR          0x308A\n#define EGL_VG_COLORSPACE_LINEAR_BIT      0x0020\n#endif /* EGL_VERSION_1_3 */\n\n#ifndef EGL_VERSION_1_4\n#define EGL_VERSION_1_4 1\n#define EGL_DEFAULT_DISPLAY               ((EGLNativeDisplayType)0)\n#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT   0x0200\n#define EGL_MULTISAMPLE_RESOLVE           0x3099\n#define EGL_MULTISAMPLE_RESOLVE_DEFAULT   0x309A\n#define EGL_MULTISAMPLE_RESOLVE_BOX       0x309B\n#define EGL_OPENGL_API                    0x30A2\n#define EGL_OPENGL_BIT                    0x0008\n#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT   0x0400\nEGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);\n#endif /* EGL_VERSION_1_4 */\n\n#ifndef EGL_VERSION_1_5\n#define EGL_VERSION_1_5 1\ntypedef void *EGLSync;\ntypedef intptr_t EGLAttrib;\ntypedef khronos_utime_nanoseconds_t EGLTime;\ntypedef void *EGLImage;\n#define EGL_CONTEXT_MAJOR_VERSION         0x3098\n#define EGL_CONTEXT_MINOR_VERSION         0x30FB\n#define EGL_CONTEXT_OPENGL_PROFILE_MASK   0x30FD\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD\n#define EGL_NO_RESET_NOTIFICATION         0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET         0x31BF\n#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001\n#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define EGL_CONTEXT_OPENGL_DEBUG          0x31B0\n#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS  0x31B2\n#define EGL_OPENGL_ES3_BIT                0x00000040\n#define EGL_CL_EVENT_HANDLE               0x309C\n#define EGL_SYNC_CL_EVENT                 0x30FE\n#define EGL_SYNC_CL_EVENT_COMPLETE        0x30FF\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE  0x30F0\n#define EGL_SYNC_TYPE                     0x30F7\n#define EGL_SYNC_STATUS                   0x30F1\n#define EGL_SYNC_CONDITION                0x30F8\n#define EGL_SIGNALED                      0x30F2\n#define EGL_UNSIGNALED                    0x30F3\n#define EGL_SYNC_FLUSH_COMMANDS_BIT       0x0001\n#define EGL_FOREVER                       0xFFFFFFFFFFFFFFFFull\n#define EGL_TIMEOUT_EXPIRED               0x30F5\n#define EGL_CONDITION_SATISFIED           0x30F6\n#define EGL_NO_SYNC                       ((EGLSync)0)\n#define EGL_SYNC_FENCE                    0x30F9\n#define EGL_GL_COLORSPACE                 0x309D\n#define EGL_GL_COLORSPACE_SRGB            0x3089\n#define EGL_GL_COLORSPACE_LINEAR          0x308A\n#define EGL_GL_RENDERBUFFER               0x30B9\n#define EGL_GL_TEXTURE_2D                 0x30B1\n#define EGL_GL_TEXTURE_LEVEL              0x30BC\n#define EGL_GL_TEXTURE_3D                 0x30B2\n#define EGL_GL_TEXTURE_ZOFFSET            0x30BD\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8\n#define EGL_IMAGE_PRESERVED               0x30D2\n#define EGL_NO_IMAGE                      ((EGLImage)0)\nEGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);\nEGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);\nEGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);\n#endif /* EGL_VERSION_1_5 */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __egl_h_ */\n\n\n\n#ifndef __eglext_h_\n#define __eglext_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2015 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $\n*/\n\n/*#include <EGL/eglplatform.h>*/\n\n#define EGL_EGLEXT_VERSION 20150623\n\n/* Generated C header for:\n * API: egl\n * Versions considered: .*\n * Versions emitted: _nomatch_^\n * Default extensions included: egl\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef EGL_KHR_cl_event\n#define EGL_KHR_cl_event 1\n#define EGL_CL_EVENT_HANDLE_KHR           0x309C\n#define EGL_SYNC_CL_EVENT_KHR             0x30FE\n#define EGL_SYNC_CL_EVENT_COMPLETE_KHR    0x30FF\n#endif /* EGL_KHR_cl_event */\n\n#ifndef EGL_KHR_cl_event2\n#define EGL_KHR_cl_event2 1\ntypedef void *EGLSyncKHR;\ntypedef intptr_t EGLAttribKHR;\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);\n#endif\n#endif /* EGL_KHR_cl_event2 */\n\n#ifndef EGL_KHR_client_get_all_proc_addresses\n#define EGL_KHR_client_get_all_proc_addresses 1\n#endif /* EGL_KHR_client_get_all_proc_addresses */\n\n#ifndef EGL_KHR_config_attribs\n#define EGL_KHR_config_attribs 1\n#define EGL_CONFORMANT_KHR                0x3042\n#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR  0x0020\n#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR   0x0040\n#endif /* EGL_KHR_config_attribs */\n\n#ifndef EGL_KHR_create_context\n#define EGL_KHR_create_context 1\n#define EGL_CONTEXT_MAJOR_VERSION_KHR     0x3098\n#define EGL_CONTEXT_MINOR_VERSION_KHR     0x30FB\n#define EGL_CONTEXT_FLAGS_KHR             0x30FC\n#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD\n#define EGL_NO_RESET_NOTIFICATION_KHR     0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET_KHR     0x31BF\n#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR  0x00000001\n#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004\n#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001\n#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002\n#define EGL_OPENGL_ES3_BIT_KHR            0x00000040\n#endif /* EGL_KHR_create_context */\n\n#ifndef EGL_KHR_create_context_no_error\n#define EGL_KHR_create_context_no_error 1\n#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR   0x31B3\n#endif /* EGL_KHR_create_context_no_error */\n\n#ifndef EGL_KHR_fence_sync\n#define EGL_KHR_fence_sync 1\ntypedef khronos_utime_nanoseconds_t EGLTimeKHR;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0\n#define EGL_SYNC_CONDITION_KHR            0x30F8\n#define EGL_SYNC_FENCE_KHR                0x30F9\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);\ntypedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_fence_sync */\n\n#ifndef EGL_KHR_get_all_proc_addresses\n#define EGL_KHR_get_all_proc_addresses 1\n#endif /* EGL_KHR_get_all_proc_addresses */\n\n#ifndef EGL_KHR_gl_colorspace\n#define EGL_KHR_gl_colorspace 1\n#define EGL_GL_COLORSPACE_KHR             0x309D\n#define EGL_GL_COLORSPACE_SRGB_KHR        0x3089\n#define EGL_GL_COLORSPACE_LINEAR_KHR      0x308A\n#endif /* EGL_KHR_gl_colorspace */\n\n#ifndef EGL_KHR_gl_renderbuffer_image\n#define EGL_KHR_gl_renderbuffer_image 1\n#define EGL_GL_RENDERBUFFER_KHR           0x30B9\n#endif /* EGL_KHR_gl_renderbuffer_image */\n\n#ifndef EGL_KHR_gl_texture_2D_image\n#define EGL_KHR_gl_texture_2D_image 1\n#define EGL_GL_TEXTURE_2D_KHR             0x30B1\n#define EGL_GL_TEXTURE_LEVEL_KHR          0x30BC\n#endif /* EGL_KHR_gl_texture_2D_image */\n\n#ifndef EGL_KHR_gl_texture_3D_image\n#define EGL_KHR_gl_texture_3D_image 1\n#define EGL_GL_TEXTURE_3D_KHR             0x30B2\n#define EGL_GL_TEXTURE_ZOFFSET_KHR        0x30BD\n#endif /* EGL_KHR_gl_texture_3D_image */\n\n#ifndef EGL_KHR_gl_texture_cubemap_image\n#define EGL_KHR_gl_texture_cubemap_image 1\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6\n#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7\n#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8\n#endif /* EGL_KHR_gl_texture_cubemap_image */\n\n#ifndef EGL_KHR_image\n#define EGL_KHR_image 1\ntypedef void *EGLImageKHR;\n#define EGL_NATIVE_PIXMAP_KHR             0x30B0\n#define EGL_NO_IMAGE_KHR                  ((EGLImageKHR)0)\ntypedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);\n#endif\n#endif /* EGL_KHR_image */\n\n#ifndef EGL_KHR_image_base\n#define EGL_KHR_image_base 1\n#define EGL_IMAGE_PRESERVED_KHR           0x30D2\n#endif /* EGL_KHR_image_base */\n\n#ifndef EGL_KHR_image_pixmap\n#define EGL_KHR_image_pixmap 1\n#endif /* EGL_KHR_image_pixmap */\n\n#ifndef EGL_KHR_lock_surface\n#define EGL_KHR_lock_surface 1\n#define EGL_READ_SURFACE_BIT_KHR          0x0001\n#define EGL_WRITE_SURFACE_BIT_KHR         0x0002\n#define EGL_LOCK_SURFACE_BIT_KHR          0x0080\n#define EGL_OPTIMAL_FORMAT_BIT_KHR        0x0100\n#define EGL_MATCH_FORMAT_KHR              0x3043\n#define EGL_FORMAT_RGB_565_EXACT_KHR      0x30C0\n#define EGL_FORMAT_RGB_565_KHR            0x30C1\n#define EGL_FORMAT_RGBA_8888_EXACT_KHR    0x30C2\n#define EGL_FORMAT_RGBA_8888_KHR          0x30C3\n#define EGL_MAP_PRESERVE_PIXELS_KHR       0x30C4\n#define EGL_LOCK_USAGE_HINT_KHR           0x30C5\n#define EGL_BITMAP_POINTER_KHR            0x30C6\n#define EGL_BITMAP_PITCH_KHR              0x30C7\n#define EGL_BITMAP_ORIGIN_KHR             0x30C8\n#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR   0x30C9\n#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA\n#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR  0x30CB\n#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC\n#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD\n#define EGL_LOWER_LEFT_KHR                0x30CE\n#define EGL_UPPER_LEFT_KHR                0x30CF\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);\n#endif\n#endif /* EGL_KHR_lock_surface */\n\n#ifndef EGL_KHR_lock_surface2\n#define EGL_KHR_lock_surface2 1\n#define EGL_BITMAP_PIXEL_SIZE_KHR         0x3110\n#endif /* EGL_KHR_lock_surface2 */\n\n#ifndef EGL_KHR_lock_surface3\n#define EGL_KHR_lock_surface3 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);\n#endif\n#endif /* EGL_KHR_lock_surface3 */\n\n#ifndef EGL_KHR_partial_update\n#define EGL_KHR_partial_update 1\n#define EGL_BUFFER_AGE_KHR                0x313D\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_KHR_partial_update */\n\n#ifndef EGL_KHR_platform_android\n#define EGL_KHR_platform_android 1\n#define EGL_PLATFORM_ANDROID_KHR          0x3141\n#endif /* EGL_KHR_platform_android */\n\n#ifndef EGL_KHR_platform_gbm\n#define EGL_KHR_platform_gbm 1\n#define EGL_PLATFORM_GBM_KHR              0x31D7\n#endif /* EGL_KHR_platform_gbm */\n\n#ifndef EGL_KHR_platform_wayland\n#define EGL_KHR_platform_wayland 1\n#define EGL_PLATFORM_WAYLAND_KHR          0x31D8\n#endif /* EGL_KHR_platform_wayland */\n\n#ifndef EGL_KHR_platform_x11\n#define EGL_KHR_platform_x11 1\n#define EGL_PLATFORM_X11_KHR              0x31D5\n#define EGL_PLATFORM_X11_SCREEN_KHR       0x31D6\n#endif /* EGL_KHR_platform_x11 */\n\n#ifndef EGL_KHR_reusable_sync\n#define EGL_KHR_reusable_sync 1\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_STATUS_KHR               0x30F1\n#define EGL_SIGNALED_KHR                  0x30F2\n#define EGL_UNSIGNALED_KHR                0x30F3\n#define EGL_TIMEOUT_EXPIRED_KHR           0x30F5\n#define EGL_CONDITION_SATISFIED_KHR       0x30F6\n#define EGL_SYNC_TYPE_KHR                 0x30F7\n#define EGL_SYNC_REUSABLE_KHR             0x30FA\n#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR   0x0001\n#define EGL_FOREVER_KHR                   0xFFFFFFFFFFFFFFFFull\n#define EGL_NO_SYNC_KHR                   ((EGLSyncKHR)0)\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_reusable_sync */\n\n#ifndef EGL_KHR_stream\n#define EGL_KHR_stream 1\ntypedef void *EGLStreamKHR;\ntypedef khronos_uint64_t EGLuint64KHR;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_NO_STREAM_KHR                 ((EGLStreamKHR)0)\n#define EGL_CONSUMER_LATENCY_USEC_KHR     0x3210\n#define EGL_PRODUCER_FRAME_KHR            0x3212\n#define EGL_CONSUMER_FRAME_KHR            0x3213\n#define EGL_STREAM_STATE_KHR              0x3214\n#define EGL_STREAM_STATE_CREATED_KHR      0x3215\n#define EGL_STREAM_STATE_CONNECTING_KHR   0x3216\n#define EGL_STREAM_STATE_EMPTY_KHR        0x3217\n#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218\n#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219\n#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A\n#define EGL_BAD_STREAM_KHR                0x321B\n#define EGL_BAD_STATE_KHR                 0x321C\ntypedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_KHR_stream */\n\n#ifndef EGL_KHR_stream_consumer_gltexture\n#define EGL_KHR_stream_consumer_gltexture 1\n#ifdef EGL_KHR_stream\n#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_consumer_gltexture */\n\n#ifndef EGL_KHR_stream_cross_process_fd\n#define EGL_KHR_stream_cross_process_fd 1\ntypedef int EGLNativeFileDescriptorKHR;\n#ifdef EGL_KHR_stream\n#define EGL_NO_FILE_DESCRIPTOR_KHR        ((EGLNativeFileDescriptorKHR)(-1))\ntypedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);\ntypedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);\nEGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_cross_process_fd */\n\n#ifndef EGL_KHR_stream_fifo\n#define EGL_KHR_stream_fifo 1\n#ifdef EGL_KHR_stream\n#define EGL_STREAM_FIFO_LENGTH_KHR        0x31FC\n#define EGL_STREAM_TIME_NOW_KHR           0x31FD\n#define EGL_STREAM_TIME_CONSUMER_KHR      0x31FE\n#define EGL_STREAM_TIME_PRODUCER_KHR      0x31FF\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_fifo */\n\n#ifndef EGL_KHR_stream_producer_aldatalocator\n#define EGL_KHR_stream_producer_aldatalocator 1\n#ifdef EGL_KHR_stream\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_producer_aldatalocator */\n\n#ifndef EGL_KHR_stream_producer_eglsurface\n#define EGL_KHR_stream_producer_eglsurface 1\n#ifdef EGL_KHR_stream\n#define EGL_STREAM_BIT_KHR                0x0800\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);\n#endif\n#endif /* EGL_KHR_stream */\n#endif /* EGL_KHR_stream_producer_eglsurface */\n\n#ifndef EGL_KHR_surfaceless_context\n#define EGL_KHR_surfaceless_context 1\n#endif /* EGL_KHR_surfaceless_context */\n\n#ifndef EGL_KHR_swap_buffers_with_damage\n#define EGL_KHR_swap_buffers_with_damage 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_KHR_swap_buffers_with_damage */\n\n#ifndef EGL_KHR_vg_parent_image\n#define EGL_KHR_vg_parent_image 1\n#define EGL_VG_PARENT_IMAGE_KHR           0x30BA\n#endif /* EGL_KHR_vg_parent_image */\n\n#ifndef EGL_KHR_wait_sync\n#define EGL_KHR_wait_sync 1\ntypedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);\n#endif\n#endif /* EGL_KHR_wait_sync */\n\n#ifndef EGL_ANDROID_blob_cache\n#define EGL_ANDROID_blob_cache 1\ntypedef khronos_ssize_t EGLsizeiANDROID;\ntypedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);\ntypedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);\ntypedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);\n#endif\n#endif /* EGL_ANDROID_blob_cache */\n\n#ifndef EGL_ANDROID_framebuffer_target\n#define EGL_ANDROID_framebuffer_target 1\n#define EGL_FRAMEBUFFER_TARGET_ANDROID    0x3147\n#endif /* EGL_ANDROID_framebuffer_target */\n\n#ifndef EGL_ANDROID_image_native_buffer\n#define EGL_ANDROID_image_native_buffer 1\n#define EGL_NATIVE_BUFFER_ANDROID         0x3140\n#endif /* EGL_ANDROID_image_native_buffer */\n\n#ifndef EGL_ANDROID_native_fence_sync\n#define EGL_ANDROID_native_fence_sync 1\n#define EGL_SYNC_NATIVE_FENCE_ANDROID     0x3144\n#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID  0x3145\n#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146\n#define EGL_NO_NATIVE_FENCE_FD_ANDROID    -1\ntypedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);\n#endif\n#endif /* EGL_ANDROID_native_fence_sync */\n\n#ifndef EGL_ANDROID_recordable\n#define EGL_ANDROID_recordable 1\n#define EGL_RECORDABLE_ANDROID            0x3142\n#endif /* EGL_ANDROID_recordable */\n\n#ifndef EGL_ANGLE_d3d_share_handle_client_buffer\n#define EGL_ANGLE_d3d_share_handle_client_buffer 1\n#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200\n#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */\n\n#ifndef EGL_ANGLE_device_d3d\n#define EGL_ANGLE_device_d3d 1\n#define EGL_D3D9_DEVICE_ANGLE             0x33A0\n#define EGL_D3D11_DEVICE_ANGLE            0x33A1\n#endif /* EGL_ANGLE_device_d3d */\n\n#ifndef EGL_ANGLE_query_surface_pointer\n#define EGL_ANGLE_query_surface_pointer 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);\n#endif\n#endif /* EGL_ANGLE_query_surface_pointer */\n\n#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle\n#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1\n#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */\n\n#ifndef EGL_ANGLE_window_fixed_size\n#define EGL_ANGLE_window_fixed_size 1\n#define EGL_FIXED_SIZE_ANGLE              0x3201\n#endif /* EGL_ANGLE_window_fixed_size */\n\n#ifndef EGL_ARM_pixmap_multisample_discard\n#define EGL_ARM_pixmap_multisample_discard 1\n#define EGL_DISCARD_SAMPLES_ARM           0x3286\n#endif /* EGL_ARM_pixmap_multisample_discard */\n\n#ifndef EGL_EXT_buffer_age\n#define EGL_EXT_buffer_age 1\n#define EGL_BUFFER_AGE_EXT                0x313D\n#endif /* EGL_EXT_buffer_age */\n\n#ifndef EGL_EXT_client_extensions\n#define EGL_EXT_client_extensions 1\n#endif /* EGL_EXT_client_extensions */\n\n#ifndef EGL_EXT_create_context_robustness\n#define EGL_EXT_create_context_robustness 1\n#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF\n#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138\n#define EGL_NO_RESET_NOTIFICATION_EXT     0x31BE\n#define EGL_LOSE_CONTEXT_ON_RESET_EXT     0x31BF\n#endif /* EGL_EXT_create_context_robustness */\n\n#ifndef EGL_EXT_device_base\n#define EGL_EXT_device_base 1\ntypedef void *EGLDeviceEXT;\n#define EGL_NO_DEVICE_EXT                 ((EGLDeviceEXT)(0))\n#define EGL_BAD_DEVICE_EXT                0x322B\n#define EGL_DEVICE_EXT                    0x322C\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);\n#endif\n#endif /* EGL_EXT_device_base */\n\n#ifndef EGL_EXT_device_drm\n#define EGL_EXT_device_drm 1\n#define EGL_DRM_DEVICE_FILE_EXT           0x3233\n#endif /* EGL_EXT_device_drm */\n\n#ifndef EGL_EXT_device_enumeration\n#define EGL_EXT_device_enumeration 1\n#endif /* EGL_EXT_device_enumeration */\n\n#ifndef EGL_EXT_device_openwf\n#define EGL_EXT_device_openwf 1\n#define EGL_OPENWF_DEVICE_ID_EXT          0x3237\n#endif /* EGL_EXT_device_openwf */\n\n#ifndef EGL_EXT_device_query\n#define EGL_EXT_device_query 1\n#endif /* EGL_EXT_device_query */\n\n#ifndef EGL_EXT_image_dma_buf_import\n#define EGL_EXT_image_dma_buf_import 1\n#define EGL_LINUX_DMA_BUF_EXT             0x3270\n#define EGL_LINUX_DRM_FOURCC_EXT          0x3271\n#define EGL_DMA_BUF_PLANE0_FD_EXT         0x3272\n#define EGL_DMA_BUF_PLANE0_OFFSET_EXT     0x3273\n#define EGL_DMA_BUF_PLANE0_PITCH_EXT      0x3274\n#define EGL_DMA_BUF_PLANE1_FD_EXT         0x3275\n#define EGL_DMA_BUF_PLANE1_OFFSET_EXT     0x3276\n#define EGL_DMA_BUF_PLANE1_PITCH_EXT      0x3277\n#define EGL_DMA_BUF_PLANE2_FD_EXT         0x3278\n#define EGL_DMA_BUF_PLANE2_OFFSET_EXT     0x3279\n#define EGL_DMA_BUF_PLANE2_PITCH_EXT      0x327A\n#define EGL_YUV_COLOR_SPACE_HINT_EXT      0x327B\n#define EGL_SAMPLE_RANGE_HINT_EXT         0x327C\n#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D\n#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E\n#define EGL_ITU_REC601_EXT                0x327F\n#define EGL_ITU_REC709_EXT                0x3280\n#define EGL_ITU_REC2020_EXT               0x3281\n#define EGL_YUV_FULL_RANGE_EXT            0x3282\n#define EGL_YUV_NARROW_RANGE_EXT          0x3283\n#define EGL_YUV_CHROMA_SITING_0_EXT       0x3284\n#define EGL_YUV_CHROMA_SITING_0_5_EXT     0x3285\n#endif /* EGL_EXT_image_dma_buf_import */\n\n#ifndef EGL_EXT_multiview_window\n#define EGL_EXT_multiview_window 1\n#define EGL_MULTIVIEW_VIEW_COUNT_EXT      0x3134\n#endif /* EGL_EXT_multiview_window */\n\n#ifndef EGL_EXT_output_base\n#define EGL_EXT_output_base 1\ntypedef void *EGLOutputLayerEXT;\ntypedef void *EGLOutputPortEXT;\n#define EGL_NO_OUTPUT_LAYER_EXT           ((EGLOutputLayerEXT)0)\n#define EGL_NO_OUTPUT_PORT_EXT            ((EGLOutputPortEXT)0)\n#define EGL_BAD_OUTPUT_LAYER_EXT          0x322D\n#define EGL_BAD_OUTPUT_PORT_EXT           0x322E\n#define EGL_SWAP_INTERVAL_EXT             0x322F\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);\ntypedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);\nEGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);\nEGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);\nEGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);\n#endif\n#endif /* EGL_EXT_output_base */\n\n#ifndef EGL_EXT_output_drm\n#define EGL_EXT_output_drm 1\n#define EGL_DRM_CRTC_EXT                  0x3234\n#define EGL_DRM_PLANE_EXT                 0x3235\n#define EGL_DRM_CONNECTOR_EXT             0x3236\n#endif /* EGL_EXT_output_drm */\n\n#ifndef EGL_EXT_output_openwf\n#define EGL_EXT_output_openwf 1\n#define EGL_OPENWF_PIPELINE_ID_EXT        0x3238\n#define EGL_OPENWF_PORT_ID_EXT            0x3239\n#endif /* EGL_EXT_output_openwf */\n\n#ifndef EGL_EXT_platform_base\n#define EGL_EXT_platform_base 1\ntypedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);\n#endif\n#endif /* EGL_EXT_platform_base */\n\n#ifndef EGL_EXT_platform_device\n#define EGL_EXT_platform_device 1\n#define EGL_PLATFORM_DEVICE_EXT           0x313F\n#endif /* EGL_EXT_platform_device */\n\n#ifndef EGL_EXT_platform_wayland\n#define EGL_EXT_platform_wayland 1\n#define EGL_PLATFORM_WAYLAND_EXT          0x31D8\n#endif /* EGL_EXT_platform_wayland */\n\n#ifndef EGL_EXT_platform_x11\n#define EGL_EXT_platform_x11 1\n#define EGL_PLATFORM_X11_EXT              0x31D5\n#define EGL_PLATFORM_X11_SCREEN_EXT       0x31D6\n#endif /* EGL_EXT_platform_x11 */\n\n#ifndef EGL_EXT_protected_surface\n#define EGL_EXT_protected_surface 1\n#define EGL_PROTECTED_CONTENT_EXT         0x32C0\n#endif /* EGL_EXT_protected_surface */\n\n#ifndef EGL_EXT_stream_consumer_egloutput\n#define EGL_EXT_stream_consumer_egloutput 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);\n#endif\n#endif /* EGL_EXT_stream_consumer_egloutput */\n\n#ifndef EGL_EXT_swap_buffers_with_damage\n#define EGL_EXT_swap_buffers_with_damage 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);\n#endif\n#endif /* EGL_EXT_swap_buffers_with_damage */\n\n#ifndef EGL_EXT_yuv_surface\n#define EGL_EXT_yuv_surface 1\n#define EGL_YUV_ORDER_EXT                 0x3301\n#define EGL_YUV_NUMBER_OF_PLANES_EXT      0x3311\n#define EGL_YUV_SUBSAMPLE_EXT             0x3312\n#define EGL_YUV_DEPTH_RANGE_EXT           0x3317\n#define EGL_YUV_CSC_STANDARD_EXT          0x330A\n#define EGL_YUV_PLANE_BPP_EXT             0x331A\n#define EGL_YUV_BUFFER_EXT                0x3300\n#define EGL_YUV_ORDER_YUV_EXT             0x3302\n#define EGL_YUV_ORDER_YVU_EXT             0x3303\n#define EGL_YUV_ORDER_YUYV_EXT            0x3304\n#define EGL_YUV_ORDER_UYVY_EXT            0x3305\n#define EGL_YUV_ORDER_YVYU_EXT            0x3306\n#define EGL_YUV_ORDER_VYUY_EXT            0x3307\n#define EGL_YUV_ORDER_AYUV_EXT            0x3308\n#define EGL_YUV_SUBSAMPLE_4_2_0_EXT       0x3313\n#define EGL_YUV_SUBSAMPLE_4_2_2_EXT       0x3314\n#define EGL_YUV_SUBSAMPLE_4_4_4_EXT       0x3315\n#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT   0x3318\n#define EGL_YUV_DEPTH_RANGE_FULL_EXT      0x3319\n#define EGL_YUV_CSC_STANDARD_601_EXT      0x330B\n#define EGL_YUV_CSC_STANDARD_709_EXT      0x330C\n#define EGL_YUV_CSC_STANDARD_2020_EXT     0x330D\n#define EGL_YUV_PLANE_BPP_0_EXT           0x331B\n#define EGL_YUV_PLANE_BPP_8_EXT           0x331C\n#define EGL_YUV_PLANE_BPP_10_EXT          0x331D\n#endif /* EGL_EXT_yuv_surface */\n\n#ifndef EGL_HI_clientpixmap\n#define EGL_HI_clientpixmap 1\nstruct EGLClientPixmapHI {\n    void  *pData;\n    EGLint iWidth;\n    EGLint iHeight;\n    EGLint iStride;\n};\n#define EGL_CLIENT_PIXMAP_POINTER_HI      0x8F74\ntypedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);\n#endif\n#endif /* EGL_HI_clientpixmap */\n\n#ifndef EGL_HI_colorformats\n#define EGL_HI_colorformats 1\n#define EGL_COLOR_FORMAT_HI               0x8F70\n#define EGL_COLOR_RGB_HI                  0x8F71\n#define EGL_COLOR_RGBA_HI                 0x8F72\n#define EGL_COLOR_ARGB_HI                 0x8F73\n#endif /* EGL_HI_colorformats */\n\n#ifndef EGL_IMG_context_priority\n#define EGL_IMG_context_priority 1\n#define EGL_CONTEXT_PRIORITY_LEVEL_IMG    0x3100\n#define EGL_CONTEXT_PRIORITY_HIGH_IMG     0x3101\n#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG   0x3102\n#define EGL_CONTEXT_PRIORITY_LOW_IMG      0x3103\n#endif /* EGL_IMG_context_priority */\n\n#ifndef EGL_MESA_drm_image\n#define EGL_MESA_drm_image 1\n#define EGL_DRM_BUFFER_FORMAT_MESA        0x31D0\n#define EGL_DRM_BUFFER_USE_MESA           0x31D1\n#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2\n#define EGL_DRM_BUFFER_MESA               0x31D3\n#define EGL_DRM_BUFFER_STRIDE_MESA        0x31D4\n#define EGL_DRM_BUFFER_USE_SCANOUT_MESA   0x00000001\n#define EGL_DRM_BUFFER_USE_SHARE_MESA     0x00000002\ntypedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);\n#endif\n#endif /* EGL_MESA_drm_image */\n\n#ifndef EGL_MESA_image_dma_buf_export\n#define EGL_MESA_image_dma_buf_export 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);\nEGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);\n#endif\n#endif /* EGL_MESA_image_dma_buf_export */\n\n#ifndef EGL_MESA_platform_gbm\n#define EGL_MESA_platform_gbm 1\n#define EGL_PLATFORM_GBM_MESA             0x31D7\n#endif /* EGL_MESA_platform_gbm */\n\n#ifndef EGL_NOK_swap_region\n#define EGL_NOK_swap_region 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#endif\n#endif /* EGL_NOK_swap_region */\n\n#ifndef EGL_NOK_swap_region2\n#define EGL_NOK_swap_region2 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);\n#endif\n#endif /* EGL_NOK_swap_region2 */\n\n#ifndef EGL_NOK_texture_from_pixmap\n#define EGL_NOK_texture_from_pixmap 1\n#define EGL_Y_INVERTED_NOK                0x307F\n#endif /* EGL_NOK_texture_from_pixmap */\n\n#ifndef EGL_NV_3dvision_surface\n#define EGL_NV_3dvision_surface 1\n#define EGL_AUTO_STEREO_NV                0x3136\n#endif /* EGL_NV_3dvision_surface */\n\n#ifndef EGL_NV_coverage_sample\n#define EGL_NV_coverage_sample 1\n#define EGL_COVERAGE_BUFFERS_NV           0x30E0\n#define EGL_COVERAGE_SAMPLES_NV           0x30E1\n#endif /* EGL_NV_coverage_sample */\n\n#ifndef EGL_NV_coverage_sample_resolve\n#define EGL_NV_coverage_sample_resolve 1\n#define EGL_COVERAGE_SAMPLE_RESOLVE_NV    0x3131\n#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132\n#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133\n#endif /* EGL_NV_coverage_sample_resolve */\n\n#ifndef EGL_NV_cuda_event\n#define EGL_NV_cuda_event 1\n#define EGL_CUDA_EVENT_HANDLE_NV          0x323B\n#define EGL_SYNC_CUDA_EVENT_NV            0x323C\n#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV   0x323D\n#endif /* EGL_NV_cuda_event */\n\n#ifndef EGL_NV_depth_nonlinear\n#define EGL_NV_depth_nonlinear 1\n#define EGL_DEPTH_ENCODING_NV             0x30E2\n#define EGL_DEPTH_ENCODING_NONE_NV        0\n#define EGL_DEPTH_ENCODING_NONLINEAR_NV   0x30E3\n#endif /* EGL_NV_depth_nonlinear */\n\n#ifndef EGL_NV_device_cuda\n#define EGL_NV_device_cuda 1\n#define EGL_CUDA_DEVICE_NV                0x323A\n#endif /* EGL_NV_device_cuda */\n\n#ifndef EGL_NV_native_query\n#define EGL_NV_native_query 1\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);\nEGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);\n#endif\n#endif /* EGL_NV_native_query */\n\n#ifndef EGL_NV_post_convert_rounding\n#define EGL_NV_post_convert_rounding 1\n#endif /* EGL_NV_post_convert_rounding */\n\n#ifndef EGL_NV_post_sub_buffer\n#define EGL_NV_post_sub_buffer 1\n#define EGL_POST_SUB_BUFFER_SUPPORTED_NV  0x30BE\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);\n#endif\n#endif /* EGL_NV_post_sub_buffer */\n\n#ifndef EGL_NV_stream_sync\n#define EGL_NV_stream_sync 1\n#define EGL_SYNC_NEW_FRAME_NV             0x321F\ntypedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);\n#endif\n#endif /* EGL_NV_stream_sync */\n\n#ifndef EGL_NV_sync\n#define EGL_NV_sync 1\ntypedef void *EGLSyncNV;\ntypedef khronos_utime_nanoseconds_t EGLTimeNV;\n#ifdef KHRONOS_SUPPORT_INT64\n#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6\n#define EGL_SYNC_STATUS_NV                0x30E7\n#define EGL_SIGNALED_NV                   0x30E8\n#define EGL_UNSIGNALED_NV                 0x30E9\n#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV    0x0001\n#define EGL_FOREVER_NV                    0xFFFFFFFFFFFFFFFFull\n#define EGL_ALREADY_SIGNALED_NV           0x30EA\n#define EGL_TIMEOUT_EXPIRED_NV            0x30EB\n#define EGL_CONDITION_SATISFIED_NV        0x30EC\n#define EGL_SYNC_TYPE_NV                  0x30ED\n#define EGL_SYNC_CONDITION_NV             0x30EE\n#define EGL_SYNC_FENCE_NV                 0x30EF\n#define EGL_NO_SYNC_NV                    ((EGLSyncNV)0)\ntypedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);\ntypedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);\ntypedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);\nEGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);\nEGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);\nEGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);\nEGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);\nEGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_NV_sync */\n\n#ifndef EGL_NV_system_time\n#define EGL_NV_system_time 1\ntypedef khronos_utime_nanoseconds_t EGLuint64NV;\n#ifdef KHRONOS_SUPPORT_INT64\ntypedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);\ntypedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);\n#ifdef EGL_EGLEXT_PROTOTYPES\nEGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);\nEGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);\n#endif\n#endif /* KHRONOS_SUPPORT_INT64 */\n#endif /* EGL_NV_system_time */\n\n#ifndef EGL_TIZEN_image_native_buffer\n#define EGL_TIZEN_image_native_buffer 1\n#define EGL_NATIVE_BUFFER_TIZEN           0x32A0\n#endif /* EGL_TIZEN_image_native_buffer */\n\n#ifndef EGL_TIZEN_image_native_surface\n#define EGL_TIZEN_image_native_surface 1\n#define EGL_NATIVE_SURFACE_TIZEN          0x32A1\n#endif /* EGL_TIZEN_image_native_surface */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __eglext_h_ */\n\n\n#endif /* _MSC_VER */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_endian.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_endian.h\n *\n *  Functions for reading and writing endian-specific values\n */\n\n#ifndef SDL_endian_h_\n#define SDL_endian_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\name The two types of endianness\n */\n/* @{ */\n#define SDL_LIL_ENDIAN  1234\n#define SDL_BIG_ENDIAN  4321\n/* @} */\n\n#ifndef SDL_BYTEORDER           /* Not defined in SDL_config.h? */\n#ifdef __linux__\n#include <endian.h>\n#define SDL_BYTEORDER  __BYTE_ORDER\n#else /* __linux__ */\n#if defined(__hppa__) || \\\n    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \\\n    (defined(__MIPS__) && defined(__MISPEB__)) || \\\n    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \\\n    defined(__sparc__)\n#define SDL_BYTEORDER   SDL_BIG_ENDIAN\n#else\n#define SDL_BYTEORDER   SDL_LIL_ENDIAN\n#endif\n#endif /* __linux__ */\n#endif /* !SDL_BYTEORDER */\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_endian.h\n */\n#if defined(__GNUC__) && defined(__i386__) && \\\n   !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"xchgb %b0,%h0\": \"=q\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"xchgb %b0,%h0\": \"=Q\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n    int result;\n\n  __asm__(\"rlwimi %0,%2,8,16,23\": \"=&r\"(result):\"0\"(x >> 8), \"r\"(x));\n    return (Uint16)result;\n}\n#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n  __asm__(\"rorw #8,%0\": \"=d\"(x): \"0\"(x):\"cc\");\n    return x;\n}\n#elif defined(__WATCOMC__) && defined(__386__)\nextern _inline Uint16 SDL_Swap16(Uint16);\n#pragma aux SDL_Swap16 = \\\n  \"xchg al, ah\" \\\n  parm   [ax]   \\\n  modify [ax];\n#else\nSDL_FORCE_INLINE Uint16\nSDL_Swap16(Uint16 x)\n{\n    return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));\n}\n#endif\n\n#if defined(__GNUC__) && defined(__i386__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"bswap %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"bswapl %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n    Uint32 result;\n\n  __asm__(\"rlwimi %0,%2,24,16,23\": \"=&r\"(result):\"0\"(x >> 24), \"r\"(x));\n  __asm__(\"rlwimi %0,%2,8,8,15\": \"=&r\"(result):\"0\"(result), \"r\"(x));\n  __asm__(\"rlwimi %0,%2,24,0,7\": \"=&r\"(result):\"0\"(result), \"r\"(x));\n    return result;\n}\n#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n  __asm__(\"rorw #8,%0\\n\\tswap %0\\n\\trorw #8,%0\": \"=d\"(x): \"0\"(x):\"cc\");\n    return x;\n}\n#elif defined(__WATCOMC__) && defined(__386__)\nextern _inline Uint32 SDL_Swap32(Uint32);\n#ifndef __SW_3 /* 486+ */\n#pragma aux SDL_Swap32 = \\\n  \"bswap eax\"  \\\n  parm   [eax] \\\n  modify [eax];\n#else  /* 386-only */\n#pragma aux SDL_Swap32 = \\\n  \"xchg al, ah\"  \\\n  \"ror  eax, 16\" \\\n  \"xchg al, ah\"  \\\n  parm   [eax]   \\\n  modify [eax];\n#endif\n#else\nSDL_FORCE_INLINE Uint32\nSDL_Swap32(Uint32 x)\n{\n    return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |\n                                    ((x >> 8) & 0x0000FF00) | (x >> 24)));\n}\n#endif\n\n#if defined(__GNUC__) && defined(__i386__)\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n    union\n    {\n        struct\n        {\n            Uint32 a, b;\n        } s;\n        Uint64 u;\n    } v;\n    v.u = x;\n  __asm__(\"bswapl %0 ; bswapl %1 ; xchgl %0,%1\": \"=r\"(v.s.a), \"=r\"(v.s.b):\"0\"(v.s.a),\n            \"1\"(v.s.\n                b));\n    return v.u;\n}\n#elif defined(__GNUC__) && defined(__x86_64__)\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n  __asm__(\"bswapq %0\": \"=r\"(x):\"0\"(x));\n    return x;\n}\n#else\nSDL_FORCE_INLINE Uint64\nSDL_Swap64(Uint64 x)\n{\n    Uint32 hi, lo;\n\n    /* Separate into high and low 32-bit values and swap them */\n    lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);\n    x >>= 32;\n    hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);\n    x = SDL_Swap32(lo);\n    x <<= 32;\n    x |= SDL_Swap32(hi);\n    return (x);\n}\n#endif\n\n\nSDL_FORCE_INLINE float\nSDL_SwapFloat(float x)\n{\n    union\n    {\n        float f;\n        Uint32 ui32;\n    } swapper;\n    swapper.f = x;\n    swapper.ui32 = SDL_Swap32(swapper.ui32);\n    return swapper.f;\n}\n\n\n/**\n *  \\name Swap to native\n *  Byteswap item from the specified endianness to the native endianness.\n */\n/* @{ */\n#if SDL_BYTEORDER == SDL_LIL_ENDIAN\n#define SDL_SwapLE16(X) (X)\n#define SDL_SwapLE32(X) (X)\n#define SDL_SwapLE64(X) (X)\n#define SDL_SwapFloatLE(X)  (X)\n#define SDL_SwapBE16(X) SDL_Swap16(X)\n#define SDL_SwapBE32(X) SDL_Swap32(X)\n#define SDL_SwapBE64(X) SDL_Swap64(X)\n#define SDL_SwapFloatBE(X)  SDL_SwapFloat(X)\n#else\n#define SDL_SwapLE16(X) SDL_Swap16(X)\n#define SDL_SwapLE32(X) SDL_Swap32(X)\n#define SDL_SwapLE64(X) SDL_Swap64(X)\n#define SDL_SwapFloatLE(X)  SDL_SwapFloat(X)\n#define SDL_SwapBE16(X) (X)\n#define SDL_SwapBE32(X) (X)\n#define SDL_SwapBE64(X) (X)\n#define SDL_SwapFloatBE(X)  (X)\n#endif\n/* @} *//* Swap to native */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_endian_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_error.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_error.h\n *\n *  Simple error message routines for SDL.\n */\n\n#ifndef SDL_error_h_\n#define SDL_error_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Public functions */\n/* SDL_SetError() unconditionally returns -1. */\nextern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\nextern DECLSPEC const char *SDLCALL SDL_GetError(void);\nextern DECLSPEC void SDLCALL SDL_ClearError(void);\n\n/**\n *  \\name Internal error functions\n *\n *  \\internal\n *  Private error reporting function - used internally.\n */\n/* @{ */\n#define SDL_OutOfMemory()   SDL_Error(SDL_ENOMEM)\n#define SDL_Unsupported()   SDL_Error(SDL_UNSUPPORTED)\n#define SDL_InvalidParamError(param)    SDL_SetError(\"Parameter '%s' is invalid\", (param))\ntypedef enum\n{\n    SDL_ENOMEM,\n    SDL_EFREAD,\n    SDL_EFWRITE,\n    SDL_EFSEEK,\n    SDL_UNSUPPORTED,\n    SDL_LASTERROR\n} SDL_errorcode;\n/* SDL_Error() unconditionally returns -1. */\nextern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);\n/* @} *//* Internal error functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_error_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_events.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_events.h\n *\n *  Include file for SDL event handling.\n */\n\n#ifndef SDL_events_h_\n#define SDL_events_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n#include \"SDL_keyboard.h\"\n#include \"SDL_mouse.h\"\n#include \"SDL_joystick.h\"\n#include \"SDL_gamecontroller.h\"\n#include \"SDL_quit.h\"\n#include \"SDL_gesture.h\"\n#include \"SDL_touch.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* General keyboard/mouse state definitions */\n#define SDL_RELEASED    0\n#define SDL_PRESSED 1\n\n/**\n * \\brief The types of events that can be delivered.\n */\ntypedef enum\n{\n    SDL_FIRSTEVENT     = 0,     /**< Unused (do not remove) */\n\n    /* Application events */\n    SDL_QUIT           = 0x100, /**< User-requested quit */\n\n    /* These application events have special meaning on iOS, see README-ios.md for details */\n    SDL_APP_TERMINATING,        /**< The application is being terminated by the OS\n                                     Called on iOS in applicationWillTerminate()\n                                     Called on Android in onDestroy()\n                                */\n    SDL_APP_LOWMEMORY,          /**< The application is low on memory, free memory if possible.\n                                     Called on iOS in applicationDidReceiveMemoryWarning()\n                                     Called on Android in onLowMemory()\n                                */\n    SDL_APP_WILLENTERBACKGROUND, /**< The application is about to enter the background\n                                     Called on iOS in applicationWillResignActive()\n                                     Called on Android in onPause()\n                                */\n    SDL_APP_DIDENTERBACKGROUND, /**< The application did enter the background and may not get CPU for some time\n                                     Called on iOS in applicationDidEnterBackground()\n                                     Called on Android in onPause()\n                                */\n    SDL_APP_WILLENTERFOREGROUND, /**< The application is about to enter the foreground\n                                     Called on iOS in applicationWillEnterForeground()\n                                     Called on Android in onResume()\n                                */\n    SDL_APP_DIDENTERFOREGROUND, /**< The application is now interactive\n                                     Called on iOS in applicationDidBecomeActive()\n                                     Called on Android in onResume()\n                                */\n\n    /* Display events */\n    SDL_DISPLAYEVENT   = 0x150,  /**< Display state change */\n\n    /* Window events */\n    SDL_WINDOWEVENT    = 0x200, /**< Window state change */\n    SDL_SYSWMEVENT,             /**< System specific event */\n\n    /* Keyboard events */\n    SDL_KEYDOWN        = 0x300, /**< Key pressed */\n    SDL_KEYUP,                  /**< Key released */\n    SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */\n    SDL_TEXTINPUT,              /**< Keyboard text input */\n    SDL_KEYMAPCHANGED,          /**< Keymap changed due to a system event such as an\n                                     input language or keyboard layout change.\n                                */\n\n    /* Mouse events */\n    SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */\n    SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */\n    SDL_MOUSEBUTTONUP,          /**< Mouse button released */\n    SDL_MOUSEWHEEL,             /**< Mouse wheel motion */\n\n    /* Joystick events */\n    SDL_JOYAXISMOTION  = 0x600, /**< Joystick axis motion */\n    SDL_JOYBALLMOTION,          /**< Joystick trackball motion */\n    SDL_JOYHATMOTION,           /**< Joystick hat position change */\n    SDL_JOYBUTTONDOWN,          /**< Joystick button pressed */\n    SDL_JOYBUTTONUP,            /**< Joystick button released */\n    SDL_JOYDEVICEADDED,         /**< A new joystick has been inserted into the system */\n    SDL_JOYDEVICEREMOVED,       /**< An opened joystick has been removed */\n\n    /* Game controller events */\n    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */\n    SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */\n    SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */\n    SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */\n    SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */\n    SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */\n\n    /* Touch events */\n    SDL_FINGERDOWN      = 0x700,\n    SDL_FINGERUP,\n    SDL_FINGERMOTION,\n\n    /* Gesture events */\n    SDL_DOLLARGESTURE   = 0x800,\n    SDL_DOLLARRECORD,\n    SDL_MULTIGESTURE,\n\n    /* Clipboard events */\n    SDL_CLIPBOARDUPDATE = 0x900, /**< The clipboard changed */\n\n    /* Drag and drop events */\n    SDL_DROPFILE        = 0x1000, /**< The system requests a file open */\n    SDL_DROPTEXT,                 /**< text/plain drag-and-drop event */\n    SDL_DROPBEGIN,                /**< A new set of drops is beginning (NULL filename) */\n    SDL_DROPCOMPLETE,             /**< Current set of drops is now complete (NULL filename) */\n\n    /* Audio hotplug events */\n    SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */\n    SDL_AUDIODEVICEREMOVED,        /**< An audio device has been removed. */\n\n    /* Sensor events */\n    SDL_SENSORUPDATE = 0x1200,     /**< A sensor was updated */\n\n    /* Render events */\n    SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */\n    SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */\n\n    /** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,\n     *  and should be allocated with SDL_RegisterEvents()\n     */\n    SDL_USEREVENT    = 0x8000,\n\n    /**\n     *  This last event is only for bounding internal arrays\n     */\n    SDL_LASTEVENT    = 0xFFFF\n} SDL_EventType;\n\n/**\n *  \\brief Fields shared by every event\n */\ntypedef struct SDL_CommonEvent\n{\n    Uint32 type;\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_CommonEvent;\n\n/**\n *  \\brief Display state change event data (event.display.*)\n */\ntypedef struct SDL_DisplayEvent\n{\n    Uint32 type;        /**< ::SDL_DISPLAYEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 display;     /**< The associated display index */\n    Uint8 event;        /**< ::SDL_DisplayEventID */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint32 data1;       /**< event dependent data */\n} SDL_DisplayEvent;\n\n/**\n *  \\brief Window state change event data (event.window.*)\n */\ntypedef struct SDL_WindowEvent\n{\n    Uint32 type;        /**< ::SDL_WINDOWEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The associated window */\n    Uint8 event;        /**< ::SDL_WindowEventID */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint32 data1;       /**< event dependent data */\n    Sint32 data2;       /**< event dependent data */\n} SDL_WindowEvent;\n\n/**\n *  \\brief Keyboard button event structure (event.key.*)\n */\ntypedef struct SDL_KeyboardEvent\n{\n    Uint32 type;        /**< ::SDL_KEYDOWN or ::SDL_KEYUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with keyboard focus, if any */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 repeat;       /**< Non-zero if this is a key repeat */\n    Uint8 padding2;\n    Uint8 padding3;\n    SDL_Keysym keysym;  /**< The key that was pressed or released */\n} SDL_KeyboardEvent;\n\n#define SDL_TEXTEDITINGEVENT_TEXT_SIZE (32)\n/**\n *  \\brief Keyboard text editing event structure (event.edit.*)\n */\ntypedef struct SDL_TextEditingEvent\n{\n    Uint32 type;                                /**< ::SDL_TEXTEDITING */\n    Uint32 timestamp;                           /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;                            /**< The window with keyboard focus, if any */\n    char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE];  /**< The editing text */\n    Sint32 start;                               /**< The start cursor of selected editing text */\n    Sint32 length;                              /**< The length of selected editing text */\n} SDL_TextEditingEvent;\n\n\n#define SDL_TEXTINPUTEVENT_TEXT_SIZE (32)\n/**\n *  \\brief Keyboard text input event structure (event.text.*)\n */\ntypedef struct SDL_TextInputEvent\n{\n    Uint32 type;                              /**< ::SDL_TEXTINPUT */\n    Uint32 timestamp;                         /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;                          /**< The window with keyboard focus, if any */\n    char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];  /**< The input text */\n} SDL_TextInputEvent;\n\n/**\n *  \\brief Mouse motion event structure (event.motion.*)\n */\ntypedef struct SDL_MouseMotionEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Uint32 state;       /**< The current button state */\n    Sint32 x;           /**< X coordinate, relative to window */\n    Sint32 y;           /**< Y coordinate, relative to window */\n    Sint32 xrel;        /**< The relative motion in the X direction */\n    Sint32 yrel;        /**< The relative motion in the Y direction */\n} SDL_MouseMotionEvent;\n\n/**\n *  \\brief Mouse button event structure (event.button.*)\n */\ntypedef struct SDL_MouseButtonEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Uint8 button;       /**< The mouse button index */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 clicks;       /**< 1 for single-click, 2 for double-click, etc. */\n    Uint8 padding1;\n    Sint32 x;           /**< X coordinate, relative to window */\n    Sint32 y;           /**< Y coordinate, relative to window */\n} SDL_MouseButtonEvent;\n\n/**\n *  \\brief Mouse wheel event structure (event.wheel.*)\n */\ntypedef struct SDL_MouseWheelEvent\n{\n    Uint32 type;        /**< ::SDL_MOUSEWHEEL */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The window with mouse focus, if any */\n    Uint32 which;       /**< The mouse instance id, or SDL_TOUCH_MOUSEID */\n    Sint32 x;           /**< The amount scrolled horizontally, positive to the right and negative to the left */\n    Sint32 y;           /**< The amount scrolled vertically, positive away from the user and negative toward the user */\n    Uint32 direction;   /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */\n} SDL_MouseWheelEvent;\n\n/**\n *  \\brief Joystick axis motion event structure (event.jaxis.*)\n */\ntypedef struct SDL_JoyAxisEvent\n{\n    Uint32 type;        /**< ::SDL_JOYAXISMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 axis;         /**< The joystick axis index */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 value;       /**< The axis value (range: -32768 to 32767) */\n    Uint16 padding4;\n} SDL_JoyAxisEvent;\n\n/**\n *  \\brief Joystick trackball motion event structure (event.jball.*)\n */\ntypedef struct SDL_JoyBallEvent\n{\n    Uint32 type;        /**< ::SDL_JOYBALLMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 ball;         /**< The joystick trackball index */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 xrel;        /**< The relative motion in the X direction */\n    Sint16 yrel;        /**< The relative motion in the Y direction */\n} SDL_JoyBallEvent;\n\n/**\n *  \\brief Joystick hat position change event structure (event.jhat.*)\n */\ntypedef struct SDL_JoyHatEvent\n{\n    Uint32 type;        /**< ::SDL_JOYHATMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 hat;          /**< The joystick hat index */\n    Uint8 value;        /**< The hat position value.\n                         *   \\sa ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP\n                         *   \\sa ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT\n                         *   \\sa ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN\n                         *\n                         *   Note that zero means the POV is centered.\n                         */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_JoyHatEvent;\n\n/**\n *  \\brief Joystick button event structure (event.jbutton.*)\n */\ntypedef struct SDL_JoyButtonEvent\n{\n    Uint32 type;        /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 button;       /**< The joystick button index */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_JoyButtonEvent;\n\n/**\n *  \\brief Joystick device event structure (event.jdevice.*)\n */\ntypedef struct SDL_JoyDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED event */\n} SDL_JoyDeviceEvent;\n\n\n/**\n *  \\brief Game controller axis motion event structure (event.caxis.*)\n */\ntypedef struct SDL_ControllerAxisEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERAXISMOTION */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 axis;         /**< The controller axis (SDL_GameControllerAxis) */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n    Sint16 value;       /**< The axis value (range: -32768 to 32767) */\n    Uint16 padding4;\n} SDL_ControllerAxisEvent;\n\n\n/**\n *  \\brief Game controller button event structure (event.cbutton.*)\n */\ntypedef struct SDL_ControllerButtonEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_JoystickID which; /**< The joystick instance id */\n    Uint8 button;       /**< The controller button (SDL_GameControllerButton) */\n    Uint8 state;        /**< ::SDL_PRESSED or ::SDL_RELEASED */\n    Uint8 padding1;\n    Uint8 padding2;\n} SDL_ControllerButtonEvent;\n\n\n/**\n *  \\brief Controller device event structure (event.cdevice.*)\n */\ntypedef struct SDL_ControllerDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */\n} SDL_ControllerDeviceEvent;\n\n/**\n *  \\brief Audio device event structure (event.adevice.*)\n */\ntypedef struct SDL_AudioDeviceEvent\n{\n    Uint32 type;        /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 which;       /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */\n    Uint8 iscapture;    /**< zero if an output device, non-zero if a capture device. */\n    Uint8 padding1;\n    Uint8 padding2;\n    Uint8 padding3;\n} SDL_AudioDeviceEvent;\n\n\n/**\n *  \\brief Touch finger event structure (event.tfinger.*)\n */\ntypedef struct SDL_TouchFingerEvent\n{\n    Uint32 type;        /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    SDL_FingerID fingerId;\n    float x;            /**< Normalized in the range 0...1 */\n    float y;            /**< Normalized in the range 0...1 */\n    float dx;           /**< Normalized in the range -1...1 */\n    float dy;           /**< Normalized in the range -1...1 */\n    float pressure;     /**< Normalized in the range 0...1 */\n} SDL_TouchFingerEvent;\n\n\n/**\n *  \\brief Multiple Finger Gesture Event (event.mgesture.*)\n */\ntypedef struct SDL_MultiGestureEvent\n{\n    Uint32 type;        /**< ::SDL_MULTIGESTURE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    float dTheta;\n    float dDist;\n    float x;\n    float y;\n    Uint16 numFingers;\n    Uint16 padding;\n} SDL_MultiGestureEvent;\n\n\n/**\n * \\brief Dollar Gesture Event (event.dgesture.*)\n */\ntypedef struct SDL_DollarGestureEvent\n{\n    Uint32 type;        /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_TouchID touchId; /**< The touch device id */\n    SDL_GestureID gestureId;\n    Uint32 numFingers;\n    float error;\n    float x;            /**< Normalized center of gesture */\n    float y;            /**< Normalized center of gesture */\n} SDL_DollarGestureEvent;\n\n\n/**\n *  \\brief An event used to request a file open by the system (event.drop.*)\n *         This event is enabled by default, you can disable it with SDL_EventState().\n *  \\note If this event is enabled, you must free the filename in the event.\n */\ntypedef struct SDL_DropEvent\n{\n    Uint32 type;        /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    char *file;         /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */\n    Uint32 windowID;    /**< The window that was dropped on, if any */\n} SDL_DropEvent;\n\n\n/**\n *  \\brief Sensor event structure (event.sensor.*)\n */\ntypedef struct SDL_SensorEvent\n{\n    Uint32 type;        /**< ::SDL_SENSORUPDATE */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Sint32 which;       /**< The instance ID of the sensor */\n    float data[6];      /**< Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData() */\n} SDL_SensorEvent;\n\n/**\n *  \\brief The \"quit requested\" event\n */\ntypedef struct SDL_QuitEvent\n{\n    Uint32 type;        /**< ::SDL_QUIT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_QuitEvent;\n\n/**\n *  \\brief OS Specific event\n */\ntypedef struct SDL_OSEvent\n{\n    Uint32 type;        /**< ::SDL_QUIT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n} SDL_OSEvent;\n\n/**\n *  \\brief A user-defined event type (event.user.*)\n */\ntypedef struct SDL_UserEvent\n{\n    Uint32 type;        /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    Uint32 windowID;    /**< The associated window if any */\n    Sint32 code;        /**< User defined event code */\n    void *data1;        /**< User defined data pointer */\n    void *data2;        /**< User defined data pointer */\n} SDL_UserEvent;\n\n\nstruct SDL_SysWMmsg;\ntypedef struct SDL_SysWMmsg SDL_SysWMmsg;\n\n/**\n *  \\brief A video driver dependent system event (event.syswm.*)\n *         This event is disabled by default, you can enable it with SDL_EventState()\n *\n *  \\note If you want to use this event, you should include SDL_syswm.h.\n */\ntypedef struct SDL_SysWMEvent\n{\n    Uint32 type;        /**< ::SDL_SYSWMEVENT */\n    Uint32 timestamp;   /**< In milliseconds, populated using SDL_GetTicks() */\n    SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */\n} SDL_SysWMEvent;\n\n/**\n *  \\brief General event structure\n */\ntypedef union SDL_Event\n{\n    Uint32 type;                    /**< Event type, shared with all events */\n    SDL_CommonEvent common;         /**< Common event data */\n    SDL_DisplayEvent display;       /**< Window event data */\n    SDL_WindowEvent window;         /**< Window event data */\n    SDL_KeyboardEvent key;          /**< Keyboard event data */\n    SDL_TextEditingEvent edit;      /**< Text editing event data */\n    SDL_TextInputEvent text;        /**< Text input event data */\n    SDL_MouseMotionEvent motion;    /**< Mouse motion event data */\n    SDL_MouseButtonEvent button;    /**< Mouse button event data */\n    SDL_MouseWheelEvent wheel;      /**< Mouse wheel event data */\n    SDL_JoyAxisEvent jaxis;         /**< Joystick axis event data */\n    SDL_JoyBallEvent jball;         /**< Joystick ball event data */\n    SDL_JoyHatEvent jhat;           /**< Joystick hat event data */\n    SDL_JoyButtonEvent jbutton;     /**< Joystick button event data */\n    SDL_JoyDeviceEvent jdevice;     /**< Joystick device change event data */\n    SDL_ControllerAxisEvent caxis;      /**< Game Controller axis event data */\n    SDL_ControllerButtonEvent cbutton;  /**< Game Controller button event data */\n    SDL_ControllerDeviceEvent cdevice;  /**< Game Controller device event data */\n    SDL_AudioDeviceEvent adevice;   /**< Audio device event data */\n    SDL_SensorEvent sensor;         /**< Sensor event data */\n    SDL_QuitEvent quit;             /**< Quit request event data */\n    SDL_UserEvent user;             /**< Custom event data */\n    SDL_SysWMEvent syswm;           /**< System dependent window event data */\n    SDL_TouchFingerEvent tfinger;   /**< Touch finger event data */\n    SDL_MultiGestureEvent mgesture; /**< Gesture event data */\n    SDL_DollarGestureEvent dgesture; /**< Gesture event data */\n    SDL_DropEvent drop;             /**< Drag and drop event data */\n\n    /* This is necessary for ABI compatibility between Visual C++ and GCC\n       Visual C++ will respect the push pack pragma and use 52 bytes for\n       this structure, and GCC will use the alignment of the largest datatype\n       within the union, which is 8 bytes.\n\n       So... we'll add padding to force the size to be 56 bytes for both.\n    */\n    Uint8 padding[56];\n} SDL_Event;\n\n/* Make sure we haven't broken binary compatibility */\nSDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);\n\n\n/* Function prototypes */\n\n/**\n *  Pumps the event loop, gathering events from the input devices.\n *\n *  This function updates the event queue and internal input device state.\n *\n *  This should only be run in the thread that sets the video mode.\n */\nextern DECLSPEC void SDLCALL SDL_PumpEvents(void);\n\n/* @{ */\ntypedef enum\n{\n    SDL_ADDEVENT,\n    SDL_PEEKEVENT,\n    SDL_GETEVENT\n} SDL_eventaction;\n\n/**\n *  Checks the event queue for messages and optionally returns them.\n *\n *  If \\c action is ::SDL_ADDEVENT, up to \\c numevents events will be added to\n *  the back of the event queue.\n *\n *  If \\c action is ::SDL_PEEKEVENT, up to \\c numevents events at the front\n *  of the event queue, within the specified minimum and maximum type,\n *  will be returned and will not be removed from the queue.\n *\n *  If \\c action is ::SDL_GETEVENT, up to \\c numevents events at the front\n *  of the event queue, within the specified minimum and maximum type,\n *  will be returned and will be removed from the queue.\n *\n *  \\return The number of events actually stored, or -1 if there was an error.\n *\n *  This function is thread-safe.\n */\nextern DECLSPEC int SDLCALL SDL_PeepEvents(SDL_Event * events, int numevents,\n                                           SDL_eventaction action,\n                                           Uint32 minType, Uint32 maxType);\n/* @} */\n\n/**\n *  Checks to see if certain event types are in the event queue.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasEvent(Uint32 type);\nextern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);\n\n/**\n *  This function clears events from the event queue\n *  This function only affects currently queued events. If you want to make\n *  sure that all pending OS events are flushed, you can call SDL_PumpEvents()\n *  on the main thread immediately before the flush call.\n */\nextern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);\nextern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);\n\n/**\n *  \\brief Polls for currently pending events.\n *\n *  \\return 1 if there are any pending events, or 0 if there are none available.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n */\nextern DECLSPEC int SDLCALL SDL_PollEvent(SDL_Event * event);\n\n/**\n *  \\brief Waits indefinitely for the next available event.\n *\n *  \\return 1, or 0 if there was an error while waiting for events.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n */\nextern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);\n\n/**\n *  \\brief Waits until the specified timeout (in milliseconds) for the next\n *         available event.\n *\n *  \\return 1, or 0 if there was an error while waiting for events.\n *\n *  \\param event If not NULL, the next event is removed from the queue and\n *               stored in that area.\n *  \\param timeout The timeout (in milliseconds) to wait for next event.\n */\nextern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event,\n                                                 int timeout);\n\n/**\n *  \\brief Add an event to the event queue.\n *\n *  \\return 1 on success, 0 if the event was filtered, or -1 if the event queue\n *          was full or there was some other error.\n */\nextern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);\n\ntypedef int (SDLCALL * SDL_EventFilter) (void *userdata, SDL_Event * event);\n\n/**\n *  Sets up a filter to process all events before they change internal state and\n *  are posted to the internal event queue.\n *\n *  The filter is prototyped as:\n *  \\code\n *      int SDL_EventFilter(void *userdata, SDL_Event * event);\n *  \\endcode\n *\n *  If the filter returns 1, then the event will be added to the internal queue.\n *  If it returns 0, then the event will be dropped from the queue, but the\n *  internal state will still be updated.  This allows selective filtering of\n *  dynamically arriving events.\n *\n *  \\warning  Be very careful of what you do in the event filter function, as\n *            it may run in a different thread!\n *\n *  There is one caveat when dealing with the ::SDL_QuitEvent event type.  The\n *  event filter is only called when the window manager desires to close the\n *  application window.  If the event filter returns 1, then the window will\n *  be closed, otherwise the window will remain open if possible.\n *\n *  If the quit event is generated by an interrupt signal, it will bypass the\n *  internal queue and be delivered to the application at the next event poll.\n */\nextern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,\n                                                void *userdata);\n\n/**\n *  Return the current event filter - can be used to \"chain\" filters.\n *  If there is no event filter set, this function returns SDL_FALSE.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,\n                                                    void **userdata);\n\n/**\n *  Add a function which is called when an event is added to the queue.\n */\nextern DECLSPEC void SDLCALL SDL_AddEventWatch(SDL_EventFilter filter,\n                                               void *userdata);\n\n/**\n *  Remove an event watch function added with SDL_AddEventWatch()\n */\nextern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,\n                                               void *userdata);\n\n/**\n *  Run the filter function on the current event queue, removing any\n *  events for which the filter returns 0.\n */\nextern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,\n                                              void *userdata);\n\n/* @{ */\n#define SDL_QUERY   -1\n#define SDL_IGNORE   0\n#define SDL_DISABLE  0\n#define SDL_ENABLE   1\n\n/**\n *  This function allows you to set the state of processing certain events.\n *   - If \\c state is set to ::SDL_IGNORE, that event will be automatically\n *     dropped from the event queue and will not be filtered.\n *   - If \\c state is set to ::SDL_ENABLE, that event will be processed\n *     normally.\n *   - If \\c state is set to ::SDL_QUERY, SDL_EventState() will return the\n *     current processing state of the specified event.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);\n/* @} */\n#define SDL_GetEventState(type) SDL_EventState(type, SDL_QUERY)\n\n/**\n *  This function allocates a set of user-defined events, and returns\n *  the beginning event number for that set of events.\n *\n *  If there aren't enough user-defined events left, this function\n *  returns (Uint32)-1\n */\nextern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_events_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_filesystem.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_filesystem.h\n *\n *  \\brief Include file for filesystem SDL API functions\n */\n\n#ifndef SDL_filesystem_h_\n#define SDL_filesystem_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Get the path where the application resides.\n *\n * Get the \"base path\". This is the directory where the application was run\n *  from, which is probably the installation directory, and may or may not\n *  be the process's current working directory.\n *\n * This returns an absolute path in UTF-8 encoding, and is guaranteed to\n *  end with a path separator ('\\\\' on Windows, '/' most other places).\n *\n * The pointer returned by this function is owned by you. Please call\n *  SDL_free() on the pointer when you are done with it, or it will be a\n *  memory leak. This is not necessarily a fast call, though, so you should\n *  call this once near startup and save the string if you need it.\n *\n * Some platforms can't determine the application's path, and on other\n *  platforms, this might be meaningless. In such cases, this function will\n *  return NULL.\n *\n *  \\return String of base dir in UTF-8 encoding, or NULL on error.\n *\n * \\sa SDL_GetPrefPath\n */\nextern DECLSPEC char *SDLCALL SDL_GetBasePath(void);\n\n/**\n * \\brief Get the user-and-app-specific path where files can be written.\n *\n * Get the \"pref dir\". This is meant to be where users can write personal\n *  files (preferences and save games, etc) that are specific to your\n *  application. This directory is unique per user, per application.\n *\n * This function will decide the appropriate location in the native filesystem,\n *  create the directory if necessary, and return a string of the absolute\n *  path to the directory in UTF-8 encoding.\n *\n * On Windows, the string might look like:\n *  \"C:\\\\Users\\\\bob\\\\AppData\\\\Roaming\\\\My Company\\\\My Program Name\\\\\"\n *\n * On Linux, the string might look like:\n *  \"/home/bob/.local/share/My Program Name/\"\n *\n * On Mac OS X, the string might look like:\n *  \"/Users/bob/Library/Application Support/My Program Name/\"\n *\n * (etc.)\n *\n * You specify the name of your organization (if it's not a real organization,\n *  your name or an Internet domain you own might do) and the name of your\n *  application. These should be untranslated proper names.\n *\n * Both the org and app strings may become part of a directory name, so\n *  please follow these rules:\n *\n *    - Try to use the same org string (including case-sensitivity) for\n *      all your applications that use this function.\n *    - Always use a unique app string for each one, and make sure it never\n *      changes for an app once you've decided on it.\n *    - Unicode characters are legal, as long as it's UTF-8 encoded, but...\n *    - ...only use letters, numbers, and spaces. Avoid punctuation like\n *      \"Game Name 2: Bad Guy's Revenge!\" ... \"Game Name 2\" is sufficient.\n *\n * This returns an absolute path in UTF-8 encoding, and is guaranteed to\n *  end with a path separator ('\\\\' on Windows, '/' most other places).\n *\n * The pointer returned by this function is owned by you. Please call\n *  SDL_free() on the pointer when you are done with it, or it will be a\n *  memory leak. This is not necessarily a fast call, though, so you should\n *  call this once near startup and save the string if you need it.\n *\n * You should assume the path returned by this function is the only safe\n *  place to write files (and that SDL_GetBasePath(), while it might be\n *  writable, or even the parent of the returned path, aren't where you\n *  should be writing things).\n *\n * Some platforms can't determine the pref path, and on other\n *  platforms, this might be meaningless. In such cases, this function will\n *  return NULL.\n *\n *   \\param org The name of your organization.\n *   \\param app The name of your application.\n *  \\return UTF-8 string of user dir in platform-dependent notation. NULL\n *          if there's a problem (creating directory failed, etc).\n *\n * \\sa SDL_GetBasePath\n */\nextern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_filesystem_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_gamecontroller.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_gamecontroller.h\n *\n *  Include file for SDL game controller event handling\n */\n\n#ifndef SDL_gamecontroller_h_\n#define SDL_gamecontroller_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_rwops.h\"\n#include \"SDL_joystick.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_gamecontroller.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_GAMECONTROLLER flag.  This causes SDL to scan the system\n *  for game controllers, and load appropriate drivers.\n *\n *  If you would like to receive controller updates while the application\n *  is in the background, you should set the following hint before calling\n *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS\n */\n\n/**\n * The gamecontroller structure used to identify an SDL game controller\n */\nstruct _SDL_GameController;\ntypedef struct _SDL_GameController SDL_GameController;\n\n\ntypedef enum\n{\n    SDL_CONTROLLER_BINDTYPE_NONE = 0,\n    SDL_CONTROLLER_BINDTYPE_BUTTON,\n    SDL_CONTROLLER_BINDTYPE_AXIS,\n    SDL_CONTROLLER_BINDTYPE_HAT\n} SDL_GameControllerBindType;\n\n/**\n *  Get the SDL joystick layer binding for this controller button/axis mapping\n */\ntypedef struct SDL_GameControllerButtonBind\n{\n    SDL_GameControllerBindType bindType;\n    union\n    {\n        int button;\n        int axis;\n        struct {\n            int hat;\n            int hat_mask;\n        } hat;\n    } value;\n\n} SDL_GameControllerButtonBind;\n\n\n/**\n *  To count the number of game controllers in the system for the following:\n *  int nJoysticks = SDL_NumJoysticks();\n *  int nGameControllers = 0;\n *  for (int i = 0; i < nJoysticks; i++) {\n *      if (SDL_IsGameController(i)) {\n *          nGameControllers++;\n *      }\n *  }\n *\n *  Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:\n *  guid,name,mappings\n *\n *  Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.\n *  Under Windows there is a reserved GUID of \"xinput\" that covers any XInput devices.\n *  The mapping format for joystick is:\n *      bX - a joystick button, index X\n *      hX.Y - hat X with value Y\n *      aX - axis X of the joystick\n *  Buttons can be used as a controller axis and vice versa.\n *\n *  This string shows an example of a valid mapping for a controller\n *  \"03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7\",\n *\n */\n\n/**\n *  Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()\n *  A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt\n *\n *  If \\c freerw is non-zero, the stream will be closed after being read.\n * \n * \\return number of mappings added, -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);\n\n/**\n *  Load a set of mappings from a file, filtered by the current SDL_GetPlatform()\n *\n *  Convenience macro.\n */\n#define SDL_GameControllerAddMappingsFromFile(file)   SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, \"rb\"), 1)\n\n/**\n *  Add or update an existing mapping configuration\n *\n * \\return 1 if mapping is added, 0 if updated, -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);\n\n/**\n *  Get the number of mappings installed\n *\n *  \\return the number of mappings\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);\n\n/**\n *  Get the mapping at a particular index.\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if the index is out of range.\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);\n\n/**\n *  Get a mapping string for a GUID\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);\n\n/**\n *  Get a mapping string for an open GameController\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller);\n\n/**\n *  Is the joystick on this index supported by the game controller interface?\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);\n\n/**\n *  Get the implementation dependent name of a game controller.\n *  This can be called before any controllers are opened.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);\n\n/**\n *  Get the mapping of a game controller.\n *  This can be called before any controllers are opened.\n *\n *  \\return the mapping string.  Must be freed with SDL_free().  Returns NULL if no mapping is available\n */\nextern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);\n\n/**\n *  Open a game controller for use.\n *  The index passed as an argument refers to the N'th game controller on the system.\n *  This index is not the value which will identify this controller in future\n *  controller events.  The joystick's instance id (::SDL_JoystickID) will be\n *  used there instead.\n *\n *  \\return A controller identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);\n\n/**\n * Return the SDL_GameController associated with an instance id.\n */\nextern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);\n\n/**\n *  Return the name for this currently opened controller\n */\nextern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);\n\n/**\n *  Get the player index of an opened game controller, or -1 if it's not available\n *\n *  For XInput controllers this returns the XInput user index.\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);\n\n/**\n *  Get the USB vendor ID of an opened controller, if available.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller);\n\n/**\n *  Get the USB product ID of an opened controller, if available.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller);\n\n/**\n *  Get the product version of an opened controller, if available.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller);\n\n/**\n *  Returns SDL_TRUE if the controller has been opened and currently connected,\n *  or SDL_FALSE if it has not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);\n\n/**\n *  Get the underlying joystick object used by a controller\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);\n\n/**\n *  Enable/disable controller event polling.\n *\n *  If controller events are disabled, you must call SDL_GameControllerUpdate()\n *  yourself and check the state of the controller when you want controller\n *  information.\n *\n *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);\n\n/**\n *  Update the current state of the open game controllers.\n *\n *  This is called automatically by the event loop if any game controller\n *  events are enabled.\n */\nextern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);\n\n\n/**\n *  The list of axes available from a controller\n *\n *  Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,\n *  and are centered within ~8000 of zero, though advanced UI will allow users to set\n *  or autodetect the dead zone, which varies between controllers.\n *\n *  Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.\n */\ntypedef enum\n{\n    SDL_CONTROLLER_AXIS_INVALID = -1,\n    SDL_CONTROLLER_AXIS_LEFTX,\n    SDL_CONTROLLER_AXIS_LEFTY,\n    SDL_CONTROLLER_AXIS_RIGHTX,\n    SDL_CONTROLLER_AXIS_RIGHTY,\n    SDL_CONTROLLER_AXIS_TRIGGERLEFT,\n    SDL_CONTROLLER_AXIS_TRIGGERRIGHT,\n    SDL_CONTROLLER_AXIS_MAX\n} SDL_GameControllerAxis;\n\n/**\n *  turn this string into a axis mapping\n */\nextern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);\n\n/**\n *  turn this axis enum into a string mapping\n */\nextern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);\n\n/**\n *  Get the SDL joystick layer binding for this controller button mapping\n */\nextern DECLSPEC SDL_GameControllerButtonBind SDLCALL\nSDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,\n                                 SDL_GameControllerAxis axis);\n\n/**\n *  Get the current state of an axis control on a game controller.\n *\n *  The state is a value ranging from -32768 to 32767 (except for the triggers,\n *  which range from 0 to 32767).\n *\n *  The axis indices start at index 0.\n */\nextern DECLSPEC Sint16 SDLCALL\nSDL_GameControllerGetAxis(SDL_GameController *gamecontroller,\n                          SDL_GameControllerAxis axis);\n\n/**\n *  The list of buttons available from a controller\n */\ntypedef enum\n{\n    SDL_CONTROLLER_BUTTON_INVALID = -1,\n    SDL_CONTROLLER_BUTTON_A,\n    SDL_CONTROLLER_BUTTON_B,\n    SDL_CONTROLLER_BUTTON_X,\n    SDL_CONTROLLER_BUTTON_Y,\n    SDL_CONTROLLER_BUTTON_BACK,\n    SDL_CONTROLLER_BUTTON_GUIDE,\n    SDL_CONTROLLER_BUTTON_START,\n    SDL_CONTROLLER_BUTTON_LEFTSTICK,\n    SDL_CONTROLLER_BUTTON_RIGHTSTICK,\n    SDL_CONTROLLER_BUTTON_LEFTSHOULDER,\n    SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,\n    SDL_CONTROLLER_BUTTON_DPAD_UP,\n    SDL_CONTROLLER_BUTTON_DPAD_DOWN,\n    SDL_CONTROLLER_BUTTON_DPAD_LEFT,\n    SDL_CONTROLLER_BUTTON_DPAD_RIGHT,\n    SDL_CONTROLLER_BUTTON_MAX\n} SDL_GameControllerButton;\n\n/**\n *  turn this string into a button mapping\n */\nextern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);\n\n/**\n *  turn this button enum into a string mapping\n */\nextern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);\n\n/**\n *  Get the SDL joystick layer binding for this controller button mapping\n */\nextern DECLSPEC SDL_GameControllerButtonBind SDLCALL\nSDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,\n                                   SDL_GameControllerButton button);\n\n\n/**\n *  Get the current state of a button on a game controller.\n *\n *  The button indices start at index 0.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,\n                                                          SDL_GameControllerButton button);\n\n/**\n *  Trigger a rumble effect\n *  Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.\n *\n *  \\param gamecontroller The controller to vibrate\n *  \\param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF\n *  \\param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF\n *  \\param duration_ms The duration of the rumble effect, in milliseconds\n *\n *  \\return 0, or -1 if rumble isn't supported on this joystick\n */\nextern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);\n\n/**\n *  Close a controller previously opened with SDL_GameControllerOpen().\n */\nextern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_gamecontroller_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_gesture.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_gesture.h\n *\n *  Include file for SDL gesture event handling.\n */\n\n#ifndef SDL_gesture_h_\n#define SDL_gesture_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"SDL_touch.h\"\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef Sint64 SDL_GestureID;\n\n/* Function prototypes */\n\n/**\n *  \\brief Begin Recording a gesture on the specified touch, or all touches (-1)\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);\n\n\n/**\n *  \\brief Save all currently loaded Dollar Gesture templates\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);\n\n/**\n *  \\brief Save a currently loaded Dollar Gesture template\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);\n\n\n/**\n *  \\brief Load Dollar Gesture templates from a file\n *\n *\n */\nextern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_gesture_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_haptic.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_haptic.h\n *\n *  \\brief The SDL haptic subsystem allows you to control haptic (force feedback)\n *         devices.\n *\n *  The basic usage is as follows:\n *   - Initialize the subsystem (::SDL_INIT_HAPTIC).\n *   - Open a haptic device.\n *    - SDL_HapticOpen() to open from index.\n *    - SDL_HapticOpenFromJoystick() to open from an existing joystick.\n *   - Create an effect (::SDL_HapticEffect).\n *   - Upload the effect with SDL_HapticNewEffect().\n *   - Run the effect with SDL_HapticRunEffect().\n *   - (optional) Free the effect with SDL_HapticDestroyEffect().\n *   - Close the haptic device with SDL_HapticClose().\n *\n * \\par Simple rumble example:\n * \\code\n *    SDL_Haptic *haptic;\n *\n *    // Open the device\n *    haptic = SDL_HapticOpen( 0 );\n *    if (haptic == NULL)\n *       return -1;\n *\n *    // Initialize simple rumble\n *    if (SDL_HapticRumbleInit( haptic ) != 0)\n *       return -1;\n *\n *    // Play effect at 50% strength for 2 seconds\n *    if (SDL_HapticRumblePlay( haptic, 0.5, 2000 ) != 0)\n *       return -1;\n *    SDL_Delay( 2000 );\n *\n *    // Clean up\n *    SDL_HapticClose( haptic );\n * \\endcode\n *\n * \\par Complete example:\n * \\code\n * int test_haptic( SDL_Joystick * joystick ) {\n *    SDL_Haptic *haptic;\n *    SDL_HapticEffect effect;\n *    int effect_id;\n *\n *    // Open the device\n *    haptic = SDL_HapticOpenFromJoystick( joystick );\n *    if (haptic == NULL) return -1; // Most likely joystick isn't haptic\n *\n *    // See if it can do sine waves\n *    if ((SDL_HapticQuery(haptic) & SDL_HAPTIC_SINE)==0) {\n *       SDL_HapticClose(haptic); // No sine effect\n *       return -1;\n *    }\n *\n *    // Create the effect\n *    memset( &effect, 0, sizeof(SDL_HapticEffect) ); // 0 is safe default\n *    effect.type = SDL_HAPTIC_SINE;\n *    effect.periodic.direction.type = SDL_HAPTIC_POLAR; // Polar coordinates\n *    effect.periodic.direction.dir[0] = 18000; // Force comes from south\n *    effect.periodic.period = 1000; // 1000 ms\n *    effect.periodic.magnitude = 20000; // 20000/32767 strength\n *    effect.periodic.length = 5000; // 5 seconds long\n *    effect.periodic.attack_length = 1000; // Takes 1 second to get max strength\n *    effect.periodic.fade_length = 1000; // Takes 1 second to fade away\n *\n *    // Upload the effect\n *    effect_id = SDL_HapticNewEffect( haptic, &effect );\n *\n *    // Test the effect\n *    SDL_HapticRunEffect( haptic, effect_id, 1 );\n *    SDL_Delay( 5000); // Wait for the effect to finish\n *\n *    // We destroy the effect, although closing the device also does this\n *    SDL_HapticDestroyEffect( haptic, effect_id );\n *\n *    // Close the device\n *    SDL_HapticClose(haptic);\n *\n *    return 0; // Success\n * }\n * \\endcode\n */\n\n#ifndef SDL_haptic_h_\n#define SDL_haptic_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_joystick.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif /* __cplusplus */\n\n/* FIXME: For SDL 2.1, adjust all the magnitude variables to be Uint16 (0xFFFF).\n *\n * At the moment the magnitude variables are mixed between signed/unsigned, and\n * it is also not made clear that ALL of those variables expect a max of 0x7FFF.\n *\n * Some platforms may have higher precision than that (Linux FF, Windows XInput)\n * so we should fix the inconsistency in favor of higher possible precision,\n * adjusting for platforms that use different scales.\n * -flibit\n */\n\n/**\n *  \\typedef SDL_Haptic\n *\n *  \\brief The haptic structure used to identify an SDL haptic.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticOpenFromJoystick\n *  \\sa SDL_HapticClose\n */\nstruct _SDL_Haptic;\ntypedef struct _SDL_Haptic SDL_Haptic;\n\n\n/**\n *  \\name Haptic features\n *\n *  Different haptic features a device can have.\n */\n/* @{ */\n\n/**\n *  \\name Haptic effects\n */\n/* @{ */\n\n/**\n *  \\brief Constant effect supported.\n *\n *  Constant haptic effect.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_CONSTANT   (1u<<0)\n\n/**\n *  \\brief Sine wave effect supported.\n *\n *  Periodic haptic effect that simulates sine waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SINE       (1u<<1)\n\n/**\n *  \\brief Left/Right effect supported.\n *\n *  Haptic effect for direct control over high/low frequency motors.\n *\n *  \\sa SDL_HapticLeftRight\n * \\warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,\n *          we ran out of bits, and this is important for XInput devices.\n */\n#define SDL_HAPTIC_LEFTRIGHT     (1u<<2)\n\n/* !!! FIXME: put this back when we have more bits in 2.1 */\n/* #define SDL_HAPTIC_SQUARE     (1<<2) */\n\n/**\n *  \\brief Triangle wave effect supported.\n *\n *  Periodic haptic effect that simulates triangular waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_TRIANGLE   (1u<<3)\n\n/**\n *  \\brief Sawtoothup wave effect supported.\n *\n *  Periodic haptic effect that simulates saw tooth up waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)\n\n/**\n *  \\brief Sawtoothdown wave effect supported.\n *\n *  Periodic haptic effect that simulates saw tooth down waves.\n *\n *  \\sa SDL_HapticPeriodic\n */\n#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)\n\n/**\n *  \\brief Ramp effect supported.\n *\n *  Ramp haptic effect.\n *\n *  \\sa SDL_HapticRamp\n */\n#define SDL_HAPTIC_RAMP       (1u<<6)\n\n/**\n *  \\brief Spring effect supported - uses axes position.\n *\n *  Condition haptic effect that simulates a spring.  Effect is based on the\n *  axes position.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_SPRING     (1u<<7)\n\n/**\n *  \\brief Damper effect supported - uses axes velocity.\n *\n *  Condition haptic effect that simulates dampening.  Effect is based on the\n *  axes velocity.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_DAMPER     (1u<<8)\n\n/**\n *  \\brief Inertia effect supported - uses axes acceleration.\n *\n *  Condition haptic effect that simulates inertia.  Effect is based on the axes\n *  acceleration.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_INERTIA    (1u<<9)\n\n/**\n *  \\brief Friction effect supported - uses axes movement.\n *\n *  Condition haptic effect that simulates friction.  Effect is based on the\n *  axes movement.\n *\n *  \\sa SDL_HapticCondition\n */\n#define SDL_HAPTIC_FRICTION   (1u<<10)\n\n/**\n *  \\brief Custom effect is supported.\n *\n *  User defined custom haptic effect.\n */\n#define SDL_HAPTIC_CUSTOM     (1u<<11)\n\n/* @} *//* Haptic effects */\n\n/* These last few are features the device has, not effects */\n\n/**\n *  \\brief Device can set global gain.\n *\n *  Device supports setting the global gain.\n *\n *  \\sa SDL_HapticSetGain\n */\n#define SDL_HAPTIC_GAIN       (1u<<12)\n\n/**\n *  \\brief Device can set autocenter.\n *\n *  Device supports setting autocenter.\n *\n *  \\sa SDL_HapticSetAutocenter\n */\n#define SDL_HAPTIC_AUTOCENTER (1u<<13)\n\n/**\n *  \\brief Device can be queried for effect status.\n *\n *  Device supports querying effect status.\n *\n *  \\sa SDL_HapticGetEffectStatus\n */\n#define SDL_HAPTIC_STATUS     (1u<<14)\n\n/**\n *  \\brief Device can be paused.\n *\n *  Devices supports being paused.\n *\n *  \\sa SDL_HapticPause\n *  \\sa SDL_HapticUnpause\n */\n#define SDL_HAPTIC_PAUSE      (1u<<15)\n\n\n/**\n * \\name Direction encodings\n */\n/* @{ */\n\n/**\n *  \\brief Uses polar coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_POLAR      0\n\n/**\n *  \\brief Uses cartesian coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_CARTESIAN  1\n\n/**\n *  \\brief Uses spherical coordinates for the direction.\n *\n *  \\sa SDL_HapticDirection\n */\n#define SDL_HAPTIC_SPHERICAL  2\n\n/* @} *//* Direction encodings */\n\n/* @} *//* Haptic features */\n\n/*\n * Misc defines.\n */\n\n/**\n * \\brief Used to play a device an infinite number of times.\n *\n * \\sa SDL_HapticRunEffect\n */\n#define SDL_HAPTIC_INFINITY   4294967295U\n\n\n/**\n *  \\brief Structure that represents a haptic direction.\n *\n *  This is the direction where the force comes from,\n *  instead of the direction in which the force is exerted.\n *\n *  Directions can be specified by:\n *   - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.\n *   - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.\n *   - ::SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.\n *\n *  Cardinal directions of the haptic device are relative to the positioning\n *  of the device.  North is considered to be away from the user.\n *\n *  The following diagram represents the cardinal directions:\n *  \\verbatim\n                 .--.\n                 |__| .-------.\n                 |=.| |.-----.|\n                 |--| ||     ||\n                 |  | |'-----'|\n                 |__|~')_____('\n                   [ COMPUTER ]\n\n\n                     North (0,-1)\n                         ^\n                         |\n                         |\n   (-1,0)  West <----[ HAPTIC ]----> East (1,0)\n                         |\n                         |\n                         v\n                      South (0,1)\n\n\n                      [ USER ]\n                        \\|||/\n                        (o o)\n                  ---ooO-(_)-Ooo---\n    \\endverbatim\n *\n *  If type is ::SDL_HAPTIC_POLAR, direction is encoded by hundredths of a\n *  degree starting north and turning clockwise.  ::SDL_HAPTIC_POLAR only uses\n *  the first \\c dir parameter.  The cardinal directions would be:\n *   - North: 0 (0 degrees)\n *   - East: 9000 (90 degrees)\n *   - South: 18000 (180 degrees)\n *   - West: 27000 (270 degrees)\n *\n *  If type is ::SDL_HAPTIC_CARTESIAN, direction is encoded by three positions\n *  (X axis, Y axis and Z axis (with 3 axes)).  ::SDL_HAPTIC_CARTESIAN uses\n *  the first three \\c dir parameters.  The cardinal directions would be:\n *   - North:  0,-1, 0\n *   - East:   1, 0, 0\n *   - South:  0, 1, 0\n *   - West:  -1, 0, 0\n *\n *  The Z axis represents the height of the effect if supported, otherwise\n *  it's unused.  In cartesian encoding (1, 2) would be the same as (2, 4), you\n *  can use any multiple you want, only the direction matters.\n *\n *  If type is ::SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations.\n *  The first two \\c dir parameters are used.  The \\c dir parameters are as\n *  follows (all values are in hundredths of degrees):\n *   - Degrees from (1, 0) rotated towards (0, 1).\n *   - Degrees towards (0, 0, 1) (device needs at least 3 axes).\n *\n *\n *  Example of force coming from the south with all encodings (force coming\n *  from the south means the user will have to pull the stick to counteract):\n *  \\code\n *  SDL_HapticDirection direction;\n *\n *  // Cartesian directions\n *  direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.\n *  direction.dir[0] = 0; // X position\n *  direction.dir[1] = 1; // Y position\n *  // Assuming the device has 2 axes, we don't need to specify third parameter.\n *\n *  // Polar directions\n *  direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.\n *  direction.dir[0] = 18000; // Polar only uses first parameter\n *\n *  // Spherical coordinates\n *  direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding\n *  direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.\n *  \\endcode\n *\n *  \\sa SDL_HAPTIC_POLAR\n *  \\sa SDL_HAPTIC_CARTESIAN\n *  \\sa SDL_HAPTIC_SPHERICAL\n *  \\sa SDL_HapticEffect\n *  \\sa SDL_HapticNumAxes\n */\ntypedef struct SDL_HapticDirection\n{\n    Uint8 type;         /**< The type of encoding. */\n    Sint32 dir[3];      /**< The encoded direction. */\n} SDL_HapticDirection;\n\n\n/**\n *  \\brief A structure containing a template for a Constant effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.\n *\n *  A constant effect applies a constant force in the specified direction\n *  to the joystick.\n *\n *  \\sa SDL_HAPTIC_CONSTANT\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticConstant\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_CONSTANT */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Constant */\n    Sint16 level;           /**< Strength of the constant effect. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticConstant;\n\n/**\n *  \\brief A structure containing a template for a Periodic effect.\n *\n *  The struct handles the following effects:\n *   - ::SDL_HAPTIC_SINE\n *   - ::SDL_HAPTIC_LEFTRIGHT\n *   - ::SDL_HAPTIC_TRIANGLE\n *   - ::SDL_HAPTIC_SAWTOOTHUP\n *   - ::SDL_HAPTIC_SAWTOOTHDOWN\n *\n *  A periodic effect consists in a wave-shaped effect that repeats itself\n *  over time.  The type determines the shape of the wave and the parameters\n *  determine the dimensions of the wave.\n *\n *  Phase is given by hundredth of a degree meaning that giving the phase a value\n *  of 9000 will displace it 25% of its period.  Here are sample values:\n *   -     0: No phase displacement.\n *   -  9000: Displaced 25% of its period.\n *   - 18000: Displaced 50% of its period.\n *   - 27000: Displaced 75% of its period.\n *   - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.\n *\n *  Examples:\n *  \\verbatim\n    SDL_HAPTIC_SINE\n      __      __      __      __\n     /  \\    /  \\    /  \\    /\n    /    \\__/    \\__/    \\__/\n\n    SDL_HAPTIC_SQUARE\n     __    __    __    __    __\n    |  |  |  |  |  |  |  |  |  |\n    |  |__|  |__|  |__|  |__|  |\n\n    SDL_HAPTIC_TRIANGLE\n      /\\    /\\    /\\    /\\    /\\\n     /  \\  /  \\  /  \\  /  \\  /\n    /    \\/    \\/    \\/    \\/\n\n    SDL_HAPTIC_SAWTOOTHUP\n      /|  /|  /|  /|  /|  /|  /|\n     / | / | / | / | / | / | / |\n    /  |/  |/  |/  |/  |/  |/  |\n\n    SDL_HAPTIC_SAWTOOTHDOWN\n    \\  |\\  |\\  |\\  |\\  |\\  |\\  |\n     \\ | \\ | \\ | \\ | \\ | \\ | \\ |\n      \\|  \\|  \\|  \\|  \\|  \\|  \\|\n    \\endverbatim\n *\n *  \\sa SDL_HAPTIC_SINE\n *  \\sa SDL_HAPTIC_LEFTRIGHT\n *  \\sa SDL_HAPTIC_TRIANGLE\n *  \\sa SDL_HAPTIC_SAWTOOTHUP\n *  \\sa SDL_HAPTIC_SAWTOOTHDOWN\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticPeriodic\n{\n    /* Header */\n    Uint16 type;        /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT,\n                             ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or\n                             ::SDL_HAPTIC_SAWTOOTHDOWN */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;      /**< Duration of the effect. */\n    Uint16 delay;       /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;      /**< Button that triggers the effect. */\n    Uint16 interval;    /**< How soon it can be triggered again after button. */\n\n    /* Periodic */\n    Uint16 period;      /**< Period of the wave. */\n    Sint16 magnitude;   /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */\n    Sint16 offset;      /**< Mean value of the wave. */\n    Uint16 phase;       /**< Positive phase shift given by hundredth of a degree. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length; /**< Duration of the fade. */\n    Uint16 fade_level;  /**< Level at the end of the fade. */\n} SDL_HapticPeriodic;\n\n/**\n *  \\brief A structure containing a template for a Condition effect.\n *\n *  The struct handles the following effects:\n *   - ::SDL_HAPTIC_SPRING: Effect based on axes position.\n *   - ::SDL_HAPTIC_DAMPER: Effect based on axes velocity.\n *   - ::SDL_HAPTIC_INERTIA: Effect based on axes acceleration.\n *   - ::SDL_HAPTIC_FRICTION: Effect based on axes movement.\n *\n *  Direction is handled by condition internals instead of a direction member.\n *  The condition effect specific members have three parameters.  The first\n *  refers to the X axis, the second refers to the Y axis and the third\n *  refers to the Z axis.  The right terms refer to the positive side of the\n *  axis and the left terms refer to the negative side of the axis.  Please\n *  refer to the ::SDL_HapticDirection diagram for which side is positive and\n *  which is negative.\n *\n *  \\sa SDL_HapticDirection\n *  \\sa SDL_HAPTIC_SPRING\n *  \\sa SDL_HAPTIC_DAMPER\n *  \\sa SDL_HAPTIC_INERTIA\n *  \\sa SDL_HAPTIC_FRICTION\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticCondition\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER,\n                                 ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION */\n    SDL_HapticDirection direction;  /**< Direction of the effect - Not used ATM. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Condition */\n    Uint16 right_sat[3];    /**< Level when joystick is to the positive side; max 0xFFFF. */\n    Uint16 left_sat[3];     /**< Level when joystick is to the negative side; max 0xFFFF. */\n    Sint16 right_coeff[3];  /**< How fast to increase the force towards the positive side. */\n    Sint16 left_coeff[3];   /**< How fast to increase the force towards the negative side. */\n    Uint16 deadband[3];     /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */\n    Sint16 center[3];       /**< Position of the dead zone. */\n} SDL_HapticCondition;\n\n/**\n *  \\brief A structure containing a template for a Ramp effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_RAMP effect.\n *\n *  The ramp effect starts at start strength and ends at end strength.\n *  It augments in linear fashion.  If you use attack and fade with a ramp\n *  the effects get added to the ramp effect making the effect become\n *  quadratic instead of linear.\n *\n *  \\sa SDL_HAPTIC_RAMP\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticRamp\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_RAMP */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Ramp */\n    Sint16 start;           /**< Beginning strength level. */\n    Sint16 end;             /**< Ending strength level. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticRamp;\n\n/**\n * \\brief A structure containing a template for a Left/Right effect.\n *\n * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect.\n *\n * The Left/Right effect is used to explicitly control the large and small\n * motors, commonly found in modern game controllers. The small (right) motor\n * is high frequency, and the large (left) motor is low frequency.\n *\n * \\sa SDL_HAPTIC_LEFTRIGHT\n * \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticLeftRight\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_LEFTRIGHT */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect in milliseconds. */\n\n    /* Rumble */\n    Uint16 large_magnitude; /**< Control of the large controller motor. */\n    Uint16 small_magnitude; /**< Control of the small controller motor. */\n} SDL_HapticLeftRight;\n\n/**\n *  \\brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.\n *\n *  This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.\n *\n *  A custom force feedback effect is much like a periodic effect, where the\n *  application can define its exact shape.  You will have to allocate the\n *  data yourself.  Data should consist of channels * samples Uint16 samples.\n *\n *  If channels is one, the effect is rotated using the defined direction.\n *  Otherwise it uses the samples in data for the different axes.\n *\n *  \\sa SDL_HAPTIC_CUSTOM\n *  \\sa SDL_HapticEffect\n */\ntypedef struct SDL_HapticCustom\n{\n    /* Header */\n    Uint16 type;            /**< ::SDL_HAPTIC_CUSTOM */\n    SDL_HapticDirection direction;  /**< Direction of the effect. */\n\n    /* Replay */\n    Uint32 length;          /**< Duration of the effect. */\n    Uint16 delay;           /**< Delay before starting the effect. */\n\n    /* Trigger */\n    Uint16 button;          /**< Button that triggers the effect. */\n    Uint16 interval;        /**< How soon it can be triggered again after button. */\n\n    /* Custom */\n    Uint8 channels;         /**< Axes to use, minimum of one. */\n    Uint16 period;          /**< Sample periods. */\n    Uint16 samples;         /**< Amount of samples. */\n    Uint16 *data;           /**< Should contain channels*samples items. */\n\n    /* Envelope */\n    Uint16 attack_length;   /**< Duration of the attack. */\n    Uint16 attack_level;    /**< Level at the start of the attack. */\n    Uint16 fade_length;     /**< Duration of the fade. */\n    Uint16 fade_level;      /**< Level at the end of the fade. */\n} SDL_HapticCustom;\n\n/**\n *  \\brief The generic template for any haptic effect.\n *\n *  All values max at 32767 (0x7FFF).  Signed values also can be negative.\n *  Time values unless specified otherwise are in milliseconds.\n *\n *  You can also pass ::SDL_HAPTIC_INFINITY to length instead of a 0-32767\n *  value.  Neither delay, interval, attack_length nor fade_length support\n *  ::SDL_HAPTIC_INFINITY.  Fade will also not be used since effect never ends.\n *\n *  Additionally, the ::SDL_HAPTIC_RAMP effect does not support a duration of\n *  ::SDL_HAPTIC_INFINITY.\n *\n *  Button triggers may not be supported on all devices, it is advised to not\n *  use them if possible.  Buttons start at index 1 instead of index 0 like\n *  the joystick.\n *\n *  If both attack_length and fade_level are 0, the envelope is not used,\n *  otherwise both values are used.\n *\n *  Common parts:\n *  \\code\n *  // Replay - All effects have this\n *  Uint32 length;        // Duration of effect (ms).\n *  Uint16 delay;         // Delay before starting effect.\n *\n *  // Trigger - All effects have this\n *  Uint16 button;        // Button that triggers effect.\n *  Uint16 interval;      // How soon before effect can be triggered again.\n *\n *  // Envelope - All effects except condition effects have this\n *  Uint16 attack_length; // Duration of the attack (ms).\n *  Uint16 attack_level;  // Level at the start of the attack.\n *  Uint16 fade_length;   // Duration of the fade out (ms).\n *  Uint16 fade_level;    // Level at the end of the fade.\n *  \\endcode\n *\n *\n *  Here we have an example of a constant effect evolution in time:\n *  \\verbatim\n    Strength\n    ^\n    |\n    |    effect level -->  _________________\n    |                     /                 \\\n    |                    /                   \\\n    |                   /                     \\\n    |                  /                       \\\n    | attack_level --> |                        \\\n    |                  |                        |  <---  fade_level\n    |\n    +--------------------------------------------------> Time\n                       [--]                 [---]\n                       attack_length        fade_length\n\n    [------------------][-----------------------]\n    delay               length\n    \\endverbatim\n *\n *  Note either the attack_level or the fade_level may be above the actual\n *  effect level.\n *\n *  \\sa SDL_HapticConstant\n *  \\sa SDL_HapticPeriodic\n *  \\sa SDL_HapticCondition\n *  \\sa SDL_HapticRamp\n *  \\sa SDL_HapticLeftRight\n *  \\sa SDL_HapticCustom\n */\ntypedef union SDL_HapticEffect\n{\n    /* Common for all force feedback effects */\n    Uint16 type;                    /**< Effect type. */\n    SDL_HapticConstant constant;    /**< Constant effect. */\n    SDL_HapticPeriodic periodic;    /**< Periodic effect. */\n    SDL_HapticCondition condition;  /**< Condition effect. */\n    SDL_HapticRamp ramp;            /**< Ramp effect. */\n    SDL_HapticLeftRight leftright;  /**< Left/Right effect. */\n    SDL_HapticCustom custom;        /**< Custom effect. */\n} SDL_HapticEffect;\n\n\n/* Function prototypes */\n/**\n *  \\brief Count the number of haptic devices attached to the system.\n *\n *  \\return Number of haptic devices detected on the system.\n */\nextern DECLSPEC int SDLCALL SDL_NumHaptics(void);\n\n/**\n *  \\brief Get the implementation dependent name of a haptic device.\n *\n *  This can be called before any joysticks are opened.\n *  If no name can be found, this function returns NULL.\n *\n *  \\param device_index Index of the device to get its name.\n *  \\return Name of the device or NULL on error.\n *\n *  \\sa SDL_NumHaptics\n */\nextern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);\n\n/**\n *  \\brief Opens a haptic device for use.\n *\n *  The index passed as an argument refers to the N'th haptic device on this\n *  system.\n *\n *  When opening a haptic device, its gain will be set to maximum and\n *  autocenter will be disabled.  To modify these values use\n *  SDL_HapticSetGain() and SDL_HapticSetAutocenter().\n *\n *  \\param device_index Index of the device to open.\n *  \\return Device identifier or NULL on error.\n *\n *  \\sa SDL_HapticIndex\n *  \\sa SDL_HapticOpenFromMouse\n *  \\sa SDL_HapticOpenFromJoystick\n *  \\sa SDL_HapticClose\n *  \\sa SDL_HapticSetGain\n *  \\sa SDL_HapticSetAutocenter\n *  \\sa SDL_HapticPause\n *  \\sa SDL_HapticStopAll\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpen(int device_index);\n\n/**\n *  \\brief Checks if the haptic device at index has been opened.\n *\n *  \\param device_index Index to check to see if it has been opened.\n *  \\return 1 if it has been opened or 0 if it hasn't.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticIndex\n */\nextern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);\n\n/**\n *  \\brief Gets the index of a haptic device.\n *\n *  \\param haptic Haptic device to get the index of.\n *  \\return The index of the haptic device or -1 on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticOpened\n */\nextern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);\n\n/**\n *  \\brief Gets whether or not the current mouse has haptic capabilities.\n *\n *  \\return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.\n *\n *  \\sa SDL_HapticOpenFromMouse\n */\nextern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);\n\n/**\n *  \\brief Tries to open a haptic device from the current mouse.\n *\n *  \\return The haptic device identifier or NULL on error.\n *\n *  \\sa SDL_MouseIsHaptic\n *  \\sa SDL_HapticOpen\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);\n\n/**\n *  \\brief Checks to see if a joystick has haptic features.\n *\n *  \\param joystick Joystick to test for haptic capabilities.\n *  \\return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't\n *          or -1 if an error occurred.\n *\n *  \\sa SDL_HapticOpenFromJoystick\n */\nextern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);\n\n/**\n *  \\brief Opens a haptic device for use from a joystick device.\n *\n *  You must still close the haptic device separately.  It will not be closed\n *  with the joystick.\n *\n *  When opening from a joystick you should first close the haptic device before\n *  closing the joystick device.  If not, on some implementations the haptic\n *  device will also get unallocated and you'll be unable to use force feedback\n *  on that device.\n *\n *  \\param joystick Joystick to create a haptic device from.\n *  \\return A valid haptic device identifier on success or NULL on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticClose\n */\nextern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *\n                                                               joystick);\n\n/**\n *  \\brief Closes a haptic device previously opened with SDL_HapticOpen().\n *\n *  \\param haptic Haptic device to close.\n */\nextern DECLSPEC void SDLCALL SDL_HapticClose(SDL_Haptic * haptic);\n\n/**\n *  \\brief Returns the number of effects a haptic device can store.\n *\n *  On some platforms this isn't fully supported, and therefore is an\n *  approximation.  Always check to see if your created effect was actually\n *  created and do not rely solely on SDL_HapticNumEffects().\n *\n *  \\param haptic The haptic device to query effect max.\n *  \\return The number of effects the haptic device can store or\n *          -1 on error.\n *\n *  \\sa SDL_HapticNumEffectsPlaying\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);\n\n/**\n *  \\brief Returns the number of effects a haptic device can play at the same\n *         time.\n *\n *  This is not supported on all platforms, but will always return a value.\n *  Added here for the sake of completeness.\n *\n *  \\param haptic The haptic device to query maximum playing effects.\n *  \\return The number of effects the haptic device can play at the same time\n *          or -1 on error.\n *\n *  \\sa SDL_HapticNumEffects\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);\n\n/**\n *  \\brief Gets the haptic device's supported features in bitwise manner.\n *\n *  Example:\n *  \\code\n *  if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {\n *      printf(\"We have constant haptic effect!\\n\");\n *  }\n *  \\endcode\n *\n *  \\param haptic The haptic device to query.\n *  \\return Haptic features in bitwise manner (OR'd).\n *\n *  \\sa SDL_HapticNumEffects\n *  \\sa SDL_HapticEffectSupported\n */\nextern DECLSPEC unsigned int SDLCALL SDL_HapticQuery(SDL_Haptic * haptic);\n\n\n/**\n *  \\brief Gets the number of haptic axes the device has.\n *\n *  \\sa SDL_HapticDirection\n */\nextern DECLSPEC int SDLCALL SDL_HapticNumAxes(SDL_Haptic * haptic);\n\n/**\n *  \\brief Checks to see if effect is supported by haptic.\n *\n *  \\param haptic Haptic device to check on.\n *  \\param effect Effect to check to see if it is supported.\n *  \\return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n *  \\sa SDL_HapticNewEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,\n                                                      SDL_HapticEffect *\n                                                      effect);\n\n/**\n *  \\brief Creates a new haptic effect on the device.\n *\n *  \\param haptic Haptic device to create the effect on.\n *  \\param effect Properties of the effect to create.\n *  \\return The identifier of the effect on success or -1 on error.\n *\n *  \\sa SDL_HapticUpdateEffect\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,\n                                                SDL_HapticEffect * effect);\n\n/**\n *  \\brief Updates the properties of an effect.\n *\n *  Can be used dynamically, although behavior when dynamically changing\n *  direction may be strange.  Specifically the effect may reupload itself\n *  and start playing from the start.  You cannot change the type either when\n *  running SDL_HapticUpdateEffect().\n *\n *  \\param haptic Haptic device that has the effect.\n *  \\param effect Identifier of the effect to update.\n *  \\param data New effect properties to use.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticNewEffect\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticUpdateEffect(SDL_Haptic * haptic,\n                                                   int effect,\n                                                   SDL_HapticEffect * data);\n\n/**\n *  \\brief Runs the haptic effect on its associated haptic device.\n *\n *  If iterations are ::SDL_HAPTIC_INFINITY, it'll run the effect over and over\n *  repeating the envelope (attack and fade) every time.  If you only want the\n *  effect to last forever, set ::SDL_HAPTIC_INFINITY in the effect's length\n *  parameter.\n *\n *  \\param haptic Haptic device to run the effect on.\n *  \\param effect Identifier of the haptic effect to run.\n *  \\param iterations Number of iterations to run the effect. Use\n *         ::SDL_HAPTIC_INFINITY for infinity.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticStopEffect\n *  \\sa SDL_HapticDestroyEffect\n *  \\sa SDL_HapticGetEffectStatus\n */\nextern DECLSPEC int SDLCALL SDL_HapticRunEffect(SDL_Haptic * haptic,\n                                                int effect,\n                                                Uint32 iterations);\n\n/**\n *  \\brief Stops the haptic effect on its associated haptic device.\n *\n *  \\param haptic Haptic device to stop the effect on.\n *  \\param effect Identifier of the effect to stop.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticDestroyEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticStopEffect(SDL_Haptic * haptic,\n                                                 int effect);\n\n/**\n *  \\brief Destroys a haptic effect on the device.\n *\n *  This will stop the effect if it's running.  Effects are automatically\n *  destroyed when the device is closed.\n *\n *  \\param haptic Device to destroy the effect on.\n *  \\param effect Identifier of the effect to destroy.\n *\n *  \\sa SDL_HapticNewEffect\n */\nextern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,\n                                                     int effect);\n\n/**\n *  \\brief Gets the status of the current effect on the haptic device.\n *\n *  Device must support the ::SDL_HAPTIC_STATUS feature.\n *\n *  \\param haptic Haptic device to query the effect status on.\n *  \\param effect Identifier of the effect to query its status.\n *  \\return 0 if it isn't playing, 1 if it is playing or -1 on error.\n *\n *  \\sa SDL_HapticRunEffect\n *  \\sa SDL_HapticStopEffect\n */\nextern DECLSPEC int SDLCALL SDL_HapticGetEffectStatus(SDL_Haptic * haptic,\n                                                      int effect);\n\n/**\n *  \\brief Sets the global gain of the device.\n *\n *  Device must support the ::SDL_HAPTIC_GAIN feature.\n *\n *  The user may specify the maximum gain by setting the environment variable\n *  SDL_HAPTIC_GAIN_MAX which should be between 0 and 100.  All calls to\n *  SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the\n *  maximum.\n *\n *  \\param haptic Haptic device to set the gain on.\n *  \\param gain Value to set the gain to, should be between 0 and 100.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticSetGain(SDL_Haptic * haptic, int gain);\n\n/**\n *  \\brief Sets the global autocenter of the device.\n *\n *  Autocenter should be between 0 and 100.  Setting it to 0 will disable\n *  autocentering.\n *\n *  Device must support the ::SDL_HAPTIC_AUTOCENTER feature.\n *\n *  \\param haptic Haptic device to set autocentering on.\n *  \\param autocenter Value to set autocenter to, 0 disables autocentering.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticQuery\n */\nextern DECLSPEC int SDLCALL SDL_HapticSetAutocenter(SDL_Haptic * haptic,\n                                                    int autocenter);\n\n/**\n *  \\brief Pauses a haptic device.\n *\n *  Device must support the ::SDL_HAPTIC_PAUSE feature.  Call\n *  SDL_HapticUnpause() to resume playback.\n *\n *  Do not modify the effects nor add new ones while the device is paused.\n *  That can cause all sorts of weird errors.\n *\n *  \\param haptic Haptic device to pause.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticUnpause\n */\nextern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);\n\n/**\n *  \\brief Unpauses a haptic device.\n *\n *  Call to unpause after SDL_HapticPause().\n *\n *  \\param haptic Haptic device to unpause.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticPause\n */\nextern DECLSPEC int SDLCALL SDL_HapticUnpause(SDL_Haptic * haptic);\n\n/**\n *  \\brief Stops all the currently playing effects on a haptic device.\n *\n *  \\param haptic Haptic device to stop.\n *  \\return 0 on success or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic);\n\n/**\n *  \\brief Checks to see if rumble is supported on a haptic device.\n *\n *  \\param haptic Haptic device to check to see if it supports rumble.\n *  \\return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error.\n *\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumblePlay\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleSupported(SDL_Haptic * haptic);\n\n/**\n *  \\brief Initializes the haptic device for simple rumble playback.\n *\n *  \\param haptic Haptic device to initialize for simple rumble playback.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticOpen\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumblePlay\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleInit(SDL_Haptic * haptic);\n\n/**\n *  \\brief Runs simple rumble on a haptic device\n *\n *  \\param haptic Haptic device to play rumble effect on.\n *  \\param strength Strength of the rumble to play as a 0-1 float value.\n *  \\param length Length of the rumble to play in milliseconds.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumbleStop\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumblePlay(SDL_Haptic * haptic, float strength, Uint32 length );\n\n/**\n *  \\brief Stops the simple rumble on a haptic device.\n *\n *  \\param haptic Haptic to stop the rumble on.\n *  \\return 0 on success or -1 on error.\n *\n *  \\sa SDL_HapticRumbleSupported\n *  \\sa SDL_HapticRumbleInit\n *  \\sa SDL_HapticRumblePlay\n */\nextern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_haptic_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_hints.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_hints.h\n *\n *  Official documentation for SDL configuration variables\n *\n *  This file contains functions to set and get configuration hints,\n *  as well as listing each of them alphabetically.\n *\n *  The convention for naming hints is SDL_HINT_X, where \"SDL_X\" is\n *  the environment variable that can be used to override the default.\n *\n *  In general these hints are just that - they may or may not be\n *  supported or applicable on any given platform, but they provide\n *  a way for an application or user to give the library a hint as\n *  to how they would like the library to work.\n */\n\n#ifndef SDL_hints_h_\n#define SDL_hints_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.\n *\n *  SDL can try to accelerate the SDL screen surface by using streaming\n *  textures with a 3D rendering engine.  This variable controls whether and\n *  how this is done.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable 3D acceleration\n *    \"1\"       - Enable 3D acceleration, using the default renderer.\n *    \"X\"       - Enable 3D acceleration, using X where X is one of the valid rendering drivers.  (e.g. \"direct3d\", \"opengl\", etc.)\n *\n *  By default SDL tries to make a best guess for each platform whether\n *  to use acceleration or not.\n */\n#define SDL_HINT_FRAMEBUFFER_ACCELERATION   \"SDL_FRAMEBUFFER_ACCELERATION\"\n\n/**\n *  \\brief  A variable specifying which render driver to use.\n *\n *  If the application doesn't pick a specific renderer to use, this variable\n *  specifies the name of the preferred renderer.  If the preferred renderer\n *  can't be initialized, the normal default renderer is used.\n *\n *  This variable is case insensitive and can be set to the following values:\n *    \"direct3d\"\n *    \"opengl\"\n *    \"opengles2\"\n *    \"opengles\"\n *    \"metal\"\n *    \"software\"\n *\n *  The default varies by platform, but it's the first one in the list that\n *  is available on the current platform.\n */\n#define SDL_HINT_RENDER_DRIVER              \"SDL_RENDER_DRIVER\"\n\n/**\n *  \\brief  A variable controlling whether the OpenGL render driver uses shaders if they are available.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable shaders\n *    \"1\"       - Enable shaders\n *\n *  By default shaders are used if OpenGL supports them.\n */\n#define SDL_HINT_RENDER_OPENGL_SHADERS      \"SDL_RENDER_OPENGL_SHADERS\"\n\n/**\n *  \\brief  A variable controlling whether the Direct3D device is initialized for thread-safe operations.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Thread-safety is not enabled (faster)\n *    \"1\"       - Thread-safety is enabled\n *\n *  By default the Direct3D device is created with thread-safety disabled.\n */\n#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE \"SDL_RENDER_DIRECT3D_THREADSAFE\"\n\n/**\n *  \\brief  A variable controlling whether to enable Direct3D 11+'s Debug Layer.\n *\n *  This variable does not have any effect on the Direct3D 9 based renderer.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable Debug Layer use\n *    \"1\"       - Enable Debug Layer use\n *\n *  By default, SDL does not use Direct3D Debug Layer.\n */\n#define SDL_HINT_RENDER_DIRECT3D11_DEBUG    \"SDL_RENDER_DIRECT3D11_DEBUG\"\n\n/**\n *  \\brief  A variable controlling the scaling policy for SDL_RenderSetLogicalSize.\n *\n *  This variable can be set to the following values:\n *    \"0\" or \"letterbox\" - Uses letterbox/sidebars to fit the entire rendering on screen\n *    \"1\" or \"overscan\"  - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen\n *\n *  By default letterbox is used\n */\n#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE       \"SDL_RENDER_LOGICAL_SIZE_MODE\"\n\n/**\n *  \\brief  A variable controlling the scaling quality\n *\n *  This variable can be set to the following values:\n *    \"0\" or \"nearest\" - Nearest pixel sampling\n *    \"1\" or \"linear\"  - Linear filtering (supported by OpenGL and Direct3D)\n *    \"2\" or \"best\"    - Currently this is the same as \"linear\"\n *\n *  By default nearest pixel sampling is used\n */\n#define SDL_HINT_RENDER_SCALE_QUALITY       \"SDL_RENDER_SCALE_QUALITY\"\n\n/**\n *  \\brief  A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable vsync\n *    \"1\"       - Enable vsync\n *\n *  By default SDL does not sync screen surface updates with vertical refresh.\n */\n#define SDL_HINT_RENDER_VSYNC               \"SDL_RENDER_VSYNC\"\n\n/**\n *  \\brief  A variable controlling whether the screensaver is enabled. \n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable screensaver\n *    \"1\"       - Enable screensaver\n *\n *  By default SDL will disable the screensaver.\n */\n#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER    \"SDL_VIDEO_ALLOW_SCREENSAVER\"\n\n/**\n *  \\brief  A variable controlling whether the X11 VidMode extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable XVidMode\n *    \"1\"       - Enable XVidMode\n *\n *  By default SDL will use XVidMode if it is available.\n */\n#define SDL_HINT_VIDEO_X11_XVIDMODE         \"SDL_VIDEO_X11_XVIDMODE\"\n\n/**\n *  \\brief  A variable controlling whether the X11 Xinerama extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable Xinerama\n *    \"1\"       - Enable Xinerama\n *\n *  By default SDL will use Xinerama if it is available.\n */\n#define SDL_HINT_VIDEO_X11_XINERAMA         \"SDL_VIDEO_X11_XINERAMA\"\n\n/**\n *  \\brief  A variable controlling whether the X11 XRandR extension should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable XRandR\n *    \"1\"       - Enable XRandR\n *\n *  By default SDL will not use XRandR because of window manager issues.\n */\n#define SDL_HINT_VIDEO_X11_XRANDR           \"SDL_VIDEO_X11_XRANDR\"\n\n/**\n *  \\brief  A variable controlling whether the X11 _NET_WM_PING protocol should be supported.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Disable _NET_WM_PING\n *    \"1\"       - Enable _NET_WM_PING\n *\n *  By default SDL will use _NET_WM_PING, but for applications that know they\n *  will not always be able to respond to ping requests in a timely manner they can\n *  turn it off to avoid the window manager thinking the app is hung.\n *  The hint is checked in CreateWindow.\n */\n#define SDL_HINT_VIDEO_X11_NET_WM_PING      \"SDL_VIDEO_X11_NET_WM_PING\"\n\n/**\n * \\brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.\n * \n * This variable can be set to the following values:\n * \"0\" - Disable _NET_WM_BYPASS_COMPOSITOR\n * \"1\" - Enable _NET_WM_BYPASS_COMPOSITOR\n * \n * By default SDL will use _NET_WM_BYPASS_COMPOSITOR\n * \n */\n#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR \"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\"\n\n/**\n *  \\brief  A variable controlling whether the window frame and title bar are interactive when the cursor is hidden \n *\n *  This variable can be set to the following values:\n *    \"0\"       - The window frame is not interactive when the cursor is hidden (no move, resize, etc)\n *    \"1\"       - The window frame is interactive when the cursor is hidden\n *\n *  By default SDL will allow interaction with the window frame when the cursor is hidden\n */\n#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN    \"SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN\"\n\n/**\n * \\brief A variable to specify custom icon resource id from RC file on Windows platform \n */\n#define SDL_HINT_WINDOWS_INTRESOURCE_ICON       \"SDL_WINDOWS_INTRESOURCE_ICON\"\n#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL \"SDL_WINDOWS_INTRESOURCE_ICON_SMALL\"\n\n/**\n *  \\brief  A variable controlling whether the windows message loop is processed by SDL \n *\n *  This variable can be set to the following values:\n *    \"0\"       - The window message loop is not run\n *    \"1\"       - The window message loop is processed in SDL_PumpEvents()\n *\n *  By default SDL will process the windows message loop\n */\n#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP \"SDL_WINDOWS_ENABLE_MESSAGELOOP\"\n\n/**\n *  \\brief  A variable controlling whether grabbing input grabs the keyboard\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Grab will affect only the mouse\n *    \"1\"       - Grab will affect mouse and keyboard\n *\n *  By default SDL will not grab the keyboard so system shortcuts still work.\n */\n#define SDL_HINT_GRAB_KEYBOARD              \"SDL_GRAB_KEYBOARD\"\n\n/**\n *  \\brief  A variable setting the double click time, in milliseconds.\n */\n#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME    \"SDL_MOUSE_DOUBLE_CLICK_TIME\"\n\n/**\n *  \\brief  A variable setting the double click radius, in pixels.\n */\n#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS    \"SDL_MOUSE_DOUBLE_CLICK_RADIUS\"\n\n/**\n *  \\brief  A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode\n */\n#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE    \"SDL_MOUSE_NORMAL_SPEED_SCALE\"\n\n/**\n *  \\brief  A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode\n */\n#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE    \"SDL_MOUSE_RELATIVE_SPEED_SCALE\"\n\n/**\n *  \\brief  A variable controlling whether relative mouse mode is implemented using mouse warping\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Relative mouse mode uses raw input\n *    \"1\"       - Relative mouse mode uses mouse warping\n *\n *  By default SDL will use raw input for relative mouse mode\n */\n#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP    \"SDL_MOUSE_RELATIVE_MODE_WARP\"\n\n/**\n *  \\brief Allow mouse click events when clicking to focus an SDL window\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Ignore mouse clicks that activate a window\n *    \"1\"       - Generate events for mouse clicks that activate a window\n *\n *  By default SDL will ignore mouse clicks that activate a window\n */\n#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH \"SDL_MOUSE_FOCUS_CLICKTHROUGH\"\n\n/**\n *  \\brief  A variable controlling whether touch events should generate synthetic mouse events\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Touch events will not generate mouse events\n *    \"1\"       - Touch events will generate mouse events\n *\n *  By default SDL will generate mouse events for touch events\n */\n#define SDL_HINT_TOUCH_MOUSE_EVENTS    \"SDL_TOUCH_MOUSE_EVENTS\"\n\n/**\n *  \\brief  A variable controlling whether mouse events should generate synthetic touch events\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Mouse events will not generate touch events (default for desktop platforms)\n *    \"1\"       - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)\n */\n\n#define SDL_HINT_MOUSE_TOUCH_EVENTS    \"SDL_MOUSE_TOUCH_EVENTS\"\n\n/**\n *  \\brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.\n *\n */\n#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS   \"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\"\n\n/**\n *  \\brief  A variable controlling whether the idle timer is disabled on iOS.\n *\n *  When an iOS app does not receive touches for some time, the screen is\n *  dimmed automatically. For games where the accelerometer is the only input\n *  this is problematic. This functionality can be disabled by setting this\n *  hint.\n *\n *  As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()\n *  accomplish the same thing on iOS. They should be preferred over this hint.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Enable idle timer\n *    \"1\"       - Disable idle timer\n */\n#define SDL_HINT_IDLE_TIMER_DISABLED \"SDL_IOS_IDLE_TIMER_DISABLED\"\n\n/**\n *  \\brief  A variable controlling which orientations are allowed on iOS/Android.\n *\n *  In some circumstances it is necessary to be able to explicitly control\n *  which UI orientations are allowed.\n *\n *  This variable is a space delimited list of the following values:\n *    \"LandscapeLeft\", \"LandscapeRight\", \"Portrait\" \"PortraitUpsideDown\"\n */\n#define SDL_HINT_ORIENTATIONS \"SDL_IOS_ORIENTATIONS\"\n\n/**\n *  \\brief  A variable controlling whether controllers used with the Apple TV\n *  generate UI events.\n *\n * When UI events are generated by controller input, the app will be\n * backgrounded when the Apple TV remote's menu button is pressed, and when the\n * pause or B buttons on gamepads are pressed.\n *\n * More information about properly making use of controllers for the Apple TV\n * can be found here:\n * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Controller input does not generate UI events (the default).\n *    \"1\"       - Controller input generates UI events.\n */\n#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS \"SDL_APPLE_TV_CONTROLLER_UI_EVENTS\"\n\n/**\n * \\brief  A variable controlling whether the Apple TV remote's joystick axes\n *         will automatically match the rotation of the remote.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Remote orientation does not affect joystick axes (the default).\n *    \"1\"       - Joystick axes are based on the orientation of the remote.\n */\n#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION \"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\"\n\n/**\n * \\brief  A variable controlling whether the home indicator bar on iPhone X\n *         should be hidden.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - The indicator bar is not hidden (default for windowed applications)\n *    \"1\"       - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)\n *    \"2\"       - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the \"home\" action (default for fullscreen applications)\n */\n#define SDL_HINT_IOS_HIDE_HOME_INDICATOR \"SDL_IOS_HIDE_HOME_INDICATOR\"\n\n/**\n *  \\brief  A variable controlling whether the Android / iOS built-in\n *  accelerometer should be listed as a joystick device.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - The accelerometer is not listed as a joystick\n *    \"1\"       - The accelerometer is available as a 3 axis joystick (the default).\n */\n#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK \"SDL_ACCELEROMETER_AS_JOYSTICK\"\n\n/**\n *  \\brief  A variable controlling whether the Android / tvOS remotes\n *  should be listed as joystick devices, instead of sending keyboard events.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Remotes send enter/escape/arrow key events\n *    \"1\"       - Remotes are available as 2 axis, 2 button joysticks (the default).\n */\n#define SDL_HINT_TV_REMOTE_AS_JOYSTICK \"SDL_TV_REMOTE_AS_JOYSTICK\"\n\n/**\n *  \\brief  A variable that lets you disable the detection and use of Xinput gamepad devices\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable XInput detection (only uses direct input)\n *    \"1\"       - Enable XInput detection (the default)\n */\n#define SDL_HINT_XINPUT_ENABLED \"SDL_XINPUT_ENABLED\"\n\n/**\n *  \\brief  A variable that causes SDL to use the old axis and button mapping for XInput devices.\n *\n *  This hint is for backwards compatibility only and will be removed in SDL 2.1\n *\n *  The default value is \"0\".  This hint must be set before SDL_Init()\n */\n#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING \"SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING\"\n\n/**\n *  \\brief  A variable that lets you manually hint extra gamecontroller db entries.\n *\n *  The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h\n *\n *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)\n *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()\n */\n#define SDL_HINT_GAMECONTROLLERCONFIG \"SDL_GAMECONTROLLERCONFIG\"\n\n/**\n *  \\brief  A variable that lets you provide a file with extra gamecontroller db entries.\n *\n *  The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h\n *\n *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)\n *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()\n */\n#define SDL_HINT_GAMECONTROLLERCONFIG_FILE \"SDL_GAMECONTROLLERCONFIG_FILE\"\n\n/**\n *  \\brief  A variable containing a list of devices to skip when scanning for game controllers.\n *\n *  The format of the string is a comma separated list of USB VID/PID pairs\n *  in hexadecimal form, e.g.\n *\n *      0xAAAA/0xBBBB,0xCCCC/0xDDDD\n *\n *  The variable can also take the form of @file, in which case the named\n *  file will be loaded and interpreted as the value of the variable.\n */\n#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES \"SDL_GAMECONTROLLER_IGNORE_DEVICES\"\n\n/**\n *  \\brief  If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.\n *\n *  The format of the string is a comma separated list of USB VID/PID pairs\n *  in hexadecimal form, e.g.\n *\n *      0xAAAA/0xBBBB,0xCCCC/0xDDDD\n *\n *  The variable can also take the form of @file, in which case the named\n *  file will be loaded and interpreted as the value of the variable.\n */\n#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT \"SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT\"\n\n/**\n *  \\brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable joystick & gamecontroller input events when the\n *                application is in the background.\n *    \"1\"       - Enable joystick & gamecontroller input events when the\n *                application is in the background.\n *\n *  The default value is \"0\".  This hint may be set at any time.\n */\n#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS \"SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI joystick drivers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI drivers are not used\n *    \"1\"       - HIDAPI drivers are used (the default)\n *\n *  This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.\n */\n#define SDL_HINT_JOYSTICK_HIDAPI \"SDL_JOYSTICK_HIDAPI\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for PS4 controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_PS4 \"SDL_JOYSTICK_HIDAPI_PS4\"\n\n/**\n *  \\brief  A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - extended reports are not enabled (the default)\n *    \"1\"       - extended reports\n *\n *  Extended input reports allow rumble on Bluetooth PS4 controllers, but\n *  break DirectInput handling for applications that don't use SDL.\n *\n *  Once extended reports are enabled, they can not be disabled without\n *  power cycling the controller.\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE \"SDL_JOYSTICK_HIDAPI_PS4_RUMBLE\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for Steam Controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_STEAM \"SDL_JOYSTICK_HIDAPI_STEAM\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH \"SDL_JOYSTICK_HIDAPI_SWITCH\"\n\n/**\n *  \\brief  A variable controlling whether the HIDAPI driver for XBox controllers should be used.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - HIDAPI driver is not used\n *    \"1\"       - HIDAPI driver is used\n *\n *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI\n */\n#define SDL_HINT_JOYSTICK_HIDAPI_XBOX   \"SDL_JOYSTICK_HIDAPI_XBOX\"\n\n/**\n *  \\brief  A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Do not scan for Steam Controllers\n *    \"1\"       - Scan for Steam Controllers (the default)\n *\n *  The default value is \"1\".  This hint must be set before initializing the joystick subsystem.\n */\n#define SDL_HINT_ENABLE_STEAM_CONTROLLERS \"SDL_ENABLE_STEAM_CONTROLLERS\"\n\n\n/**\n *  \\brief If set to \"0\" then never set the top most bit on a SDL Window, even if the video mode expects it.\n *      This is a debugging aid for developers and not expected to be used by end users. The default is \"1\"\n *\n *  This variable can be set to the following values:\n *    \"0\"       - don't allow topmost\n *    \"1\"       - allow topmost\n */\n#define SDL_HINT_ALLOW_TOPMOST \"SDL_ALLOW_TOPMOST\"\n\n/**\n *  \\brief A variable that controls the timer resolution, in milliseconds.\n *\n *  The higher resolution the timer, the more frequently the CPU services\n *  timer interrupts, and the more precise delays are, but this takes up\n *  power and CPU time.  This hint is only used on Windows 7 and earlier.\n *\n *  See this blog post for more information:\n *  http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/\n *\n *  If this variable is set to \"0\", the system timer resolution is not set.\n *\n *  The default value is \"1\". This hint may be set at any time.\n */\n#define SDL_HINT_TIMER_RESOLUTION \"SDL_TIMER_RESOLUTION\"\n\n\n/**\n *  \\brief  A variable describing the content orientation on QtWayland-based platforms.\n *\n *  On QtWayland platforms, windows are rotated client-side to allow for custom\n *  transitions. In order to correctly position overlays (e.g. volume bar) and\n *  gestures (e.g. events view, close/minimize gestures), the system needs to\n *  know in which orientation the application is currently drawing its contents.\n *\n *  This does not cause the window to be rotated or resized, the application\n *  needs to take care of drawing the content in the right orientation (the\n *  framebuffer is always in portrait mode).\n *\n *  This variable can be one of the following values:\n *    \"primary\" (default), \"portrait\", \"landscape\", \"inverted-portrait\", \"inverted-landscape\"\n */\n#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION \"SDL_QTWAYLAND_CONTENT_ORIENTATION\"\n\n/**\n *  \\brief  Flags to set on QtWayland windows to integrate with the native window manager.\n *\n *  On QtWayland platforms, this hint controls the flags to set on the windows.\n *  For example, on Sailfish OS \"OverridesSystemGestures\" disables swipe gestures.\n *\n *  This variable is a space-separated list of the following values (empty = no flags):\n *    \"OverridesSystemGestures\", \"StaysOnTop\", \"BypassWindowManager\"\n */\n#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS \"SDL_QTWAYLAND_WINDOW_FLAGS\"\n\n/**\n*  \\brief  A string specifying SDL's threads stack size in bytes or \"0\" for the backend's default size\n*\n*  Use this hint in case you need to set SDL's threads stack size to other than the default.\n*  This is specially useful if you build SDL against a non glibc libc library (such as musl) which\n*  provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).\n*  Support for this hint is currently available only in the pthread, Windows, and PSP backend.\n*\n*  Instead of this hint, in 2.0.9 and later, you can use\n*  SDL_CreateThreadWithStackSize(). This hint only works with the classic\n*  SDL_CreateThread().\n*/\n#define SDL_HINT_THREAD_STACK_SIZE              \"SDL_THREAD_STACK_SIZE\"\n\n/**\n *  \\brief If set to 1, then do not allow high-DPI windows. (\"Retina\" on Mac and iOS)\n */\n#define SDL_HINT_VIDEO_HIGHDPI_DISABLED \"SDL_VIDEO_HIGHDPI_DISABLED\"\n\n/**\n *  \\brief A variable that determines whether ctrl+click should generate a right-click event on Mac\n *\n *  If present, holding ctrl while left clicking will generate a right click\n *  event when on Mac.\n */\n#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK \"SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK\"\n\n/**\n*  \\brief  A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries\n*\n*  SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It\n*  can use two different sets of binaries, those compiled by the user from source\n*  or those provided by the Chrome browser. In the later case, these binaries require\n*  that SDL loads a DLL providing the shader compiler.\n*\n*  This variable can be set to the following values:\n*    \"d3dcompiler_46.dll\" - default, best for Vista or later.\n*    \"d3dcompiler_43.dll\" - for XP support.\n*    \"none\" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.\n*\n*/\n#define SDL_HINT_VIDEO_WIN_D3DCOMPILER              \"SDL_VIDEO_WIN_D3DCOMPILER\"\n\n/**\n*  \\brief  A variable that is the address of another SDL_Window* (as a hex string formatted with \"%p\").\n*  \n*  If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has\n*  SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly \n*  created SDL_Window:\n*\n*  1. Its pixel format will be set to the same pixel format as this SDL_Window.  This is\n*  needed for example when sharing an OpenGL context across multiple windows.\n*\n*  2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for\n*  OpenGL rendering.\n*\n*  This variable can be set to the following values:\n*    The address (as a string \"%p\") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should\n*    share a pixel format with.\n*/\n#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT    \"SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT\"\n\n/**\n *  \\brief A URL to a WinRT app's privacy policy\n *\n *  All network-enabled WinRT apps must make a privacy policy available to its\n *  users.  On Windows 8, 8.1, and RT, Microsoft mandates that this policy be\n *  be available in the Windows Settings charm, as accessed from within the app.\n *  SDL provides code to add a URL-based link there, which can point to the app's\n *  privacy policy.\n *\n *  To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL\n *  before calling any SDL_Init() functions.  The contents of the hint should\n *  be a valid URL.  For example, \"http://www.example.com\".\n *\n *  The default value is \"\", which will prevent SDL from adding a privacy policy\n *  link to the Settings charm.  This hint should only be set during app init.\n *\n *  The label text of an app's \"Privacy Policy\" link may be customized via another\n *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.\n *\n *  Please note that on Windows Phone, Microsoft does not provide standard UI\n *  for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL\n *  will not get used on that platform.  Network-enabled phone apps should display\n *  their privacy policy through some other, in-app means.\n */\n#define SDL_HINT_WINRT_PRIVACY_POLICY_URL \"SDL_WINRT_PRIVACY_POLICY_URL\"\n\n/** \\brief Label text for a WinRT app's privacy policy link\n *\n *  Network-enabled WinRT apps must include a privacy policy.  On Windows 8, 8.1, and RT,\n *  Microsoft mandates that this policy be available via the Windows Settings charm.\n *  SDL provides code to add a link there, with its label text being set via the\n *  optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.\n *\n *  Please note that a privacy policy's contents are not set via this hint.  A separate\n *  hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the\n *  policy.\n *\n *  The contents of this hint should be encoded as a UTF8 string.\n *\n *  The default value is \"Privacy Policy\".  This hint should only be set during app\n *  initialization, preferably before any calls to SDL_Init().\n *\n *  For additional information on linking to a privacy policy, see the documentation for\n *  SDL_HINT_WINRT_PRIVACY_POLICY_URL.\n */\n#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL \"SDL_WINRT_PRIVACY_POLICY_LABEL\"\n\n/** \\brief Allows back-button-press events on Windows Phone to be marked as handled\n *\n *  Windows Phone devices typically feature a Back button.  When pressed,\n *  the OS will emit back-button-press events, which apps are expected to\n *  handle in an appropriate manner.  If apps do not explicitly mark these\n *  events as 'Handled', then the OS will invoke its default behavior for\n *  unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to\n *  terminate the app (and attempt to switch to the previous app, or to the\n *  device's home screen).\n *\n *  Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to \"1\" will cause SDL\n *  to mark back-button-press events as Handled, if and when one is sent to\n *  the app.\n *\n *  Internally, Windows Phone sends back button events as parameters to\n *  special back-button-press callback functions.  Apps that need to respond\n *  to back-button-press events are expected to register one or more\n *  callback functions for such, shortly after being launched (during the\n *  app's initialization phase).  After the back button is pressed, the OS\n *  will invoke these callbacks.  If the app's callback(s) do not explicitly\n *  mark the event as handled by the time they return, or if the app never\n *  registers one of these callback, the OS will consider the event\n *  un-handled, and it will apply its default back button behavior (terminate\n *  the app).\n *\n *  SDL registers its own back-button-press callback with the Windows Phone\n *  OS.  This callback will emit a pair of SDL key-press events (SDL_KEYDOWN\n *  and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which\n *  it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.\n *  If the hint's value is set to \"1\", the back button event's Handled\n *  property will get set to 'true'.  If the hint's value is set to something\n *  else, or if it is unset, SDL will leave the event's Handled property\n *  alone.  (By default, the OS sets this property to 'false', to note.)\n *\n *  SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a\n *  back button is pressed, or can set it in direct-response to a back button\n *  being pressed.\n *\n *  In order to get notified when a back button is pressed, SDL apps should\n *  register a callback function with SDL_AddEventWatch(), and have it listen\n *  for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.\n *  (Alternatively, SDL_KEYUP events can be listened-for.  Listening for\n *  either event type is suitable.)  Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON\n *  set by such a callback, will be applied to the OS' current\n *  back-button-press event.\n *\n *  More details on back button behavior in Windows Phone apps can be found\n *  at the following page, on Microsoft's developer site:\n *  http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx\n */\n#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON \"SDL_WINRT_HANDLE_BACK_BUTTON\"\n\n/**\n *  \\brief  A variable that dictates policy for fullscreen Spaces on Mac OS X.\n *\n *  This hint only applies to Mac OS X.\n *\n *  The variable can be set to the following values:\n *    \"0\"       - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and\n *                SDL_WINDOW_RESIZABLE windows won't offer the \"fullscreen\"\n *                button on their titlebars).\n *    \"1\"       - Enable Spaces support (FULLSCREEN_DESKTOP will use them and\n *                SDL_WINDOW_RESIZABLE windows will offer the \"fullscreen\"\n *                button on their titlebars).\n *\n *  The default value is \"1\". Spaces are disabled regardless of this hint if\n *   the OS isn't at least Mac OS X Lion (10.7). This hint must be set before\n *   any windows are created.\n */\n#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES    \"SDL_VIDEO_MAC_FULLSCREEN_SPACES\"\n\n/**\n*  \\brief  When set don't force the SDL app to become a foreground process\n*\n*  This hint only applies to Mac OS X.\n*\n*/\n#define SDL_HINT_MAC_BACKGROUND_APP    \"SDL_MAC_BACKGROUND_APP\"\n\n/**\n * \\brief Android APK expansion main file version. Should be a string number like \"1\", \"2\" etc.\n *\n * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.\n *\n * If both hints were set then SDL_RWFromFile() will look into expansion files\n * after a given relative path was not found in the internal storage and assets.\n *\n * By default this hint is not set and the APK expansion files are not searched.\n */\n#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION \"SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION\"\n \n/**\n * \\brief Android APK expansion patch file version. Should be a string number like \"1\", \"2\" etc.\n *\n * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.\n *\n * If both hints were set then SDL_RWFromFile() will look into expansion files\n * after a given relative path was not found in the internal storage and assets.\n *\n * By default this hint is not set and the APK expansion files are not searched.\n */\n#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION \"SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION\"\n\n/**\n * \\brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL_TEXTEDITING events are sent, and it is the application's\n *               responsibility to render the text from these events and \n *               differentiate it somehow from committed text. (default)\n *   \"1\"       - If supported by the IME then SDL_TEXTEDITING events are not sent, \n *               and text that is being composed will be rendered in its own UI.\n */\n#define SDL_HINT_IME_INTERNAL_EDITING \"SDL_IME_INTERNAL_EDITING\"\n\n/**\n * \\brief A variable to control whether we trap the Android back button to handle it manually.\n *        This is necessary for the right mouse button to work on some Android devices, or\n *        to be able to trap the back button for use in your code reliably.  If set to true,\n *        the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of \n *        SDL_SCANCODE_AC_BACK.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Back button will be handled as usual for system. (default)\n *   \"1\"       - Back button will be trapped, allowing you to handle the key press\n *               manually.  (This will also let right mouse click work on systems \n *               where the right mouse button functions as back.)\n *\n * The value of this hint is used at runtime, so it can be changed at any time.\n */\n#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON \"SDL_ANDROID_TRAP_BACK_BUTTON\"\n\n/**\n * \\brief A variable to control whether the event loop will block itself when the app is paused.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Non blocking.\n *   \"1\"       - Blocking. (default)\n *\n * The value should be set before SDL is initialized.\n */\n#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE \"SDL_ANDROID_BLOCK_ON_PAUSE\"\n\n /**\n * \\brief A variable to control whether the return key on the soft keyboard\n *        should hide the soft keyboard on Android and iOS.\n *\n * The variable can be set to the following values:\n *   \"0\"       - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)\n *   \"1\"       - The return key will hide the keyboard.\n *\n * The value of this hint is used at runtime, so it can be changed at any time.\n */\n#define SDL_HINT_RETURN_KEY_HIDES_IME \"SDL_RETURN_KEY_HIDES_IME\"\n\n/**\n *  \\brief override the binding element for keyboard inputs for Emscripten builds\n *\n * This hint only applies to the emscripten platform\n *\n * The variable can be one of\n *    \"#window\"      - The javascript window object (this is the default)\n *    \"#document\"    - The javascript document object\n *    \"#screen\"      - the javascript window.screen object\n *    \"#canvas\"      - the WebGL canvas element\n *    any other string without a leading # sign applies to the element on the page with that ID.\n */\n#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT   \"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\"\n\n/**\n *  \\brief Tell SDL not to catch the SIGINT or SIGTERM signals.\n *\n * This hint only applies to Unix-like platforms.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will install a SIGINT and SIGTERM handler, and when it\n *               catches a signal, convert it into an SDL_QUIT event.\n *   \"1\"       - SDL will not install a signal handler at all.\n */\n#define SDL_HINT_NO_SIGNAL_HANDLERS   \"SDL_NO_SIGNAL_HANDLERS\"\n\n/**\n *  \\brief Tell SDL not to generate window-close events for Alt+F4 on Windows.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will generate a window-close event when it sees Alt+F4.\n *   \"1\"       - SDL will only do normal key handling for Alt+F4.\n */\n#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 \"SDL_WINDOWS_NO_CLOSE_ON_ALT_F4\"\n\n/**\n *  \\brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.\n *\n * The bitmap header version 4 is required for proper alpha channel support and\n * SDL will use it when required. Should this not be desired, this hint can\n * force the use of the 40 byte header version which is supported everywhere.\n *\n * The variable can be set to the following values:\n *   \"0\"       - Surfaces with a colorkey or an alpha channel are saved to a\n *               32-bit BMP file with an alpha mask. SDL will use the bitmap\n *               header version 4 and set the alpha mask accordingly.\n *   \"1\"       - Surfaces with a colorkey or an alpha channel are saved to a\n *               32-bit BMP file without an alpha mask. The alpha channel data\n *               will be in the file, but applications are going to ignore it.\n *\n * The default value is \"0\".\n */\n#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT \"SDL_BMP_SAVE_LEGACY_FORMAT\"\n\n/**\n * \\brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.\n *        The 0x406D1388 Exception is a trick used to inform Visual Studio of a\n *        thread's name, but it tends to cause problems with other debuggers,\n *        and the .NET runtime. Note that SDL 2.0.6 and later will still use\n *        the (safer) SetThreadDescription API, introduced in the Windows 10\n *        Creators Update, if available.\n *\n * The variable can be set to the following values:\n *   \"0\"       - SDL will raise the 0x406D1388 Exception to name threads.\n *               This is the default behavior of SDL <= 2.0.4.\n *   \"1\"       - SDL will not raise this exception, and threads will be unnamed. (default)\n *               This is necessary with .NET languages or debuggers that aren't Visual Studio.\n */\n#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING \"SDL_WINDOWS_DISABLE_THREAD_NAMING\"\n\n/**\n * \\brief Tell SDL which Dispmanx layer to use on a Raspberry PI\n *\n * Also known as Z-order. The variable can take a negative or positive value.\n * The default is 10000.\n */\n#define SDL_HINT_RPI_VIDEO_LAYER           \"SDL_RPI_VIDEO_LAYER\"\n\n/**\n * \\brief Tell the video driver that we only want a double buffer.\n *\n * By default, most lowlevel 2D APIs will use a triple buffer scheme that \n * wastes no CPU time on waiting for vsync after issuing a flip, but\n * introduces a frame of latency. On the other hand, using a double buffer\n * scheme instead is recommended for cases where low latency is an important\n * factor because we save a whole frame of latency.\n * We do so by waiting for vsync immediately after issuing a flip, usually just\n * after eglSwapBuffers call in the backend's *_SwapWindow function.\n *\n * Since it's driver-specific, it's only supported where possible and\n * implemented. Currently supported the following drivers:\n * - KMSDRM (kmsdrm)\n * - Raspberry Pi (raspberrypi)\n */\n#define SDL_HINT_VIDEO_DOUBLE_BUFFER      \"SDL_VIDEO_DOUBLE_BUFFER\"\n\n/**\n *  \\brief  A variable controlling what driver to use for OpenGL ES contexts.\n *\n *  On some platforms, currently Windows and X11, OpenGL drivers may support\n *  creating contexts with an OpenGL ES profile. By default SDL uses these\n *  profiles, when available, otherwise it attempts to load an OpenGL ES\n *  library, e.g. that provided by the ANGLE project. This variable controls\n *  whether SDL follows this default behaviour or will always load an\n *  OpenGL ES library.\n *\n *  Circumstances where this is useful include\n *  - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,\n *    or emulator, e.g. those from ARM, Imagination or Qualcomm.\n *  - Resolving OpenGL ES function addresses at link time by linking with\n *    the OpenGL ES library instead of querying them at run time with\n *    SDL_GL_GetProcAddress().\n *\n *  Caution: for an application to work with the default behaviour across\n *  different OpenGL drivers it must query the OpenGL ES function\n *  addresses at run time using SDL_GL_GetProcAddress().\n *\n *  This variable is ignored on most platforms because OpenGL ES is native\n *  or not supported.\n *\n *  This variable can be set to the following values:\n *    \"0\"       - Use ES profile of OpenGL, if available. (Default when not set.)\n *    \"1\"       - Load OpenGL ES library using the default library names.\n *\n */\n#define SDL_HINT_OPENGL_ES_DRIVER   \"SDL_OPENGL_ES_DRIVER\"\n\n/**\n *  \\brief  A variable controlling speed/quality tradeoff of audio resampling.\n *\n *  If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )\n *  to handle audio resampling. There are different resampling modes available\n *  that produce different levels of quality, using more CPU.\n *\n *  If this hint isn't specified to a valid setting, or libsamplerate isn't\n *  available, SDL will use the default, internal resampling algorithm.\n *\n *  Note that this is currently only applicable to resampling audio that is\n *  being written to a device for playback or audio being read from a device\n *  for capture. SDL_AudioCVT always uses the default resampler (although this\n *  might change for SDL 2.1).\n *\n *  This hint is currently only checked at audio subsystem initialization.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\" or \"default\" - Use SDL's internal resampling (Default when not set - low quality, fast)\n *    \"1\" or \"fast\"    - Use fast, slightly higher quality resampling, if available\n *    \"2\" or \"medium\"  - Use medium quality resampling, if available\n *    \"3\" or \"best\"    - Use high quality resampling, if available\n */\n#define SDL_HINT_AUDIO_RESAMPLING_MODE   \"SDL_AUDIO_RESAMPLING_MODE\"\n\n/**\n *  \\brief  A variable controlling the audio category on iOS and Mac OS X\n *\n *  This variable can be set to the following values:\n *\n *    \"ambient\"     - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)\n *    \"playback\"    - Use the AVAudioSessionCategoryPlayback category\n *\n *  For more information, see Apple's documentation:\n *  https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html\n */\n#define SDL_HINT_AUDIO_CATEGORY   \"SDL_AUDIO_CATEGORY\"\n\n/**\n *  \\brief  A variable controlling whether the 2D render API is compatible or efficient.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\"     - Don't use batching to make rendering more efficient.\n *    \"1\"     - Use batching, but might cause problems if app makes its own direct OpenGL calls.\n *\n *  Up to SDL 2.0.9, the render API would draw immediately when requested. Now\n *  it batches up draw requests and sends them all to the GPU only when forced\n *  to (during SDL_RenderPresent, when changing render targets, by updating a\n *  texture that the batch needs, etc). This is significantly more efficient,\n *  but it can cause problems for apps that expect to render on top of the\n *  render API's output. As such, SDL will disable batching if a specific\n *  render backend is requested (since this might indicate that the app is\n *  planning to use the underlying graphics API directly). This hint can\n *  be used to explicitly request batching in this instance. It is a contract\n *  that you will either never use the underlying graphics API directly, or\n *  if you do, you will call SDL_RenderFlush() before you do so any current\n *  batch goes to the GPU before your work begins. Not following this contract\n *  will result in undefined behavior.\n */\n#define SDL_HINT_RENDER_BATCHING  \"SDL_RENDER_BATCHING\"\n\n\n/**\n *  \\brief  A variable controlling whether SDL logs all events pushed onto its internal queue.\n *\n *  This variable can be set to the following values:\n *\n *    \"0\"     - Don't log any events (default)\n *    \"1\"     - Log all events except mouse and finger motion, which are pretty spammy.\n *    \"2\"     - Log all events.\n *\n *  This is generally meant to be used to debug SDL itself, but can be useful\n *  for application developers that need better visibility into what is going\n *  on in the event queue. Logged events are sent through SDL_Log(), which\n *  means by default they appear on stdout on most platforms or maybe\n *  OutputDebugString() on Windows, and can be funneled by the app with\n *  SDL_LogSetOutputFunction(), etc.\n *\n *  This hint can be toggled on and off at runtime, if you only need to log\n *  events for a small subset of program execution.\n */\n#define SDL_HINT_EVENT_LOGGING   \"SDL_EVENT_LOGGING\"\n\n\n\n/**\n *  \\brief  Controls how the size of the RIFF chunk affects the loading of a WAVE file.\n *\n *  The size of the RIFF chunk (which includes all the sub-chunks of the WAVE\n *  file) is not always reliable. In case the size is wrong, it's possible to\n *  just ignore it and step through the chunks until a fixed limit is reached.\n *\n *  Note that files that have trailing data unrelated to the WAVE file or\n *  corrupt files may slow down the loading process without a reliable boundary.\n *  By default, SDL stops after 10000 chunks to prevent wasting time. Use the\n *  environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.\n *\n *  This variable can be set to the following values:\n *\n *    \"force\"        - Always use the RIFF chunk size as a boundary for the chunk search\n *    \"ignorezero\"   - Like \"force\", but a zero size searches up to 4 GiB (default)\n *    \"ignore\"       - Ignore the RIFF chunk size and always search up to 4 GiB\n *    \"maximum\"      - Search for chunks until the end of file (not recommended)\n */\n#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE   \"SDL_WAVE_RIFF_CHUNK_SIZE\"\n\n/**\n *  \\brief  Controls how a truncated WAVE file is handled.\n *\n *  A WAVE file is considered truncated if any of the chunks are incomplete or\n *  the data chunk size is not a multiple of the block size. By default, SDL\n *  decodes until the first incomplete block, as most applications seem to do.\n *\n *  This variable can be set to the following values:\n *\n *    \"verystrict\" - Raise an error if the file is truncated\n *    \"strict\"     - Like \"verystrict\", but the size of the RIFF chunk is ignored\n *    \"dropframe\"  - Decode until the first incomplete sample frame\n *    \"dropblock\"  - Decode until the first incomplete block (default)\n */\n#define SDL_HINT_WAVE_TRUNCATION   \"SDL_WAVE_TRUNCATION\"\n\n/**\n *  \\brief  Controls how the fact chunk affects the loading of a WAVE file.\n *\n *  The fact chunk stores information about the number of samples of a WAVE\n *  file. The Standards Update from Microsoft notes that this value can be used\n *  to 'determine the length of the data in seconds'. This is especially useful\n *  for compressed formats (for which this is a mandatory chunk) if they produce\n *  multiple sample frames per block and truncating the block is not allowed.\n *  The fact chunk can exactly specify how many sample frames there should be\n *  in this case.\n *\n *  Unfortunately, most application seem to ignore the fact chunk and so SDL\n *  ignores it by default as well.\n *\n *  This variable can be set to the following values:\n *\n *    \"truncate\"    - Use the number of samples to truncate the wave data if\n *                    the fact chunk is present and valid\n *    \"strict\"      - Like \"truncate\", but raise an error if the fact chunk\n *                    is invalid, not present for non-PCM formats, or if the\n *                    data chunk doesn't have that many samples\n *    \"ignorezero\"  - Like \"truncate\", but ignore fact chunk if the number of\n *                    samples is zero\n *    \"ignore\"      - Ignore fact chunk entirely (default)\n */\n#define SDL_HINT_WAVE_FACT_CHUNK   \"SDL_WAVE_FACT_CHUNK\"\n\n/**\n *  \\brief  An enumeration of hint priorities\n */\ntypedef enum\n{\n    SDL_HINT_DEFAULT,\n    SDL_HINT_NORMAL,\n    SDL_HINT_OVERRIDE\n} SDL_HintPriority;\n\n\n/**\n *  \\brief Set a hint with a specific priority\n *\n *  The priority controls the behavior when setting a hint that already\n *  has a value.  Hints will replace existing hints of their priority and\n *  lower.  Environment variables are considered to have override priority.\n *\n *  \\return SDL_TRUE if the hint was set, SDL_FALSE otherwise\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,\n                                                         const char *value,\n                                                         SDL_HintPriority priority);\n\n/**\n *  \\brief Set a hint with normal priority\n *\n *  \\return SDL_TRUE if the hint was set, SDL_FALSE otherwise\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,\n                                             const char *value);\n\n/**\n *  \\brief Get a hint\n *\n *  \\return The string value of a hint variable.\n */\nextern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);\n\n/**\n *  \\brief Get a hint\n *\n *  \\return The boolean value of a hint variable.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);\n\n/**\n * \\brief type definition of the hint callback function.\n */\ntypedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);\n\n/**\n *  \\brief Add a function to watch a particular hint\n *\n *  \\param name The hint to watch\n *  \\param callback The function to call when the hint value changes\n *  \\param userdata A pointer to pass to the callback function\n */\nextern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,\n                                                 SDL_HintCallback callback,\n                                                 void *userdata);\n\n/**\n *  \\brief Remove a function watching a particular hint\n *\n *  \\param name The hint being watched\n *  \\param callback The function being called when the hint value changes\n *  \\param userdata A pointer being passed to the callback function\n */\nextern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,\n                                                 SDL_HintCallback callback,\n                                                 void *userdata);\n\n/**\n *  \\brief  Clear all hints\n *\n *  This function is called during SDL_Quit() to free stored hints.\n */\nextern DECLSPEC void SDLCALL SDL_ClearHints(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_hints_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_joystick.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_joystick.h\n *\n *  Include file for SDL joystick event handling\n *\n * The term \"device_index\" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick\n *   behind a device_index changing as joysticks are plugged and unplugged.\n *\n * The term \"instance_id\" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted\n *   then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in.\n *\n * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of\n *   the device (a X360 wired controller for example). This identifier is platform dependent.\n *\n *\n */\n\n#ifndef SDL_joystick_h_\n#define SDL_joystick_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\file SDL_joystick.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_JOYSTICK flag.  This causes SDL to scan the system\n *  for joysticks, and load appropriate drivers.\n *\n *  If you would like to receive joystick updates while the application\n *  is in the background, you should set the following hint before calling\n *  SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS\n */\n\n/**\n * The joystick structure used to identify an SDL joystick\n */\nstruct _SDL_Joystick;\ntypedef struct _SDL_Joystick SDL_Joystick;\n\n/* A structure that encodes the stable unique id for a joystick device */\ntypedef struct {\n    Uint8 data[16];\n} SDL_JoystickGUID;\n\n/**\n * This is a unique ID for a joystick for the time it is connected to the system,\n * and is never reused for the lifetime of the application. If the joystick is\n * disconnected and reconnected, it will get a new ID.\n *\n * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.\n */\ntypedef Sint32 SDL_JoystickID;\n\ntypedef enum\n{\n    SDL_JOYSTICK_TYPE_UNKNOWN,\n    SDL_JOYSTICK_TYPE_GAMECONTROLLER,\n    SDL_JOYSTICK_TYPE_WHEEL,\n    SDL_JOYSTICK_TYPE_ARCADE_STICK,\n    SDL_JOYSTICK_TYPE_FLIGHT_STICK,\n    SDL_JOYSTICK_TYPE_DANCE_PAD,\n    SDL_JOYSTICK_TYPE_GUITAR,\n    SDL_JOYSTICK_TYPE_DRUM_KIT,\n    SDL_JOYSTICK_TYPE_ARCADE_PAD,\n    SDL_JOYSTICK_TYPE_THROTTLE\n} SDL_JoystickType;\n\ntypedef enum\n{\n    SDL_JOYSTICK_POWER_UNKNOWN = -1,\n    SDL_JOYSTICK_POWER_EMPTY,   /* <= 5% */\n    SDL_JOYSTICK_POWER_LOW,     /* <= 20% */\n    SDL_JOYSTICK_POWER_MEDIUM,  /* <= 70% */\n    SDL_JOYSTICK_POWER_FULL,    /* <= 100% */\n    SDL_JOYSTICK_POWER_WIRED,\n    SDL_JOYSTICK_POWER_MAX\n} SDL_JoystickPowerLevel;\n\n/* Function prototypes */\n\n/**\n * Locking for multi-threaded access to the joystick API\n *\n * If you are using the joystick API or handling events from multiple threads\n * you should use these locking functions to protect access to the joysticks.\n *\n * In particular, you are guaranteed that the joystick list won't change, so\n * the API functions that take a joystick index will be valid, and joystick\n * and game controller events will not be delivered.\n */\nextern DECLSPEC void SDLCALL SDL_LockJoysticks(void);\nextern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void);\n\n/**\n *  Count the number of joysticks attached to the system right now\n */\nextern DECLSPEC int SDLCALL SDL_NumJoysticks(void);\n\n/**\n *  Get the implementation dependent name of a joystick.\n *  This can be called before any joysticks are opened.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);\n\n/**\n *  Get the player index of a joystick, or -1 if it's not available\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index);\n\n/**\n *  Return the GUID for the joystick at this index\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);\n\n/**\n *  Get the USB vendor ID of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index);\n\n/**\n *  Get the USB product ID of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index);\n\n/**\n *  Get the product version of a joystick, if available.\n *  This can be called before any joysticks are opened.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index);\n\n/**\n *  Get the type of a joystick, if available.\n *  This can be called before any joysticks are opened.\n */\nextern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index);\n\n/**\n *  Get the instance ID of a joystick.\n *  This can be called before any joysticks are opened.\n *  If the index is out of range, this function will return -1.\n */\nextern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index);\n\n/**\n *  Open a joystick for use.\n *  The index passed as an argument refers to the N'th joystick on the system.\n *  This index is not the value which will identify this joystick in future\n *  joystick events.  The joystick's instance id (::SDL_JoystickID) will be used\n *  there instead.\n *\n *  \\return A joystick identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);\n\n/**\n * Return the SDL_Joystick associated with an instance id.\n */\nextern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);\n\n/**\n *  Return the name for this currently opened joystick.\n *  If no name can be found, this function returns NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);\n\n/**\n *  Get the player index of an opened joystick, or -1 if it's not available\n *\n *  For XInput controllers this returns the XInput user index.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);\n\n/**\n *  Return the GUID for this opened joystick\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);\n\n/**\n *  Get the USB vendor ID of an opened joystick, if available.\n *  If the vendor ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick);\n\n/**\n *  Get the USB product ID of an opened joystick, if available.\n *  If the product ID isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick);\n\n/**\n *  Get the product version of an opened joystick, if available.\n *  If the product version isn't available this function returns 0.\n */\nextern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick);\n\n/**\n *  Get the type of an opened joystick.\n */\nextern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick);\n\n/**\n *  Return a string representation for this guid. pszGUID must point to at least 33 bytes\n *  (32 for the string plus a NULL terminator).\n */\nextern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);\n\n/**\n *  Convert a string into a joystick guid\n */\nextern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);\n\n/**\n *  Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick);\n\n/**\n *  Get the instance ID of an opened joystick or -1 if the joystick is invalid.\n */\nextern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick);\n\n/**\n *  Get the number of general axis controls on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick);\n\n/**\n *  Get the number of trackballs on a joystick.\n *\n *  Joystick trackballs have only relative motion events associated\n *  with them and their state cannot be polled.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick);\n\n/**\n *  Get the number of POV hats on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);\n\n/**\n *  Get the number of buttons on a joystick.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);\n\n/**\n *  Update the current state of the open joysticks.\n *\n *  This is called automatically by the event loop if any joystick\n *  events are enabled.\n */\nextern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);\n\n/**\n *  Enable/disable joystick event polling.\n *\n *  If joystick events are disabled, you must call SDL_JoystickUpdate()\n *  yourself and check the state of the joystick when you want joystick\n *  information.\n *\n *  The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);\n\n#define SDL_JOYSTICK_AXIS_MAX   32767\n#define SDL_JOYSTICK_AXIS_MIN   -32768\n/**\n *  Get the current state of an axis control on a joystick.\n *\n *  The state is a value ranging from -32768 to 32767.\n *\n *  The axis indices start at index 0.\n */\nextern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,\n                                                   int axis);\n\n/**\n *  Get the initial state of an axis control on a joystick.\n *\n *  The state is a value ranging from -32768 to 32767.\n *\n *  The axis indices start at index 0.\n *\n *  \\return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick,\n                                                   int axis, Sint16 *state);\n\n/**\n *  \\name Hat positions\n */\n/* @{ */\n#define SDL_HAT_CENTERED    0x00\n#define SDL_HAT_UP          0x01\n#define SDL_HAT_RIGHT       0x02\n#define SDL_HAT_DOWN        0x04\n#define SDL_HAT_LEFT        0x08\n#define SDL_HAT_RIGHTUP     (SDL_HAT_RIGHT|SDL_HAT_UP)\n#define SDL_HAT_RIGHTDOWN   (SDL_HAT_RIGHT|SDL_HAT_DOWN)\n#define SDL_HAT_LEFTUP      (SDL_HAT_LEFT|SDL_HAT_UP)\n#define SDL_HAT_LEFTDOWN    (SDL_HAT_LEFT|SDL_HAT_DOWN)\n/* @} */\n\n/**\n *  Get the current state of a POV hat on a joystick.\n *\n *  The hat indices start at index 0.\n *\n *  \\return The return value is one of the following positions:\n *           - ::SDL_HAT_CENTERED\n *           - ::SDL_HAT_UP\n *           - ::SDL_HAT_RIGHT\n *           - ::SDL_HAT_DOWN\n *           - ::SDL_HAT_LEFT\n *           - ::SDL_HAT_RIGHTUP\n *           - ::SDL_HAT_RIGHTDOWN\n *           - ::SDL_HAT_LEFTUP\n *           - ::SDL_HAT_LEFTDOWN\n */\nextern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick,\n                                                 int hat);\n\n/**\n *  Get the ball axis change since the last poll.\n *\n *  \\return 0, or -1 if you passed it invalid parameters.\n *\n *  The ball indices start at index 0.\n */\nextern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,\n                                                int ball, int *dx, int *dy);\n\n/**\n *  Get the current state of a button on a joystick.\n *\n *  The button indices start at index 0.\n */\nextern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,\n                                                    int button);\n\n/**\n *  Trigger a rumble effect\n *  Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.\n *\n *  \\param joystick The joystick to vibrate\n *  \\param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF\n *  \\param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF\n *  \\param duration_ms The duration of the rumble effect, in milliseconds\n *\n *  \\return 0, or -1 if rumble isn't supported on this joystick\n */\nextern DECLSPEC int SDLCALL SDL_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);\n\n/**\n *  Close a joystick previously opened with SDL_JoystickOpen().\n */\nextern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);\n\n/**\n *  Return the battery level of this joystick\n */\nextern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_joystick_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_keyboard.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_keyboard.h\n *\n *  Include file for SDL keyboard event handling\n */\n\n#ifndef SDL_keyboard_h_\n#define SDL_keyboard_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_keycode.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The SDL keysym structure, used in key events.\n *\n *  \\note  If you are looking for translated character input, see the ::SDL_TEXTINPUT event.\n */\ntypedef struct SDL_Keysym\n{\n    SDL_Scancode scancode;      /**< SDL physical key code - see ::SDL_Scancode for details */\n    SDL_Keycode sym;            /**< SDL virtual key code - see ::SDL_Keycode for details */\n    Uint16 mod;                 /**< current key modifiers */\n    Uint32 unused;\n} SDL_Keysym;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the window which currently has keyboard focus.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);\n\n/**\n *  \\brief Get a snapshot of the current state of the keyboard.\n *\n *  \\param numkeys if non-NULL, receives the length of the returned array.\n *\n *  \\return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values.\n *\n *  \\b Example:\n *  \\code\n *  const Uint8 *state = SDL_GetKeyboardState(NULL);\n *  if ( state[SDL_SCANCODE_RETURN] )   {\n *      printf(\"<RETURN> is pressed.\\n\");\n *  }\n *  \\endcode\n */\nextern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);\n\n/**\n *  \\brief Get the current key modifier state for the keyboard.\n */\nextern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);\n\n/**\n *  \\brief Set the current key modifier state for the keyboard.\n *\n *  \\note This does not change the keyboard state, only the key modifier flags.\n */\nextern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);\n\n/**\n *  \\brief Get the key code corresponding to the given scancode according\n *         to the current keyboard layout.\n *\n *  See ::SDL_Keycode for details.\n *\n *  \\sa SDL_GetKeyName()\n */\nextern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode);\n\n/**\n *  \\brief Get the scancode corresponding to the given key code according to the\n *         current keyboard layout.\n *\n *  See ::SDL_Scancode for details.\n *\n *  \\sa SDL_GetScancodeName()\n */\nextern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key);\n\n/**\n *  \\brief Get a human-readable name for a scancode.\n *\n *  \\return A pointer to the name for the scancode.\n *          If the scancode doesn't have a name, this function returns\n *          an empty string (\"\").\n *\n *  \\sa SDL_Scancode\n */\nextern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode);\n\n/**\n *  \\brief Get a scancode from a human-readable name\n *\n *  \\return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized\n *\n *  \\sa SDL_Scancode\n */\nextern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);\n\n/**\n *  \\brief Get a human-readable name for a key.\n *\n *  \\return A pointer to a UTF-8 string that stays valid at least until the next\n *          call to this function. If you need it around any longer, you must\n *          copy it.  If the key doesn't have a name, this function returns an\n *          empty string (\"\").\n *\n *  \\sa SDL_Keycode\n */\nextern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);\n\n/**\n *  \\brief Get a key code from a human-readable name\n *\n *  \\return key code, or SDLK_UNKNOWN if the name wasn't recognized\n *\n *  \\sa SDL_Keycode\n */\nextern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);\n\n/**\n *  \\brief Start accepting Unicode text input events.\n *         This function will show the on-screen keyboard if supported.\n *\n *  \\sa SDL_StopTextInput()\n *  \\sa SDL_SetTextInputRect()\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC void SDLCALL SDL_StartTextInput(void);\n\n/**\n *  \\brief Return whether or not Unicode text input events are enabled.\n *\n *  \\sa SDL_StartTextInput()\n *  \\sa SDL_StopTextInput()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void);\n\n/**\n *  \\brief Stop receiving any text input events.\n *         This function will hide the on-screen keyboard if supported.\n *\n *  \\sa SDL_StartTextInput()\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC void SDLCALL SDL_StopTextInput(void);\n\n/**\n *  \\brief Set the rectangle used to type Unicode text inputs.\n *         This is used as a hint for IME and on-screen keyboard placement.\n *\n *  \\sa SDL_StartTextInput()\n */\nextern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect);\n\n/**\n *  \\brief Returns whether the platform has some screen keyboard support.\n *\n *  \\return SDL_TRUE if some keyboard support is available else SDL_FALSE.\n *\n *  \\note Not all screen keyboard functions are supported on all platforms.\n *\n *  \\sa SDL_IsScreenKeyboardShown()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void);\n\n/**\n *  \\brief Returns whether the screen keyboard is shown for given window.\n *\n *  \\param window The window for which screen keyboard should be queried.\n *\n *  \\return SDL_TRUE if screen keyboard is shown else SDL_FALSE.\n *\n *  \\sa SDL_HasScreenKeyboardSupport()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_keyboard_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_keycode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_keycode.h\n *\n *  Defines constants which identify keyboard keys and modifiers.\n */\n\n#ifndef SDL_keycode_h_\n#define SDL_keycode_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_scancode.h\"\n\n/**\n *  \\brief The SDL virtual key representation.\n *\n *  Values of this type are used to represent keyboard keys using the current\n *  layout of the keyboard.  These values include Unicode values representing\n *  the unmodified character that would be generated by pressing the key, or\n *  an SDLK_* constant for those keys that do not generate characters.\n *\n *  A special exception is the number keys at the top of the keyboard which\n *  always map to SDLK_0...SDLK_9, regardless of layout.\n */\ntypedef Sint32 SDL_Keycode;\n\n#define SDLK_SCANCODE_MASK (1<<30)\n#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)\n\nenum\n{\n    SDLK_UNKNOWN = 0,\n\n    SDLK_RETURN = '\\r',\n    SDLK_ESCAPE = '\\033',\n    SDLK_BACKSPACE = '\\b',\n    SDLK_TAB = '\\t',\n    SDLK_SPACE = ' ',\n    SDLK_EXCLAIM = '!',\n    SDLK_QUOTEDBL = '\"',\n    SDLK_HASH = '#',\n    SDLK_PERCENT = '%',\n    SDLK_DOLLAR = '$',\n    SDLK_AMPERSAND = '&',\n    SDLK_QUOTE = '\\'',\n    SDLK_LEFTPAREN = '(',\n    SDLK_RIGHTPAREN = ')',\n    SDLK_ASTERISK = '*',\n    SDLK_PLUS = '+',\n    SDLK_COMMA = ',',\n    SDLK_MINUS = '-',\n    SDLK_PERIOD = '.',\n    SDLK_SLASH = '/',\n    SDLK_0 = '0',\n    SDLK_1 = '1',\n    SDLK_2 = '2',\n    SDLK_3 = '3',\n    SDLK_4 = '4',\n    SDLK_5 = '5',\n    SDLK_6 = '6',\n    SDLK_7 = '7',\n    SDLK_8 = '8',\n    SDLK_9 = '9',\n    SDLK_COLON = ':',\n    SDLK_SEMICOLON = ';',\n    SDLK_LESS = '<',\n    SDLK_EQUALS = '=',\n    SDLK_GREATER = '>',\n    SDLK_QUESTION = '?',\n    SDLK_AT = '@',\n    /*\n       Skip uppercase letters\n     */\n    SDLK_LEFTBRACKET = '[',\n    SDLK_BACKSLASH = '\\\\',\n    SDLK_RIGHTBRACKET = ']',\n    SDLK_CARET = '^',\n    SDLK_UNDERSCORE = '_',\n    SDLK_BACKQUOTE = '`',\n    SDLK_a = 'a',\n    SDLK_b = 'b',\n    SDLK_c = 'c',\n    SDLK_d = 'd',\n    SDLK_e = 'e',\n    SDLK_f = 'f',\n    SDLK_g = 'g',\n    SDLK_h = 'h',\n    SDLK_i = 'i',\n    SDLK_j = 'j',\n    SDLK_k = 'k',\n    SDLK_l = 'l',\n    SDLK_m = 'm',\n    SDLK_n = 'n',\n    SDLK_o = 'o',\n    SDLK_p = 'p',\n    SDLK_q = 'q',\n    SDLK_r = 'r',\n    SDLK_s = 's',\n    SDLK_t = 't',\n    SDLK_u = 'u',\n    SDLK_v = 'v',\n    SDLK_w = 'w',\n    SDLK_x = 'x',\n    SDLK_y = 'y',\n    SDLK_z = 'z',\n\n    SDLK_CAPSLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CAPSLOCK),\n\n    SDLK_F1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F1),\n    SDLK_F2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F2),\n    SDLK_F3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F3),\n    SDLK_F4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F4),\n    SDLK_F5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F5),\n    SDLK_F6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F6),\n    SDLK_F7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F7),\n    SDLK_F8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F8),\n    SDLK_F9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F9),\n    SDLK_F10 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F10),\n    SDLK_F11 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F11),\n    SDLK_F12 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F12),\n\n    SDLK_PRINTSCREEN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRINTSCREEN),\n    SDLK_SCROLLLOCK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SCROLLLOCK),\n    SDLK_PAUSE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAUSE),\n    SDLK_INSERT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_INSERT),\n    SDLK_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HOME),\n    SDLK_PAGEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEUP),\n    SDLK_DELETE = '\\177',\n    SDLK_END = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_END),\n    SDLK_PAGEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PAGEDOWN),\n    SDLK_RIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RIGHT),\n    SDLK_LEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LEFT),\n    SDLK_DOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DOWN),\n    SDLK_UP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UP),\n\n    SDLK_NUMLOCKCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_NUMLOCKCLEAR),\n    SDLK_KP_DIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DIVIDE),\n    SDLK_KP_MULTIPLY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MULTIPLY),\n    SDLK_KP_MINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MINUS),\n    SDLK_KP_PLUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUS),\n    SDLK_KP_ENTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_ENTER),\n    SDLK_KP_1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_1),\n    SDLK_KP_2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_2),\n    SDLK_KP_3 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_3),\n    SDLK_KP_4 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_4),\n    SDLK_KP_5 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_5),\n    SDLK_KP_6 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_6),\n    SDLK_KP_7 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_7),\n    SDLK_KP_8 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_8),\n    SDLK_KP_9 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_9),\n    SDLK_KP_0 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_0),\n    SDLK_KP_PERIOD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERIOD),\n\n    SDLK_APPLICATION = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APPLICATION),\n    SDLK_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_POWER),\n    SDLK_KP_EQUALS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALS),\n    SDLK_F13 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F13),\n    SDLK_F14 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F14),\n    SDLK_F15 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F15),\n    SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),\n    SDLK_F17 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F17),\n    SDLK_F18 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F18),\n    SDLK_F19 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F19),\n    SDLK_F20 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F20),\n    SDLK_F21 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F21),\n    SDLK_F22 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F22),\n    SDLK_F23 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F23),\n    SDLK_F24 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F24),\n    SDLK_EXECUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXECUTE),\n    SDLK_HELP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_HELP),\n    SDLK_MENU = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MENU),\n    SDLK_SELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SELECT),\n    SDLK_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_STOP),\n    SDLK_AGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AGAIN),\n    SDLK_UNDO = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_UNDO),\n    SDLK_CUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CUT),\n    SDLK_COPY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COPY),\n    SDLK_PASTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PASTE),\n    SDLK_FIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_FIND),\n    SDLK_MUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MUTE),\n    SDLK_VOLUMEUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEUP),\n    SDLK_VOLUMEDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_VOLUMEDOWN),\n    SDLK_KP_COMMA = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COMMA),\n    SDLK_KP_EQUALSAS400 =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EQUALSAS400),\n\n    SDLK_ALTERASE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ALTERASE),\n    SDLK_SYSREQ = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SYSREQ),\n    SDLK_CANCEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CANCEL),\n    SDLK_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEAR),\n    SDLK_PRIOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_PRIOR),\n    SDLK_RETURN2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RETURN2),\n    SDLK_SEPARATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SEPARATOR),\n    SDLK_OUT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OUT),\n    SDLK_OPER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_OPER),\n    SDLK_CLEARAGAIN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CLEARAGAIN),\n    SDLK_CRSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CRSEL),\n    SDLK_EXSEL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EXSEL),\n\n    SDLK_KP_00 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_00),\n    SDLK_KP_000 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_000),\n    SDLK_THOUSANDSSEPARATOR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_THOUSANDSSEPARATOR),\n    SDLK_DECIMALSEPARATOR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DECIMALSEPARATOR),\n    SDLK_CURRENCYUNIT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYUNIT),\n    SDLK_CURRENCYSUBUNIT =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CURRENCYSUBUNIT),\n    SDLK_KP_LEFTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTPAREN),\n    SDLK_KP_RIGHTPAREN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTPAREN),\n    SDLK_KP_LEFTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LEFTBRACE),\n    SDLK_KP_RIGHTBRACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_RIGHTBRACE),\n    SDLK_KP_TAB = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_TAB),\n    SDLK_KP_BACKSPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BACKSPACE),\n    SDLK_KP_A = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_A),\n    SDLK_KP_B = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_B),\n    SDLK_KP_C = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_C),\n    SDLK_KP_D = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_D),\n    SDLK_KP_E = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_E),\n    SDLK_KP_F = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_F),\n    SDLK_KP_XOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_XOR),\n    SDLK_KP_POWER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_POWER),\n    SDLK_KP_PERCENT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PERCENT),\n    SDLK_KP_LESS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_LESS),\n    SDLK_KP_GREATER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_GREATER),\n    SDLK_KP_AMPERSAND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AMPERSAND),\n    SDLK_KP_DBLAMPERSAND =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLAMPERSAND),\n    SDLK_KP_VERTICALBAR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_VERTICALBAR),\n    SDLK_KP_DBLVERTICALBAR =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DBLVERTICALBAR),\n    SDLK_KP_COLON = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_COLON),\n    SDLK_KP_HASH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HASH),\n    SDLK_KP_SPACE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_SPACE),\n    SDLK_KP_AT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_AT),\n    SDLK_KP_EXCLAM = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_EXCLAM),\n    SDLK_KP_MEMSTORE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSTORE),\n    SDLK_KP_MEMRECALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMRECALL),\n    SDLK_KP_MEMCLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMCLEAR),\n    SDLK_KP_MEMADD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMADD),\n    SDLK_KP_MEMSUBTRACT =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMSUBTRACT),\n    SDLK_KP_MEMMULTIPLY =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMMULTIPLY),\n    SDLK_KP_MEMDIVIDE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_MEMDIVIDE),\n    SDLK_KP_PLUSMINUS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_PLUSMINUS),\n    SDLK_KP_CLEAR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEAR),\n    SDLK_KP_CLEARENTRY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_CLEARENTRY),\n    SDLK_KP_BINARY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_BINARY),\n    SDLK_KP_OCTAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_OCTAL),\n    SDLK_KP_DECIMAL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_DECIMAL),\n    SDLK_KP_HEXADECIMAL =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KP_HEXADECIMAL),\n\n    SDLK_LCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LCTRL),\n    SDLK_LSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LSHIFT),\n    SDLK_LALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LALT),\n    SDLK_LGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_LGUI),\n    SDLK_RCTRL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RCTRL),\n    SDLK_RSHIFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RSHIFT),\n    SDLK_RALT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT),\n    SDLK_RGUI = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI),\n\n    SDLK_MODE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE),\n\n    SDLK_AUDIONEXT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT),\n    SDLK_AUDIOPREV = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV),\n    SDLK_AUDIOSTOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP),\n    SDLK_AUDIOPLAY = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY),\n    SDLK_AUDIOMUTE = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE),\n    SDLK_MEDIASELECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT),\n    SDLK_WWW = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW),\n    SDLK_MAIL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL),\n    SDLK_CALCULATOR = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR),\n    SDLK_COMPUTER = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER),\n    SDLK_AC_SEARCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH),\n    SDLK_AC_HOME = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME),\n    SDLK_AC_BACK = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK),\n    SDLK_AC_FORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_FORWARD),\n    SDLK_AC_STOP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP),\n    SDLK_AC_REFRESH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH),\n    SDLK_AC_BOOKMARKS = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS),\n\n    SDLK_BRIGHTNESSDOWN =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN),\n    SDLK_BRIGHTNESSUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP),\n    SDLK_DISPLAYSWITCH = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH),\n    SDLK_KBDILLUMTOGGLE =\n        SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE),\n    SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),\n    SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),\n    SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),\n    SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),\n    SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),\n    SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),\n\n    SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),\n    SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)\n};\n\n/**\n * \\brief Enumeration of valid key mods (possibly OR'd together).\n */\ntypedef enum\n{\n    KMOD_NONE = 0x0000,\n    KMOD_LSHIFT = 0x0001,\n    KMOD_RSHIFT = 0x0002,\n    KMOD_LCTRL = 0x0040,\n    KMOD_RCTRL = 0x0080,\n    KMOD_LALT = 0x0100,\n    KMOD_RALT = 0x0200,\n    KMOD_LGUI = 0x0400,\n    KMOD_RGUI = 0x0800,\n    KMOD_NUM = 0x1000,\n    KMOD_CAPS = 0x2000,\n    KMOD_MODE = 0x4000,\n    KMOD_RESERVED = 0x8000\n} SDL_Keymod;\n\n#define KMOD_CTRL   (KMOD_LCTRL|KMOD_RCTRL)\n#define KMOD_SHIFT  (KMOD_LSHIFT|KMOD_RSHIFT)\n#define KMOD_ALT    (KMOD_LALT|KMOD_RALT)\n#define KMOD_GUI    (KMOD_LGUI|KMOD_RGUI)\n\n#endif /* SDL_keycode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_loadso.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_loadso.h\n *\n *  System dependent library loading routines\n *\n *  Some things to keep in mind:\n *  \\li These functions only work on C function names.  Other languages may\n *      have name mangling and intrinsic language support that varies from\n *      compiler to compiler.\n *  \\li Make sure you declare your function pointers with the same calling\n *      convention as the actual library function.  Your code will crash\n *      mysteriously if you do not do this.\n *  \\li Avoid namespace collisions.  If you load a symbol from the library,\n *      it is not defined whether or not it goes into the global symbol\n *      namespace for the application.  If it does and it conflicts with\n *      symbols in your code or other shared libraries, you will not get\n *      the results you expect. :)\n */\n\n#ifndef SDL_loadso_h_\n#define SDL_loadso_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  This function dynamically loads a shared object and returns a pointer\n *  to the object handle (or NULL if there was an error).\n *  The 'sofile' parameter is a system dependent name of the object file.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);\n\n/**\n *  Given an object handle, this function looks up the address of the\n *  named function in the shared object and returns it.  This address\n *  is no longer valid after calling SDL_UnloadObject().\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle,\n                                               const char *name);\n\n/**\n *  Unload a shared object from memory.\n */\nextern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_loadso_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_log.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_log.h\n *\n *  Simple log messages with categories and priorities.\n *\n *  By default logs are quiet, but if you're debugging SDL you might want:\n *\n *      SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN);\n *\n *  Here's where the messages go on different platforms:\n *      Windows: debug output stream\n *      Android: log output\n *      Others: standard error output (stderr)\n */\n\n#ifndef SDL_log_h_\n#define SDL_log_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/**\n *  \\brief The maximum size of a log message\n *\n *  Messages longer than the maximum size will be truncated\n */\n#define SDL_MAX_LOG_MESSAGE 4096\n\n/**\n *  \\brief The predefined log categories\n *\n *  By default the application category is enabled at the INFO level,\n *  the assert category is enabled at the WARN level, test is enabled\n *  at the VERBOSE level and all other categories are enabled at the\n *  CRITICAL level.\n */\nenum\n{\n    SDL_LOG_CATEGORY_APPLICATION,\n    SDL_LOG_CATEGORY_ERROR,\n    SDL_LOG_CATEGORY_ASSERT,\n    SDL_LOG_CATEGORY_SYSTEM,\n    SDL_LOG_CATEGORY_AUDIO,\n    SDL_LOG_CATEGORY_VIDEO,\n    SDL_LOG_CATEGORY_RENDER,\n    SDL_LOG_CATEGORY_INPUT,\n    SDL_LOG_CATEGORY_TEST,\n\n    /* Reserved for future SDL library use */\n    SDL_LOG_CATEGORY_RESERVED1,\n    SDL_LOG_CATEGORY_RESERVED2,\n    SDL_LOG_CATEGORY_RESERVED3,\n    SDL_LOG_CATEGORY_RESERVED4,\n    SDL_LOG_CATEGORY_RESERVED5,\n    SDL_LOG_CATEGORY_RESERVED6,\n    SDL_LOG_CATEGORY_RESERVED7,\n    SDL_LOG_CATEGORY_RESERVED8,\n    SDL_LOG_CATEGORY_RESERVED9,\n    SDL_LOG_CATEGORY_RESERVED10,\n\n    /* Beyond this point is reserved for application use, e.g.\n       enum {\n           MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,\n           MYAPP_CATEGORY_AWESOME2,\n           MYAPP_CATEGORY_AWESOME3,\n           ...\n       };\n     */\n    SDL_LOG_CATEGORY_CUSTOM\n};\n\n/**\n *  \\brief The predefined log priorities\n */\ntypedef enum\n{\n    SDL_LOG_PRIORITY_VERBOSE = 1,\n    SDL_LOG_PRIORITY_DEBUG,\n    SDL_LOG_PRIORITY_INFO,\n    SDL_LOG_PRIORITY_WARN,\n    SDL_LOG_PRIORITY_ERROR,\n    SDL_LOG_PRIORITY_CRITICAL,\n    SDL_NUM_LOG_PRIORITIES\n} SDL_LogPriority;\n\n\n/**\n *  \\brief Set the priority of all log categories\n */\nextern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority);\n\n/**\n *  \\brief Set the priority of a particular log category\n */\nextern DECLSPEC void SDLCALL SDL_LogSetPriority(int category,\n                                                SDL_LogPriority priority);\n\n/**\n *  \\brief Get the priority of a particular log category\n */\nextern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category);\n\n/**\n *  \\brief Reset all priorities to default.\n *\n *  \\note This is called in SDL_Quit().\n */\nextern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);\n\n/**\n *  \\brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO\n */\nextern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_VERBOSE\n */\nextern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_DEBUG\n */\nextern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_INFO\n */\nextern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_WARN\n */\nextern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_ERROR\n */\nextern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with SDL_LOG_PRIORITY_CRITICAL\n */\nextern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n *  \\brief Log a message with the specified category and priority.\n */\nextern DECLSPEC void SDLCALL SDL_LogMessage(int category,\n                                            SDL_LogPriority priority,\n                                            SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);\n\n/**\n *  \\brief Log a message with the specified category and priority.\n */\nextern DECLSPEC void SDLCALL SDL_LogMessageV(int category,\n                                             SDL_LogPriority priority,\n                                             const char *fmt, va_list ap);\n\n/**\n *  \\brief The prototype for the log output function\n */\ntypedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);\n\n/**\n *  \\brief Get the current log output function.\n */\nextern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);\n\n/**\n *  \\brief This function allows you to replace the default log output\n *         function with one of your own.\n */\nextern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_log_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_main.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_main_h_\n#define SDL_main_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\file SDL_main.h\n *\n *  Redefine main() on some platforms so that it is called by SDL.\n */\n\n#ifndef SDL_MAIN_HANDLED\n#if defined(__WIN32__)\n/* On Windows SDL provides WinMain(), which parses the command line and passes\n   the arguments to your main function.\n\n   If you provide your own WinMain(), you may define SDL_MAIN_HANDLED\n */\n#define SDL_MAIN_AVAILABLE\n\n#elif defined(__WINRT__)\n/* On WinRT, SDL provides a main function that initializes CoreApplication,\n   creating an instance of IFrameworkView in the process.\n\n   Please note that #include'ing SDL_main.h is not enough to get a main()\n   function working.  In non-XAML apps, the file,\n   src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled\n   into the app itself.  In XAML apps, the function, SDL_WinRTRunApp must be\n   called, with a pointer to the Direct3D-hosted XAML control passed in.\n*/\n#define SDL_MAIN_NEEDED\n\n#elif defined(__IPHONEOS__)\n/* On iOS SDL provides a main function that creates an application delegate\n   and starts the iOS application run loop.\n\n   If you link with SDL dynamically on iOS, the main function can't be in a\n   shared library, so you need to link with libSDLmain.a, which includes a\n   stub main function that calls into the shared library to start execution.\n\n   See src/video/uikit/SDL_uikitappdelegate.m for more details.\n */\n#define SDL_MAIN_NEEDED\n\n#elif defined(__ANDROID__)\n/* On Android SDL provides a Java class in SDLActivity.java that is the\n   main activity entry point.\n\n   See docs/README-android.md for more details on extending that class.\n */\n#define SDL_MAIN_NEEDED\n\n/* We need to export SDL_main so it can be launched from Java */\n#define SDLMAIN_DECLSPEC    DECLSPEC\n\n#elif defined(__NACL__)\n/* On NACL we use ppapi_simple to set up the application helper code,\n   then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before \n   starting the user main function.\n   All user code is run in a separate thread by ppapi_simple, thus \n   allowing for blocking io to take place via nacl_io\n*/\n#define SDL_MAIN_NEEDED\n\n#endif\n#endif /* SDL_MAIN_HANDLED */\n\n#ifndef SDLMAIN_DECLSPEC\n#define SDLMAIN_DECLSPEC\n#endif\n\n/**\n *  \\file SDL_main.h\n *\n *  The application's main() function must be called with C linkage,\n *  and should be declared like this:\n *  \\code\n *  #ifdef __cplusplus\n *  extern \"C\"\n *  #endif\n *  int main(int argc, char *argv[])\n *  {\n *  }\n *  \\endcode\n */\n\n#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE)\n#define main    SDL_main\n#endif\n\n#include \"begin_code.h\"\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  The prototype for the application's main() function\n */\ntypedef int (*SDL_main_func)(int argc, char *argv[]);\nextern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);\n\n\n/**\n *  This is called by the real SDL main function to let the rest of the\n *  library know that initialization was done properly.\n *\n *  Calling this yourself without knowing what you're doing can cause\n *  crashes and hard to diagnose problems with your application.\n */\nextern DECLSPEC void SDLCALL SDL_SetMainReady(void);\n\n#ifdef __WIN32__\n\n/**\n *  This can be called to set the application class at startup\n */\nextern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);\nextern DECLSPEC void SDLCALL SDL_UnregisterApp(void);\n\n#endif /* __WIN32__ */\n\n\n#ifdef __WINRT__\n\n/**\n *  \\brief Initializes and launches an SDL/WinRT application.\n *\n *  \\param mainFunction The SDL app's C-style main().\n *  \\param reserved Reserved for future use; should be NULL\n *  \\return 0 on success, -1 on failure.  On failure, use SDL_GetError to retrieve more\n *      information on the failure.\n */\nextern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);\n\n#endif /* __WINRT__ */\n\n#if defined(__IPHONEOS__)\n\n/**\n *  \\brief Initializes and launches an SDL application.\n *\n *  \\param argc The argc parameter from the application's main() function\n *  \\param argv The argv parameter from the application's main() function\n *  \\param mainFunction The SDL app's C-style main().\n *  \\return the return value from mainFunction\n */\nextern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);\n\n#endif /* __IPHONEOS__ */\n\n\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_main_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_messagebox.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_messagebox_h_\n#define SDL_messagebox_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_video.h\"      /* For SDL_Window */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief SDL_MessageBox flags. If supported will display warning icon, etc.\n */\ntypedef enum\n{\n    SDL_MESSAGEBOX_ERROR        = 0x00000010,   /**< error dialog */\n    SDL_MESSAGEBOX_WARNING      = 0x00000020,   /**< warning dialog */\n    SDL_MESSAGEBOX_INFORMATION  = 0x00000040    /**< informational dialog */\n} SDL_MessageBoxFlags;\n\n/**\n * \\brief Flags for SDL_MessageBoxButtonData.\n */\ntypedef enum\n{\n    SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001,  /**< Marks the default button when return is hit */\n    SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002   /**< Marks the default button when escape is hit */\n} SDL_MessageBoxButtonFlags;\n\n/**\n *  \\brief Individual button data.\n */\ntypedef struct\n{\n    Uint32 flags;       /**< ::SDL_MessageBoxButtonFlags */\n    int buttonid;       /**< User defined button id (value returned via SDL_ShowMessageBox) */\n    const char * text;  /**< The UTF-8 button text */\n} SDL_MessageBoxButtonData;\n\n/**\n * \\brief RGB value used in a message box color scheme\n */\ntypedef struct\n{\n    Uint8 r, g, b;\n} SDL_MessageBoxColor;\n\ntypedef enum\n{\n    SDL_MESSAGEBOX_COLOR_BACKGROUND,\n    SDL_MESSAGEBOX_COLOR_TEXT,\n    SDL_MESSAGEBOX_COLOR_BUTTON_BORDER,\n    SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND,\n    SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED,\n    SDL_MESSAGEBOX_COLOR_MAX\n} SDL_MessageBoxColorType;\n\n/**\n * \\brief A set of colors to use for message box dialogs\n */\ntypedef struct\n{\n    SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX];\n} SDL_MessageBoxColorScheme;\n\n/**\n *  \\brief MessageBox structure containing title, text, window, etc.\n */\ntypedef struct\n{\n    Uint32 flags;                       /**< ::SDL_MessageBoxFlags */\n    SDL_Window *window;                 /**< Parent window, can be NULL */\n    const char *title;                  /**< UTF-8 title */\n    const char *message;                /**< UTF-8 message text */\n\n    int numbuttons;\n    const SDL_MessageBoxButtonData *buttons;\n\n    const SDL_MessageBoxColorScheme *colorScheme;   /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */\n} SDL_MessageBoxData;\n\n/**\n *  \\brief Create a modal message box.\n *\n *  \\param messageboxdata The SDL_MessageBoxData structure with title, text, etc.\n *  \\param buttonid The pointer to which user id of hit button should be copied.\n *\n *  \\return -1 on error, otherwise 0 and buttonid contains user id of button\n *          hit or -1 if dialog was closed.\n *\n *  \\note This function should be called on the thread that created the parent\n *        window, or on the main thread if the messagebox has no parent.  It will\n *        block execution of that thread until the user clicks a button or\n *        closes the messagebox.\n */\nextern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);\n\n/**\n *  \\brief Create a simple modal message box\n *\n *  \\param flags    ::SDL_MessageBoxFlags\n *  \\param title    UTF-8 title text\n *  \\param message  UTF-8 message text\n *  \\param window   The parent window, or NULL for no parent\n *\n *  \\return 0 on success, -1 on error\n *\n *  \\sa SDL_ShowMessageBox\n */\nextern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_messagebox_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_mouse.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_mouse.h\n *\n *  Include file for SDL mouse event handling.\n */\n\n#ifndef SDL_mouse_h_\n#define SDL_mouse_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct SDL_Cursor SDL_Cursor;   /**< Implementation dependent */\n\n/**\n * \\brief Cursor types for SDL_CreateSystemCursor().\n */\ntypedef enum\n{\n    SDL_SYSTEM_CURSOR_ARROW,     /**< Arrow */\n    SDL_SYSTEM_CURSOR_IBEAM,     /**< I-beam */\n    SDL_SYSTEM_CURSOR_WAIT,      /**< Wait */\n    SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */\n    SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */\n    SDL_SYSTEM_CURSOR_SIZENWSE,  /**< Double arrow pointing northwest and southeast */\n    SDL_SYSTEM_CURSOR_SIZENESW,  /**< Double arrow pointing northeast and southwest */\n    SDL_SYSTEM_CURSOR_SIZEWE,    /**< Double arrow pointing west and east */\n    SDL_SYSTEM_CURSOR_SIZENS,    /**< Double arrow pointing north and south */\n    SDL_SYSTEM_CURSOR_SIZEALL,   /**< Four pointed arrow pointing north, south, east, and west */\n    SDL_SYSTEM_CURSOR_NO,        /**< Slashed circle or crossbones */\n    SDL_SYSTEM_CURSOR_HAND,      /**< Hand */\n    SDL_NUM_SYSTEM_CURSORS\n} SDL_SystemCursor;\n\n/**\n * \\brief Scroll direction types for the Scroll event\n */\ntypedef enum\n{\n    SDL_MOUSEWHEEL_NORMAL,    /**< The scroll direction is normal */\n    SDL_MOUSEWHEEL_FLIPPED    /**< The scroll direction is flipped / natural */\n} SDL_MouseWheelDirection;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the window which currently has mouse focus.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);\n\n/**\n *  \\brief Retrieve the current state of the mouse.\n *\n *  The current button state is returned as a button bitmask, which can\n *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the\n *  mouse cursor position relative to the focus window for the currently\n *  selected mouse.  You can pass NULL for either x or y.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);\n\n/**\n *  \\brief Get the current state of the mouse, in relation to the desktop\n *\n *  This works just like SDL_GetMouseState(), but the coordinates will be\n *  reported relative to the top-left of the desktop. This can be useful if\n *  you need to track the mouse outside of a specific window and\n *  SDL_CaptureMouse() doesn't fit your needs. For example, it could be\n *  useful if you need to track the mouse while dragging a window, where\n *  coordinates relative to a window might not be in sync at all times.\n *\n *  \\note SDL_GetMouseState() returns the mouse position as SDL understands\n *        it from the last pump of the event queue. This function, however,\n *        queries the OS for the current mouse position, and as such, might\n *        be a slightly less efficient function. Unless you know what you're\n *        doing and have a good reason to use this function, you probably want\n *        SDL_GetMouseState() instead.\n *\n *  \\param x Returns the current X coord, relative to the desktop. Can be NULL.\n *  \\param y Returns the current Y coord, relative to the desktop. Can be NULL.\n *  \\return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros.\n *\n *  \\sa SDL_GetMouseState\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);\n\n/**\n *  \\brief Retrieve the relative state of the mouse.\n *\n *  The current button state is returned as a button bitmask, which can\n *  be tested using the SDL_BUTTON(X) macros, and x and y are set to the\n *  mouse deltas since the last call to SDL_GetRelativeMouseState().\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);\n\n/**\n *  \\brief Moves the mouse to the given position within the window.\n *\n *  \\param window The window to move the mouse into, or NULL for the current mouse focus\n *  \\param x The x coordinate within the window\n *  \\param y The y coordinate within the window\n *\n *  \\note This function generates a mouse motion event\n */\nextern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,\n                                                   int x, int y);\n\n/**\n *  \\brief Moves the mouse to the given position in global screen space.\n *\n *  \\param x The x coordinate\n *  \\param y The y coordinate\n *  \\return 0 on success, -1 on error (usually: unsupported by a platform).\n *\n *  \\note This function generates a mouse motion event\n */\nextern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);\n\n/**\n *  \\brief Set relative mouse mode.\n *\n *  \\param enabled Whether or not to enable relative mode\n *\n *  \\return 0 on success, or -1 if relative mode is not supported.\n *\n *  While the mouse is in relative mode, the cursor is hidden, and the\n *  driver will try to report continuous motion in the current window.\n *  Only relative motion events will be delivered, the mouse position\n *  will not change.\n *\n *  \\note This function will flush any pending mouse motion.\n *\n *  \\sa SDL_GetRelativeMouseMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);\n\n/**\n *  \\brief Capture the mouse, to track input outside an SDL window.\n *\n *  \\param enabled Whether or not to enable capturing\n *\n *  Capturing enables your app to obtain mouse events globally, instead of\n *  just within your window. Not all video targets support this function.\n *  When capturing is enabled, the current window will get all mouse events,\n *  but unlike relative mode, no change is made to the cursor and it is\n *  not restrained to your window.\n *\n *  This function may also deny mouse input to other windows--both those in\n *  your application and others on the system--so you should use this\n *  function sparingly, and in small bursts. For example, you might want to\n *  track the mouse while the user is dragging something, until the user\n *  releases a mouse button. It is not recommended that you capture the mouse\n *  for long periods of time, such as the entire time your app is running.\n *\n *  While captured, mouse events still report coordinates relative to the\n *  current (foreground) window, but those coordinates may be outside the\n *  bounds of the window (including negative values). Capturing is only\n *  allowed for the foreground window. If the window loses focus while\n *  capturing, the capture will be disabled automatically.\n *\n *  While capturing is enabled, the current window will have the\n *  SDL_WINDOW_MOUSE_CAPTURE flag set.\n *\n *  \\return 0 on success, or -1 if not supported.\n */\nextern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);\n\n/**\n *  \\brief Query whether relative mouse mode is enabled.\n *\n *  \\sa SDL_SetRelativeMouseMode()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void);\n\n/**\n *  \\brief Create a cursor, using the specified bitmap data and\n *         mask (in MSB format).\n *\n *  The cursor width must be a multiple of 8 bits.\n *\n *  The cursor is created in black and white according to the following:\n *  <table>\n *  <tr><td> data </td><td> mask </td><td> resulting pixel on screen </td></tr>\n *  <tr><td>  0   </td><td>  1   </td><td> White </td></tr>\n *  <tr><td>  1   </td><td>  1   </td><td> Black </td></tr>\n *  <tr><td>  0   </td><td>  0   </td><td> Transparent </td></tr>\n *  <tr><td>  1   </td><td>  0   </td><td> Inverted color if possible, black\n *                                         if not. </td></tr>\n *  </table>\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data,\n                                                     const Uint8 * mask,\n                                                     int w, int h, int hot_x,\n                                                     int hot_y);\n\n/**\n *  \\brief Create a color cursor.\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface,\n                                                          int hot_x,\n                                                          int hot_y);\n\n/**\n *  \\brief Create a system cursor.\n *\n *  \\sa SDL_FreeCursor()\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id);\n\n/**\n *  \\brief Set the active cursor.\n */\nextern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor);\n\n/**\n *  \\brief Return the active cursor.\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);\n\n/**\n *  \\brief Return the default cursor.\n */\nextern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);\n\n/**\n *  \\brief Frees a cursor created with SDL_CreateCursor() or similar functions.\n *\n *  \\sa SDL_CreateCursor()\n *  \\sa SDL_CreateColorCursor()\n *  \\sa SDL_CreateSystemCursor()\n */\nextern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);\n\n/**\n *  \\brief Toggle whether or not the cursor is shown.\n *\n *  \\param toggle 1 to show the cursor, 0 to hide it, -1 to query the current\n *                state.\n *\n *  \\return 1 if the cursor is shown, or 0 if the cursor is hidden.\n */\nextern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);\n\n/**\n *  Used as a mask when testing buttons in buttonstate.\n *   - Button 1:  Left mouse button\n *   - Button 2:  Middle mouse button\n *   - Button 3:  Right mouse button\n */\n#define SDL_BUTTON(X)       (1 << ((X)-1))\n#define SDL_BUTTON_LEFT     1\n#define SDL_BUTTON_MIDDLE   2\n#define SDL_BUTTON_RIGHT    3\n#define SDL_BUTTON_X1       4\n#define SDL_BUTTON_X2       5\n#define SDL_BUTTON_LMASK    SDL_BUTTON(SDL_BUTTON_LEFT)\n#define SDL_BUTTON_MMASK    SDL_BUTTON(SDL_BUTTON_MIDDLE)\n#define SDL_BUTTON_RMASK    SDL_BUTTON(SDL_BUTTON_RIGHT)\n#define SDL_BUTTON_X1MASK   SDL_BUTTON(SDL_BUTTON_X1)\n#define SDL_BUTTON_X2MASK   SDL_BUTTON(SDL_BUTTON_X2)\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_mouse_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_mutex.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_mutex_h_\n#define SDL_mutex_h_\n\n/**\n *  \\file SDL_mutex.h\n *\n *  Functions to provide thread synchronization primitives.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  Synchronization functions which can time out return this value\n *  if they time out.\n */\n#define SDL_MUTEX_TIMEDOUT  1\n\n/**\n *  This is the timeout value which corresponds to never time out.\n */\n#define SDL_MUTEX_MAXWAIT   (~(Uint32)0)\n\n\n/**\n *  \\name Mutex functions\n */\n/* @{ */\n\n/* The SDL mutex structure, defined in SDL_sysmutex.c */\nstruct SDL_mutex;\ntypedef struct SDL_mutex SDL_mutex;\n\n/**\n *  Create a mutex, initialized unlocked.\n */\nextern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void);\n\n/**\n *  Lock the mutex.\n *\n *  \\return 0, or -1 on error.\n */\n#define SDL_mutexP(m)   SDL_LockMutex(m)\nextern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex);\n\n/**\n *  Try to lock the mutex\n *\n *  \\return 0, SDL_MUTEX_TIMEDOUT, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);\n\n/**\n *  Unlock the mutex.\n *\n *  \\return 0, or -1 on error.\n *\n *  \\warning It is an error to unlock a mutex that has not been locked by\n *           the current thread, and doing so results in undefined behavior.\n */\n#define SDL_mutexV(m)   SDL_UnlockMutex(m)\nextern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex);\n\n/**\n *  Destroy a mutex.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex);\n\n/* @} *//* Mutex functions */\n\n\n/**\n *  \\name Semaphore functions\n */\n/* @{ */\n\n/* The SDL semaphore structure, defined in SDL_syssem.c */\nstruct SDL_semaphore;\ntypedef struct SDL_semaphore SDL_sem;\n\n/**\n *  Create a semaphore, initialized with value, returns NULL on failure.\n */\nextern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value);\n\n/**\n *  Destroy a semaphore.\n */\nextern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem);\n\n/**\n *  This function suspends the calling thread until the semaphore pointed\n *  to by \\c sem has a positive count. It then atomically decreases the\n *  semaphore count.\n */\nextern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem);\n\n/**\n *  Non-blocking variant of SDL_SemWait().\n *\n *  \\return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would\n *          block, and -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);\n\n/**\n *  Variant of SDL_SemWait() with a timeout in milliseconds.\n *\n *  \\return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not\n *          succeed in the allotted time, and -1 on error.\n *\n *  \\warning On some platforms this function is implemented by looping with a\n *           delay of 1 ms, and so should be avoided if possible.\n */\nextern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);\n\n/**\n *  Atomically increases the semaphore's count (not blocking).\n *\n *  \\return 0, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);\n\n/**\n *  Returns the current count of the semaphore.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);\n\n/* @} *//* Semaphore functions */\n\n\n/**\n *  \\name Condition variable functions\n */\n/* @{ */\n\n/* The SDL condition variable structure, defined in SDL_syscond.c */\nstruct SDL_cond;\ntypedef struct SDL_cond SDL_cond;\n\n/**\n *  Create a condition variable.\n *\n *  Typical use of condition variables:\n *\n *  Thread A:\n *    SDL_LockMutex(lock);\n *    while ( ! condition ) {\n *        SDL_CondWait(cond, lock);\n *    }\n *    SDL_UnlockMutex(lock);\n *\n *  Thread B:\n *    SDL_LockMutex(lock);\n *    ...\n *    condition = true;\n *    ...\n *    SDL_CondSignal(cond);\n *    SDL_UnlockMutex(lock);\n *\n *  There is some discussion whether to signal the condition variable\n *  with the mutex locked or not.  There is some potential performance\n *  benefit to unlocking first on some platforms, but there are some\n *  potential race conditions depending on how your code is structured.\n *\n *  In general it's safer to signal the condition variable while the\n *  mutex is locked.\n */\nextern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void);\n\n/**\n *  Destroy a condition variable.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond);\n\n/**\n *  Restart one of the threads that are waiting on the condition variable.\n *\n *  \\return 0 or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond);\n\n/**\n *  Restart all threads that are waiting on the condition variable.\n *\n *  \\return 0 or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond);\n\n/**\n *  Wait on the condition variable, unlocking the provided mutex.\n *\n *  \\warning The mutex must be locked before entering this function!\n *\n *  The mutex is re-locked once the condition variable is signaled.\n *\n *  \\return 0 when it is signaled, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex);\n\n/**\n *  Waits for at most \\c ms milliseconds, and returns 0 if the condition\n *  variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not\n *  signaled in the allotted time, and -1 on error.\n *\n *  \\warning On some platforms this function is implemented by looping with a\n *           delay of 1 ms, and so should be avoided if possible.\n */\nextern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,\n                                                SDL_mutex * mutex, Uint32 ms);\n\n/* @} *//* Condition variable functions */\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_mutex_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_name.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDLname_h_\n#define SDLname_h_\n\n#if defined(__STDC__) || defined(__cplusplus)\n#define NeedFunctionPrototypes 1\n#endif\n\n#define SDL_NAME(X) SDL_##X\n\n#endif /* SDLname_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengl.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengl.h\n *\n *  This is a simple file to encapsulate the OpenGL API headers.\n */\n\n/**\n *  \\def NO_SDL_GLEXT\n *\n *  Define this if you have your own version of glext.h and want to disable the\n *  version included in SDL_opengl.h.\n */\n\n#ifndef SDL_opengl_h_\n#define SDL_opengl_h_\n\n#include \"SDL_config.h\"\n\n#ifndef __IPHONEOS__  /* No OpenGL on iOS. */\n\n/*\n * Mesa 3-D graphics library\n *\n * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.\n * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n#ifndef __gl_h_\n#define __gl_h_\n\n#if defined(USE_MGL_NAMESPACE)\n#include \"gl_mangle.h\"\n#endif\n\n\n/**********************************************************************\n * Begin system-specific stuff.\n */\n\n#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)\n#define __WIN32__\n#endif\n\n#if defined(__WIN32__) && !defined(__CYGWIN__)\n#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */\n#    define GLAPI __declspec(dllexport)\n#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */\n#    define GLAPI __declspec(dllimport)\n#  else /* for use with static link lib build of Win32 edition only */\n#    define GLAPI extern\n#  endif /* _STATIC_MESA support */\n#  if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE)  /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */\n#    define GLAPIENTRY \n#  else\n#    define GLAPIENTRY __stdcall\n#  endif\n#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */\n#  define GLAPI extern\n#  define GLAPIENTRY __stdcall\n#elif defined(__OS2__) || defined(__EMX__) /* native os/2 opengl */\n#  define GLAPI extern\n#  define GLAPIENTRY _System\n#  define APIENTRY _System\n#  if defined(__GNUC__) && !defined(_System)\n#    define _System\n#  endif\n#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))\n#  define GLAPI __attribute__((visibility(\"default\")))\n#  define GLAPIENTRY\n#endif /* WIN32 && !CYGWIN */\n\n/*\n * WINDOWS: Include windows.h here to define APIENTRY.\n * It is also useful when applications include this file by\n * including only glut.h, since glut.h depends on windows.h.\n * Applications needing to include windows.h with parms other\n * than \"WIN32_LEAN_AND_MEAN\" may include windows.h before\n * glut.h or gl.h.\n */\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#ifndef NOMINMAX   /* don't define min() and max(). */\n#define NOMINMAX\n#endif\n#include <windows.h>\n#endif\n\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n#ifndef GLAPIENTRY\n#define GLAPIENTRY\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY GLAPIENTRY\n#endif\n\n/* \"P\" suffix to be used for a pointer to a function */\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n\n#ifndef GLAPIENTRYP\n#define GLAPIENTRYP GLAPIENTRY *\n#endif\n\n#if defined(PRAGMA_EXPORT_SUPPORTED)\n#pragma export on\n#endif\n\n/*\n * End system-specific stuff.\n **********************************************************************/\n\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n\n#define GL_VERSION_1_1   1\n#define GL_VERSION_1_2   1\n#define GL_VERSION_1_3   1\n#define GL_ARB_imaging   1\n\n\n/*\n * Datatypes\n */\ntypedef unsigned int\tGLenum;\ntypedef unsigned char\tGLboolean;\ntypedef unsigned int\tGLbitfield;\ntypedef void\t\tGLvoid;\ntypedef signed char\tGLbyte;\t\t/* 1-byte signed */\ntypedef short\t\tGLshort;\t/* 2-byte signed */\ntypedef int\t\tGLint;\t\t/* 4-byte signed */\ntypedef unsigned char\tGLubyte;\t/* 1-byte unsigned */\ntypedef unsigned short\tGLushort;\t/* 2-byte unsigned */\ntypedef unsigned int\tGLuint;\t\t/* 4-byte unsigned */\ntypedef int\t\tGLsizei;\t/* 4-byte signed */\ntypedef float\t\tGLfloat;\t/* single precision float */\ntypedef float\t\tGLclampf;\t/* single precision float in [0,1] */\ntypedef double\t\tGLdouble;\t/* double precision float */\ntypedef double\t\tGLclampd;\t/* double precision float in [0,1] */\n\n\n\n/*\n * Constants\n */\n\n/* Boolean values */\n#define GL_FALSE\t\t\t\t0\n#define GL_TRUE\t\t\t\t\t1\n\n/* Data types */\n#define GL_BYTE\t\t\t\t\t0x1400\n#define GL_UNSIGNED_BYTE\t\t\t0x1401\n#define GL_SHORT\t\t\t\t0x1402\n#define GL_UNSIGNED_SHORT\t\t\t0x1403\n#define GL_INT\t\t\t\t\t0x1404\n#define GL_UNSIGNED_INT\t\t\t\t0x1405\n#define GL_FLOAT\t\t\t\t0x1406\n#define GL_2_BYTES\t\t\t\t0x1407\n#define GL_3_BYTES\t\t\t\t0x1408\n#define GL_4_BYTES\t\t\t\t0x1409\n#define GL_DOUBLE\t\t\t\t0x140A\n\n/* Primitives */\n#define GL_POINTS\t\t\t\t0x0000\n#define GL_LINES\t\t\t\t0x0001\n#define GL_LINE_LOOP\t\t\t\t0x0002\n#define GL_LINE_STRIP\t\t\t\t0x0003\n#define GL_TRIANGLES\t\t\t\t0x0004\n#define GL_TRIANGLE_STRIP\t\t\t0x0005\n#define GL_TRIANGLE_FAN\t\t\t\t0x0006\n#define GL_QUADS\t\t\t\t0x0007\n#define GL_QUAD_STRIP\t\t\t\t0x0008\n#define GL_POLYGON\t\t\t\t0x0009\n\n/* Vertex Arrays */\n#define GL_VERTEX_ARRAY\t\t\t\t0x8074\n#define GL_NORMAL_ARRAY\t\t\t\t0x8075\n#define GL_COLOR_ARRAY\t\t\t\t0x8076\n#define GL_INDEX_ARRAY\t\t\t\t0x8077\n#define GL_TEXTURE_COORD_ARRAY\t\t\t0x8078\n#define GL_EDGE_FLAG_ARRAY\t\t\t0x8079\n#define GL_VERTEX_ARRAY_SIZE\t\t\t0x807A\n#define GL_VERTEX_ARRAY_TYPE\t\t\t0x807B\n#define GL_VERTEX_ARRAY_STRIDE\t\t\t0x807C\n#define GL_NORMAL_ARRAY_TYPE\t\t\t0x807E\n#define GL_NORMAL_ARRAY_STRIDE\t\t\t0x807F\n#define GL_COLOR_ARRAY_SIZE\t\t\t0x8081\n#define GL_COLOR_ARRAY_TYPE\t\t\t0x8082\n#define GL_COLOR_ARRAY_STRIDE\t\t\t0x8083\n#define GL_INDEX_ARRAY_TYPE\t\t\t0x8085\n#define GL_INDEX_ARRAY_STRIDE\t\t\t0x8086\n#define GL_TEXTURE_COORD_ARRAY_SIZE\t\t0x8088\n#define GL_TEXTURE_COORD_ARRAY_TYPE\t\t0x8089\n#define GL_TEXTURE_COORD_ARRAY_STRIDE\t\t0x808A\n#define GL_EDGE_FLAG_ARRAY_STRIDE\t\t0x808C\n#define GL_VERTEX_ARRAY_POINTER\t\t\t0x808E\n#define GL_NORMAL_ARRAY_POINTER\t\t\t0x808F\n#define GL_COLOR_ARRAY_POINTER\t\t\t0x8090\n#define GL_INDEX_ARRAY_POINTER\t\t\t0x8091\n#define GL_TEXTURE_COORD_ARRAY_POINTER\t\t0x8092\n#define GL_EDGE_FLAG_ARRAY_POINTER\t\t0x8093\n#define GL_V2F\t\t\t\t\t0x2A20\n#define GL_V3F\t\t\t\t\t0x2A21\n#define GL_C4UB_V2F\t\t\t\t0x2A22\n#define GL_C4UB_V3F\t\t\t\t0x2A23\n#define GL_C3F_V3F\t\t\t\t0x2A24\n#define GL_N3F_V3F\t\t\t\t0x2A25\n#define GL_C4F_N3F_V3F\t\t\t\t0x2A26\n#define GL_T2F_V3F\t\t\t\t0x2A27\n#define GL_T4F_V4F\t\t\t\t0x2A28\n#define GL_T2F_C4UB_V3F\t\t\t\t0x2A29\n#define GL_T2F_C3F_V3F\t\t\t\t0x2A2A\n#define GL_T2F_N3F_V3F\t\t\t\t0x2A2B\n#define GL_T2F_C4F_N3F_V3F\t\t\t0x2A2C\n#define GL_T4F_C4F_N3F_V4F\t\t\t0x2A2D\n\n/* Matrix Mode */\n#define GL_MATRIX_MODE\t\t\t\t0x0BA0\n#define GL_MODELVIEW\t\t\t\t0x1700\n#define GL_PROJECTION\t\t\t\t0x1701\n#define GL_TEXTURE\t\t\t\t0x1702\n\n/* Points */\n#define GL_POINT_SMOOTH\t\t\t\t0x0B10\n#define GL_POINT_SIZE\t\t\t\t0x0B11\n#define GL_POINT_SIZE_GRANULARITY \t\t0x0B13\n#define GL_POINT_SIZE_RANGE\t\t\t0x0B12\n\n/* Lines */\n#define GL_LINE_SMOOTH\t\t\t\t0x0B20\n#define GL_LINE_STIPPLE\t\t\t\t0x0B24\n#define GL_LINE_STIPPLE_PATTERN\t\t\t0x0B25\n#define GL_LINE_STIPPLE_REPEAT\t\t\t0x0B26\n#define GL_LINE_WIDTH\t\t\t\t0x0B21\n#define GL_LINE_WIDTH_GRANULARITY\t\t0x0B23\n#define GL_LINE_WIDTH_RANGE\t\t\t0x0B22\n\n/* Polygons */\n#define GL_POINT\t\t\t\t0x1B00\n#define GL_LINE\t\t\t\t\t0x1B01\n#define GL_FILL\t\t\t\t\t0x1B02\n#define GL_CW\t\t\t\t\t0x0900\n#define GL_CCW\t\t\t\t\t0x0901\n#define GL_FRONT\t\t\t\t0x0404\n#define GL_BACK\t\t\t\t\t0x0405\n#define GL_POLYGON_MODE\t\t\t\t0x0B40\n#define GL_POLYGON_SMOOTH\t\t\t0x0B41\n#define GL_POLYGON_STIPPLE\t\t\t0x0B42\n#define GL_EDGE_FLAG\t\t\t\t0x0B43\n#define GL_CULL_FACE\t\t\t\t0x0B44\n#define GL_CULL_FACE_MODE\t\t\t0x0B45\n#define GL_FRONT_FACE\t\t\t\t0x0B46\n#define GL_POLYGON_OFFSET_FACTOR\t\t0x8038\n#define GL_POLYGON_OFFSET_UNITS\t\t\t0x2A00\n#define GL_POLYGON_OFFSET_POINT\t\t\t0x2A01\n#define GL_POLYGON_OFFSET_LINE\t\t\t0x2A02\n#define GL_POLYGON_OFFSET_FILL\t\t\t0x8037\n\n/* Display Lists */\n#define GL_COMPILE\t\t\t\t0x1300\n#define GL_COMPILE_AND_EXECUTE\t\t\t0x1301\n#define GL_LIST_BASE\t\t\t\t0x0B32\n#define GL_LIST_INDEX\t\t\t\t0x0B33\n#define GL_LIST_MODE\t\t\t\t0x0B30\n\n/* Depth buffer */\n#define GL_NEVER\t\t\t\t0x0200\n#define GL_LESS\t\t\t\t\t0x0201\n#define GL_EQUAL\t\t\t\t0x0202\n#define GL_LEQUAL\t\t\t\t0x0203\n#define GL_GREATER\t\t\t\t0x0204\n#define GL_NOTEQUAL\t\t\t\t0x0205\n#define GL_GEQUAL\t\t\t\t0x0206\n#define GL_ALWAYS\t\t\t\t0x0207\n#define GL_DEPTH_TEST\t\t\t\t0x0B71\n#define GL_DEPTH_BITS\t\t\t\t0x0D56\n#define GL_DEPTH_CLEAR_VALUE\t\t\t0x0B73\n#define GL_DEPTH_FUNC\t\t\t\t0x0B74\n#define GL_DEPTH_RANGE\t\t\t\t0x0B70\n#define GL_DEPTH_WRITEMASK\t\t\t0x0B72\n#define GL_DEPTH_COMPONENT\t\t\t0x1902\n\n/* Lighting */\n#define GL_LIGHTING\t\t\t\t0x0B50\n#define GL_LIGHT0\t\t\t\t0x4000\n#define GL_LIGHT1\t\t\t\t0x4001\n#define GL_LIGHT2\t\t\t\t0x4002\n#define GL_LIGHT3\t\t\t\t0x4003\n#define GL_LIGHT4\t\t\t\t0x4004\n#define GL_LIGHT5\t\t\t\t0x4005\n#define GL_LIGHT6\t\t\t\t0x4006\n#define GL_LIGHT7\t\t\t\t0x4007\n#define GL_SPOT_EXPONENT\t\t\t0x1205\n#define GL_SPOT_CUTOFF\t\t\t\t0x1206\n#define GL_CONSTANT_ATTENUATION\t\t\t0x1207\n#define GL_LINEAR_ATTENUATION\t\t\t0x1208\n#define GL_QUADRATIC_ATTENUATION\t\t0x1209\n#define GL_AMBIENT\t\t\t\t0x1200\n#define GL_DIFFUSE\t\t\t\t0x1201\n#define GL_SPECULAR\t\t\t\t0x1202\n#define GL_SHININESS\t\t\t\t0x1601\n#define GL_EMISSION\t\t\t\t0x1600\n#define GL_POSITION\t\t\t\t0x1203\n#define GL_SPOT_DIRECTION\t\t\t0x1204\n#define GL_AMBIENT_AND_DIFFUSE\t\t\t0x1602\n#define GL_COLOR_INDEXES\t\t\t0x1603\n#define GL_LIGHT_MODEL_TWO_SIDE\t\t\t0x0B52\n#define GL_LIGHT_MODEL_LOCAL_VIEWER\t\t0x0B51\n#define GL_LIGHT_MODEL_AMBIENT\t\t\t0x0B53\n#define GL_FRONT_AND_BACK\t\t\t0x0408\n#define GL_SHADE_MODEL\t\t\t\t0x0B54\n#define GL_FLAT\t\t\t\t\t0x1D00\n#define GL_SMOOTH\t\t\t\t0x1D01\n#define GL_COLOR_MATERIAL\t\t\t0x0B57\n#define GL_COLOR_MATERIAL_FACE\t\t\t0x0B55\n#define GL_COLOR_MATERIAL_PARAMETER\t\t0x0B56\n#define GL_NORMALIZE\t\t\t\t0x0BA1\n\n/* User clipping planes */\n#define GL_CLIP_PLANE0\t\t\t\t0x3000\n#define GL_CLIP_PLANE1\t\t\t\t0x3001\n#define GL_CLIP_PLANE2\t\t\t\t0x3002\n#define GL_CLIP_PLANE3\t\t\t\t0x3003\n#define GL_CLIP_PLANE4\t\t\t\t0x3004\n#define GL_CLIP_PLANE5\t\t\t\t0x3005\n\n/* Accumulation buffer */\n#define GL_ACCUM_RED_BITS\t\t\t0x0D58\n#define GL_ACCUM_GREEN_BITS\t\t\t0x0D59\n#define GL_ACCUM_BLUE_BITS\t\t\t0x0D5A\n#define GL_ACCUM_ALPHA_BITS\t\t\t0x0D5B\n#define GL_ACCUM_CLEAR_VALUE\t\t\t0x0B80\n#define GL_ACCUM\t\t\t\t0x0100\n#define GL_ADD\t\t\t\t\t0x0104\n#define GL_LOAD\t\t\t\t\t0x0101\n#define GL_MULT\t\t\t\t\t0x0103\n#define GL_RETURN\t\t\t\t0x0102\n\n/* Alpha testing */\n#define GL_ALPHA_TEST\t\t\t\t0x0BC0\n#define GL_ALPHA_TEST_REF\t\t\t0x0BC2\n#define GL_ALPHA_TEST_FUNC\t\t\t0x0BC1\n\n/* Blending */\n#define GL_BLEND\t\t\t\t0x0BE2\n#define GL_BLEND_SRC\t\t\t\t0x0BE1\n#define GL_BLEND_DST\t\t\t\t0x0BE0\n#define GL_ZERO\t\t\t\t\t0\n#define GL_ONE\t\t\t\t\t1\n#define GL_SRC_COLOR\t\t\t\t0x0300\n#define GL_ONE_MINUS_SRC_COLOR\t\t\t0x0301\n#define GL_SRC_ALPHA\t\t\t\t0x0302\n#define GL_ONE_MINUS_SRC_ALPHA\t\t\t0x0303\n#define GL_DST_ALPHA\t\t\t\t0x0304\n#define GL_ONE_MINUS_DST_ALPHA\t\t\t0x0305\n#define GL_DST_COLOR\t\t\t\t0x0306\n#define GL_ONE_MINUS_DST_COLOR\t\t\t0x0307\n#define GL_SRC_ALPHA_SATURATE\t\t\t0x0308\n\n/* Render Mode */\n#define GL_FEEDBACK\t\t\t\t0x1C01\n#define GL_RENDER\t\t\t\t0x1C00\n#define GL_SELECT\t\t\t\t0x1C02\n\n/* Feedback */\n#define GL_2D\t\t\t\t\t0x0600\n#define GL_3D\t\t\t\t\t0x0601\n#define GL_3D_COLOR\t\t\t\t0x0602\n#define GL_3D_COLOR_TEXTURE\t\t\t0x0603\n#define GL_4D_COLOR_TEXTURE\t\t\t0x0604\n#define GL_POINT_TOKEN\t\t\t\t0x0701\n#define GL_LINE_TOKEN\t\t\t\t0x0702\n#define GL_LINE_RESET_TOKEN\t\t\t0x0707\n#define GL_POLYGON_TOKEN\t\t\t0x0703\n#define GL_BITMAP_TOKEN\t\t\t\t0x0704\n#define GL_DRAW_PIXEL_TOKEN\t\t\t0x0705\n#define GL_COPY_PIXEL_TOKEN\t\t\t0x0706\n#define GL_PASS_THROUGH_TOKEN\t\t\t0x0700\n#define GL_FEEDBACK_BUFFER_POINTER\t\t0x0DF0\n#define GL_FEEDBACK_BUFFER_SIZE\t\t\t0x0DF1\n#define GL_FEEDBACK_BUFFER_TYPE\t\t\t0x0DF2\n\n/* Selection */\n#define GL_SELECTION_BUFFER_POINTER\t\t0x0DF3\n#define GL_SELECTION_BUFFER_SIZE\t\t0x0DF4\n\n/* Fog */\n#define GL_FOG\t\t\t\t\t0x0B60\n#define GL_FOG_MODE\t\t\t\t0x0B65\n#define GL_FOG_DENSITY\t\t\t\t0x0B62\n#define GL_FOG_COLOR\t\t\t\t0x0B66\n#define GL_FOG_INDEX\t\t\t\t0x0B61\n#define GL_FOG_START\t\t\t\t0x0B63\n#define GL_FOG_END\t\t\t\t0x0B64\n#define GL_LINEAR\t\t\t\t0x2601\n#define GL_EXP\t\t\t\t\t0x0800\n#define GL_EXP2\t\t\t\t\t0x0801\n\n/* Logic Ops */\n#define GL_LOGIC_OP\t\t\t\t0x0BF1\n#define GL_INDEX_LOGIC_OP\t\t\t0x0BF1\n#define GL_COLOR_LOGIC_OP\t\t\t0x0BF2\n#define GL_LOGIC_OP_MODE\t\t\t0x0BF0\n#define GL_CLEAR\t\t\t\t0x1500\n#define GL_SET\t\t\t\t\t0x150F\n#define GL_COPY\t\t\t\t\t0x1503\n#define GL_COPY_INVERTED\t\t\t0x150C\n#define GL_NOOP\t\t\t\t\t0x1505\n#define GL_INVERT\t\t\t\t0x150A\n#define GL_AND\t\t\t\t\t0x1501\n#define GL_NAND\t\t\t\t\t0x150E\n#define GL_OR\t\t\t\t\t0x1507\n#define GL_NOR\t\t\t\t\t0x1508\n#define GL_XOR\t\t\t\t\t0x1506\n#define GL_EQUIV\t\t\t\t0x1509\n#define GL_AND_REVERSE\t\t\t\t0x1502\n#define GL_AND_INVERTED\t\t\t\t0x1504\n#define GL_OR_REVERSE\t\t\t\t0x150B\n#define GL_OR_INVERTED\t\t\t\t0x150D\n\n/* Stencil */\n#define GL_STENCIL_BITS\t\t\t\t0x0D57\n#define GL_STENCIL_TEST\t\t\t\t0x0B90\n#define GL_STENCIL_CLEAR_VALUE\t\t\t0x0B91\n#define GL_STENCIL_FUNC\t\t\t\t0x0B92\n#define GL_STENCIL_VALUE_MASK\t\t\t0x0B93\n#define GL_STENCIL_FAIL\t\t\t\t0x0B94\n#define GL_STENCIL_PASS_DEPTH_FAIL\t\t0x0B95\n#define GL_STENCIL_PASS_DEPTH_PASS\t\t0x0B96\n#define GL_STENCIL_REF\t\t\t\t0x0B97\n#define GL_STENCIL_WRITEMASK\t\t\t0x0B98\n#define GL_STENCIL_INDEX\t\t\t0x1901\n#define GL_KEEP\t\t\t\t\t0x1E00\n#define GL_REPLACE\t\t\t\t0x1E01\n#define GL_INCR\t\t\t\t\t0x1E02\n#define GL_DECR\t\t\t\t\t0x1E03\n\n/* Buffers, Pixel Drawing/Reading */\n#define GL_NONE\t\t\t\t\t0\n#define GL_LEFT\t\t\t\t\t0x0406\n#define GL_RIGHT\t\t\t\t0x0407\n/*GL_FRONT\t\t\t\t\t0x0404 */\n/*GL_BACK\t\t\t\t\t0x0405 */\n/*GL_FRONT_AND_BACK\t\t\t\t0x0408 */\n#define GL_FRONT_LEFT\t\t\t\t0x0400\n#define GL_FRONT_RIGHT\t\t\t\t0x0401\n#define GL_BACK_LEFT\t\t\t\t0x0402\n#define GL_BACK_RIGHT\t\t\t\t0x0403\n#define GL_AUX0\t\t\t\t\t0x0409\n#define GL_AUX1\t\t\t\t\t0x040A\n#define GL_AUX2\t\t\t\t\t0x040B\n#define GL_AUX3\t\t\t\t\t0x040C\n#define GL_COLOR_INDEX\t\t\t\t0x1900\n#define GL_RED\t\t\t\t\t0x1903\n#define GL_GREEN\t\t\t\t0x1904\n#define GL_BLUE\t\t\t\t\t0x1905\n#define GL_ALPHA\t\t\t\t0x1906\n#define GL_LUMINANCE\t\t\t\t0x1909\n#define GL_LUMINANCE_ALPHA\t\t\t0x190A\n#define GL_ALPHA_BITS\t\t\t\t0x0D55\n#define GL_RED_BITS\t\t\t\t0x0D52\n#define GL_GREEN_BITS\t\t\t\t0x0D53\n#define GL_BLUE_BITS\t\t\t\t0x0D54\n#define GL_INDEX_BITS\t\t\t\t0x0D51\n#define GL_SUBPIXEL_BITS\t\t\t0x0D50\n#define GL_AUX_BUFFERS\t\t\t\t0x0C00\n#define GL_READ_BUFFER\t\t\t\t0x0C02\n#define GL_DRAW_BUFFER\t\t\t\t0x0C01\n#define GL_DOUBLEBUFFER\t\t\t\t0x0C32\n#define GL_STEREO\t\t\t\t0x0C33\n#define GL_BITMAP\t\t\t\t0x1A00\n#define GL_COLOR\t\t\t\t0x1800\n#define GL_DEPTH\t\t\t\t0x1801\n#define GL_STENCIL\t\t\t\t0x1802\n#define GL_DITHER\t\t\t\t0x0BD0\n#define GL_RGB\t\t\t\t\t0x1907\n#define GL_RGBA\t\t\t\t\t0x1908\n\n/* Implementation limits */\n#define GL_MAX_LIST_NESTING\t\t\t0x0B31\n#define GL_MAX_EVAL_ORDER\t\t\t0x0D30\n#define GL_MAX_LIGHTS\t\t\t\t0x0D31\n#define GL_MAX_CLIP_PLANES\t\t\t0x0D32\n#define GL_MAX_TEXTURE_SIZE\t\t\t0x0D33\n#define GL_MAX_PIXEL_MAP_TABLE\t\t\t0x0D34\n#define GL_MAX_ATTRIB_STACK_DEPTH\t\t0x0D35\n#define GL_MAX_MODELVIEW_STACK_DEPTH\t\t0x0D36\n#define GL_MAX_NAME_STACK_DEPTH\t\t\t0x0D37\n#define GL_MAX_PROJECTION_STACK_DEPTH\t\t0x0D38\n#define GL_MAX_TEXTURE_STACK_DEPTH\t\t0x0D39\n#define GL_MAX_VIEWPORT_DIMS\t\t\t0x0D3A\n#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\t0x0D3B\n\n/* Gets */\n#define GL_ATTRIB_STACK_DEPTH\t\t\t0x0BB0\n#define GL_CLIENT_ATTRIB_STACK_DEPTH\t\t0x0BB1\n#define GL_COLOR_CLEAR_VALUE\t\t\t0x0C22\n#define GL_COLOR_WRITEMASK\t\t\t0x0C23\n#define GL_CURRENT_INDEX\t\t\t0x0B01\n#define GL_CURRENT_COLOR\t\t\t0x0B00\n#define GL_CURRENT_NORMAL\t\t\t0x0B02\n#define GL_CURRENT_RASTER_COLOR\t\t\t0x0B04\n#define GL_CURRENT_RASTER_DISTANCE\t\t0x0B09\n#define GL_CURRENT_RASTER_INDEX\t\t\t0x0B05\n#define GL_CURRENT_RASTER_POSITION\t\t0x0B07\n#define GL_CURRENT_RASTER_TEXTURE_COORDS\t0x0B06\n#define GL_CURRENT_RASTER_POSITION_VALID\t0x0B08\n#define GL_CURRENT_TEXTURE_COORDS\t\t0x0B03\n#define GL_INDEX_CLEAR_VALUE\t\t\t0x0C20\n#define GL_INDEX_MODE\t\t\t\t0x0C30\n#define GL_INDEX_WRITEMASK\t\t\t0x0C21\n#define GL_MODELVIEW_MATRIX\t\t\t0x0BA6\n#define GL_MODELVIEW_STACK_DEPTH\t\t0x0BA3\n#define GL_NAME_STACK_DEPTH\t\t\t0x0D70\n#define GL_PROJECTION_MATRIX\t\t\t0x0BA7\n#define GL_PROJECTION_STACK_DEPTH\t\t0x0BA4\n#define GL_RENDER_MODE\t\t\t\t0x0C40\n#define GL_RGBA_MODE\t\t\t\t0x0C31\n#define GL_TEXTURE_MATRIX\t\t\t0x0BA8\n#define GL_TEXTURE_STACK_DEPTH\t\t\t0x0BA5\n#define GL_VIEWPORT\t\t\t\t0x0BA2\n\n/* Evaluators */\n#define GL_AUTO_NORMAL\t\t\t\t0x0D80\n#define GL_MAP1_COLOR_4\t\t\t\t0x0D90\n#define GL_MAP1_INDEX\t\t\t\t0x0D91\n#define GL_MAP1_NORMAL\t\t\t\t0x0D92\n#define GL_MAP1_TEXTURE_COORD_1\t\t\t0x0D93\n#define GL_MAP1_TEXTURE_COORD_2\t\t\t0x0D94\n#define GL_MAP1_TEXTURE_COORD_3\t\t\t0x0D95\n#define GL_MAP1_TEXTURE_COORD_4\t\t\t0x0D96\n#define GL_MAP1_VERTEX_3\t\t\t0x0D97\n#define GL_MAP1_VERTEX_4\t\t\t0x0D98\n#define GL_MAP2_COLOR_4\t\t\t\t0x0DB0\n#define GL_MAP2_INDEX\t\t\t\t0x0DB1\n#define GL_MAP2_NORMAL\t\t\t\t0x0DB2\n#define GL_MAP2_TEXTURE_COORD_1\t\t\t0x0DB3\n#define GL_MAP2_TEXTURE_COORD_2\t\t\t0x0DB4\n#define GL_MAP2_TEXTURE_COORD_3\t\t\t0x0DB5\n#define GL_MAP2_TEXTURE_COORD_4\t\t\t0x0DB6\n#define GL_MAP2_VERTEX_3\t\t\t0x0DB7\n#define GL_MAP2_VERTEX_4\t\t\t0x0DB8\n#define GL_MAP1_GRID_DOMAIN\t\t\t0x0DD0\n#define GL_MAP1_GRID_SEGMENTS\t\t\t0x0DD1\n#define GL_MAP2_GRID_DOMAIN\t\t\t0x0DD2\n#define GL_MAP2_GRID_SEGMENTS\t\t\t0x0DD3\n#define GL_COEFF\t\t\t\t0x0A00\n#define GL_ORDER\t\t\t\t0x0A01\n#define GL_DOMAIN\t\t\t\t0x0A02\n\n/* Hints */\n#define GL_PERSPECTIVE_CORRECTION_HINT\t\t0x0C50\n#define GL_POINT_SMOOTH_HINT\t\t\t0x0C51\n#define GL_LINE_SMOOTH_HINT\t\t\t0x0C52\n#define GL_POLYGON_SMOOTH_HINT\t\t\t0x0C53\n#define GL_FOG_HINT\t\t\t\t0x0C54\n#define GL_DONT_CARE\t\t\t\t0x1100\n#define GL_FASTEST\t\t\t\t0x1101\n#define GL_NICEST\t\t\t\t0x1102\n\n/* Scissor box */\n#define GL_SCISSOR_BOX\t\t\t\t0x0C10\n#define GL_SCISSOR_TEST\t\t\t\t0x0C11\n\n/* Pixel Mode / Transfer */\n#define GL_MAP_COLOR\t\t\t\t0x0D10\n#define GL_MAP_STENCIL\t\t\t\t0x0D11\n#define GL_INDEX_SHIFT\t\t\t\t0x0D12\n#define GL_INDEX_OFFSET\t\t\t\t0x0D13\n#define GL_RED_SCALE\t\t\t\t0x0D14\n#define GL_RED_BIAS\t\t\t\t0x0D15\n#define GL_GREEN_SCALE\t\t\t\t0x0D18\n#define GL_GREEN_BIAS\t\t\t\t0x0D19\n#define GL_BLUE_SCALE\t\t\t\t0x0D1A\n#define GL_BLUE_BIAS\t\t\t\t0x0D1B\n#define GL_ALPHA_SCALE\t\t\t\t0x0D1C\n#define GL_ALPHA_BIAS\t\t\t\t0x0D1D\n#define GL_DEPTH_SCALE\t\t\t\t0x0D1E\n#define GL_DEPTH_BIAS\t\t\t\t0x0D1F\n#define GL_PIXEL_MAP_S_TO_S_SIZE\t\t0x0CB1\n#define GL_PIXEL_MAP_I_TO_I_SIZE\t\t0x0CB0\n#define GL_PIXEL_MAP_I_TO_R_SIZE\t\t0x0CB2\n#define GL_PIXEL_MAP_I_TO_G_SIZE\t\t0x0CB3\n#define GL_PIXEL_MAP_I_TO_B_SIZE\t\t0x0CB4\n#define GL_PIXEL_MAP_I_TO_A_SIZE\t\t0x0CB5\n#define GL_PIXEL_MAP_R_TO_R_SIZE\t\t0x0CB6\n#define GL_PIXEL_MAP_G_TO_G_SIZE\t\t0x0CB7\n#define GL_PIXEL_MAP_B_TO_B_SIZE\t\t0x0CB8\n#define GL_PIXEL_MAP_A_TO_A_SIZE\t\t0x0CB9\n#define GL_PIXEL_MAP_S_TO_S\t\t\t0x0C71\n#define GL_PIXEL_MAP_I_TO_I\t\t\t0x0C70\n#define GL_PIXEL_MAP_I_TO_R\t\t\t0x0C72\n#define GL_PIXEL_MAP_I_TO_G\t\t\t0x0C73\n#define GL_PIXEL_MAP_I_TO_B\t\t\t0x0C74\n#define GL_PIXEL_MAP_I_TO_A\t\t\t0x0C75\n#define GL_PIXEL_MAP_R_TO_R\t\t\t0x0C76\n#define GL_PIXEL_MAP_G_TO_G\t\t\t0x0C77\n#define GL_PIXEL_MAP_B_TO_B\t\t\t0x0C78\n#define GL_PIXEL_MAP_A_TO_A\t\t\t0x0C79\n#define GL_PACK_ALIGNMENT\t\t\t0x0D05\n#define GL_PACK_LSB_FIRST\t\t\t0x0D01\n#define GL_PACK_ROW_LENGTH\t\t\t0x0D02\n#define GL_PACK_SKIP_PIXELS\t\t\t0x0D04\n#define GL_PACK_SKIP_ROWS\t\t\t0x0D03\n#define GL_PACK_SWAP_BYTES\t\t\t0x0D00\n#define GL_UNPACK_ALIGNMENT\t\t\t0x0CF5\n#define GL_UNPACK_LSB_FIRST\t\t\t0x0CF1\n#define GL_UNPACK_ROW_LENGTH\t\t\t0x0CF2\n#define GL_UNPACK_SKIP_PIXELS\t\t\t0x0CF4\n#define GL_UNPACK_SKIP_ROWS\t\t\t0x0CF3\n#define GL_UNPACK_SWAP_BYTES\t\t\t0x0CF0\n#define GL_ZOOM_X\t\t\t\t0x0D16\n#define GL_ZOOM_Y\t\t\t\t0x0D17\n\n/* Texture mapping */\n#define GL_TEXTURE_ENV\t\t\t\t0x2300\n#define GL_TEXTURE_ENV_MODE\t\t\t0x2200\n#define GL_TEXTURE_1D\t\t\t\t0x0DE0\n#define GL_TEXTURE_2D\t\t\t\t0x0DE1\n#define GL_TEXTURE_WRAP_S\t\t\t0x2802\n#define GL_TEXTURE_WRAP_T\t\t\t0x2803\n#define GL_TEXTURE_MAG_FILTER\t\t\t0x2800\n#define GL_TEXTURE_MIN_FILTER\t\t\t0x2801\n#define GL_TEXTURE_ENV_COLOR\t\t\t0x2201\n#define GL_TEXTURE_GEN_S\t\t\t0x0C60\n#define GL_TEXTURE_GEN_T\t\t\t0x0C61\n#define GL_TEXTURE_GEN_R\t\t\t0x0C62\n#define GL_TEXTURE_GEN_Q\t\t\t0x0C63\n#define GL_TEXTURE_GEN_MODE\t\t\t0x2500\n#define GL_TEXTURE_BORDER_COLOR\t\t\t0x1004\n#define GL_TEXTURE_WIDTH\t\t\t0x1000\n#define GL_TEXTURE_HEIGHT\t\t\t0x1001\n#define GL_TEXTURE_BORDER\t\t\t0x1005\n#define GL_TEXTURE_COMPONENTS\t\t\t0x1003\n#define GL_TEXTURE_RED_SIZE\t\t\t0x805C\n#define GL_TEXTURE_GREEN_SIZE\t\t\t0x805D\n#define GL_TEXTURE_BLUE_SIZE\t\t\t0x805E\n#define GL_TEXTURE_ALPHA_SIZE\t\t\t0x805F\n#define GL_TEXTURE_LUMINANCE_SIZE\t\t0x8060\n#define GL_TEXTURE_INTENSITY_SIZE\t\t0x8061\n#define GL_NEAREST_MIPMAP_NEAREST\t\t0x2700\n#define GL_NEAREST_MIPMAP_LINEAR\t\t0x2702\n#define GL_LINEAR_MIPMAP_NEAREST\t\t0x2701\n#define GL_LINEAR_MIPMAP_LINEAR\t\t\t0x2703\n#define GL_OBJECT_LINEAR\t\t\t0x2401\n#define GL_OBJECT_PLANE\t\t\t\t0x2501\n#define GL_EYE_LINEAR\t\t\t\t0x2400\n#define GL_EYE_PLANE\t\t\t\t0x2502\n#define GL_SPHERE_MAP\t\t\t\t0x2402\n#define GL_DECAL\t\t\t\t0x2101\n#define GL_MODULATE\t\t\t\t0x2100\n#define GL_NEAREST\t\t\t\t0x2600\n#define GL_REPEAT\t\t\t\t0x2901\n#define GL_CLAMP\t\t\t\t0x2900\n#define GL_S\t\t\t\t\t0x2000\n#define GL_T\t\t\t\t\t0x2001\n#define GL_R\t\t\t\t\t0x2002\n#define GL_Q\t\t\t\t\t0x2003\n\n/* Utility */\n#define GL_VENDOR\t\t\t\t0x1F00\n#define GL_RENDERER\t\t\t\t0x1F01\n#define GL_VERSION\t\t\t\t0x1F02\n#define GL_EXTENSIONS\t\t\t\t0x1F03\n\n/* Errors */\n#define GL_NO_ERROR \t\t\t\t0\n#define GL_INVALID_ENUM\t\t\t\t0x0500\n#define GL_INVALID_VALUE\t\t\t0x0501\n#define GL_INVALID_OPERATION\t\t\t0x0502\n#define GL_STACK_OVERFLOW\t\t\t0x0503\n#define GL_STACK_UNDERFLOW\t\t\t0x0504\n#define GL_OUT_OF_MEMORY\t\t\t0x0505\n\n/* glPush/PopAttrib bits */\n#define GL_CURRENT_BIT\t\t\t\t0x00000001\n#define GL_POINT_BIT\t\t\t\t0x00000002\n#define GL_LINE_BIT\t\t\t\t0x00000004\n#define GL_POLYGON_BIT\t\t\t\t0x00000008\n#define GL_POLYGON_STIPPLE_BIT\t\t\t0x00000010\n#define GL_PIXEL_MODE_BIT\t\t\t0x00000020\n#define GL_LIGHTING_BIT\t\t\t\t0x00000040\n#define GL_FOG_BIT\t\t\t\t0x00000080\n#define GL_DEPTH_BUFFER_BIT\t\t\t0x00000100\n#define GL_ACCUM_BUFFER_BIT\t\t\t0x00000200\n#define GL_STENCIL_BUFFER_BIT\t\t\t0x00000400\n#define GL_VIEWPORT_BIT\t\t\t\t0x00000800\n#define GL_TRANSFORM_BIT\t\t\t0x00001000\n#define GL_ENABLE_BIT\t\t\t\t0x00002000\n#define GL_COLOR_BUFFER_BIT\t\t\t0x00004000\n#define GL_HINT_BIT\t\t\t\t0x00008000\n#define GL_EVAL_BIT\t\t\t\t0x00010000\n#define GL_LIST_BIT\t\t\t\t0x00020000\n#define GL_TEXTURE_BIT\t\t\t\t0x00040000\n#define GL_SCISSOR_BIT\t\t\t\t0x00080000\n#define GL_ALL_ATTRIB_BITS\t\t\t0x000FFFFF\n\n\n/* OpenGL 1.1 */\n#define GL_PROXY_TEXTURE_1D\t\t\t0x8063\n#define GL_PROXY_TEXTURE_2D\t\t\t0x8064\n#define GL_TEXTURE_PRIORITY\t\t\t0x8066\n#define GL_TEXTURE_RESIDENT\t\t\t0x8067\n#define GL_TEXTURE_BINDING_1D\t\t\t0x8068\n#define GL_TEXTURE_BINDING_2D\t\t\t0x8069\n#define GL_TEXTURE_INTERNAL_FORMAT\t\t0x1003\n#define GL_ALPHA4\t\t\t\t0x803B\n#define GL_ALPHA8\t\t\t\t0x803C\n#define GL_ALPHA12\t\t\t\t0x803D\n#define GL_ALPHA16\t\t\t\t0x803E\n#define GL_LUMINANCE4\t\t\t\t0x803F\n#define GL_LUMINANCE8\t\t\t\t0x8040\n#define GL_LUMINANCE12\t\t\t\t0x8041\n#define GL_LUMINANCE16\t\t\t\t0x8042\n#define GL_LUMINANCE4_ALPHA4\t\t\t0x8043\n#define GL_LUMINANCE6_ALPHA2\t\t\t0x8044\n#define GL_LUMINANCE8_ALPHA8\t\t\t0x8045\n#define GL_LUMINANCE12_ALPHA4\t\t\t0x8046\n#define GL_LUMINANCE12_ALPHA12\t\t\t0x8047\n#define GL_LUMINANCE16_ALPHA16\t\t\t0x8048\n#define GL_INTENSITY\t\t\t\t0x8049\n#define GL_INTENSITY4\t\t\t\t0x804A\n#define GL_INTENSITY8\t\t\t\t0x804B\n#define GL_INTENSITY12\t\t\t\t0x804C\n#define GL_INTENSITY16\t\t\t\t0x804D\n#define GL_R3_G3_B2\t\t\t\t0x2A10\n#define GL_RGB4\t\t\t\t\t0x804F\n#define GL_RGB5\t\t\t\t\t0x8050\n#define GL_RGB8\t\t\t\t\t0x8051\n#define GL_RGB10\t\t\t\t0x8052\n#define GL_RGB12\t\t\t\t0x8053\n#define GL_RGB16\t\t\t\t0x8054\n#define GL_RGBA2\t\t\t\t0x8055\n#define GL_RGBA4\t\t\t\t0x8056\n#define GL_RGB5_A1\t\t\t\t0x8057\n#define GL_RGBA8\t\t\t\t0x8058\n#define GL_RGB10_A2\t\t\t\t0x8059\n#define GL_RGBA12\t\t\t\t0x805A\n#define GL_RGBA16\t\t\t\t0x805B\n#define GL_CLIENT_PIXEL_STORE_BIT\t\t0x00000001\n#define GL_CLIENT_VERTEX_ARRAY_BIT\t\t0x00000002\n#define GL_ALL_CLIENT_ATTRIB_BITS \t\t0xFFFFFFFF\n#define GL_CLIENT_ALL_ATTRIB_BITS \t\t0xFFFFFFFF\n\n\n\n/*\n * Miscellaneous\n */\n\nGLAPI void GLAPIENTRY glClearIndex( GLfloat c );\n\nGLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );\n\nGLAPI void GLAPIENTRY glClear( GLbitfield mask );\n\nGLAPI void GLAPIENTRY glIndexMask( GLuint mask );\n\nGLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );\n\nGLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref );\n\nGLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor );\n\nGLAPI void GLAPIENTRY glLogicOp( GLenum opcode );\n\nGLAPI void GLAPIENTRY glCullFace( GLenum mode );\n\nGLAPI void GLAPIENTRY glFrontFace( GLenum mode );\n\nGLAPI void GLAPIENTRY glPointSize( GLfloat size );\n\nGLAPI void GLAPIENTRY glLineWidth( GLfloat width );\n\nGLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern );\n\nGLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode );\n\nGLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units );\n\nGLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask );\n\nGLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask );\n\nGLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag );\n\nGLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag );\n\nGLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height);\n\nGLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation );\n\nGLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation );\n\nGLAPI void GLAPIENTRY glDrawBuffer( GLenum mode );\n\nGLAPI void GLAPIENTRY glReadBuffer( GLenum mode );\n\nGLAPI void GLAPIENTRY glEnable( GLenum cap );\n\nGLAPI void GLAPIENTRY glDisable( GLenum cap );\n\nGLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap );\n\n\nGLAPI void GLAPIENTRY glEnableClientState( GLenum cap );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glDisableClientState( GLenum cap );  /* 1.1 */\n\n\nGLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params );\n\nGLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params );\n\nGLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask );\n\nGLAPI void GLAPIENTRY glPopAttrib( void );\n\n\nGLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glPopClientAttrib( void );  /* 1.1 */\n\n\nGLAPI GLint GLAPIENTRY glRenderMode( GLenum mode );\n\nGLAPI GLenum GLAPIENTRY glGetError( void );\n\nGLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name );\n\nGLAPI void GLAPIENTRY glFinish( void );\n\nGLAPI void GLAPIENTRY glFlush( void );\n\nGLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode );\n\n\n/*\n * Depth Buffer\n */\n\nGLAPI void GLAPIENTRY glClearDepth( GLclampd depth );\n\nGLAPI void GLAPIENTRY glDepthFunc( GLenum func );\n\nGLAPI void GLAPIENTRY glDepthMask( GLboolean flag );\n\nGLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val );\n\n\n/*\n * Accumulation Buffer\n */\n\nGLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );\n\nGLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value );\n\n\n/*\n * Transformation\n */\n\nGLAPI void GLAPIENTRY glMatrixMode( GLenum mode );\n\nGLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right,\n                                 GLdouble bottom, GLdouble top,\n                                 GLdouble near_val, GLdouble far_val );\n\nGLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right,\n                                   GLdouble bottom, GLdouble top,\n                                   GLdouble near_val, GLdouble far_val );\n\nGLAPI void GLAPIENTRY glViewport( GLint x, GLint y,\n                                    GLsizei width, GLsizei height );\n\nGLAPI void GLAPIENTRY glPushMatrix( void );\n\nGLAPI void GLAPIENTRY glPopMatrix( void );\n\nGLAPI void GLAPIENTRY glLoadIdentity( void );\n\nGLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m );\nGLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m );\n\nGLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m );\nGLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m );\n\nGLAPI void GLAPIENTRY glRotated( GLdouble angle,\n                                   GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glRotatef( GLfloat angle,\n                                   GLfloat x, GLfloat y, GLfloat z );\n\nGLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z );\n\nGLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z );\n\n\n/*\n * Display Lists\n */\n\nGLAPI GLboolean GLAPIENTRY glIsList( GLuint list );\n\nGLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range );\n\nGLAPI GLuint GLAPIENTRY glGenLists( GLsizei range );\n\nGLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode );\n\nGLAPI void GLAPIENTRY glEndList( void );\n\nGLAPI void GLAPIENTRY glCallList( GLuint list );\n\nGLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type,\n                                     const GLvoid *lists );\n\nGLAPI void GLAPIENTRY glListBase( GLuint base );\n\n\n/*\n * Drawing Functions\n */\n\nGLAPI void GLAPIENTRY glBegin( GLenum mode );\n\nGLAPI void GLAPIENTRY glEnd( void );\n\n\nGLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y );\nGLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y );\nGLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y );\nGLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y );\n\nGLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z );\nGLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z );\nGLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z );\n\nGLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );\nGLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );\nGLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w );\nGLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w );\n\nGLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex2iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex3iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glVertex4iv( const GLint *v );\nGLAPI void GLAPIENTRY glVertex4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz );\nGLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz );\nGLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz );\nGLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz );\nGLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz );\n\nGLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glNormal3iv( const GLint *v );\nGLAPI void GLAPIENTRY glNormal3sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glIndexd( GLdouble c );\nGLAPI void GLAPIENTRY glIndexf( GLfloat c );\nGLAPI void GLAPIENTRY glIndexi( GLint c );\nGLAPI void GLAPIENTRY glIndexs( GLshort c );\nGLAPI void GLAPIENTRY glIndexub( GLubyte c );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glIndexdv( const GLdouble *c );\nGLAPI void GLAPIENTRY glIndexfv( const GLfloat *c );\nGLAPI void GLAPIENTRY glIndexiv( const GLint *c );\nGLAPI void GLAPIENTRY glIndexsv( const GLshort *c );\nGLAPI void GLAPIENTRY glIndexubv( const GLubyte *c );  /* 1.1 */\n\nGLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue );\nGLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue );\nGLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue );\nGLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue );\nGLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue );\nGLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue );\nGLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue );\nGLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue );\n\nGLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green,\n                                   GLbyte blue, GLbyte alpha );\nGLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green,\n                                   GLdouble blue, GLdouble alpha );\nGLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green,\n                                   GLfloat blue, GLfloat alpha );\nGLAPI void GLAPIENTRY glColor4i( GLint red, GLint green,\n                                   GLint blue, GLint alpha );\nGLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green,\n                                   GLshort blue, GLshort alpha );\nGLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green,\n                                    GLubyte blue, GLubyte alpha );\nGLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green,\n                                    GLuint blue, GLuint alpha );\nGLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green,\n                                    GLushort blue, GLushort alpha );\n\n\nGLAPI void GLAPIENTRY glColor3bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glColor3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glColor3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glColor3iv( const GLint *v );\nGLAPI void GLAPIENTRY glColor3sv( const GLshort *v );\nGLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v );\nGLAPI void GLAPIENTRY glColor3uiv( const GLuint *v );\nGLAPI void GLAPIENTRY glColor3usv( const GLushort *v );\n\nGLAPI void GLAPIENTRY glColor4bv( const GLbyte *v );\nGLAPI void GLAPIENTRY glColor4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glColor4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glColor4iv( const GLint *v );\nGLAPI void GLAPIENTRY glColor4sv( const GLshort *v );\nGLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v );\nGLAPI void GLAPIENTRY glColor4uiv( const GLuint *v );\nGLAPI void GLAPIENTRY glColor4usv( const GLushort *v );\n\n\nGLAPI void GLAPIENTRY glTexCoord1d( GLdouble s );\nGLAPI void GLAPIENTRY glTexCoord1f( GLfloat s );\nGLAPI void GLAPIENTRY glTexCoord1i( GLint s );\nGLAPI void GLAPIENTRY glTexCoord1s( GLshort s );\n\nGLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t );\nGLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t );\nGLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t );\nGLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t );\n\nGLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r );\nGLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r );\nGLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r );\nGLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r );\n\nGLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q );\nGLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q );\nGLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q );\nGLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q );\n\nGLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v );\nGLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y );\nGLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y );\nGLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y );\nGLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y );\n\nGLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z );\nGLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z );\nGLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z );\nGLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z );\n\nGLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w );\nGLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w );\nGLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w );\nGLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w );\n\nGLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v );\n\nGLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v );\nGLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v );\nGLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v );\nGLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 );\nGLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );\nGLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 );\nGLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 );\n\n\nGLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 );\nGLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 );\nGLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 );\nGLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 );\n\n\n/*\n * Vertex Arrays  (1.1)\n */\n\nGLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type,\n                                       GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride,\n                                       const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type,\n                                      GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride,\n                                      const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type,\n                                         GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr );\n\nGLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params );\n\nGLAPI void GLAPIENTRY glArrayElement( GLint i );\n\nGLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count );\n\nGLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count,\n                                      GLenum type, const GLvoid *indices );\n\nGLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride,\n                                           const GLvoid *pointer );\n\n/*\n * Lighting\n */\n\nGLAPI void GLAPIENTRY glShadeModel( GLenum mode );\n\nGLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname,\n                                 const GLfloat *params );\nGLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname,\n                                 const GLint *params );\n\nGLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname,\n                                    GLfloat *params );\nGLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname,\n                                    GLint *params );\n\nGLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param );\nGLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params );\n\nGLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode );\n\n\n/*\n * Raster functions\n */\n\nGLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor );\n\nGLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize,\n                                    const GLfloat *values );\nGLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize,\n                                     const GLuint *values );\nGLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize,\n                                     const GLushort *values );\n\nGLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values );\nGLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values );\nGLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values );\n\nGLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height,\n                                GLfloat xorig, GLfloat yorig,\n                                GLfloat xmove, GLfloat ymove,\n                                const GLubyte *bitmap );\n\nGLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y,\n                                    GLsizei width, GLsizei height,\n                                    GLenum format, GLenum type,\n                                    GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height,\n                                    GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y,\n                                    GLsizei width, GLsizei height,\n                                    GLenum type );\n\n/*\n * Stenciling\n */\n\nGLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask );\n\nGLAPI void GLAPIENTRY glStencilMask( GLuint mask );\n\nGLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass );\n\nGLAPI void GLAPIENTRY glClearStencil( GLint s );\n\n\n\n/*\n * Texture mapping\n */\n\nGLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param );\nGLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params );\nGLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params );\nGLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params );\nGLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param );\nGLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname,\n                                          const GLfloat *params );\nGLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname,\n                                          const GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target,\n                                           GLenum pname, GLfloat *params);\nGLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target,\n                                           GLenum pname, GLint *params );\n\nGLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level,\n                                                GLenum pname, GLfloat *params );\nGLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level,\n                                                GLenum pname, GLint *params );\n\n\nGLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level,\n                                    GLint internalFormat,\n                                    GLsizei width, GLint border,\n                                    GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level,\n                                    GLint internalFormat,\n                                    GLsizei width, GLsizei height,\n                                    GLint border, GLenum format, GLenum type,\n                                    const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level,\n                                     GLenum format, GLenum type,\n                                     GLvoid *pixels );\n\n\n/* 1.1 functions */\n\nGLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures );\n\nGLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);\n\nGLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture );\n\nGLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n,\n                                            const GLuint *textures,\n                                            const GLclampf *priorities );\n\nGLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n,\n                                                  const GLuint *textures,\n                                                  GLboolean *residences );\n\nGLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture );\n\n\nGLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level,\n                                       GLint xoffset,\n                                       GLsizei width, GLenum format,\n                                       GLenum type, const GLvoid *pixels );\n\n\nGLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level,\n                                       GLint xoffset, GLint yoffset,\n                                       GLsizei width, GLsizei height,\n                                       GLenum format, GLenum type,\n                                       const GLvoid *pixels );\n\n\nGLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level,\n                                        GLenum internalformat,\n                                        GLint x, GLint y,\n                                        GLsizei width, GLint border );\n\n\nGLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level,\n                                        GLenum internalformat,\n                                        GLint x, GLint y,\n                                        GLsizei width, GLsizei height,\n                                        GLint border );\n\n\nGLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level,\n                                           GLint xoffset, GLint x, GLint y,\n                                           GLsizei width );\n\n\nGLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level,\n                                           GLint xoffset, GLint yoffset,\n                                           GLint x, GLint y,\n                                           GLsizei width, GLsizei height );\n\n\n/*\n * Evaluators\n */\n\nGLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2,\n                               GLint stride,\n                               GLint order, const GLdouble *points );\nGLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2,\n                               GLint stride,\n                               GLint order, const GLfloat *points );\n\nGLAPI void GLAPIENTRY glMap2d( GLenum target,\n\t\t     GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,\n\t\t     GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,\n\t\t     const GLdouble *points );\nGLAPI void GLAPIENTRY glMap2f( GLenum target,\n\t\t     GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,\n\t\t     GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,\n\t\t     const GLfloat *points );\n\nGLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v );\nGLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v );\nGLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v );\n\nGLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u );\nGLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u );\n\nGLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u );\nGLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u );\n\nGLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v );\nGLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v );\n\nGLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u );\nGLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u );\n\nGLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 );\nGLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 );\n\nGLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2,\n                                   GLint vn, GLdouble v1, GLdouble v2 );\nGLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2,\n                                   GLint vn, GLfloat v1, GLfloat v2 );\n\nGLAPI void GLAPIENTRY glEvalPoint1( GLint i );\n\nGLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j );\n\nGLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 );\n\nGLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 );\n\n\n/*\n * Fog\n */\n\nGLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param );\n\nGLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param );\n\nGLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params );\n\nGLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params );\n\n\n/*\n * Selection and Feedback\n */\n\nGLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );\n\nGLAPI void GLAPIENTRY glPassThrough( GLfloat token );\n\nGLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer );\n\nGLAPI void GLAPIENTRY glInitNames( void );\n\nGLAPI void GLAPIENTRY glLoadName( GLuint name );\n\nGLAPI void GLAPIENTRY glPushName( GLuint name );\n\nGLAPI void GLAPIENTRY glPopName( void );\n\n\n\n/*\n * OpenGL 1.2\n */\n\n#define GL_RESCALE_NORMAL\t\t\t0x803A\n#define GL_CLAMP_TO_EDGE\t\t\t0x812F\n#define GL_MAX_ELEMENTS_VERTICES\t\t0x80E8\n#define GL_MAX_ELEMENTS_INDICES\t\t\t0x80E9\n#define GL_BGR\t\t\t\t\t0x80E0\n#define GL_BGRA\t\t\t\t\t0x80E1\n#define GL_UNSIGNED_BYTE_3_3_2\t\t\t0x8032\n#define GL_UNSIGNED_BYTE_2_3_3_REV\t\t0x8362\n#define GL_UNSIGNED_SHORT_5_6_5\t\t\t0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV\t\t0x8364\n#define GL_UNSIGNED_SHORT_4_4_4_4\t\t0x8033\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV\t\t0x8365\n#define GL_UNSIGNED_SHORT_5_5_5_1\t\t0x8034\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV\t\t0x8366\n#define GL_UNSIGNED_INT_8_8_8_8\t\t\t0x8035\n#define GL_UNSIGNED_INT_8_8_8_8_REV\t\t0x8367\n#define GL_UNSIGNED_INT_10_10_10_2\t\t0x8036\n#define GL_UNSIGNED_INT_2_10_10_10_REV\t\t0x8368\n#define GL_LIGHT_MODEL_COLOR_CONTROL\t\t0x81F8\n#define GL_SINGLE_COLOR\t\t\t\t0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR\t\t0x81FA\n#define GL_TEXTURE_MIN_LOD\t\t\t0x813A\n#define GL_TEXTURE_MAX_LOD\t\t\t0x813B\n#define GL_TEXTURE_BASE_LEVEL\t\t\t0x813C\n#define GL_TEXTURE_MAX_LEVEL\t\t\t0x813D\n#define GL_SMOOTH_POINT_SIZE_RANGE\t\t0x0B12\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY\t0x0B13\n#define GL_SMOOTH_LINE_WIDTH_RANGE\t\t0x0B22\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY\t0x0B23\n#define GL_ALIASED_POINT_SIZE_RANGE\t\t0x846D\n#define GL_ALIASED_LINE_WIDTH_RANGE\t\t0x846E\n#define GL_PACK_SKIP_IMAGES\t\t\t0x806B\n#define GL_PACK_IMAGE_HEIGHT\t\t\t0x806C\n#define GL_UNPACK_SKIP_IMAGES\t\t\t0x806D\n#define GL_UNPACK_IMAGE_HEIGHT\t\t\t0x806E\n#define GL_TEXTURE_3D\t\t\t\t0x806F\n#define GL_PROXY_TEXTURE_3D\t\t\t0x8070\n#define GL_TEXTURE_DEPTH\t\t\t0x8071\n#define GL_TEXTURE_WRAP_R\t\t\t0x8072\n#define GL_MAX_3D_TEXTURE_SIZE\t\t\t0x8073\n#define GL_TEXTURE_BINDING_3D\t\t\t0x806A\n\nGLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start,\n\tGLuint end, GLsizei count, GLenum type, const GLvoid *indices );\n\nGLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level,\n                                      GLint internalFormat,\n                                      GLsizei width, GLsizei height,\n                                      GLsizei depth, GLint border,\n                                      GLenum format, GLenum type,\n                                      const GLvoid *pixels );\n\nGLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level,\n                                         GLint xoffset, GLint yoffset,\n                                         GLint zoffset, GLsizei width,\n                                         GLsizei height, GLsizei depth,\n                                         GLenum format,\n                                         GLenum type, const GLvoid *pixels);\n\nGLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level,\n                                             GLint xoffset, GLint yoffset,\n                                             GLint zoffset, GLint x,\n                                             GLint y, GLsizei width,\n                                             GLsizei height );\n\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n\n\n/*\n * GL_ARB_imaging\n */\n\n#define GL_CONSTANT_COLOR\t\t\t0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR\t\t0x8002\n#define GL_CONSTANT_ALPHA\t\t\t0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA\t\t0x8004\n#define GL_COLOR_TABLE\t\t\t\t0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE\t\t0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE\t0x80D2\n#define GL_PROXY_COLOR_TABLE\t\t\t0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\t0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\t0x80D5\n#define GL_COLOR_TABLE_SCALE\t\t\t0x80D6\n#define GL_COLOR_TABLE_BIAS\t\t\t0x80D7\n#define GL_COLOR_TABLE_FORMAT\t\t\t0x80D8\n#define GL_COLOR_TABLE_WIDTH\t\t\t0x80D9\n#define GL_COLOR_TABLE_RED_SIZE\t\t\t0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE\t\t0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE\t\t0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE\t\t0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE\t\t0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE\t\t0x80DF\n#define GL_CONVOLUTION_1D\t\t\t0x8010\n#define GL_CONVOLUTION_2D\t\t\t0x8011\n#define GL_SEPARABLE_2D\t\t\t\t0x8012\n#define GL_CONVOLUTION_BORDER_MODE\t\t0x8013\n#define GL_CONVOLUTION_FILTER_SCALE\t\t0x8014\n#define GL_CONVOLUTION_FILTER_BIAS\t\t0x8015\n#define GL_REDUCE\t\t\t\t0x8016\n#define GL_CONVOLUTION_FORMAT\t\t\t0x8017\n#define GL_CONVOLUTION_WIDTH\t\t\t0x8018\n#define GL_CONVOLUTION_HEIGHT\t\t\t0x8019\n#define GL_MAX_CONVOLUTION_WIDTH\t\t0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT\t\t0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE\t\t0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE\t\t0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE\t\t0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE\t\t0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS\t\t0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS\t\t0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS\t\t0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS\t\t0x8023\n#define GL_CONSTANT_BORDER\t\t\t0x8151\n#define GL_REPLICATE_BORDER\t\t\t0x8153\n#define GL_CONVOLUTION_BORDER_COLOR\t\t0x8154\n#define GL_COLOR_MATRIX\t\t\t\t0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH\t\t0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH\t\t0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE\t\t0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE\t0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE\t\t0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE\t0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS\t\t0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS\t\t0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS\t\t0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS\t\t0x80BB\n#define GL_HISTOGRAM\t\t\t\t0x8024\n#define GL_PROXY_HISTOGRAM\t\t\t0x8025\n#define GL_HISTOGRAM_WIDTH\t\t\t0x8026\n#define GL_HISTOGRAM_FORMAT\t\t\t0x8027\n#define GL_HISTOGRAM_RED_SIZE\t\t\t0x8028\n#define GL_HISTOGRAM_GREEN_SIZE\t\t\t0x8029\n#define GL_HISTOGRAM_BLUE_SIZE\t\t\t0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE\t\t\t0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE\t\t0x802C\n#define GL_HISTOGRAM_SINK\t\t\t0x802D\n#define GL_MINMAX\t\t\t\t0x802E\n#define GL_MINMAX_FORMAT\t\t\t0x802F\n#define GL_MINMAX_SINK\t\t\t\t0x8030\n#define GL_TABLE_TOO_LARGE\t\t\t0x8031\n#define GL_BLEND_EQUATION\t\t\t0x8009\n#define GL_MIN\t\t\t\t\t0x8007\n#define GL_MAX\t\t\t\t\t0x8008\n#define GL_FUNC_ADD\t\t\t\t0x8006\n#define GL_FUNC_SUBTRACT\t\t\t0x800A\n#define GL_FUNC_REVERSE_SUBTRACT\t\t0x800B\n#define GL_BLEND_COLOR\t\t\t\t0x8005\n\n\nGLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat,\n                                    GLsizei width, GLenum format,\n                                    GLenum type, const GLvoid *table );\n\nGLAPI void GLAPIENTRY glColorSubTable( GLenum target,\n                                       GLsizei start, GLsizei count,\n                                       GLenum format, GLenum type,\n                                       const GLvoid *data );\n\nGLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname,\n                                              const GLint *params);\n\nGLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname,\n                                              const GLfloat *params);\n\nGLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start,\n                                           GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat,\n                                        GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format,\n                                       GLenum type, GLvoid *table );\n\nGLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname,\n                                                  GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname,\n                                                  GLint *params );\n\nGLAPI void GLAPIENTRY glBlendEquation( GLenum mode );\n\nGLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green,\n                                    GLclampf blue, GLclampf alpha );\n\nGLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width,\n\t\t\t\t   GLenum internalformat, GLboolean sink );\n\nGLAPI void GLAPIENTRY glResetHistogram( GLenum target );\n\nGLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset,\n\t\t\t\t      GLenum format, GLenum type,\n\t\t\t\t      GLvoid *values );\n\nGLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname,\n\t\t\t\t\t\t GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname,\n\t\t\t\t\t\t GLint *params );\n\nGLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat,\n\t\t\t\tGLboolean sink );\n\nGLAPI void GLAPIENTRY glResetMinmax( GLenum target );\n\nGLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset,\n                                   GLenum format, GLenum types,\n                                   GLvoid *values );\n\nGLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname,\n\t\t\t\t\t      GLfloat *params );\n\nGLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname,\n\t\t\t\t\t      GLint *params );\n\nGLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLenum format, GLenum type,\n\tconst GLvoid *image );\n\nGLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLsizei height, GLenum format,\n\tGLenum type, const GLvoid *image );\n\nGLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname,\n\tGLfloat params );\n\nGLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname,\n\tconst GLfloat *params );\n\nGLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname,\n\tGLint params );\n\nGLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname,\n\tconst GLint *params );\n\nGLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target,\n\tGLenum internalformat, GLint x, GLint y, GLsizei width );\n\nGLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target,\n\tGLenum internalformat, GLint x, GLint y, GLsizei width,\n\tGLsizei height);\n\nGLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format,\n\tGLenum type, GLvoid *image );\n\nGLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname,\n\tGLfloat *params );\n\nGLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname,\n\tGLint *params );\n\nGLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target,\n\tGLenum internalformat, GLsizei width, GLsizei height, GLenum format,\n\tGLenum type, const GLvoid *row, const GLvoid *column );\n\nGLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,\n\tGLenum type, GLvoid *row, GLvoid *column, GLvoid *span );\n\n\n\n\n/*\n * OpenGL 1.3\n */\n\n/* multitexture */\n#define GL_TEXTURE0\t\t\t\t0x84C0\n#define GL_TEXTURE1\t\t\t\t0x84C1\n#define GL_TEXTURE2\t\t\t\t0x84C2\n#define GL_TEXTURE3\t\t\t\t0x84C3\n#define GL_TEXTURE4\t\t\t\t0x84C4\n#define GL_TEXTURE5\t\t\t\t0x84C5\n#define GL_TEXTURE6\t\t\t\t0x84C6\n#define GL_TEXTURE7\t\t\t\t0x84C7\n#define GL_TEXTURE8\t\t\t\t0x84C8\n#define GL_TEXTURE9\t\t\t\t0x84C9\n#define GL_TEXTURE10\t\t\t\t0x84CA\n#define GL_TEXTURE11\t\t\t\t0x84CB\n#define GL_TEXTURE12\t\t\t\t0x84CC\n#define GL_TEXTURE13\t\t\t\t0x84CD\n#define GL_TEXTURE14\t\t\t\t0x84CE\n#define GL_TEXTURE15\t\t\t\t0x84CF\n#define GL_TEXTURE16\t\t\t\t0x84D0\n#define GL_TEXTURE17\t\t\t\t0x84D1\n#define GL_TEXTURE18\t\t\t\t0x84D2\n#define GL_TEXTURE19\t\t\t\t0x84D3\n#define GL_TEXTURE20\t\t\t\t0x84D4\n#define GL_TEXTURE21\t\t\t\t0x84D5\n#define GL_TEXTURE22\t\t\t\t0x84D6\n#define GL_TEXTURE23\t\t\t\t0x84D7\n#define GL_TEXTURE24\t\t\t\t0x84D8\n#define GL_TEXTURE25\t\t\t\t0x84D9\n#define GL_TEXTURE26\t\t\t\t0x84DA\n#define GL_TEXTURE27\t\t\t\t0x84DB\n#define GL_TEXTURE28\t\t\t\t0x84DC\n#define GL_TEXTURE29\t\t\t\t0x84DD\n#define GL_TEXTURE30\t\t\t\t0x84DE\n#define GL_TEXTURE31\t\t\t\t0x84DF\n#define GL_ACTIVE_TEXTURE\t\t\t0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE\t\t0x84E1\n#define GL_MAX_TEXTURE_UNITS\t\t\t0x84E2\n/* texture_cube_map */\n#define GL_NORMAL_MAP\t\t\t\t0x8511\n#define GL_REFLECTION_MAP\t\t\t0x8512\n#define GL_TEXTURE_CUBE_MAP\t\t\t0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP\t\t0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X\t\t0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X\t\t0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y\t\t0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\t\t0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z\t\t0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\t\t0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP\t\t0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE\t\t0x851C\n/* texture_compression */\n#define GL_COMPRESSED_ALPHA\t\t\t0x84E9\n#define GL_COMPRESSED_LUMINANCE\t\t\t0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA\t\t0x84EB\n#define GL_COMPRESSED_INTENSITY\t\t\t0x84EC\n#define GL_COMPRESSED_RGB\t\t\t0x84ED\n#define GL_COMPRESSED_RGBA\t\t\t0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT\t\t0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE\t0x86A0\n#define GL_TEXTURE_COMPRESSED\t\t\t0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS\t0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS\t\t0x86A3\n/* multisample */\n#define GL_MULTISAMPLE\t\t\t\t0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE\t\t0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE\t\t\t0x809F\n#define GL_SAMPLE_COVERAGE\t\t\t0x80A0\n#define GL_SAMPLE_BUFFERS\t\t\t0x80A8\n#define GL_SAMPLES\t\t\t\t0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE\t\t0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT\t\t0x80AB\n#define GL_MULTISAMPLE_BIT\t\t\t0x20000000\n/* transpose_matrix */\n#define GL_TRANSPOSE_MODELVIEW_MATRIX\t\t0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX\t\t0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX\t\t0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX\t\t0x84E6\n/* texture_env_combine */\n#define GL_COMBINE\t\t\t\t0x8570\n#define GL_COMBINE_RGB\t\t\t\t0x8571\n#define GL_COMBINE_ALPHA\t\t\t0x8572\n#define GL_SOURCE0_RGB\t\t\t\t0x8580\n#define GL_SOURCE1_RGB\t\t\t\t0x8581\n#define GL_SOURCE2_RGB\t\t\t\t0x8582\n#define GL_SOURCE0_ALPHA\t\t\t0x8588\n#define GL_SOURCE1_ALPHA\t\t\t0x8589\n#define GL_SOURCE2_ALPHA\t\t\t0x858A\n#define GL_OPERAND0_RGB\t\t\t\t0x8590\n#define GL_OPERAND1_RGB\t\t\t\t0x8591\n#define GL_OPERAND2_RGB\t\t\t\t0x8592\n#define GL_OPERAND0_ALPHA\t\t\t0x8598\n#define GL_OPERAND1_ALPHA\t\t\t0x8599\n#define GL_OPERAND2_ALPHA\t\t\t0x859A\n#define GL_RGB_SCALE\t\t\t\t0x8573\n#define GL_ADD_SIGNED\t\t\t\t0x8574\n#define GL_INTERPOLATE\t\t\t\t0x8575\n#define GL_SUBTRACT\t\t\t\t0x84E7\n#define GL_CONSTANT\t\t\t\t0x8576\n#define GL_PRIMARY_COLOR\t\t\t0x8577\n#define GL_PREVIOUS\t\t\t\t0x8578\n/* texture_env_dot3 */\n#define GL_DOT3_RGB\t\t\t\t0x86AE\n#define GL_DOT3_RGBA\t\t\t\t0x86AF\n/* texture_border_clamp */\n#define GL_CLAMP_TO_BORDER\t\t\t0x812D\n\nGLAPI void GLAPIENTRY glActiveTexture( GLenum texture );\n\nGLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture );\n\nGLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data );\n\nGLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s );\n\nGLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t );\n\nGLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r );\n\nGLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q );\n\nGLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v );\n\n\nGLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] );\n\nGLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] );\n\nGLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] );\n\nGLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] );\n\nGLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert );\n\n\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);\n\n\n\n/*\n * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)\n */\n#ifndef GL_ARB_multitexture\n#define GL_ARB_multitexture 1\n\n#define GL_TEXTURE0_ARB\t\t\t\t0x84C0\n#define GL_TEXTURE1_ARB\t\t\t\t0x84C1\n#define GL_TEXTURE2_ARB\t\t\t\t0x84C2\n#define GL_TEXTURE3_ARB\t\t\t\t0x84C3\n#define GL_TEXTURE4_ARB\t\t\t\t0x84C4\n#define GL_TEXTURE5_ARB\t\t\t\t0x84C5\n#define GL_TEXTURE6_ARB\t\t\t\t0x84C6\n#define GL_TEXTURE7_ARB\t\t\t\t0x84C7\n#define GL_TEXTURE8_ARB\t\t\t\t0x84C8\n#define GL_TEXTURE9_ARB\t\t\t\t0x84C9\n#define GL_TEXTURE10_ARB\t\t\t0x84CA\n#define GL_TEXTURE11_ARB\t\t\t0x84CB\n#define GL_TEXTURE12_ARB\t\t\t0x84CC\n#define GL_TEXTURE13_ARB\t\t\t0x84CD\n#define GL_TEXTURE14_ARB\t\t\t0x84CE\n#define GL_TEXTURE15_ARB\t\t\t0x84CF\n#define GL_TEXTURE16_ARB\t\t\t0x84D0\n#define GL_TEXTURE17_ARB\t\t\t0x84D1\n#define GL_TEXTURE18_ARB\t\t\t0x84D2\n#define GL_TEXTURE19_ARB\t\t\t0x84D3\n#define GL_TEXTURE20_ARB\t\t\t0x84D4\n#define GL_TEXTURE21_ARB\t\t\t0x84D5\n#define GL_TEXTURE22_ARB\t\t\t0x84D6\n#define GL_TEXTURE23_ARB\t\t\t0x84D7\n#define GL_TEXTURE24_ARB\t\t\t0x84D8\n#define GL_TEXTURE25_ARB\t\t\t0x84D9\n#define GL_TEXTURE26_ARB\t\t\t0x84DA\n#define GL_TEXTURE27_ARB\t\t\t0x84DB\n#define GL_TEXTURE28_ARB\t\t\t0x84DC\n#define GL_TEXTURE29_ARB\t\t\t0x84DD\n#define GL_TEXTURE30_ARB\t\t\t0x84DE\n#define GL_TEXTURE31_ARB\t\t\t0x84DF\n#define GL_ACTIVE_TEXTURE_ARB\t\t\t0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE_ARB\t\t0x84E1\n#define GL_MAX_TEXTURE_UNITS_ARB\t\t0x84E2\n\nGLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);\nGLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);\nGLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);\nGLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);\nGLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);\nGLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);\nGLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);\nGLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);\nGLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);\nGLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);\nGLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);\nGLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);\nGLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);\n\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);\n\n#endif /* GL_ARB_multitexture */\n\n\n\n/*\n * Define this token if you want \"old-style\" header file behaviour (extensions\n * defined in gl.h).  Otherwise, extensions will be included from glext.h.\n */\n#if !defined(NO_SDL_GLEXT) && !defined(GL_GLEXT_LEGACY)\n#include \"SDL_opengl_glext.h\"\n#endif  /* GL_GLEXT_LEGACY */\n\n\n\n/*\n * ???. GL_MESA_packed_depth_stencil\n * XXX obsolete\n */\n#ifndef GL_MESA_packed_depth_stencil\n#define GL_MESA_packed_depth_stencil 1\n\n#define GL_DEPTH_STENCIL_MESA\t\t\t0x8750\n#define GL_UNSIGNED_INT_24_8_MESA\t\t0x8751\n#define GL_UNSIGNED_INT_8_24_REV_MESA\t\t0x8752\n#define GL_UNSIGNED_SHORT_15_1_MESA\t\t0x8753\n#define GL_UNSIGNED_SHORT_1_15_REV_MESA\t\t0x8754\n\n#endif /* GL_MESA_packed_depth_stencil */\n\n\n#ifndef GL_ATI_blend_equation_separate\n#define GL_ATI_blend_equation_separate 1\n\n#define GL_ALPHA_BLEND_EQUATION_ATI\t        0x883D\n\nGLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA );\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA);\n\n#endif /* GL_ATI_blend_equation_separate */\n\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\ntypedef void* GLeglImageOES;\n#endif\n\n#ifndef GL_OES_EGL_image\n#define GL_OES_EGL_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);\nGLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);\n#endif\ntypedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);\ntypedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);\n#endif\n\n\n/**\n ** NOTE!!!!!  If you add new functions to this file, or update\n ** glext.h be sure to regenerate the gl_mangle.h file.  See comments\n ** in that file for details.\n **/\n\n\n\n/**********************************************************************\n * Begin system-specific stuff\n */\n#if defined(PRAGMA_EXPORT_SUPPORTED)\n#pragma export off\n#endif\n\n/*\n * End system-specific stuff\n **********************************************************************/\n\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl_h_ */\n\n#endif /* !__IPHONEOS__ */\n\n#endif /* SDL_opengl_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengl_glext.h",
    "content": "#ifndef __glext_h_\n#define __glext_h_ 1\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n** Copyright (c) 2013-2014 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n/*\n** This header is generated from the Khronos OpenGL / OpenGL ES XML\n** API Registry. The current version of the Registry, generator scripts\n** used to make the header, and the header can be found at\n**   http://www.opengl.org/registry/\n**\n** Khronos $Revision: 26745 $ on $Date: 2014-05-21 03:12:26 -0700 (Wed, 21 May 2014) $\n*/\n\n#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN 1\n#endif\n#include <windows.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n#ifndef APIENTRYP\n#define APIENTRYP APIENTRY *\n#endif\n#ifndef GLAPI\n#define GLAPI extern\n#endif\n\n#define GL_GLEXT_VERSION 20140521\n\n/* Generated C header for:\n * API: gl\n * Profile: compatibility\n * Versions considered: .*\n * Versions emitted: 1\\.[2-9]|[234]\\.[0-9]\n * Default extensions included: gl\n * Additional extensions included: _nomatch_^\n * Extensions removed: _nomatch_^\n */\n\n#ifndef GL_VERSION_1_2\n#define GL_VERSION_1_2 1\n#define GL_UNSIGNED_BYTE_3_3_2            0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034\n#define GL_UNSIGNED_INT_8_8_8_8           0x8035\n#define GL_UNSIGNED_INT_10_10_10_2        0x8036\n#define GL_TEXTURE_BINDING_3D             0x806A\n#define GL_PACK_SKIP_IMAGES               0x806B\n#define GL_PACK_IMAGE_HEIGHT              0x806C\n#define GL_UNPACK_SKIP_IMAGES             0x806D\n#define GL_UNPACK_IMAGE_HEIGHT            0x806E\n#define GL_TEXTURE_3D                     0x806F\n#define GL_PROXY_TEXTURE_3D               0x8070\n#define GL_TEXTURE_DEPTH                  0x8071\n#define GL_TEXTURE_WRAP_R                 0x8072\n#define GL_MAX_3D_TEXTURE_SIZE            0x8073\n#define GL_UNSIGNED_BYTE_2_3_3_REV        0x8362\n#define GL_UNSIGNED_SHORT_5_6_5           0x8363\n#define GL_UNSIGNED_SHORT_5_6_5_REV       0x8364\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV     0x8365\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV     0x8366\n#define GL_UNSIGNED_INT_8_8_8_8_REV       0x8367\n#define GL_UNSIGNED_INT_2_10_10_10_REV    0x8368\n#define GL_BGR                            0x80E0\n#define GL_BGRA                           0x80E1\n#define GL_MAX_ELEMENTS_VERTICES          0x80E8\n#define GL_MAX_ELEMENTS_INDICES           0x80E9\n#define GL_CLAMP_TO_EDGE                  0x812F\n#define GL_TEXTURE_MIN_LOD                0x813A\n#define GL_TEXTURE_MAX_LOD                0x813B\n#define GL_TEXTURE_BASE_LEVEL             0x813C\n#define GL_TEXTURE_MAX_LEVEL              0x813D\n#define GL_SMOOTH_POINT_SIZE_RANGE        0x0B12\n#define GL_SMOOTH_POINT_SIZE_GRANULARITY  0x0B13\n#define GL_SMOOTH_LINE_WIDTH_RANGE        0x0B22\n#define GL_SMOOTH_LINE_WIDTH_GRANULARITY  0x0B23\n#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E\n#define GL_RESCALE_NORMAL                 0x803A\n#define GL_LIGHT_MODEL_COLOR_CONTROL      0x81F8\n#define GL_SINGLE_COLOR                   0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR        0x81FA\n#define GL_ALIASED_POINT_SIZE_RANGE       0x846D\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\nGLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_VERSION_1_2 */\n\n#ifndef GL_VERSION_1_3\n#define GL_VERSION_1_3 1\n#define GL_TEXTURE0                       0x84C0\n#define GL_TEXTURE1                       0x84C1\n#define GL_TEXTURE2                       0x84C2\n#define GL_TEXTURE3                       0x84C3\n#define GL_TEXTURE4                       0x84C4\n#define GL_TEXTURE5                       0x84C5\n#define GL_TEXTURE6                       0x84C6\n#define GL_TEXTURE7                       0x84C7\n#define GL_TEXTURE8                       0x84C8\n#define GL_TEXTURE9                       0x84C9\n#define GL_TEXTURE10                      0x84CA\n#define GL_TEXTURE11                      0x84CB\n#define GL_TEXTURE12                      0x84CC\n#define GL_TEXTURE13                      0x84CD\n#define GL_TEXTURE14                      0x84CE\n#define GL_TEXTURE15                      0x84CF\n#define GL_TEXTURE16                      0x84D0\n#define GL_TEXTURE17                      0x84D1\n#define GL_TEXTURE18                      0x84D2\n#define GL_TEXTURE19                      0x84D3\n#define GL_TEXTURE20                      0x84D4\n#define GL_TEXTURE21                      0x84D5\n#define GL_TEXTURE22                      0x84D6\n#define GL_TEXTURE23                      0x84D7\n#define GL_TEXTURE24                      0x84D8\n#define GL_TEXTURE25                      0x84D9\n#define GL_TEXTURE26                      0x84DA\n#define GL_TEXTURE27                      0x84DB\n#define GL_TEXTURE28                      0x84DC\n#define GL_TEXTURE29                      0x84DD\n#define GL_TEXTURE30                      0x84DE\n#define GL_TEXTURE31                      0x84DF\n#define GL_ACTIVE_TEXTURE                 0x84E0\n#define GL_MULTISAMPLE                    0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE            0x809F\n#define GL_SAMPLE_COVERAGE                0x80A0\n#define GL_SAMPLE_BUFFERS                 0x80A8\n#define GL_SAMPLES                        0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE          0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT         0x80AB\n#define GL_TEXTURE_CUBE_MAP               0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP         0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C\n#define GL_COMPRESSED_RGB                 0x84ED\n#define GL_COMPRESSED_RGBA                0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT       0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE  0x86A0\n#define GL_TEXTURE_COMPRESSED             0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3\n#define GL_CLAMP_TO_BORDER                0x812D\n#define GL_CLIENT_ACTIVE_TEXTURE          0x84E1\n#define GL_MAX_TEXTURE_UNITS              0x84E2\n#define GL_TRANSPOSE_MODELVIEW_MATRIX     0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX    0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX       0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX         0x84E6\n#define GL_MULTISAMPLE_BIT                0x20000000\n#define GL_NORMAL_MAP                     0x8511\n#define GL_REFLECTION_MAP                 0x8512\n#define GL_COMPRESSED_ALPHA               0x84E9\n#define GL_COMPRESSED_LUMINANCE           0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA     0x84EB\n#define GL_COMPRESSED_INTENSITY           0x84EC\n#define GL_COMBINE                        0x8570\n#define GL_COMBINE_RGB                    0x8571\n#define GL_COMBINE_ALPHA                  0x8572\n#define GL_SOURCE0_RGB                    0x8580\n#define GL_SOURCE1_RGB                    0x8581\n#define GL_SOURCE2_RGB                    0x8582\n#define GL_SOURCE0_ALPHA                  0x8588\n#define GL_SOURCE1_ALPHA                  0x8589\n#define GL_SOURCE2_ALPHA                  0x858A\n#define GL_OPERAND0_RGB                   0x8590\n#define GL_OPERAND1_RGB                   0x8591\n#define GL_OPERAND2_RGB                   0x8592\n#define GL_OPERAND0_ALPHA                 0x8598\n#define GL_OPERAND1_ALPHA                 0x8599\n#define GL_OPERAND2_ALPHA                 0x859A\n#define GL_RGB_SCALE                      0x8573\n#define GL_ADD_SIGNED                     0x8574\n#define GL_INTERPOLATE                    0x8575\n#define GL_SUBTRACT                       0x84E7\n#define GL_CONSTANT                       0x8576\n#define GL_PRIMARY_COLOR                  0x8577\n#define GL_PREVIOUS                       0x8578\n#define GL_DOT3_RGB                       0x86AE\n#define GL_DOT3_RGBA                      0x86AF\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTexture (GLenum texture);\nGLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);\nGLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, void *img);\nGLAPI void APIENTRY glClientActiveTexture (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m);\n#endif\n#endif /* GL_VERSION_1_3 */\n\n#ifndef GL_VERSION_1_4\n#define GL_VERSION_1_4 1\n#define GL_BLEND_DST_RGB                  0x80C8\n#define GL_BLEND_SRC_RGB                  0x80C9\n#define GL_BLEND_DST_ALPHA                0x80CA\n#define GL_BLEND_SRC_ALPHA                0x80CB\n#define GL_POINT_FADE_THRESHOLD_SIZE      0x8128\n#define GL_DEPTH_COMPONENT16              0x81A5\n#define GL_DEPTH_COMPONENT24              0x81A6\n#define GL_DEPTH_COMPONENT32              0x81A7\n#define GL_MIRRORED_REPEAT                0x8370\n#define GL_MAX_TEXTURE_LOD_BIAS           0x84FD\n#define GL_TEXTURE_LOD_BIAS               0x8501\n#define GL_INCR_WRAP                      0x8507\n#define GL_DECR_WRAP                      0x8508\n#define GL_TEXTURE_DEPTH_SIZE             0x884A\n#define GL_TEXTURE_COMPARE_MODE           0x884C\n#define GL_TEXTURE_COMPARE_FUNC           0x884D\n#define GL_POINT_SIZE_MIN                 0x8126\n#define GL_POINT_SIZE_MAX                 0x8127\n#define GL_POINT_DISTANCE_ATTENUATION     0x8129\n#define GL_GENERATE_MIPMAP                0x8191\n#define GL_GENERATE_MIPMAP_HINT           0x8192\n#define GL_FOG_COORDINATE_SOURCE          0x8450\n#define GL_FOG_COORDINATE                 0x8451\n#define GL_FRAGMENT_DEPTH                 0x8452\n#define GL_CURRENT_FOG_COORDINATE         0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE      0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE    0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER   0x8456\n#define GL_FOG_COORDINATE_ARRAY           0x8457\n#define GL_COLOR_SUM                      0x8458\n#define GL_CURRENT_SECONDARY_COLOR        0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE     0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE     0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE   0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER  0x845D\n#define GL_SECONDARY_COLOR_ARRAY          0x845E\n#define GL_TEXTURE_FILTER_CONTROL         0x8500\n#define GL_DEPTH_TEXTURE_MODE             0x884B\n#define GL_COMPARE_R_TO_TEXTURE           0x884E\n#define GL_FUNC_ADD                       0x8006\n#define GL_FUNC_SUBTRACT                  0x800A\n#define GL_FUNC_REVERSE_SUBTRACT          0x800B\n#define GL_MIN                            0x8007\n#define GL_MAX                            0x8008\n#define GL_CONSTANT_COLOR                 0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002\n#define GL_CONSTANT_ALPHA                 0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\nGLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);\nGLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount);\nGLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFogCoordf (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfv (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoordd (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddv (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3iv (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2i (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2sv (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dv (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fv (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3iv (const GLint *v);\nGLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3sv (const GLshort *v);\nGLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\nGLAPI void APIENTRY glBlendEquation (GLenum mode);\n#endif\n#endif /* GL_VERSION_1_4 */\n\n#ifndef GL_VERSION_1_5\n#define GL_VERSION_1_5 1\n#include <stddef.h>\n#ifdef __MACOSX__\ntypedef long GLsizeiptr;\ntypedef long GLintptr;\n#else\ntypedef ptrdiff_t GLsizeiptr;\ntypedef ptrdiff_t GLintptr;\n#endif\n#define GL_BUFFER_SIZE                    0x8764\n#define GL_BUFFER_USAGE                   0x8765\n#define GL_QUERY_COUNTER_BITS             0x8864\n#define GL_CURRENT_QUERY                  0x8865\n#define GL_QUERY_RESULT                   0x8866\n#define GL_QUERY_RESULT_AVAILABLE         0x8867\n#define GL_ARRAY_BUFFER                   0x8892\n#define GL_ELEMENT_ARRAY_BUFFER           0x8893\n#define GL_ARRAY_BUFFER_BINDING           0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n#define GL_READ_ONLY                      0x88B8\n#define GL_WRITE_ONLY                     0x88B9\n#define GL_READ_WRITE                     0x88BA\n#define GL_BUFFER_ACCESS                  0x88BB\n#define GL_BUFFER_MAPPED                  0x88BC\n#define GL_BUFFER_MAP_POINTER             0x88BD\n#define GL_STREAM_DRAW                    0x88E0\n#define GL_STREAM_READ                    0x88E1\n#define GL_STREAM_COPY                    0x88E2\n#define GL_STATIC_DRAW                    0x88E4\n#define GL_STATIC_READ                    0x88E5\n#define GL_STATIC_COPY                    0x88E6\n#define GL_DYNAMIC_DRAW                   0x88E8\n#define GL_DYNAMIC_READ                   0x88E9\n#define GL_DYNAMIC_COPY                   0x88EA\n#define GL_SAMPLES_PASSED                 0x8914\n#define GL_SRC1_ALPHA                     0x8589\n#define GL_VERTEX_ARRAY_BUFFER_BINDING    0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING    0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING     0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING     0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING    0x889E\n#define GL_FOG_COORD_SRC                  0x8450\n#define GL_FOG_COORD                      0x8451\n#define GL_CURRENT_FOG_COORD              0x8453\n#define GL_FOG_COORD_ARRAY_TYPE           0x8454\n#define GL_FOG_COORD_ARRAY_STRIDE         0x8455\n#define GL_FOG_COORD_ARRAY_POINTER        0x8456\n#define GL_FOG_COORD_ARRAY                0x8457\n#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D\n#define GL_SRC0_RGB                       0x8580\n#define GL_SRC1_RGB                       0x8581\n#define GL_SRC2_RGB                       0x8582\n#define GL_SRC0_ALPHA                     0x8588\n#define GL_SRC2_ALPHA                     0x858A\ntypedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, void *data);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQuery (GLuint id);\nGLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQuery (GLenum target);\nGLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);\nGLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);\nGLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, void *data);\nGLAPI void *APIENTRY glMapBuffer (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);\nGLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_VERSION_1_5 */\n\n#ifndef GL_VERSION_2_0\n#define GL_VERSION_2_0 1\ntypedef char GLchar;\n#define GL_BLEND_EQUATION_RGB             0x8009\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED    0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE       0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE     0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE       0x8625\n#define GL_CURRENT_VERTEX_ATTRIB          0x8626\n#define GL_VERTEX_PROGRAM_POINT_SIZE      0x8642\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER    0x8645\n#define GL_STENCIL_BACK_FUNC              0x8800\n#define GL_STENCIL_BACK_FAIL              0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803\n#define GL_MAX_DRAW_BUFFERS               0x8824\n#define GL_DRAW_BUFFER0                   0x8825\n#define GL_DRAW_BUFFER1                   0x8826\n#define GL_DRAW_BUFFER2                   0x8827\n#define GL_DRAW_BUFFER3                   0x8828\n#define GL_DRAW_BUFFER4                   0x8829\n#define GL_DRAW_BUFFER5                   0x882A\n#define GL_DRAW_BUFFER6                   0x882B\n#define GL_DRAW_BUFFER7                   0x882C\n#define GL_DRAW_BUFFER8                   0x882D\n#define GL_DRAW_BUFFER9                   0x882E\n#define GL_DRAW_BUFFER10                  0x882F\n#define GL_DRAW_BUFFER11                  0x8830\n#define GL_DRAW_BUFFER12                  0x8831\n#define GL_DRAW_BUFFER13                  0x8832\n#define GL_DRAW_BUFFER14                  0x8833\n#define GL_DRAW_BUFFER15                  0x8834\n#define GL_BLEND_EQUATION_ALPHA           0x883D\n#define GL_MAX_VERTEX_ATTRIBS             0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A\n#define GL_MAX_TEXTURE_IMAGE_UNITS        0x8872\n#define GL_FRAGMENT_SHADER                0x8B30\n#define GL_VERTEX_SHADER                  0x8B31\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS  0x8B4A\n#define GL_MAX_VARYING_FLOATS             0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_SHADER_TYPE                    0x8B4F\n#define GL_FLOAT_VEC2                     0x8B50\n#define GL_FLOAT_VEC3                     0x8B51\n#define GL_FLOAT_VEC4                     0x8B52\n#define GL_INT_VEC2                       0x8B53\n#define GL_INT_VEC3                       0x8B54\n#define GL_INT_VEC4                       0x8B55\n#define GL_BOOL                           0x8B56\n#define GL_BOOL_VEC2                      0x8B57\n#define GL_BOOL_VEC3                      0x8B58\n#define GL_BOOL_VEC4                      0x8B59\n#define GL_FLOAT_MAT2                     0x8B5A\n#define GL_FLOAT_MAT3                     0x8B5B\n#define GL_FLOAT_MAT4                     0x8B5C\n#define GL_SAMPLER_1D                     0x8B5D\n#define GL_SAMPLER_2D                     0x8B5E\n#define GL_SAMPLER_3D                     0x8B5F\n#define GL_SAMPLER_CUBE                   0x8B60\n#define GL_SAMPLER_1D_SHADOW              0x8B61\n#define GL_SAMPLER_2D_SHADOW              0x8B62\n#define GL_DELETE_STATUS                  0x8B80\n#define GL_COMPILE_STATUS                 0x8B81\n#define GL_LINK_STATUS                    0x8B82\n#define GL_VALIDATE_STATUS                0x8B83\n#define GL_INFO_LOG_LENGTH                0x8B84\n#define GL_ATTACHED_SHADERS               0x8B85\n#define GL_ACTIVE_UNIFORMS                0x8B86\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH      0x8B87\n#define GL_SHADER_SOURCE_LENGTH           0x8B88\n#define GL_ACTIVE_ATTRIBUTES              0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH    0x8B8A\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B\n#define GL_SHADING_LANGUAGE_VERSION       0x8B8C\n#define GL_CURRENT_PROGRAM                0x8B8D\n#define GL_POINT_SPRITE_COORD_ORIGIN      0x8CA0\n#define GL_LOWER_LEFT                     0x8CA1\n#define GL_UPPER_LEFT                     0x8CA2\n#define GL_STENCIL_BACK_REF               0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK         0x8CA5\n#define GL_VERTEX_PROGRAM_TWO_SIDE        0x8643\n#define GL_POINT_SPRITE                   0x8861\n#define GL_COORD_REPLACE                  0x8862\n#define GL_MAX_TEXTURE_COORDS             0x8871\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);\ntypedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);\ntypedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);\ntypedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);\nGLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);\nGLAPI void APIENTRY glCompileShader (GLuint shader);\nGLAPI GLuint APIENTRY glCreateProgram (void);\nGLAPI GLuint APIENTRY glCreateShader (GLenum type);\nGLAPI void APIENTRY glDeleteProgram (GLuint program);\nGLAPI void APIENTRY glDeleteShader (GLuint shader);\nGLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);\nGLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);\nGLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);\nGLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);\nGLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);\nGLAPI GLboolean APIENTRY glIsProgram (GLuint program);\nGLAPI GLboolean APIENTRY glIsShader (GLuint shader);\nGLAPI void APIENTRY glLinkProgram (GLuint program);\nGLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);\nGLAPI void APIENTRY glUseProgram (GLuint program);\nGLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1i (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glValidateProgram (GLuint program);\nGLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_VERSION_2_0 */\n\n#ifndef GL_VERSION_2_1\n#define GL_VERSION_2_1 1\n#define GL_PIXEL_PACK_BUFFER              0x88EB\n#define GL_PIXEL_UNPACK_BUFFER            0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING      0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING    0x88EF\n#define GL_FLOAT_MAT2x3                   0x8B65\n#define GL_FLOAT_MAT2x4                   0x8B66\n#define GL_FLOAT_MAT3x2                   0x8B67\n#define GL_FLOAT_MAT3x4                   0x8B68\n#define GL_FLOAT_MAT4x2                   0x8B69\n#define GL_FLOAT_MAT4x3                   0x8B6A\n#define GL_SRGB                           0x8C40\n#define GL_SRGB8                          0x8C41\n#define GL_SRGB_ALPHA                     0x8C42\n#define GL_SRGB8_ALPHA8                   0x8C43\n#define GL_COMPRESSED_SRGB                0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA          0x8C49\n#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F\n#define GL_SLUMINANCE_ALPHA               0x8C44\n#define GL_SLUMINANCE8_ALPHA8             0x8C45\n#define GL_SLUMINANCE                     0x8C46\n#define GL_SLUMINANCE8                    0x8C47\n#define GL_COMPRESSED_SLUMINANCE          0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA    0x8C4B\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\n#endif\n#endif /* GL_VERSION_2_1 */\n\n#ifndef GL_VERSION_3_0\n#define GL_VERSION_3_0 1\ntypedef unsigned short GLhalf;\n#define GL_COMPARE_REF_TO_TEXTURE         0x884E\n#define GL_CLIP_DISTANCE0                 0x3000\n#define GL_CLIP_DISTANCE1                 0x3001\n#define GL_CLIP_DISTANCE2                 0x3002\n#define GL_CLIP_DISTANCE3                 0x3003\n#define GL_CLIP_DISTANCE4                 0x3004\n#define GL_CLIP_DISTANCE5                 0x3005\n#define GL_CLIP_DISTANCE6                 0x3006\n#define GL_CLIP_DISTANCE7                 0x3007\n#define GL_MAX_CLIP_DISTANCES             0x0D32\n#define GL_MAJOR_VERSION                  0x821B\n#define GL_MINOR_VERSION                  0x821C\n#define GL_NUM_EXTENSIONS                 0x821D\n#define GL_CONTEXT_FLAGS                  0x821E\n#define GL_COMPRESSED_RED                 0x8225\n#define GL_COMPRESSED_RG                  0x8226\n#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x00000001\n#define GL_RGBA32F                        0x8814\n#define GL_RGB32F                         0x8815\n#define GL_RGBA16F                        0x881A\n#define GL_RGB16F                         0x881B\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER    0x88FD\n#define GL_MAX_ARRAY_TEXTURE_LAYERS       0x88FF\n#define GL_MIN_PROGRAM_TEXEL_OFFSET       0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET       0x8905\n#define GL_CLAMP_READ_COLOR               0x891C\n#define GL_FIXED_ONLY                     0x891D\n#define GL_MAX_VARYING_COMPONENTS         0x8B4B\n#define GL_TEXTURE_1D_ARRAY               0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY         0x8C19\n#define GL_TEXTURE_2D_ARRAY               0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY         0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY       0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY       0x8C1D\n#define GL_R11F_G11F_B10F                 0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV   0x8C3B\n#define GL_RGB9_E5                        0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV       0x8C3E\n#define GL_TEXTURE_SHARED_SIZE            0x8C3F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS    0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85\n#define GL_PRIMITIVES_GENERATED           0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88\n#define GL_RASTERIZER_DISCARD             0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS            0x8C8C\n#define GL_SEPARATE_ATTRIBS               0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER      0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F\n#define GL_RGBA32UI                       0x8D70\n#define GL_RGB32UI                        0x8D71\n#define GL_RGBA16UI                       0x8D76\n#define GL_RGB16UI                        0x8D77\n#define GL_RGBA8UI                        0x8D7C\n#define GL_RGB8UI                         0x8D7D\n#define GL_RGBA32I                        0x8D82\n#define GL_RGB32I                         0x8D83\n#define GL_RGBA16I                        0x8D88\n#define GL_RGB16I                         0x8D89\n#define GL_RGBA8I                         0x8D8E\n#define GL_RGB8I                          0x8D8F\n#define GL_RED_INTEGER                    0x8D94\n#define GL_GREEN_INTEGER                  0x8D95\n#define GL_BLUE_INTEGER                   0x8D96\n#define GL_RGB_INTEGER                    0x8D98\n#define GL_RGBA_INTEGER                   0x8D99\n#define GL_BGR_INTEGER                    0x8D9A\n#define GL_BGRA_INTEGER                   0x8D9B\n#define GL_SAMPLER_1D_ARRAY               0x8DC0\n#define GL_SAMPLER_2D_ARRAY               0x8DC1\n#define GL_SAMPLER_1D_ARRAY_SHADOW        0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW        0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW            0x8DC5\n#define GL_UNSIGNED_INT_VEC2              0x8DC6\n#define GL_UNSIGNED_INT_VEC3              0x8DC7\n#define GL_UNSIGNED_INT_VEC4              0x8DC8\n#define GL_INT_SAMPLER_1D                 0x8DC9\n#define GL_INT_SAMPLER_2D                 0x8DCA\n#define GL_INT_SAMPLER_3D                 0x8DCB\n#define GL_INT_SAMPLER_CUBE               0x8DCC\n#define GL_INT_SAMPLER_1D_ARRAY           0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY           0x8DCF\n#define GL_UNSIGNED_INT_SAMPLER_1D        0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D        0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D        0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE      0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY  0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY  0x8DD7\n#define GL_QUERY_WAIT                     0x8E13\n#define GL_QUERY_NO_WAIT                  0x8E14\n#define GL_QUERY_BY_REGION_WAIT           0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT        0x8E16\n#define GL_BUFFER_ACCESS_FLAGS            0x911F\n#define GL_BUFFER_MAP_LENGTH              0x9120\n#define GL_BUFFER_MAP_OFFSET              0x9121\n#define GL_DEPTH_COMPONENT32F             0x8CAC\n#define GL_DEPTH32F_STENCIL8              0x8CAD\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD\n#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211\n#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212\n#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213\n#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214\n#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215\n#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216\n#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217\n#define GL_FRAMEBUFFER_DEFAULT            0x8218\n#define GL_FRAMEBUFFER_UNDEFINED          0x8219\n#define GL_DEPTH_STENCIL_ATTACHMENT       0x821A\n#define GL_MAX_RENDERBUFFER_SIZE          0x84E8\n#define GL_DEPTH_STENCIL                  0x84F9\n#define GL_UNSIGNED_INT_24_8              0x84FA\n#define GL_DEPTH24_STENCIL8               0x88F0\n#define GL_TEXTURE_STENCIL_SIZE           0x88F1\n#define GL_TEXTURE_RED_TYPE               0x8C10\n#define GL_TEXTURE_GREEN_TYPE             0x8C11\n#define GL_TEXTURE_BLUE_TYPE              0x8C12\n#define GL_TEXTURE_ALPHA_TYPE             0x8C13\n#define GL_TEXTURE_DEPTH_TYPE             0x8C16\n#define GL_UNSIGNED_NORMALIZED            0x8C17\n#define GL_FRAMEBUFFER_BINDING            0x8CA6\n#define GL_DRAW_FRAMEBUFFER_BINDING       0x8CA6\n#define GL_RENDERBUFFER_BINDING           0x8CA7\n#define GL_READ_FRAMEBUFFER               0x8CA8\n#define GL_DRAW_FRAMEBUFFER               0x8CA9\n#define GL_READ_FRAMEBUFFER_BINDING       0x8CAA\n#define GL_RENDERBUFFER_SAMPLES           0x8CAB\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE           0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED        0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS          0x8CDF\n#define GL_COLOR_ATTACHMENT0              0x8CE0\n#define GL_COLOR_ATTACHMENT1              0x8CE1\n#define GL_COLOR_ATTACHMENT2              0x8CE2\n#define GL_COLOR_ATTACHMENT3              0x8CE3\n#define GL_COLOR_ATTACHMENT4              0x8CE4\n#define GL_COLOR_ATTACHMENT5              0x8CE5\n#define GL_COLOR_ATTACHMENT6              0x8CE6\n#define GL_COLOR_ATTACHMENT7              0x8CE7\n#define GL_COLOR_ATTACHMENT8              0x8CE8\n#define GL_COLOR_ATTACHMENT9              0x8CE9\n#define GL_COLOR_ATTACHMENT10             0x8CEA\n#define GL_COLOR_ATTACHMENT11             0x8CEB\n#define GL_COLOR_ATTACHMENT12             0x8CEC\n#define GL_COLOR_ATTACHMENT13             0x8CED\n#define GL_COLOR_ATTACHMENT14             0x8CEE\n#define GL_COLOR_ATTACHMENT15             0x8CEF\n#define GL_DEPTH_ATTACHMENT               0x8D00\n#define GL_STENCIL_ATTACHMENT             0x8D20\n#define GL_FRAMEBUFFER                    0x8D40\n#define GL_RENDERBUFFER                   0x8D41\n#define GL_RENDERBUFFER_WIDTH             0x8D42\n#define GL_RENDERBUFFER_HEIGHT            0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44\n#define GL_STENCIL_INDEX1                 0x8D46\n#define GL_STENCIL_INDEX4                 0x8D47\n#define GL_STENCIL_INDEX8                 0x8D48\n#define GL_STENCIL_INDEX16                0x8D49\n#define GL_RENDERBUFFER_RED_SIZE          0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56\n#define GL_MAX_SAMPLES                    0x8D57\n#define GL_INDEX                          0x8222\n#define GL_TEXTURE_LUMINANCE_TYPE         0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE         0x8C15\n#define GL_FRAMEBUFFER_SRGB               0x8DB9\n#define GL_HALF_FLOAT                     0x140B\n#define GL_MAP_READ_BIT                   0x0001\n#define GL_MAP_WRITE_BIT                  0x0002\n#define GL_MAP_INVALIDATE_RANGE_BIT       0x0004\n#define GL_MAP_INVALIDATE_BUFFER_BIT      0x0008\n#define GL_MAP_FLUSH_EXPLICIT_BIT         0x0010\n#define GL_MAP_UNSYNCHRONIZED_BIT         0x0020\n#define GL_COMPRESSED_RED_RGTC1           0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1    0x8DBC\n#define GL_COMPRESSED_RG_RGTC2            0x8DBD\n#define GL_COMPRESSED_SIGNED_RG_RGTC2     0x8DBE\n#define GL_RG                             0x8227\n#define GL_RG_INTEGER                     0x8228\n#define GL_R8                             0x8229\n#define GL_R16                            0x822A\n#define GL_RG8                            0x822B\n#define GL_RG16                           0x822C\n#define GL_R16F                           0x822D\n#define GL_R32F                           0x822E\n#define GL_RG16F                          0x822F\n#define GL_RG32F                          0x8230\n#define GL_R8I                            0x8231\n#define GL_R8UI                           0x8232\n#define GL_R16I                           0x8233\n#define GL_R16UI                          0x8234\n#define GL_R32I                           0x8235\n#define GL_R32UI                          0x8236\n#define GL_RG8I                           0x8237\n#define GL_RG8UI                          0x8238\n#define GL_RG16I                          0x8239\n#define GL_RG16UI                         0x823A\n#define GL_RG32I                          0x823B\n#define GL_RG32UI                         0x823C\n#define GL_VERTEX_ARRAY_BINDING           0x85B5\n#define GL_CLAMP_VERTEX_COLOR             0x891A\n#define GL_CLAMP_FRAGMENT_COLOR           0x891B\n#define GL_ALPHA_INTEGER                  0x8D97\ntypedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\ntypedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\ntypedef const GLubyte *(APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\nGLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glEnablei (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisablei (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);\nGLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedback (void);\nGLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);\nGLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRender (void);\nGLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);\nGLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);\nGLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);\nGLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);\nGLAPI const GLubyte *APIENTRY glGetStringi (GLenum name, GLuint index);\nGLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmap (GLenum target);\nGLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\nGLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void *APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glBindVertexArray (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);\n#endif\n#endif /* GL_VERSION_3_0 */\n\n#ifndef GL_VERSION_3_1\n#define GL_VERSION_3_1 1\n#define GL_SAMPLER_2D_RECT                0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW         0x8B64\n#define GL_SAMPLER_BUFFER                 0x8DC2\n#define GL_INT_SAMPLER_2D_RECT            0x8DCD\n#define GL_INT_SAMPLER_BUFFER             0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT   0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER    0x8DD8\n#define GL_TEXTURE_BUFFER                 0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE        0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER         0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D\n#define GL_TEXTURE_RECTANGLE              0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE      0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE        0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE     0x84F8\n#define GL_R8_SNORM                       0x8F94\n#define GL_RG8_SNORM                      0x8F95\n#define GL_RGB8_SNORM                     0x8F96\n#define GL_RGBA8_SNORM                    0x8F97\n#define GL_R16_SNORM                      0x8F98\n#define GL_RG16_SNORM                     0x8F99\n#define GL_RGB16_SNORM                    0x8F9A\n#define GL_RGBA16_SNORM                   0x8F9B\n#define GL_SIGNED_NORMALIZED              0x8F9C\n#define GL_PRIMITIVE_RESTART              0x8F9D\n#define GL_PRIMITIVE_RESTART_INDEX        0x8F9E\n#define GL_COPY_READ_BUFFER               0x8F36\n#define GL_COPY_WRITE_BUFFER              0x8F37\n#define GL_UNIFORM_BUFFER                 0x8A11\n#define GL_UNIFORM_BUFFER_BINDING         0x8A28\n#define GL_UNIFORM_BUFFER_START           0x8A29\n#define GL_UNIFORM_BUFFER_SIZE            0x8A2A\n#define GL_MAX_VERTEX_UNIFORM_BLOCKS      0x8A2B\n#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS    0x8A2D\n#define GL_MAX_COMBINED_UNIFORM_BLOCKS    0x8A2E\n#define GL_MAX_UNIFORM_BUFFER_BINDINGS    0x8A2F\n#define GL_MAX_UNIFORM_BLOCK_SIZE         0x8A30\n#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31\n#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33\n#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34\n#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35\n#define GL_ACTIVE_UNIFORM_BLOCKS          0x8A36\n#define GL_UNIFORM_TYPE                   0x8A37\n#define GL_UNIFORM_SIZE                   0x8A38\n#define GL_UNIFORM_NAME_LENGTH            0x8A39\n#define GL_UNIFORM_BLOCK_INDEX            0x8A3A\n#define GL_UNIFORM_OFFSET                 0x8A3B\n#define GL_UNIFORM_ARRAY_STRIDE           0x8A3C\n#define GL_UNIFORM_MATRIX_STRIDE          0x8A3D\n#define GL_UNIFORM_IS_ROW_MAJOR           0x8A3E\n#define GL_UNIFORM_BLOCK_BINDING          0x8A3F\n#define GL_UNIFORM_BLOCK_DATA_SIZE        0x8A40\n#define GL_UNIFORM_BLOCK_NAME_LENGTH      0x8A41\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS  0x8A42\n#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46\n#define GL_INVALID_INDEX                  0xFFFFFFFFu\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\ntypedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\ntypedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);\nGLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);\nGLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);\nGLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\nGLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);\nGLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);\nGLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);\nGLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);\nGLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);\n#endif\n#endif /* GL_VERSION_3_1 */\n\n#ifndef GL_VERSION_3_2\n#define GL_VERSION_3_2 1\ntypedef struct __GLsync *GLsync;\n#ifndef GLEXT_64_TYPES_DEFINED\n/* This code block is duplicated in glxext.h, so must be protected */\n#define GLEXT_64_TYPES_DEFINED\n/* Define int32_t, int64_t, and uint64_t types for UST/MSC */\n/* (as used in the GL_EXT_timer_query extension). */\n#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n#include <inttypes.h>\n#elif defined(__sun__) || defined(__digital__)\n#include <inttypes.h>\n#if defined(__STDC__)\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int int64_t;\ntypedef unsigned long int uint64_t;\n#else\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#endif /* __arch64__ */\n#endif /* __STDC__ */\n#elif defined( __VMS ) || defined(__sgi)\n#include <inttypes.h>\n#elif defined(__SCO__) || defined(__USLC__)\n#include <stdint.h>\n#elif defined(__UNIXOS2__) || defined(__SOL64__)\ntypedef long int int32_t;\ntypedef long long int int64_t;\ntypedef unsigned long long int uint64_t;\n#elif defined(_WIN32) && defined(__GNUC__)\n#include <stdint.h>\n#elif defined(_WIN32)\ntypedef __int32 int32_t;\ntypedef __int64 int64_t;\ntypedef unsigned __int64 uint64_t;\n#else\n/* Fallback if nothing above works */\n#include <inttypes.h>\n#endif\n#endif\ntypedef uint64_t GLuint64;\ntypedef int64_t GLint64;\n#define GL_CONTEXT_CORE_PROFILE_BIT       0x00000001\n#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002\n#define GL_LINES_ADJACENCY                0x000A\n#define GL_LINE_STRIP_ADJACENCY           0x000B\n#define GL_TRIANGLES_ADJACENCY            0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY       0x000D\n#define GL_PROGRAM_POINT_SIZE             0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8\n#define GL_GEOMETRY_SHADER                0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT          0x8916\n#define GL_GEOMETRY_INPUT_TYPE            0x8917\n#define GL_GEOMETRY_OUTPUT_TYPE           0x8918\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES   0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1\n#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122\n#define GL_MAX_GEOMETRY_INPUT_COMPONENTS  0x9123\n#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124\n#define GL_MAX_FRAGMENT_INPUT_COMPONENTS  0x9125\n#define GL_CONTEXT_PROFILE_MASK           0x9126\n#define GL_DEPTH_CLAMP                    0x864F\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION        0x8E4D\n#define GL_LAST_VERTEX_CONVENTION         0x8E4E\n#define GL_PROVOKING_VERTEX               0x8E4F\n#define GL_TEXTURE_CUBE_MAP_SEAMLESS      0x884F\n#define GL_MAX_SERVER_WAIT_TIMEOUT        0x9111\n#define GL_OBJECT_TYPE                    0x9112\n#define GL_SYNC_CONDITION                 0x9113\n#define GL_SYNC_STATUS                    0x9114\n#define GL_SYNC_FLAGS                     0x9115\n#define GL_SYNC_FENCE                     0x9116\n#define GL_SYNC_GPU_COMMANDS_COMPLETE     0x9117\n#define GL_UNSIGNALED                     0x9118\n#define GL_SIGNALED                       0x9119\n#define GL_ALREADY_SIGNALED               0x911A\n#define GL_TIMEOUT_EXPIRED                0x911B\n#define GL_CONDITION_SATISFIED            0x911C\n#define GL_WAIT_FAILED                    0x911D\n#define GL_TIMEOUT_IGNORED                0xFFFFFFFFFFFFFFFFull\n#define GL_SYNC_FLUSH_COMMANDS_BIT        0x00000001\n#define GL_SAMPLE_POSITION                0x8E50\n#define GL_SAMPLE_MASK                    0x8E51\n#define GL_SAMPLE_MASK_VALUE              0x8E52\n#define GL_MAX_SAMPLE_MASK_WORDS          0x8E59\n#define GL_TEXTURE_2D_MULTISAMPLE         0x9100\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE   0x9101\n#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102\n#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104\n#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105\n#define GL_TEXTURE_SAMPLES                0x9106\n#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107\n#define GL_SAMPLER_2D_MULTISAMPLE         0x9108\n#define GL_INT_SAMPLER_2D_MULTISAMPLE     0x9109\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A\n#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY   0x910B\n#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C\n#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D\n#define GL_MAX_COLOR_TEXTURE_SAMPLES      0x910E\n#define GL_MAX_DEPTH_TEXTURE_SAMPLES      0x910F\n#define GL_MAX_INTEGER_SAMPLES            0x9110\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);\ntypedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);\ntypedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);\ntypedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);\ntypedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data);\ntypedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\ntypedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);\nGLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount, const GLint *basevertex);\nGLAPI void APIENTRY glProvokingVertex (GLenum mode);\nGLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);\nGLAPI GLboolean APIENTRY glIsSync (GLsync sync);\nGLAPI void APIENTRY glDeleteSync (GLsync sync);\nGLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *data);\nGLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\nGLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);\nGLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);\n#endif\n#endif /* GL_VERSION_3_2 */\n\n#ifndef GL_VERSION_3_3\n#define GL_VERSION_3_3 1\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR    0x88FE\n#define GL_SRC1_COLOR                     0x88F9\n#define GL_ONE_MINUS_SRC1_COLOR           0x88FA\n#define GL_ONE_MINUS_SRC1_ALPHA           0x88FB\n#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS   0x88FC\n#define GL_ANY_SAMPLES_PASSED             0x8C2F\n#define GL_SAMPLER_BINDING                0x8919\n#define GL_RGB10_A2UI                     0x906F\n#define GL_TEXTURE_SWIZZLE_R              0x8E42\n#define GL_TEXTURE_SWIZZLE_G              0x8E43\n#define GL_TEXTURE_SWIZZLE_B              0x8E44\n#define GL_TEXTURE_SWIZZLE_A              0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA           0x8E46\n#define GL_TIME_ELAPSED                   0x88BF\n#define GL_TIMESTAMP                      0x8E28\n#define GL_INT_2_10_10_10_REV             0x8D9F\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);\ntypedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);\ntypedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);\ntypedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);\ntypedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);\ntypedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);\ntypedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);\nGLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);\nGLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);\nGLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);\nGLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);\nGLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);\nGLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);\nGLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);\nGLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);\nGLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);\nGLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);\nGLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);\nGLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);\nGLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);\nGLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);\nGLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);\nGLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);\nGLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);\nGLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);\nGLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);\n#endif\n#endif /* GL_VERSION_3_3 */\n\n#ifndef GL_VERSION_4_0\n#define GL_VERSION_4_0 1\n#define GL_SAMPLE_SHADING                 0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE       0x8C37\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F\n#define GL_TEXTURE_CUBE_MAP_ARRAY         0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY   0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY         0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW  0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY     0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F\n#define GL_DRAW_INDIRECT_BUFFER           0x8F3F\n#define GL_DRAW_INDIRECT_BUFFER_BINDING   0x8F43\n#define GL_GEOMETRY_SHADER_INVOCATIONS    0x887F\n#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C\n#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D\n#define GL_MAX_VERTEX_STREAMS             0x8E71\n#define GL_DOUBLE_VEC2                    0x8FFC\n#define GL_DOUBLE_VEC3                    0x8FFD\n#define GL_DOUBLE_VEC4                    0x8FFE\n#define GL_DOUBLE_MAT2                    0x8F46\n#define GL_DOUBLE_MAT3                    0x8F47\n#define GL_DOUBLE_MAT4                    0x8F48\n#define GL_DOUBLE_MAT2x3                  0x8F49\n#define GL_DOUBLE_MAT2x4                  0x8F4A\n#define GL_DOUBLE_MAT3x2                  0x8F4B\n#define GL_DOUBLE_MAT3x4                  0x8F4C\n#define GL_DOUBLE_MAT4x2                  0x8F4D\n#define GL_DOUBLE_MAT4x3                  0x8F4E\n#define GL_ACTIVE_SUBROUTINES             0x8DE5\n#define GL_ACTIVE_SUBROUTINE_UNIFORMS     0x8DE6\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47\n#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH   0x8E48\n#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49\n#define GL_MAX_SUBROUTINES                0x8DE7\n#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8\n#define GL_NUM_COMPATIBLE_SUBROUTINES     0x8E4A\n#define GL_COMPATIBLE_SUBROUTINES         0x8E4B\n#define GL_PATCHES                        0x000E\n#define GL_PATCH_VERTICES                 0x8E72\n#define GL_PATCH_DEFAULT_INNER_LEVEL      0x8E73\n#define GL_PATCH_DEFAULT_OUTER_LEVEL      0x8E74\n#define GL_TESS_CONTROL_OUTPUT_VERTICES   0x8E75\n#define GL_TESS_GEN_MODE                  0x8E76\n#define GL_TESS_GEN_SPACING               0x8E77\n#define GL_TESS_GEN_VERTEX_ORDER          0x8E78\n#define GL_TESS_GEN_POINT_MODE            0x8E79\n#define GL_ISOLINES                       0x8E7A\n#define GL_FRACTIONAL_ODD                 0x8E7B\n#define GL_FRACTIONAL_EVEN                0x8E7C\n#define GL_MAX_PATCH_VERTICES             0x8E7D\n#define GL_MAX_TESS_GEN_LEVEL             0x8E7E\n#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F\n#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80\n#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81\n#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82\n#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83\n#define GL_MAX_TESS_PATCH_COMPONENTS      0x8E84\n#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85\n#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86\n#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89\n#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A\n#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C\n#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D\n#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E\n#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1\n#define GL_TESS_EVALUATION_SHADER         0x8E87\n#define GL_TESS_CONTROL_SHADER            0x8E88\n#define GL_TRANSFORM_FEEDBACK             0x8E22\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24\n#define GL_TRANSFORM_FEEDBACK_BINDING     0x8E25\n#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect);\ntypedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);\ntypedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);\ntypedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShading (GLfloat value);\nGLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect);\nGLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect);\nGLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);\nGLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);\nGLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);\nGLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);\nGLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);\nGLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);\nGLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);\nGLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);\nGLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedback (void);\nGLAPI void APIENTRY glResumeTransformFeedback (void);\nGLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);\nGLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);\nGLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);\nGLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);\nGLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);\n#endif\n#endif /* GL_VERSION_4_0 */\n\n#ifndef GL_VERSION_4_1\n#define GL_VERSION_4_1 1\n#define GL_FIXED                          0x140C\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B\n#define GL_LOW_FLOAT                      0x8DF0\n#define GL_MEDIUM_FLOAT                   0x8DF1\n#define GL_HIGH_FLOAT                     0x8DF2\n#define GL_LOW_INT                        0x8DF3\n#define GL_MEDIUM_INT                     0x8DF4\n#define GL_HIGH_INT                       0x8DF5\n#define GL_SHADER_COMPILER                0x8DFA\n#define GL_SHADER_BINARY_FORMATS          0x8DF8\n#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9\n#define GL_MAX_VERTEX_UNIFORM_VECTORS     0x8DFB\n#define GL_MAX_VARYING_VECTORS            0x8DFC\n#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD\n#define GL_RGB565                         0x8D62\n#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257\n#define GL_PROGRAM_BINARY_LENGTH          0x8741\n#define GL_NUM_PROGRAM_BINARY_FORMATS     0x87FE\n#define GL_PROGRAM_BINARY_FORMATS         0x87FF\n#define GL_VERTEX_SHADER_BIT              0x00000001\n#define GL_FRAGMENT_SHADER_BIT            0x00000002\n#define GL_GEOMETRY_SHADER_BIT            0x00000004\n#define GL_TESS_CONTROL_SHADER_BIT        0x00000008\n#define GL_TESS_EVALUATION_SHADER_BIT     0x00000010\n#define GL_ALL_SHADER_BITS                0xFFFFFFFF\n#define GL_PROGRAM_SEPARABLE              0x8258\n#define GL_ACTIVE_PROGRAM                 0x8259\n#define GL_PROGRAM_PIPELINE_BINDING       0x825A\n#define GL_MAX_VIEWPORTS                  0x825B\n#define GL_VIEWPORT_SUBPIXEL_BITS         0x825C\n#define GL_VIEWPORT_BOUNDS_RANGE          0x825D\n#define GL_LAYER_PROVOKING_VERTEX         0x825E\n#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F\n#define GL_UNDEFINED_VERTEX               0x8260\ntypedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);\ntypedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);\ntypedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\ntypedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);\ntypedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\ntypedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);\ntypedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReleaseShaderCompiler (void);\nGLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);\nGLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);\nGLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);\nGLAPI void APIENTRY glClearDepthf (GLfloat d);\nGLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\nGLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);\nGLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);\nGLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);\nGLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);\nGLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);\nGLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);\nGLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);\nGLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);\nGLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);\nGLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);\nGLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);\nGLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);\nGLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\nGLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);\nGLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);\nGLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);\nGLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);\nGLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);\n#endif\n#endif /* GL_VERSION_4_1 */\n\n#ifndef GL_VERSION_4_2\n#define GL_VERSION_4_2 1\n#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH  0x9127\n#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128\n#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH  0x9129\n#define GL_UNPACK_COMPRESSED_BLOCK_SIZE   0x912A\n#define GL_PACK_COMPRESSED_BLOCK_WIDTH    0x912B\n#define GL_PACK_COMPRESSED_BLOCK_HEIGHT   0x912C\n#define GL_PACK_COMPRESSED_BLOCK_DEPTH    0x912D\n#define GL_PACK_COMPRESSED_BLOCK_SIZE     0x912E\n#define GL_NUM_SAMPLE_COUNTS              0x9380\n#define GL_MIN_MAP_BUFFER_ALIGNMENT       0x90BC\n#define GL_ATOMIC_COUNTER_BUFFER          0x92C0\n#define GL_ATOMIC_COUNTER_BUFFER_BINDING  0x92C1\n#define GL_ATOMIC_COUNTER_BUFFER_START    0x92C2\n#define GL_ATOMIC_COUNTER_BUFFER_SIZE     0x92C3\n#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5\n#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB\n#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0\n#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1\n#define GL_MAX_VERTEX_ATOMIC_COUNTERS     0x92D2\n#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3\n#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4\n#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS   0x92D5\n#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS   0x92D6\n#define GL_MAX_COMBINED_ATOMIC_COUNTERS   0x92D7\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8\n#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC\n#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS  0x92D9\n#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA\n#define GL_UNSIGNED_INT_ATOMIC_COUNTER    0x92DB\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT      0x00000002\n#define GL_UNIFORM_BARRIER_BIT            0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT      0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020\n#define GL_COMMAND_BARRIER_BIT            0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT       0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT     0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT      0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT        0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT     0x00001000\n#define GL_ALL_BARRIER_BITS               0xFFFFFFFF\n#define GL_MAX_IMAGE_UNITS                0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39\n#define GL_IMAGE_BINDING_NAME             0x8F3A\n#define GL_IMAGE_BINDING_LEVEL            0x8F3B\n#define GL_IMAGE_BINDING_LAYERED          0x8F3C\n#define GL_IMAGE_BINDING_LAYER            0x8F3D\n#define GL_IMAGE_BINDING_ACCESS           0x8F3E\n#define GL_IMAGE_1D                       0x904C\n#define GL_IMAGE_2D                       0x904D\n#define GL_IMAGE_3D                       0x904E\n#define GL_IMAGE_2D_RECT                  0x904F\n#define GL_IMAGE_CUBE                     0x9050\n#define GL_IMAGE_BUFFER                   0x9051\n#define GL_IMAGE_1D_ARRAY                 0x9052\n#define GL_IMAGE_2D_ARRAY                 0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY           0x9054\n#define GL_IMAGE_2D_MULTISAMPLE           0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY     0x9056\n#define GL_INT_IMAGE_1D                   0x9057\n#define GL_INT_IMAGE_2D                   0x9058\n#define GL_INT_IMAGE_3D                   0x9059\n#define GL_INT_IMAGE_2D_RECT              0x905A\n#define GL_INT_IMAGE_CUBE                 0x905B\n#define GL_INT_IMAGE_BUFFER               0x905C\n#define GL_INT_IMAGE_1D_ARRAY             0x905D\n#define GL_INT_IMAGE_2D_ARRAY             0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY       0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE       0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D          0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D          0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D          0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT     0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE        0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER      0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY    0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY    0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C\n#define GL_MAX_IMAGE_SAMPLES              0x906D\n#define GL_IMAGE_BINDING_FORMAT           0x906E\n#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8\n#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9\n#define GL_MAX_VERTEX_IMAGE_UNIFORMS      0x90CA\n#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB\n#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC\n#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS    0x90CD\n#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS    0x90CE\n#define GL_MAX_COMBINED_IMAGE_UNIFORMS    0x90CF\n#define GL_COMPRESSED_RGBA_BPTC_UNORM     0x8E8C\n#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D\n#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E\n#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F\n#define GL_TEXTURE_IMMUTABLE_FORMAT       0x912F\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\ntypedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);\nGLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);\nGLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);\nGLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);\nGLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);\nGLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);\nGLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);\nGLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);\n#endif\n#endif /* GL_VERSION_4_2 */\n\n#ifndef GL_VERSION_4_3\n#define GL_VERSION_4_3 1\ntypedef void (APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_NUM_SHADING_LANGUAGE_VERSIONS  0x82E9\n#define GL_VERTEX_ATTRIB_ARRAY_LONG       0x874E\n#define GL_COMPRESSED_RGB8_ETC2           0x9274\n#define GL_COMPRESSED_SRGB8_ETC2          0x9275\n#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276\n#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277\n#define GL_COMPRESSED_RGBA8_ETC2_EAC      0x9278\n#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279\n#define GL_COMPRESSED_R11_EAC             0x9270\n#define GL_COMPRESSED_SIGNED_R11_EAC      0x9271\n#define GL_COMPRESSED_RG11_EAC            0x9272\n#define GL_COMPRESSED_SIGNED_RG11_EAC     0x9273\n#define GL_PRIMITIVE_RESTART_FIXED_INDEX  0x8D69\n#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A\n#define GL_MAX_ELEMENT_INDEX              0x8D6B\n#define GL_COMPUTE_SHADER                 0x91B9\n#define GL_MAX_COMPUTE_UNIFORM_BLOCKS     0x91BB\n#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC\n#define GL_MAX_COMPUTE_IMAGE_UNIFORMS     0x91BD\n#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262\n#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263\n#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264\n#define GL_MAX_COMPUTE_ATOMIC_COUNTERS    0x8265\n#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266\n#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB\n#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE\n#define GL_MAX_COMPUTE_WORK_GROUP_SIZE    0x91BF\n#define GL_COMPUTE_WORK_GROUP_SIZE        0x8267\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC\n#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED\n#define GL_DISPATCH_INDIRECT_BUFFER       0x90EE\n#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS       0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION        0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM      0x8245\n#define GL_DEBUG_SOURCE_API               0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM     0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY       0x8249\n#define GL_DEBUG_SOURCE_APPLICATION       0x824A\n#define GL_DEBUG_SOURCE_OTHER             0x824B\n#define GL_DEBUG_TYPE_ERROR               0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR  0x824E\n#define GL_DEBUG_TYPE_PORTABILITY         0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE         0x8250\n#define GL_DEBUG_TYPE_OTHER               0x8251\n#define GL_MAX_DEBUG_MESSAGE_LENGTH       0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES      0x9144\n#define GL_DEBUG_LOGGED_MESSAGES          0x9145\n#define GL_DEBUG_SEVERITY_HIGH            0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM          0x9147\n#define GL_DEBUG_SEVERITY_LOW             0x9148\n#define GL_DEBUG_TYPE_MARKER              0x8268\n#define GL_DEBUG_TYPE_PUSH_GROUP          0x8269\n#define GL_DEBUG_TYPE_POP_GROUP           0x826A\n#define GL_DEBUG_SEVERITY_NOTIFICATION    0x826B\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH    0x826C\n#define GL_DEBUG_GROUP_STACK_DEPTH        0x826D\n#define GL_BUFFER                         0x82E0\n#define GL_SHADER                         0x82E1\n#define GL_PROGRAM                        0x82E2\n#define GL_QUERY                          0x82E3\n#define GL_PROGRAM_PIPELINE               0x82E4\n#define GL_SAMPLER                        0x82E6\n#define GL_MAX_LABEL_LENGTH               0x82E8\n#define GL_DEBUG_OUTPUT                   0x92E0\n#define GL_CONTEXT_FLAG_DEBUG_BIT         0x00000002\n#define GL_MAX_UNIFORM_LOCATIONS          0x826E\n#define GL_FRAMEBUFFER_DEFAULT_WIDTH      0x9310\n#define GL_FRAMEBUFFER_DEFAULT_HEIGHT     0x9311\n#define GL_FRAMEBUFFER_DEFAULT_LAYERS     0x9312\n#define GL_FRAMEBUFFER_DEFAULT_SAMPLES    0x9313\n#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314\n#define GL_MAX_FRAMEBUFFER_WIDTH          0x9315\n#define GL_MAX_FRAMEBUFFER_HEIGHT         0x9316\n#define GL_MAX_FRAMEBUFFER_LAYERS         0x9317\n#define GL_MAX_FRAMEBUFFER_SAMPLES        0x9318\n#define GL_INTERNALFORMAT_SUPPORTED       0x826F\n#define GL_INTERNALFORMAT_PREFERRED       0x8270\n#define GL_INTERNALFORMAT_RED_SIZE        0x8271\n#define GL_INTERNALFORMAT_GREEN_SIZE      0x8272\n#define GL_INTERNALFORMAT_BLUE_SIZE       0x8273\n#define GL_INTERNALFORMAT_ALPHA_SIZE      0x8274\n#define GL_INTERNALFORMAT_DEPTH_SIZE      0x8275\n#define GL_INTERNALFORMAT_STENCIL_SIZE    0x8276\n#define GL_INTERNALFORMAT_SHARED_SIZE     0x8277\n#define GL_INTERNALFORMAT_RED_TYPE        0x8278\n#define GL_INTERNALFORMAT_GREEN_TYPE      0x8279\n#define GL_INTERNALFORMAT_BLUE_TYPE       0x827A\n#define GL_INTERNALFORMAT_ALPHA_TYPE      0x827B\n#define GL_INTERNALFORMAT_DEPTH_TYPE      0x827C\n#define GL_INTERNALFORMAT_STENCIL_TYPE    0x827D\n#define GL_MAX_WIDTH                      0x827E\n#define GL_MAX_HEIGHT                     0x827F\n#define GL_MAX_DEPTH                      0x8280\n#define GL_MAX_LAYERS                     0x8281\n#define GL_MAX_COMBINED_DIMENSIONS        0x8282\n#define GL_COLOR_COMPONENTS               0x8283\n#define GL_DEPTH_COMPONENTS               0x8284\n#define GL_STENCIL_COMPONENTS             0x8285\n#define GL_COLOR_RENDERABLE               0x8286\n#define GL_DEPTH_RENDERABLE               0x8287\n#define GL_STENCIL_RENDERABLE             0x8288\n#define GL_FRAMEBUFFER_RENDERABLE         0x8289\n#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A\n#define GL_FRAMEBUFFER_BLEND              0x828B\n#define GL_READ_PIXELS                    0x828C\n#define GL_READ_PIXELS_FORMAT             0x828D\n#define GL_READ_PIXELS_TYPE               0x828E\n#define GL_TEXTURE_IMAGE_FORMAT           0x828F\n#define GL_TEXTURE_IMAGE_TYPE             0x8290\n#define GL_GET_TEXTURE_IMAGE_FORMAT       0x8291\n#define GL_GET_TEXTURE_IMAGE_TYPE         0x8292\n#define GL_MIPMAP                         0x8293\n#define GL_MANUAL_GENERATE_MIPMAP         0x8294\n#define GL_AUTO_GENERATE_MIPMAP           0x8295\n#define GL_COLOR_ENCODING                 0x8296\n#define GL_SRGB_READ                      0x8297\n#define GL_SRGB_WRITE                     0x8298\n#define GL_FILTER                         0x829A\n#define GL_VERTEX_TEXTURE                 0x829B\n#define GL_TESS_CONTROL_TEXTURE           0x829C\n#define GL_TESS_EVALUATION_TEXTURE        0x829D\n#define GL_GEOMETRY_TEXTURE               0x829E\n#define GL_FRAGMENT_TEXTURE               0x829F\n#define GL_COMPUTE_TEXTURE                0x82A0\n#define GL_TEXTURE_SHADOW                 0x82A1\n#define GL_TEXTURE_GATHER                 0x82A2\n#define GL_TEXTURE_GATHER_SHADOW          0x82A3\n#define GL_SHADER_IMAGE_LOAD              0x82A4\n#define GL_SHADER_IMAGE_STORE             0x82A5\n#define GL_SHADER_IMAGE_ATOMIC            0x82A6\n#define GL_IMAGE_TEXEL_SIZE               0x82A7\n#define GL_IMAGE_COMPATIBILITY_CLASS      0x82A8\n#define GL_IMAGE_PIXEL_FORMAT             0x82A9\n#define GL_IMAGE_PIXEL_TYPE               0x82AA\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD\n#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE\n#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF\n#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1\n#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2\n#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE  0x82B3\n#define GL_CLEAR_BUFFER                   0x82B4\n#define GL_TEXTURE_VIEW                   0x82B5\n#define GL_VIEW_COMPATIBILITY_CLASS       0x82B6\n#define GL_FULL_SUPPORT                   0x82B7\n#define GL_CAVEAT_SUPPORT                 0x82B8\n#define GL_IMAGE_CLASS_4_X_32             0x82B9\n#define GL_IMAGE_CLASS_2_X_32             0x82BA\n#define GL_IMAGE_CLASS_1_X_32             0x82BB\n#define GL_IMAGE_CLASS_4_X_16             0x82BC\n#define GL_IMAGE_CLASS_2_X_16             0x82BD\n#define GL_IMAGE_CLASS_1_X_16             0x82BE\n#define GL_IMAGE_CLASS_4_X_8              0x82BF\n#define GL_IMAGE_CLASS_2_X_8              0x82C0\n#define GL_IMAGE_CLASS_1_X_8              0x82C1\n#define GL_IMAGE_CLASS_11_11_10           0x82C2\n#define GL_IMAGE_CLASS_10_10_10_2         0x82C3\n#define GL_VIEW_CLASS_128_BITS            0x82C4\n#define GL_VIEW_CLASS_96_BITS             0x82C5\n#define GL_VIEW_CLASS_64_BITS             0x82C6\n#define GL_VIEW_CLASS_48_BITS             0x82C7\n#define GL_VIEW_CLASS_32_BITS             0x82C8\n#define GL_VIEW_CLASS_24_BITS             0x82C9\n#define GL_VIEW_CLASS_16_BITS             0x82CA\n#define GL_VIEW_CLASS_8_BITS              0x82CB\n#define GL_VIEW_CLASS_S3TC_DXT1_RGB       0x82CC\n#define GL_VIEW_CLASS_S3TC_DXT1_RGBA      0x82CD\n#define GL_VIEW_CLASS_S3TC_DXT3_RGBA      0x82CE\n#define GL_VIEW_CLASS_S3TC_DXT5_RGBA      0x82CF\n#define GL_VIEW_CLASS_RGTC1_RED           0x82D0\n#define GL_VIEW_CLASS_RGTC2_RG            0x82D1\n#define GL_VIEW_CLASS_BPTC_UNORM          0x82D2\n#define GL_VIEW_CLASS_BPTC_FLOAT          0x82D3\n#define GL_UNIFORM                        0x92E1\n#define GL_UNIFORM_BLOCK                  0x92E2\n#define GL_PROGRAM_INPUT                  0x92E3\n#define GL_PROGRAM_OUTPUT                 0x92E4\n#define GL_BUFFER_VARIABLE                0x92E5\n#define GL_SHADER_STORAGE_BLOCK           0x92E6\n#define GL_VERTEX_SUBROUTINE              0x92E8\n#define GL_TESS_CONTROL_SUBROUTINE        0x92E9\n#define GL_TESS_EVALUATION_SUBROUTINE     0x92EA\n#define GL_GEOMETRY_SUBROUTINE            0x92EB\n#define GL_FRAGMENT_SUBROUTINE            0x92EC\n#define GL_COMPUTE_SUBROUTINE             0x92ED\n#define GL_VERTEX_SUBROUTINE_UNIFORM      0x92EE\n#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF\n#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0\n#define GL_GEOMETRY_SUBROUTINE_UNIFORM    0x92F1\n#define GL_FRAGMENT_SUBROUTINE_UNIFORM    0x92F2\n#define GL_COMPUTE_SUBROUTINE_UNIFORM     0x92F3\n#define GL_TRANSFORM_FEEDBACK_VARYING     0x92F4\n#define GL_ACTIVE_RESOURCES               0x92F5\n#define GL_MAX_NAME_LENGTH                0x92F6\n#define GL_MAX_NUM_ACTIVE_VARIABLES       0x92F7\n#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8\n#define GL_NAME_LENGTH                    0x92F9\n#define GL_TYPE                           0x92FA\n#define GL_ARRAY_SIZE                     0x92FB\n#define GL_OFFSET                         0x92FC\n#define GL_BLOCK_INDEX                    0x92FD\n#define GL_ARRAY_STRIDE                   0x92FE\n#define GL_MATRIX_STRIDE                  0x92FF\n#define GL_IS_ROW_MAJOR                   0x9300\n#define GL_ATOMIC_COUNTER_BUFFER_INDEX    0x9301\n#define GL_BUFFER_BINDING                 0x9302\n#define GL_BUFFER_DATA_SIZE               0x9303\n#define GL_NUM_ACTIVE_VARIABLES           0x9304\n#define GL_ACTIVE_VARIABLES               0x9305\n#define GL_REFERENCED_BY_VERTEX_SHADER    0x9306\n#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307\n#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308\n#define GL_REFERENCED_BY_GEOMETRY_SHADER  0x9309\n#define GL_REFERENCED_BY_FRAGMENT_SHADER  0x930A\n#define GL_REFERENCED_BY_COMPUTE_SHADER   0x930B\n#define GL_TOP_LEVEL_ARRAY_SIZE           0x930C\n#define GL_TOP_LEVEL_ARRAY_STRIDE         0x930D\n#define GL_LOCATION                       0x930E\n#define GL_LOCATION_INDEX                 0x930F\n#define GL_IS_PER_PATCH                   0x92E7\n#define GL_SHADER_STORAGE_BUFFER          0x90D2\n#define GL_SHADER_STORAGE_BUFFER_BINDING  0x90D3\n#define GL_SHADER_STORAGE_BUFFER_START    0x90D4\n#define GL_SHADER_STORAGE_BUFFER_SIZE     0x90D5\n#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6\n#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7\n#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8\n#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9\n#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA\n#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB\n#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC\n#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD\n#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE  0x90DE\n#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF\n#define GL_SHADER_STORAGE_BARRIER_BIT     0x00002000\n#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39\n#define GL_DEPTH_STENCIL_TEXTURE_MODE     0x90EA\n#define GL_TEXTURE_BUFFER_OFFSET          0x919D\n#define GL_TEXTURE_BUFFER_SIZE            0x919E\n#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F\n#define GL_TEXTURE_VIEW_MIN_LEVEL         0x82DB\n#define GL_TEXTURE_VIEW_NUM_LEVELS        0x82DC\n#define GL_TEXTURE_VIEW_MIN_LAYER         0x82DD\n#define GL_TEXTURE_VIEW_NUM_LAYERS        0x82DE\n#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF\n#define GL_VERTEX_ATTRIB_BINDING          0x82D4\n#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET  0x82D5\n#define GL_VERTEX_BINDING_DIVISOR         0x82D6\n#define GL_VERTEX_BINDING_OFFSET          0x82D7\n#define GL_VERTEX_BINDING_STRIDE          0x82D8\n#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9\n#define GL_MAX_VERTEX_ATTRIB_BINDINGS     0x82DA\n#define GL_VERTEX_BINDING_BUFFER          0x8F4F\n#define GL_DISPLAY_LIST                   0x82E7\ntypedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\ntypedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\ntypedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\ntypedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);\ntypedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\ntypedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\ntypedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\ntypedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\ntypedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);\ntypedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);\nGLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);\nGLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\nGLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);\nGLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);\nGLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);\nGLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);\nGLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);\nGLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);\nGLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);\nGLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);\nGLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);\nGLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);\nGLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\nGLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);\nGLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\nGLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);\nGLAPI void APIENTRY glPopDebugGroup (void);\nGLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\nGLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n#endif /* GL_VERSION_4_3 */\n\n#ifndef GL_VERSION_4_4\n#define GL_VERSION_4_4 1\n#define GL_MAX_VERTEX_ATTRIB_STRIDE       0x82E5\n#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221\n#define GL_TEXTURE_BUFFER_BINDING         0x8C2A\n#define GL_MAP_PERSISTENT_BIT             0x0040\n#define GL_MAP_COHERENT_BIT               0x0080\n#define GL_DYNAMIC_STORAGE_BIT            0x0100\n#define GL_CLIENT_STORAGE_BIT             0x0200\n#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000\n#define GL_BUFFER_IMMUTABLE_STORAGE       0x821F\n#define GL_BUFFER_STORAGE_FLAGS           0x8220\n#define GL_CLEAR_TEXTURE                  0x9365\n#define GL_LOCATION_COMPONENT             0x934A\n#define GL_TRANSFORM_FEEDBACK_BUFFER_INDEX 0x934B\n#define GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE 0x934C\n#define GL_QUERY_BUFFER                   0x9192\n#define GL_QUERY_BUFFER_BARRIER_BIT       0x00008000\n#define GL_QUERY_BUFFER_BINDING           0x9193\n#define GL_QUERY_RESULT_NO_WAIT           0x9194\n#define GL_MIRROR_CLAMP_TO_EDGE           0x8743\ntypedef void (APIENTRYP PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLCLEARTEXIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARTEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLBINDBUFFERSBASEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLBINDBUFFERSRANGEPROC) (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);\ntypedef void (APIENTRYP PFNGLBINDTEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLBINDSAMPLERSPROC) (GLuint first, GLsizei count, const GLuint *samplers);\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTURESPROC) (GLuint first, GLsizei count, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLBINDVERTEXBUFFERSPROC) (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferStorage (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);\nGLAPI void APIENTRY glClearTexImage (GLuint texture, GLint level, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glBindBuffersBase (GLenum target, GLuint first, GLsizei count, const GLuint *buffers);\nGLAPI void APIENTRY glBindBuffersRange (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);\nGLAPI void APIENTRY glBindTextures (GLuint first, GLsizei count, const GLuint *textures);\nGLAPI void APIENTRY glBindSamplers (GLuint first, GLsizei count, const GLuint *samplers);\nGLAPI void APIENTRY glBindImageTextures (GLuint first, GLsizei count, const GLuint *textures);\nGLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);\n#endif\n#endif /* GL_VERSION_4_4 */\n\n#ifndef GL_ARB_ES2_compatibility\n#define GL_ARB_ES2_compatibility 1\n#endif /* GL_ARB_ES2_compatibility */\n\n#ifndef GL_ARB_ES3_compatibility\n#define GL_ARB_ES3_compatibility 1\n#endif /* GL_ARB_ES3_compatibility */\n\n#ifndef GL_ARB_arrays_of_arrays\n#define GL_ARB_arrays_of_arrays 1\n#endif /* GL_ARB_arrays_of_arrays */\n\n#ifndef GL_ARB_base_instance\n#define GL_ARB_base_instance 1\n#endif /* GL_ARB_base_instance */\n\n#ifndef GL_ARB_bindless_texture\n#define GL_ARB_bindless_texture 1\ntypedef uint64_t GLuint64EXT;\n#define GL_UNSIGNED_INT64_ARB             0x140F\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLEARBPROC) (GLuint texture);\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEARBPROC) (GLuint texture, GLuint sampler);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTARBPROC) (GLuint64 handle);\ntypedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLEARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64ARBPROC) (GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VARBPROC) (GLint location, GLsizei count, const GLuint64 *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64ARBPROC) (GLuint program, GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint64 APIENTRY glGetTextureHandleARB (GLuint texture);\nGLAPI GLuint64 APIENTRY glGetTextureSamplerHandleARB (GLuint texture, GLuint sampler);\nGLAPI void APIENTRY glMakeTextureHandleResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glMakeTextureHandleNonResidentARB (GLuint64 handle);\nGLAPI GLuint64 APIENTRY glGetImageHandleARB (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\nGLAPI void APIENTRY glMakeImageHandleResidentARB (GLuint64 handle, GLenum access);\nGLAPI void APIENTRY glMakeImageHandleNonResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glUniformHandleui64ARB (GLint location, GLuint64 value);\nGLAPI void APIENTRY glUniformHandleui64vARB (GLint location, GLsizei count, const GLuint64 *value);\nGLAPI void APIENTRY glProgramUniformHandleui64ARB (GLuint program, GLint location, GLuint64 value);\nGLAPI void APIENTRY glProgramUniformHandleui64vARB (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\nGLAPI GLboolean APIENTRY glIsTextureHandleResidentARB (GLuint64 handle);\nGLAPI GLboolean APIENTRY glIsImageHandleResidentARB (GLuint64 handle);\nGLAPI void APIENTRY glVertexAttribL1ui64ARB (GLuint index, GLuint64EXT x);\nGLAPI void APIENTRY glVertexAttribL1ui64vARB (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glGetVertexAttribLui64vARB (GLuint index, GLenum pname, GLuint64EXT *params);\n#endif\n#endif /* GL_ARB_bindless_texture */\n\n#ifndef GL_ARB_blend_func_extended\n#define GL_ARB_blend_func_extended 1\n#endif /* GL_ARB_blend_func_extended */\n\n#ifndef GL_ARB_buffer_storage\n#define GL_ARB_buffer_storage 1\n#endif /* GL_ARB_buffer_storage */\n\n#ifndef GL_ARB_cl_event\n#define GL_ARB_cl_event 1\nstruct _cl_context;\nstruct _cl_event;\n#define GL_SYNC_CL_EVENT_ARB              0x8240\n#define GL_SYNC_CL_EVENT_COMPLETE_ARB     0x8241\ntypedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);\n#endif\n#endif /* GL_ARB_cl_event */\n\n#ifndef GL_ARB_clear_buffer_object\n#define GL_ARB_clear_buffer_object 1\n#endif /* GL_ARB_clear_buffer_object */\n\n#ifndef GL_ARB_clear_texture\n#define GL_ARB_clear_texture 1\n#endif /* GL_ARB_clear_texture */\n\n#ifndef GL_ARB_color_buffer_float\n#define GL_ARB_color_buffer_float 1\n#define GL_RGBA_FLOAT_MODE_ARB            0x8820\n#define GL_CLAMP_VERTEX_COLOR_ARB         0x891A\n#define GL_CLAMP_FRAGMENT_COLOR_ARB       0x891B\n#define GL_CLAMP_READ_COLOR_ARB           0x891C\n#define GL_FIXED_ONLY_ARB                 0x891D\ntypedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp);\n#endif\n#endif /* GL_ARB_color_buffer_float */\n\n#ifndef GL_ARB_compatibility\n#define GL_ARB_compatibility 1\n#endif /* GL_ARB_compatibility */\n\n#ifndef GL_ARB_compressed_texture_pixel_storage\n#define GL_ARB_compressed_texture_pixel_storage 1\n#endif /* GL_ARB_compressed_texture_pixel_storage */\n\n#ifndef GL_ARB_compute_shader\n#define GL_ARB_compute_shader 1\n#define GL_COMPUTE_SHADER_BIT             0x00000020\n#endif /* GL_ARB_compute_shader */\n\n#ifndef GL_ARB_compute_variable_group_size\n#define GL_ARB_compute_variable_group_size 1\n#define GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB 0x9344\n#define GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB 0x90EB\n#define GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB 0x9345\n#define GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB 0x91BF\ntypedef void (APIENTRYP PFNGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);\n#endif\n#endif /* GL_ARB_compute_variable_group_size */\n\n#ifndef GL_ARB_conservative_depth\n#define GL_ARB_conservative_depth 1\n#endif /* GL_ARB_conservative_depth */\n\n#ifndef GL_ARB_copy_buffer\n#define GL_ARB_copy_buffer 1\n#define GL_COPY_READ_BUFFER_BINDING       0x8F36\n#define GL_COPY_WRITE_BUFFER_BINDING      0x8F37\n#endif /* GL_ARB_copy_buffer */\n\n#ifndef GL_ARB_copy_image\n#define GL_ARB_copy_image 1\n#endif /* GL_ARB_copy_image */\n\n#ifndef GL_ARB_debug_output\n#define GL_ARB_debug_output 1\ntypedef void (APIENTRY  *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB   0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION_ARB    0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM_ARB  0x8245\n#define GL_DEBUG_SOURCE_API_ARB           0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB   0x8249\n#define GL_DEBUG_SOURCE_APPLICATION_ARB   0x824A\n#define GL_DEBUG_SOURCE_OTHER_ARB         0x824B\n#define GL_DEBUG_TYPE_ERROR_ARB           0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E\n#define GL_DEBUG_TYPE_PORTABILITY_ARB     0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE_ARB     0x8250\n#define GL_DEBUG_TYPE_OTHER_ARB           0x8251\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_ARB      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_ARB        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_ARB      0x9147\n#define GL_DEBUG_SEVERITY_LOW_ARB         0x9148\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\n#endif\n#endif /* GL_ARB_debug_output */\n\n#ifndef GL_ARB_depth_buffer_float\n#define GL_ARB_depth_buffer_float 1\n#endif /* GL_ARB_depth_buffer_float */\n\n#ifndef GL_ARB_depth_clamp\n#define GL_ARB_depth_clamp 1\n#endif /* GL_ARB_depth_clamp */\n\n#ifndef GL_ARB_depth_texture\n#define GL_ARB_depth_texture 1\n#define GL_DEPTH_COMPONENT16_ARB          0x81A5\n#define GL_DEPTH_COMPONENT24_ARB          0x81A6\n#define GL_DEPTH_COMPONENT32_ARB          0x81A7\n#define GL_TEXTURE_DEPTH_SIZE_ARB         0x884A\n#define GL_DEPTH_TEXTURE_MODE_ARB         0x884B\n#endif /* GL_ARB_depth_texture */\n\n#ifndef GL_ARB_draw_buffers\n#define GL_ARB_draw_buffers 1\n#define GL_MAX_DRAW_BUFFERS_ARB           0x8824\n#define GL_DRAW_BUFFER0_ARB               0x8825\n#define GL_DRAW_BUFFER1_ARB               0x8826\n#define GL_DRAW_BUFFER2_ARB               0x8827\n#define GL_DRAW_BUFFER3_ARB               0x8828\n#define GL_DRAW_BUFFER4_ARB               0x8829\n#define GL_DRAW_BUFFER5_ARB               0x882A\n#define GL_DRAW_BUFFER6_ARB               0x882B\n#define GL_DRAW_BUFFER7_ARB               0x882C\n#define GL_DRAW_BUFFER8_ARB               0x882D\n#define GL_DRAW_BUFFER9_ARB               0x882E\n#define GL_DRAW_BUFFER10_ARB              0x882F\n#define GL_DRAW_BUFFER11_ARB              0x8830\n#define GL_DRAW_BUFFER12_ARB              0x8831\n#define GL_DRAW_BUFFER13_ARB              0x8832\n#define GL_DRAW_BUFFER14_ARB              0x8833\n#define GL_DRAW_BUFFER15_ARB              0x8834\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs);\n#endif\n#endif /* GL_ARB_draw_buffers */\n\n#ifndef GL_ARB_draw_buffers_blend\n#define GL_ARB_draw_buffers_blend 1\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\ntypedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\nGLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\n#endif\n#endif /* GL_ARB_draw_buffers_blend */\n\n#ifndef GL_ARB_draw_elements_base_vertex\n#define GL_ARB_draw_elements_base_vertex 1\n#endif /* GL_ARB_draw_elements_base_vertex */\n\n#ifndef GL_ARB_draw_indirect\n#define GL_ARB_draw_indirect 1\n#endif /* GL_ARB_draw_indirect */\n\n#ifndef GL_ARB_draw_instanced\n#define GL_ARB_draw_instanced 1\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#endif\n#endif /* GL_ARB_draw_instanced */\n\n#ifndef GL_ARB_enhanced_layouts\n#define GL_ARB_enhanced_layouts 1\n#endif /* GL_ARB_enhanced_layouts */\n\n#ifndef GL_ARB_explicit_attrib_location\n#define GL_ARB_explicit_attrib_location 1\n#endif /* GL_ARB_explicit_attrib_location */\n\n#ifndef GL_ARB_explicit_uniform_location\n#define GL_ARB_explicit_uniform_location 1\n#endif /* GL_ARB_explicit_uniform_location */\n\n#ifndef GL_ARB_fragment_coord_conventions\n#define GL_ARB_fragment_coord_conventions 1\n#endif /* GL_ARB_fragment_coord_conventions */\n\n#ifndef GL_ARB_fragment_layer_viewport\n#define GL_ARB_fragment_layer_viewport 1\n#endif /* GL_ARB_fragment_layer_viewport */\n\n#ifndef GL_ARB_fragment_program\n#define GL_ARB_fragment_program 1\n#define GL_FRAGMENT_PROGRAM_ARB           0x8804\n#define GL_PROGRAM_FORMAT_ASCII_ARB       0x8875\n#define GL_PROGRAM_LENGTH_ARB             0x8627\n#define GL_PROGRAM_FORMAT_ARB             0x8876\n#define GL_PROGRAM_BINDING_ARB            0x8677\n#define GL_PROGRAM_INSTRUCTIONS_ARB       0x88A0\n#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB   0x88A1\n#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2\n#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3\n#define GL_PROGRAM_TEMPORARIES_ARB        0x88A4\n#define GL_MAX_PROGRAM_TEMPORARIES_ARB    0x88A5\n#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6\n#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7\n#define GL_PROGRAM_PARAMETERS_ARB         0x88A8\n#define GL_MAX_PROGRAM_PARAMETERS_ARB     0x88A9\n#define GL_PROGRAM_NATIVE_PARAMETERS_ARB  0x88AA\n#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB\n#define GL_PROGRAM_ATTRIBS_ARB            0x88AC\n#define GL_MAX_PROGRAM_ATTRIBS_ARB        0x88AD\n#define GL_PROGRAM_NATIVE_ATTRIBS_ARB     0x88AE\n#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF\n#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4\n#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5\n#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6\n#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB   0x8805\n#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB   0x8806\n#define GL_PROGRAM_TEX_INDIRECTIONS_ARB   0x8807\n#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808\n#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809\n#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A\n#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B\n#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C\n#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D\n#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E\n#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F\n#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810\n#define GL_PROGRAM_STRING_ARB             0x8628\n#define GL_PROGRAM_ERROR_POSITION_ARB     0x864B\n#define GL_CURRENT_MATRIX_ARB             0x8641\n#define GL_TRANSPOSE_CURRENT_MATRIX_ARB   0x88B7\n#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640\n#define GL_MAX_PROGRAM_MATRICES_ARB       0x862F\n#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E\n#define GL_MAX_TEXTURE_COORDS_ARB         0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB    0x8872\n#define GL_PROGRAM_ERROR_STRING_ARB       0x8874\n#define GL_MATRIX0_ARB                    0x88C0\n#define GL_MATRIX1_ARB                    0x88C1\n#define GL_MATRIX2_ARB                    0x88C2\n#define GL_MATRIX3_ARB                    0x88C3\n#define GL_MATRIX4_ARB                    0x88C4\n#define GL_MATRIX5_ARB                    0x88C5\n#define GL_MATRIX6_ARB                    0x88C6\n#define GL_MATRIX7_ARB                    0x88C7\n#define GL_MATRIX8_ARB                    0x88C8\n#define GL_MATRIX9_ARB                    0x88C9\n#define GL_MATRIX10_ARB                   0x88CA\n#define GL_MATRIX11_ARB                   0x88CB\n#define GL_MATRIX12_ARB                   0x88CC\n#define GL_MATRIX13_ARB                   0x88CD\n#define GL_MATRIX14_ARB                   0x88CE\n#define GL_MATRIX15_ARB                   0x88CF\n#define GL_MATRIX16_ARB                   0x88D0\n#define GL_MATRIX17_ARB                   0x88D1\n#define GL_MATRIX18_ARB                   0x88D2\n#define GL_MATRIX19_ARB                   0x88D3\n#define GL_MATRIX20_ARB                   0x88D4\n#define GL_MATRIX21_ARB                   0x88D5\n#define GL_MATRIX22_ARB                   0x88D6\n#define GL_MATRIX23_ARB                   0x88D7\n#define GL_MATRIX24_ARB                   0x88D8\n#define GL_MATRIX25_ARB                   0x88D9\n#define GL_MATRIX26_ARB                   0x88DA\n#define GL_MATRIX27_ARB                   0x88DB\n#define GL_MATRIX28_ARB                   0x88DC\n#define GL_MATRIX29_ARB                   0x88DD\n#define GL_MATRIX30_ARB                   0x88DE\n#define GL_MATRIX31_ARB                   0x88DF\ntypedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const void *string);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, void *string);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const void *string);\nGLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program);\nGLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, void *string);\nGLAPI GLboolean APIENTRY glIsProgramARB (GLuint program);\n#endif\n#endif /* GL_ARB_fragment_program */\n\n#ifndef GL_ARB_fragment_program_shadow\n#define GL_ARB_fragment_program_shadow 1\n#endif /* GL_ARB_fragment_program_shadow */\n\n#ifndef GL_ARB_fragment_shader\n#define GL_ARB_fragment_shader 1\n#define GL_FRAGMENT_SHADER_ARB            0x8B30\n#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B\n#endif /* GL_ARB_fragment_shader */\n\n#ifndef GL_ARB_framebuffer_no_attachments\n#define GL_ARB_framebuffer_no_attachments 1\n#endif /* GL_ARB_framebuffer_no_attachments */\n\n#ifndef GL_ARB_framebuffer_object\n#define GL_ARB_framebuffer_object 1\n#endif /* GL_ARB_framebuffer_object */\n\n#ifndef GL_ARB_framebuffer_sRGB\n#define GL_ARB_framebuffer_sRGB 1\n#endif /* GL_ARB_framebuffer_sRGB */\n\n#ifndef GL_KHR_context_flush_control\n#define GL_CONTEXT_RELEASE_BEHAVIOR       0x82FB\n#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC\n#endif /* GL_KHR_context_flush_control */\n\n#ifndef GL_ARB_geometry_shader4\n#define GL_ARB_geometry_shader4 1\n#define GL_LINES_ADJACENCY_ARB            0x000A\n#define GL_LINE_STRIP_ADJACENCY_ARB       0x000B\n#define GL_TRIANGLES_ADJACENCY_ARB        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_ARB   0x000D\n#define GL_PROGRAM_POINT_SIZE_ARB         0x8642\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9\n#define GL_GEOMETRY_SHADER_ARB            0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT_ARB      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_ARB        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_ARB       0x8DDC\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value);\nGLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n#endif /* GL_ARB_geometry_shader4 */\n\n#ifndef GL_ARB_get_program_binary\n#define GL_ARB_get_program_binary 1\n#endif /* GL_ARB_get_program_binary */\n\n#ifndef GL_ARB_gpu_shader5\n#define GL_ARB_gpu_shader5 1\n#endif /* GL_ARB_gpu_shader5 */\n\n#ifndef GL_ARB_gpu_shader_fp64\n#define GL_ARB_gpu_shader_fp64 1\n#endif /* GL_ARB_gpu_shader_fp64 */\n\n#ifndef GL_ARB_half_float_pixel\n#define GL_ARB_half_float_pixel 1\ntypedef unsigned short GLhalfARB;\n#define GL_HALF_FLOAT_ARB                 0x140B\n#endif /* GL_ARB_half_float_pixel */\n\n#ifndef GL_ARB_half_float_vertex\n#define GL_ARB_half_float_vertex 1\n#endif /* GL_ARB_half_float_vertex */\n\n#ifndef GL_ARB_imaging\n#define GL_ARB_imaging 1\n#define GL_BLEND_COLOR                    0x8005\n#define GL_BLEND_EQUATION                 0x8009\n#define GL_CONVOLUTION_1D                 0x8010\n#define GL_CONVOLUTION_2D                 0x8011\n#define GL_SEPARABLE_2D                   0x8012\n#define GL_CONVOLUTION_BORDER_MODE        0x8013\n#define GL_CONVOLUTION_FILTER_SCALE       0x8014\n#define GL_CONVOLUTION_FILTER_BIAS        0x8015\n#define GL_REDUCE                         0x8016\n#define GL_CONVOLUTION_FORMAT             0x8017\n#define GL_CONVOLUTION_WIDTH              0x8018\n#define GL_CONVOLUTION_HEIGHT             0x8019\n#define GL_MAX_CONVOLUTION_WIDTH          0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT         0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE     0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE   0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE    0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE   0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS      0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS    0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS     0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS    0x8023\n#define GL_HISTOGRAM                      0x8024\n#define GL_PROXY_HISTOGRAM                0x8025\n#define GL_HISTOGRAM_WIDTH                0x8026\n#define GL_HISTOGRAM_FORMAT               0x8027\n#define GL_HISTOGRAM_RED_SIZE             0x8028\n#define GL_HISTOGRAM_GREEN_SIZE           0x8029\n#define GL_HISTOGRAM_BLUE_SIZE            0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE           0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE       0x802C\n#define GL_HISTOGRAM_SINK                 0x802D\n#define GL_MINMAX                         0x802E\n#define GL_MINMAX_FORMAT                  0x802F\n#define GL_MINMAX_SINK                    0x8030\n#define GL_TABLE_TOO_LARGE                0x8031\n#define GL_COLOR_MATRIX                   0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH       0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH   0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE    0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE  0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE   0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE  0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS     0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS   0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS    0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS   0x80BB\n#define GL_COLOR_TABLE                    0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE   0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE  0x80D2\n#define GL_PROXY_COLOR_TABLE              0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5\n#define GL_COLOR_TABLE_SCALE              0x80D6\n#define GL_COLOR_TABLE_BIAS               0x80D7\n#define GL_COLOR_TABLE_FORMAT             0x80D8\n#define GL_COLOR_TABLE_WIDTH              0x80D9\n#define GL_COLOR_TABLE_RED_SIZE           0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE         0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE          0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE         0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE     0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE     0x80DF\n#define GL_CONSTANT_BORDER                0x8151\n#define GL_REPLICATE_BORDER               0x8153\n#define GL_CONVOLUTION_BORDER_COLOR       0x8154\ntypedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, void *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, void *table);\nGLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image);\nGLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\nGLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\nGLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogram (GLenum target);\nGLAPI void APIENTRY glResetMinmax (GLenum target);\n#endif\n#endif /* GL_ARB_imaging */\n\n#ifndef GL_ARB_indirect_parameters\n#define GL_ARB_indirect_parameters 1\n#define GL_PARAMETER_BUFFER_ARB           0x80EE\n#define GL_PARAMETER_BUFFER_BINDING_ARB   0x80EF\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);\n#endif\n#endif /* GL_ARB_indirect_parameters */\n\n#ifndef GL_ARB_instanced_arrays\n#define GL_ARB_instanced_arrays 1\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor);\n#endif\n#endif /* GL_ARB_instanced_arrays */\n\n#ifndef GL_ARB_internalformat_query\n#define GL_ARB_internalformat_query 1\n#endif /* GL_ARB_internalformat_query */\n\n#ifndef GL_ARB_internalformat_query2\n#define GL_ARB_internalformat_query2 1\n#define GL_SRGB_DECODE_ARB                0x8299\n#endif /* GL_ARB_internalformat_query2 */\n\n#ifndef GL_ARB_invalidate_subdata\n#define GL_ARB_invalidate_subdata 1\n#endif /* GL_ARB_invalidate_subdata */\n\n#ifndef GL_ARB_map_buffer_alignment\n#define GL_ARB_map_buffer_alignment 1\n#endif /* GL_ARB_map_buffer_alignment */\n\n#ifndef GL_ARB_map_buffer_range\n#define GL_ARB_map_buffer_range 1\n#endif /* GL_ARB_map_buffer_range */\n\n#ifndef GL_ARB_matrix_palette\n#define GL_ARB_matrix_palette 1\n#define GL_MATRIX_PALETTE_ARB             0x8840\n#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841\n#define GL_MAX_PALETTE_MATRICES_ARB       0x8842\n#define GL_CURRENT_PALETTE_MATRIX_ARB     0x8843\n#define GL_MATRIX_INDEX_ARRAY_ARB         0x8844\n#define GL_CURRENT_MATRIX_INDEX_ARB       0x8845\n#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB    0x8846\n#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB    0x8847\n#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB  0x8848\n#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849\ntypedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices);\ntypedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index);\nGLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices);\nGLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices);\nGLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices);\nGLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_ARB_matrix_palette */\n\n#ifndef GL_ARB_multi_bind\n#define GL_ARB_multi_bind 1\n#endif /* GL_ARB_multi_bind */\n\n#ifndef GL_ARB_multi_draw_indirect\n#define GL_ARB_multi_draw_indirect 1\n#endif /* GL_ARB_multi_draw_indirect */\n\n#ifndef GL_ARB_multisample\n#define GL_ARB_multisample 1\n#define GL_MULTISAMPLE_ARB                0x809D\n#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB   0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_ARB        0x809F\n#define GL_SAMPLE_COVERAGE_ARB            0x80A0\n#define GL_SAMPLE_BUFFERS_ARB             0x80A8\n#define GL_SAMPLES_ARB                    0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE_ARB      0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT_ARB     0x80AB\n#define GL_MULTISAMPLE_BIT_ARB            0x20000000\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLfloat value, GLboolean invert);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleCoverageARB (GLfloat value, GLboolean invert);\n#endif\n#endif /* GL_ARB_multisample */\n\n#ifndef GL_ARB_multitexture\n#define GL_ARB_multitexture 1\n#define GL_TEXTURE0_ARB                   0x84C0\n#define GL_TEXTURE1_ARB                   0x84C1\n#define GL_TEXTURE2_ARB                   0x84C2\n#define GL_TEXTURE3_ARB                   0x84C3\n#define GL_TEXTURE4_ARB                   0x84C4\n#define GL_TEXTURE5_ARB                   0x84C5\n#define GL_TEXTURE6_ARB                   0x84C6\n#define GL_TEXTURE7_ARB                   0x84C7\n#define GL_TEXTURE8_ARB                   0x84C8\n#define GL_TEXTURE9_ARB                   0x84C9\n#define GL_TEXTURE10_ARB                  0x84CA\n#define GL_TEXTURE11_ARB                  0x84CB\n#define GL_TEXTURE12_ARB                  0x84CC\n#define GL_TEXTURE13_ARB                  0x84CD\n#define GL_TEXTURE14_ARB                  0x84CE\n#define GL_TEXTURE15_ARB                  0x84CF\n#define GL_TEXTURE16_ARB                  0x84D0\n#define GL_TEXTURE17_ARB                  0x84D1\n#define GL_TEXTURE18_ARB                  0x84D2\n#define GL_TEXTURE19_ARB                  0x84D3\n#define GL_TEXTURE20_ARB                  0x84D4\n#define GL_TEXTURE21_ARB                  0x84D5\n#define GL_TEXTURE22_ARB                  0x84D6\n#define GL_TEXTURE23_ARB                  0x84D7\n#define GL_TEXTURE24_ARB                  0x84D8\n#define GL_TEXTURE25_ARB                  0x84D9\n#define GL_TEXTURE26_ARB                  0x84DA\n#define GL_TEXTURE27_ARB                  0x84DB\n#define GL_TEXTURE28_ARB                  0x84DC\n#define GL_TEXTURE29_ARB                  0x84DD\n#define GL_TEXTURE30_ARB                  0x84DE\n#define GL_TEXTURE31_ARB                  0x84DF\n#define GL_ACTIVE_TEXTURE_ARB             0x84E0\n#define GL_CLIENT_ACTIVE_TEXTURE_ARB      0x84E1\n#define GL_MAX_TEXTURE_UNITS_ARB          0x84E2\ntypedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glClientActiveTextureARB (GLenum texture);\nGLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s);\nGLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s);\nGLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s);\nGLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s);\nGLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t);\nGLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t);\nGLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t);\nGLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t);\nGLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r);\nGLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r);\nGLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r);\nGLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r);\nGLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v);\nGLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);\nGLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v);\nGLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);\nGLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v);\nGLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q);\nGLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v);\nGLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);\nGLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v);\n#endif\n#endif /* GL_ARB_multitexture */\n\n#ifndef GL_ARB_occlusion_query\n#define GL_ARB_occlusion_query 1\n#define GL_QUERY_COUNTER_BITS_ARB         0x8864\n#define GL_CURRENT_QUERY_ARB              0x8865\n#define GL_QUERY_RESULT_ARB               0x8866\n#define GL_QUERY_RESULT_AVAILABLE_ARB     0x8867\n#define GL_SAMPLES_PASSED_ARB             0x8914\ntypedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsQueryARB (GLuint id);\nGLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id);\nGLAPI void APIENTRY glEndQueryARB (GLenum target);\nGLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_ARB_occlusion_query */\n\n#ifndef GL_ARB_occlusion_query2\n#define GL_ARB_occlusion_query2 1\n#endif /* GL_ARB_occlusion_query2 */\n\n#ifndef GL_ARB_pixel_buffer_object\n#define GL_ARB_pixel_buffer_object 1\n#define GL_PIXEL_PACK_BUFFER_ARB          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_ARB        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_ARB  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF\n#endif /* GL_ARB_pixel_buffer_object */\n\n#ifndef GL_ARB_point_parameters\n#define GL_ARB_point_parameters 1\n#define GL_POINT_SIZE_MIN_ARB             0x8126\n#define GL_POINT_SIZE_MAX_ARB             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_ARB  0x8128\n#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_ARB_point_parameters */\n\n#ifndef GL_ARB_point_sprite\n#define GL_ARB_point_sprite 1\n#define GL_POINT_SPRITE_ARB               0x8861\n#define GL_COORD_REPLACE_ARB              0x8862\n#endif /* GL_ARB_point_sprite */\n\n#ifndef GL_ARB_program_interface_query\n#define GL_ARB_program_interface_query 1\n#endif /* GL_ARB_program_interface_query */\n\n#ifndef GL_ARB_provoking_vertex\n#define GL_ARB_provoking_vertex 1\n#endif /* GL_ARB_provoking_vertex */\n\n#ifndef GL_ARB_query_buffer_object\n#define GL_ARB_query_buffer_object 1\n#endif /* GL_ARB_query_buffer_object */\n\n#ifndef GL_ARB_robust_buffer_access_behavior\n#define GL_ARB_robust_buffer_access_behavior 1\n#endif /* GL_ARB_robust_buffer_access_behavior */\n\n#ifndef GL_ARB_robustness\n#define GL_ARB_robustness 1\n#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004\n#define GL_LOSE_CONTEXT_ON_RESET_ARB      0x8252\n#define GL_GUILTY_CONTEXT_RESET_ARB       0x8253\n#define GL_INNOCENT_CONTEXT_RESET_ARB     0x8254\n#define GL_UNKNOWN_CONTEXT_RESET_ARB      0x8255\n#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256\n#define GL_NO_RESET_NOTIFICATION_ARB      0x8261\ntypedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);\ntypedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);\ntypedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\ntypedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void *img);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\ntypedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values);\ntypedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values);\ntypedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern);\ntypedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);\ntypedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);\ntypedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);\ntypedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\ntypedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);\nGLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *img);\nGLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\nGLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, void *img);\nGLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\nGLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);\nGLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);\nGLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);\nGLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);\nGLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v);\nGLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v);\nGLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values);\nGLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values);\nGLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values);\nGLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern);\nGLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table);\nGLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image);\nGLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void *row, GLsizei columnBufSize, void *column, void *span);\nGLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\nGLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, void *values);\n#endif\n#endif /* GL_ARB_robustness */\n\n#ifndef GL_ARB_robustness_isolation\n#define GL_ARB_robustness_isolation 1\n#endif /* GL_ARB_robustness_isolation */\n\n#ifndef GL_ARB_sample_shading\n#define GL_ARB_sample_shading 1\n#define GL_SAMPLE_SHADING_ARB             0x8C36\n#define GL_MIN_SAMPLE_SHADING_VALUE_ARB   0x8C37\ntypedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);\n#endif\n#endif /* GL_ARB_sample_shading */\n\n#ifndef GL_ARB_sampler_objects\n#define GL_ARB_sampler_objects 1\n#endif /* GL_ARB_sampler_objects */\n\n#ifndef GL_ARB_seamless_cube_map\n#define GL_ARB_seamless_cube_map 1\n#endif /* GL_ARB_seamless_cube_map */\n\n#ifndef GL_ARB_seamless_cubemap_per_texture\n#define GL_ARB_seamless_cubemap_per_texture 1\n#endif /* GL_ARB_seamless_cubemap_per_texture */\n\n#ifndef GL_ARB_separate_shader_objects\n#define GL_ARB_separate_shader_objects 1\n#endif /* GL_ARB_separate_shader_objects */\n\n#ifndef GL_ARB_shader_atomic_counters\n#define GL_ARB_shader_atomic_counters 1\n#endif /* GL_ARB_shader_atomic_counters */\n\n#ifndef GL_ARB_shader_bit_encoding\n#define GL_ARB_shader_bit_encoding 1\n#endif /* GL_ARB_shader_bit_encoding */\n\n#ifndef GL_ARB_shader_draw_parameters\n#define GL_ARB_shader_draw_parameters 1\n#endif /* GL_ARB_shader_draw_parameters */\n\n#ifndef GL_ARB_shader_group_vote\n#define GL_ARB_shader_group_vote 1\n#endif /* GL_ARB_shader_group_vote */\n\n#ifndef GL_ARB_shader_image_load_store\n#define GL_ARB_shader_image_load_store 1\n#endif /* GL_ARB_shader_image_load_store */\n\n#ifndef GL_ARB_shader_image_size\n#define GL_ARB_shader_image_size 1\n#endif /* GL_ARB_shader_image_size */\n\n#ifndef GL_ARB_shader_objects\n#define GL_ARB_shader_objects 1\n#ifdef __APPLE__\ntypedef void *GLhandleARB;\n#else\ntypedef unsigned int GLhandleARB;\n#endif\ntypedef char GLcharARB;\n#define GL_PROGRAM_OBJECT_ARB             0x8B40\n#define GL_SHADER_OBJECT_ARB              0x8B48\n#define GL_OBJECT_TYPE_ARB                0x8B4E\n#define GL_OBJECT_SUBTYPE_ARB             0x8B4F\n#define GL_FLOAT_VEC2_ARB                 0x8B50\n#define GL_FLOAT_VEC3_ARB                 0x8B51\n#define GL_FLOAT_VEC4_ARB                 0x8B52\n#define GL_INT_VEC2_ARB                   0x8B53\n#define GL_INT_VEC3_ARB                   0x8B54\n#define GL_INT_VEC4_ARB                   0x8B55\n#define GL_BOOL_ARB                       0x8B56\n#define GL_BOOL_VEC2_ARB                  0x8B57\n#define GL_BOOL_VEC3_ARB                  0x8B58\n#define GL_BOOL_VEC4_ARB                  0x8B59\n#define GL_FLOAT_MAT2_ARB                 0x8B5A\n#define GL_FLOAT_MAT3_ARB                 0x8B5B\n#define GL_FLOAT_MAT4_ARB                 0x8B5C\n#define GL_SAMPLER_1D_ARB                 0x8B5D\n#define GL_SAMPLER_2D_ARB                 0x8B5E\n#define GL_SAMPLER_3D_ARB                 0x8B5F\n#define GL_SAMPLER_CUBE_ARB               0x8B60\n#define GL_SAMPLER_1D_SHADOW_ARB          0x8B61\n#define GL_SAMPLER_2D_SHADOW_ARB          0x8B62\n#define GL_SAMPLER_2D_RECT_ARB            0x8B63\n#define GL_SAMPLER_2D_RECT_SHADOW_ARB     0x8B64\n#define GL_OBJECT_DELETE_STATUS_ARB       0x8B80\n#define GL_OBJECT_COMPILE_STATUS_ARB      0x8B81\n#define GL_OBJECT_LINK_STATUS_ARB         0x8B82\n#define GL_OBJECT_VALIDATE_STATUS_ARB     0x8B83\n#define GL_OBJECT_INFO_LOG_LENGTH_ARB     0x8B84\n#define GL_OBJECT_ATTACHED_OBJECTS_ARB    0x8B85\n#define GL_OBJECT_ACTIVE_UNIFORMS_ARB     0x8B86\n#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87\n#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88\ntypedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);\ntypedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);\ntypedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);\ntypedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void);\ntypedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);\ntypedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);\ntypedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\ntypedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj);\nGLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname);\nGLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj);\nGLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);\nGLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);\nGLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj);\nGLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void);\nGLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj);\nGLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj);\nGLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj);\nGLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0);\nGLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0);\nGLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);\nGLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);\nGLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params);\nGLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params);\nGLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);\n#endif\n#endif /* GL_ARB_shader_objects */\n\n#ifndef GL_ARB_shader_precision\n#define GL_ARB_shader_precision 1\n#endif /* GL_ARB_shader_precision */\n\n#ifndef GL_ARB_shader_stencil_export\n#define GL_ARB_shader_stencil_export 1\n#endif /* GL_ARB_shader_stencil_export */\n\n#ifndef GL_ARB_shader_storage_buffer_object\n#define GL_ARB_shader_storage_buffer_object 1\n#endif /* GL_ARB_shader_storage_buffer_object */\n\n#ifndef GL_ARB_shader_subroutine\n#define GL_ARB_shader_subroutine 1\n#endif /* GL_ARB_shader_subroutine */\n\n#ifndef GL_ARB_shader_texture_lod\n#define GL_ARB_shader_texture_lod 1\n#endif /* GL_ARB_shader_texture_lod */\n\n#ifndef GL_ARB_shading_language_100\n#define GL_ARB_shading_language_100 1\n#define GL_SHADING_LANGUAGE_VERSION_ARB   0x8B8C\n#endif /* GL_ARB_shading_language_100 */\n\n#ifndef GL_ARB_shading_language_420pack\n#define GL_ARB_shading_language_420pack 1\n#endif /* GL_ARB_shading_language_420pack */\n\n#ifndef GL_ARB_shading_language_include\n#define GL_ARB_shading_language_include 1\n#define GL_SHADER_INCLUDE_ARB             0x8DAE\n#define GL_NAMED_STRING_LENGTH_ARB        0x8DE9\n#define GL_NAMED_STRING_TYPE_ARB          0x8DEA\ntypedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\ntypedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\ntypedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);\nGLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar *const*path, const GLint *length);\nGLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);\nGLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);\nGLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ARB_shading_language_include */\n\n#ifndef GL_ARB_shading_language_packing\n#define GL_ARB_shading_language_packing 1\n#endif /* GL_ARB_shading_language_packing */\n\n#ifndef GL_ARB_shadow\n#define GL_ARB_shadow 1\n#define GL_TEXTURE_COMPARE_MODE_ARB       0x884C\n#define GL_TEXTURE_COMPARE_FUNC_ARB       0x884D\n#define GL_COMPARE_R_TO_TEXTURE_ARB       0x884E\n#endif /* GL_ARB_shadow */\n\n#ifndef GL_ARB_shadow_ambient\n#define GL_ARB_shadow_ambient 1\n#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF\n#endif /* GL_ARB_shadow_ambient */\n\n#ifndef GL_ARB_sparse_texture\n#define GL_ARB_sparse_texture 1\n#define GL_TEXTURE_SPARSE_ARB             0x91A6\n#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB    0x91A7\n#define GL_MIN_SPARSE_LEVEL_ARB           0x919B\n#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB     0x91A8\n#define GL_VIRTUAL_PAGE_SIZE_X_ARB        0x9195\n#define GL_VIRTUAL_PAGE_SIZE_Y_ARB        0x9196\n#define GL_VIRTUAL_PAGE_SIZE_Z_ARB        0x9197\n#define GL_MAX_SPARSE_TEXTURE_SIZE_ARB    0x9198\n#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199\n#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A\n#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9\ntypedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\n#endif\n#endif /* GL_ARB_sparse_texture */\n\n#ifndef GL_ARB_stencil_texturing\n#define GL_ARB_stencil_texturing 1\n#endif /* GL_ARB_stencil_texturing */\n\n#ifndef GL_ARB_sync\n#define GL_ARB_sync 1\n#endif /* GL_ARB_sync */\n\n#ifndef GL_ARB_tessellation_shader\n#define GL_ARB_tessellation_shader 1\n#endif /* GL_ARB_tessellation_shader */\n\n#ifndef GL_ARB_texture_border_clamp\n#define GL_ARB_texture_border_clamp 1\n#define GL_CLAMP_TO_BORDER_ARB            0x812D\n#endif /* GL_ARB_texture_border_clamp */\n\n#ifndef GL_ARB_texture_buffer_object\n#define GL_ARB_texture_buffer_object 1\n#define GL_TEXTURE_BUFFER_ARB             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_ARB     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_ARB      0x8C2E\ntypedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n#endif /* GL_ARB_texture_buffer_object */\n\n#ifndef GL_ARB_texture_buffer_object_rgb32\n#define GL_ARB_texture_buffer_object_rgb32 1\n#endif /* GL_ARB_texture_buffer_object_rgb32 */\n\n#ifndef GL_ARB_texture_buffer_range\n#define GL_ARB_texture_buffer_range 1\n#endif /* GL_ARB_texture_buffer_range */\n\n#ifndef GL_ARB_texture_compression\n#define GL_ARB_texture_compression 1\n#define GL_COMPRESSED_ALPHA_ARB           0x84E9\n#define GL_COMPRESSED_LUMINANCE_ARB       0x84EA\n#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB\n#define GL_COMPRESSED_INTENSITY_ARB       0x84EC\n#define GL_COMPRESSED_RGB_ARB             0x84ED\n#define GL_COMPRESSED_RGBA_ARB            0x84EE\n#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF\n#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0\n#define GL_TEXTURE_COMPRESSED_ARB         0x86A1\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);\nGLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void *img);\n#endif\n#endif /* GL_ARB_texture_compression */\n\n#ifndef GL_ARB_texture_compression_bptc\n#define GL_ARB_texture_compression_bptc 1\n#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C\n#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D\n#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E\n#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F\n#endif /* GL_ARB_texture_compression_bptc */\n\n#ifndef GL_ARB_texture_compression_rgtc\n#define GL_ARB_texture_compression_rgtc 1\n#endif /* GL_ARB_texture_compression_rgtc */\n\n#ifndef GL_ARB_texture_cube_map\n#define GL_ARB_texture_cube_map 1\n#define GL_NORMAL_MAP_ARB                 0x8511\n#define GL_REFLECTION_MAP_ARB             0x8512\n#define GL_TEXTURE_CUBE_MAP_ARB           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARB   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARB     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB  0x851C\n#endif /* GL_ARB_texture_cube_map */\n\n#ifndef GL_ARB_texture_cube_map_array\n#define GL_ARB_texture_cube_map_array 1\n#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB     0x9009\n#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A\n#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B\n#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB     0x900C\n#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D\n#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F\n#endif /* GL_ARB_texture_cube_map_array */\n\n#ifndef GL_ARB_texture_env_add\n#define GL_ARB_texture_env_add 1\n#endif /* GL_ARB_texture_env_add */\n\n#ifndef GL_ARB_texture_env_combine\n#define GL_ARB_texture_env_combine 1\n#define GL_COMBINE_ARB                    0x8570\n#define GL_COMBINE_RGB_ARB                0x8571\n#define GL_COMBINE_ALPHA_ARB              0x8572\n#define GL_SOURCE0_RGB_ARB                0x8580\n#define GL_SOURCE1_RGB_ARB                0x8581\n#define GL_SOURCE2_RGB_ARB                0x8582\n#define GL_SOURCE0_ALPHA_ARB              0x8588\n#define GL_SOURCE1_ALPHA_ARB              0x8589\n#define GL_SOURCE2_ALPHA_ARB              0x858A\n#define GL_OPERAND0_RGB_ARB               0x8590\n#define GL_OPERAND1_RGB_ARB               0x8591\n#define GL_OPERAND2_RGB_ARB               0x8592\n#define GL_OPERAND0_ALPHA_ARB             0x8598\n#define GL_OPERAND1_ALPHA_ARB             0x8599\n#define GL_OPERAND2_ALPHA_ARB             0x859A\n#define GL_RGB_SCALE_ARB                  0x8573\n#define GL_ADD_SIGNED_ARB                 0x8574\n#define GL_INTERPOLATE_ARB                0x8575\n#define GL_SUBTRACT_ARB                   0x84E7\n#define GL_CONSTANT_ARB                   0x8576\n#define GL_PRIMARY_COLOR_ARB              0x8577\n#define GL_PREVIOUS_ARB                   0x8578\n#endif /* GL_ARB_texture_env_combine */\n\n#ifndef GL_ARB_texture_env_crossbar\n#define GL_ARB_texture_env_crossbar 1\n#endif /* GL_ARB_texture_env_crossbar */\n\n#ifndef GL_ARB_texture_env_dot3\n#define GL_ARB_texture_env_dot3 1\n#define GL_DOT3_RGB_ARB                   0x86AE\n#define GL_DOT3_RGBA_ARB                  0x86AF\n#endif /* GL_ARB_texture_env_dot3 */\n\n#ifndef GL_ARB_texture_float\n#define GL_ARB_texture_float 1\n#define GL_TEXTURE_RED_TYPE_ARB           0x8C10\n#define GL_TEXTURE_GREEN_TYPE_ARB         0x8C11\n#define GL_TEXTURE_BLUE_TYPE_ARB          0x8C12\n#define GL_TEXTURE_ALPHA_TYPE_ARB         0x8C13\n#define GL_TEXTURE_LUMINANCE_TYPE_ARB     0x8C14\n#define GL_TEXTURE_INTENSITY_TYPE_ARB     0x8C15\n#define GL_TEXTURE_DEPTH_TYPE_ARB         0x8C16\n#define GL_UNSIGNED_NORMALIZED_ARB        0x8C17\n#define GL_RGBA32F_ARB                    0x8814\n#define GL_RGB32F_ARB                     0x8815\n#define GL_ALPHA32F_ARB                   0x8816\n#define GL_INTENSITY32F_ARB               0x8817\n#define GL_LUMINANCE32F_ARB               0x8818\n#define GL_LUMINANCE_ALPHA32F_ARB         0x8819\n#define GL_RGBA16F_ARB                    0x881A\n#define GL_RGB16F_ARB                     0x881B\n#define GL_ALPHA16F_ARB                   0x881C\n#define GL_INTENSITY16F_ARB               0x881D\n#define GL_LUMINANCE16F_ARB               0x881E\n#define GL_LUMINANCE_ALPHA16F_ARB         0x881F\n#endif /* GL_ARB_texture_float */\n\n#ifndef GL_ARB_texture_gather\n#define GL_ARB_texture_gather 1\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F\n#endif /* GL_ARB_texture_gather */\n\n#ifndef GL_ARB_texture_mirror_clamp_to_edge\n#define GL_ARB_texture_mirror_clamp_to_edge 1\n#endif /* GL_ARB_texture_mirror_clamp_to_edge */\n\n#ifndef GL_ARB_texture_mirrored_repeat\n#define GL_ARB_texture_mirrored_repeat 1\n#define GL_MIRRORED_REPEAT_ARB            0x8370\n#endif /* GL_ARB_texture_mirrored_repeat */\n\n#ifndef GL_ARB_texture_multisample\n#define GL_ARB_texture_multisample 1\n#endif /* GL_ARB_texture_multisample */\n\n#ifndef GL_ARB_texture_non_power_of_two\n#define GL_ARB_texture_non_power_of_two 1\n#endif /* GL_ARB_texture_non_power_of_two */\n\n#ifndef GL_ARB_texture_query_levels\n#define GL_ARB_texture_query_levels 1\n#endif /* GL_ARB_texture_query_levels */\n\n#ifndef GL_ARB_texture_query_lod\n#define GL_ARB_texture_query_lod 1\n#endif /* GL_ARB_texture_query_lod */\n\n#ifndef GL_ARB_texture_rectangle\n#define GL_ARB_texture_rectangle 1\n#define GL_TEXTURE_RECTANGLE_ARB          0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_ARB  0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_ARB    0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8\n#endif /* GL_ARB_texture_rectangle */\n\n#ifndef GL_ARB_texture_rg\n#define GL_ARB_texture_rg 1\n#endif /* GL_ARB_texture_rg */\n\n#ifndef GL_ARB_texture_rgb10_a2ui\n#define GL_ARB_texture_rgb10_a2ui 1\n#endif /* GL_ARB_texture_rgb10_a2ui */\n\n#ifndef GL_ARB_texture_stencil8\n#define GL_ARB_texture_stencil8 1\n#endif /* GL_ARB_texture_stencil8 */\n\n#ifndef GL_ARB_texture_storage\n#define GL_ARB_texture_storage 1\n#endif /* GL_ARB_texture_storage */\n\n#ifndef GL_ARB_texture_storage_multisample\n#define GL_ARB_texture_storage_multisample 1\n#endif /* GL_ARB_texture_storage_multisample */\n\n#ifndef GL_ARB_texture_swizzle\n#define GL_ARB_texture_swizzle 1\n#endif /* GL_ARB_texture_swizzle */\n\n#ifndef GL_ARB_texture_view\n#define GL_ARB_texture_view 1\n#endif /* GL_ARB_texture_view */\n\n#ifndef GL_ARB_timer_query\n#define GL_ARB_timer_query 1\n#endif /* GL_ARB_timer_query */\n\n#ifndef GL_ARB_transform_feedback2\n#define GL_ARB_transform_feedback2 1\n#define GL_TRANSFORM_FEEDBACK_PAUSED      0x8E23\n#define GL_TRANSFORM_FEEDBACK_ACTIVE      0x8E24\n#endif /* GL_ARB_transform_feedback2 */\n\n#ifndef GL_ARB_transform_feedback3\n#define GL_ARB_transform_feedback3 1\n#endif /* GL_ARB_transform_feedback3 */\n\n#ifndef GL_ARB_transform_feedback_instanced\n#define GL_ARB_transform_feedback_instanced 1\n#endif /* GL_ARB_transform_feedback_instanced */\n\n#ifndef GL_ARB_transpose_matrix\n#define GL_ARB_transpose_matrix 1\n#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3\n#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4\n#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB   0x84E5\n#define GL_TRANSPOSE_COLOR_MATRIX_ARB     0x84E6\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m);\nGLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m);\nGLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m);\n#endif\n#endif /* GL_ARB_transpose_matrix */\n\n#ifndef GL_ARB_uniform_buffer_object\n#define GL_ARB_uniform_buffer_object 1\n#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS    0x8A2C\n#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32\n#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45\n#endif /* GL_ARB_uniform_buffer_object */\n\n#ifndef GL_ARB_vertex_array_bgra\n#define GL_ARB_vertex_array_bgra 1\n#endif /* GL_ARB_vertex_array_bgra */\n\n#ifndef GL_ARB_vertex_array_object\n#define GL_ARB_vertex_array_object 1\n#endif /* GL_ARB_vertex_array_object */\n\n#ifndef GL_ARB_vertex_attrib_64bit\n#define GL_ARB_vertex_attrib_64bit 1\n#endif /* GL_ARB_vertex_attrib_64bit */\n\n#ifndef GL_ARB_vertex_attrib_binding\n#define GL_ARB_vertex_attrib_binding 1\n#endif /* GL_ARB_vertex_attrib_binding */\n\n#ifndef GL_ARB_vertex_blend\n#define GL_ARB_vertex_blend 1\n#define GL_MAX_VERTEX_UNITS_ARB           0x86A4\n#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5\n#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6\n#define GL_VERTEX_BLEND_ARB               0x86A7\n#define GL_CURRENT_WEIGHT_ARB             0x86A8\n#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9\n#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA\n#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB\n#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC\n#define GL_WEIGHT_ARRAY_ARB               0x86AD\n#define GL_MODELVIEW0_ARB                 0x1700\n#define GL_MODELVIEW1_ARB                 0x850A\n#define GL_MODELVIEW2_ARB                 0x8722\n#define GL_MODELVIEW3_ARB                 0x8723\n#define GL_MODELVIEW4_ARB                 0x8724\n#define GL_MODELVIEW5_ARB                 0x8725\n#define GL_MODELVIEW6_ARB                 0x8726\n#define GL_MODELVIEW7_ARB                 0x8727\n#define GL_MODELVIEW8_ARB                 0x8728\n#define GL_MODELVIEW9_ARB                 0x8729\n#define GL_MODELVIEW10_ARB                0x872A\n#define GL_MODELVIEW11_ARB                0x872B\n#define GL_MODELVIEW12_ARB                0x872C\n#define GL_MODELVIEW13_ARB                0x872D\n#define GL_MODELVIEW14_ARB                0x872E\n#define GL_MODELVIEW15_ARB                0x872F\n#define GL_MODELVIEW16_ARB                0x8730\n#define GL_MODELVIEW17_ARB                0x8731\n#define GL_MODELVIEW18_ARB                0x8732\n#define GL_MODELVIEW19_ARB                0x8733\n#define GL_MODELVIEW20_ARB                0x8734\n#define GL_MODELVIEW21_ARB                0x8735\n#define GL_MODELVIEW22_ARB                0x8736\n#define GL_MODELVIEW23_ARB                0x8737\n#define GL_MODELVIEW24_ARB                0x8738\n#define GL_MODELVIEW25_ARB                0x8739\n#define GL_MODELVIEW26_ARB                0x873A\n#define GL_MODELVIEW27_ARB                0x873B\n#define GL_MODELVIEW28_ARB                0x873C\n#define GL_MODELVIEW29_ARB                0x873D\n#define GL_MODELVIEW30_ARB                0x873E\n#define GL_MODELVIEW31_ARB                0x873F\ntypedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights);\ntypedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights);\nGLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights);\nGLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights);\nGLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights);\nGLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights);\nGLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights);\nGLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights);\nGLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights);\nGLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glVertexBlendARB (GLint count);\n#endif\n#endif /* GL_ARB_vertex_blend */\n\n#ifndef GL_ARB_vertex_buffer_object\n#define GL_ARB_vertex_buffer_object 1\n#ifdef __MACOSX__ /* The OS X headers haven't caught up with Khronos yet */\ntypedef long GLsizeiptrARB;\ntypedef long GLintptrARB;\n#else\ntypedef ptrdiff_t GLsizeiptrARB;\ntypedef ptrdiff_t GLintptrARB;\n#endif\n#define GL_BUFFER_SIZE_ARB                0x8764\n#define GL_BUFFER_USAGE_ARB               0x8765\n#define GL_ARRAY_BUFFER_ARB               0x8892\n#define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893\n#define GL_ARRAY_BUFFER_BINDING_ARB       0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895\n#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896\n#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897\n#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898\n#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899\n#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A\n#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B\n#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C\n#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D\n#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F\n#define GL_READ_ONLY_ARB                  0x88B8\n#define GL_WRITE_ONLY_ARB                 0x88B9\n#define GL_READ_WRITE_ARB                 0x88BA\n#define GL_BUFFER_ACCESS_ARB              0x88BB\n#define GL_BUFFER_MAPPED_ARB              0x88BC\n#define GL_BUFFER_MAP_POINTER_ARB         0x88BD\n#define GL_STREAM_DRAW_ARB                0x88E0\n#define GL_STREAM_READ_ARB                0x88E1\n#define GL_STREAM_COPY_ARB                0x88E2\n#define GL_STATIC_DRAW_ARB                0x88E4\n#define GL_STATIC_READ_ARB                0x88E5\n#define GL_STATIC_COPY_ARB                0x88E6\n#define GL_DYNAMIC_DRAW_ARB               0x88E8\n#define GL_DYNAMIC_READ_ARB               0x88E9\n#define GL_DYNAMIC_COPY_ARB               0x88EA\ntypedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);\ntypedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);\ntypedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);\ntypedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);\ntypedef void *(APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer);\nGLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers);\nGLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers);\nGLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer);\nGLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const void *data, GLenum usage);\nGLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const void *data);\nGLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, void *data);\nGLAPI void *APIENTRY glMapBufferARB (GLenum target, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target);\nGLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_ARB_vertex_buffer_object */\n\n#ifndef GL_ARB_vertex_program\n#define GL_ARB_vertex_program 1\n#define GL_COLOR_SUM_ARB                  0x8458\n#define GL_VERTEX_PROGRAM_ARB             0x8620\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB   0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB   0x8625\n#define GL_CURRENT_VERTEX_ATTRIB_ARB      0x8626\n#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB  0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB    0x8643\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645\n#define GL_MAX_VERTEX_ATTRIBS_ARB         0x8869\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A\n#define GL_PROGRAM_ADDRESS_REGISTERS_ARB  0x88B0\n#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1\n#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2\n#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index);\nGLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, void **pointer);\n#endif\n#endif /* GL_ARB_vertex_program */\n\n#ifndef GL_ARB_vertex_shader\n#define GL_ARB_vertex_shader 1\n#define GL_VERTEX_SHADER_ARB              0x8B31\n#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A\n#define GL_MAX_VARYING_FLOATS_ARB         0x8B4B\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D\n#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB   0x8B89\n#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A\ntypedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\ntypedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name);\nGLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);\nGLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name);\n#endif\n#endif /* GL_ARB_vertex_shader */\n\n#ifndef GL_ARB_vertex_type_10f_11f_11f_rev\n#define GL_ARB_vertex_type_10f_11f_11f_rev 1\n#endif /* GL_ARB_vertex_type_10f_11f_11f_rev */\n\n#ifndef GL_ARB_vertex_type_2_10_10_10_rev\n#define GL_ARB_vertex_type_2_10_10_10_rev 1\n#endif /* GL_ARB_vertex_type_2_10_10_10_rev */\n\n#ifndef GL_ARB_viewport_array\n#define GL_ARB_viewport_array 1\n#endif /* GL_ARB_viewport_array */\n\n#ifndef GL_ARB_window_pos\n#define GL_ARB_window_pos 1\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svARB (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivARB (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svARB (const GLshort *v);\n#endif\n#endif /* GL_ARB_window_pos */\n\n#ifndef GL_KHR_debug\n#define GL_KHR_debug 1\n#endif /* GL_KHR_debug */\n\n#ifndef GL_KHR_texture_compression_astc_hdr\n#define GL_KHR_texture_compression_astc_hdr 1\n#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0\n#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1\n#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2\n#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3\n#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4\n#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5\n#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6\n#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7\n#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8\n#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9\n#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA\n#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB\n#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC\n#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD\n#endif /* GL_KHR_texture_compression_astc_hdr */\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_KHR_texture_compression_astc_ldr 1\n#endif /* GL_KHR_texture_compression_astc_ldr */\n\n#ifndef GL_OES_byte_coordinates\n#define GL_OES_byte_coordinates 1\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BOESPROC) (GLenum texture, GLbyte s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BOESPROC) (GLenum texture, GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BOESPROC) (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4BVOESPROC) (GLenum texture, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BOESPROC) (GLbyte s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BOESPROC) (GLbyte s, GLbyte t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BOESPROC) (GLbyte s, GLbyte t, GLbyte r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BOESPROC) (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX2BOESPROC) (GLbyte x);\ntypedef void (APIENTRYP PFNGLVERTEX2BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3BOESPROC) (GLbyte x, GLbyte y);\ntypedef void (APIENTRYP PFNGLVERTEX3BVOESPROC) (const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4BOESPROC) (GLbyte x, GLbyte y, GLbyte z);\ntypedef void (APIENTRYP PFNGLVERTEX4BVOESPROC) (const GLbyte *coords);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiTexCoord1bOES (GLenum texture, GLbyte s);\nGLAPI void APIENTRY glMultiTexCoord1bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord2bOES (GLenum texture, GLbyte s, GLbyte t);\nGLAPI void APIENTRY glMultiTexCoord2bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord3bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glMultiTexCoord3bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glMultiTexCoord4bOES (GLenum texture, GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glMultiTexCoord4bvOES (GLenum texture, const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord1bOES (GLbyte s);\nGLAPI void APIENTRY glTexCoord1bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord2bOES (GLbyte s, GLbyte t);\nGLAPI void APIENTRY glTexCoord2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord3bOES (GLbyte s, GLbyte t, GLbyte r);\nGLAPI void APIENTRY glTexCoord3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glTexCoord4bOES (GLbyte s, GLbyte t, GLbyte r, GLbyte q);\nGLAPI void APIENTRY glTexCoord4bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex2bOES (GLbyte x);\nGLAPI void APIENTRY glVertex2bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex3bOES (GLbyte x, GLbyte y);\nGLAPI void APIENTRY glVertex3bvOES (const GLbyte *coords);\nGLAPI void APIENTRY glVertex4bOES (GLbyte x, GLbyte y, GLbyte z);\nGLAPI void APIENTRY glVertex4bvOES (const GLbyte *coords);\n#endif\n#endif /* GL_OES_byte_coordinates */\n\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_OES_compressed_paletted_texture 1\n#define GL_PALETTE4_RGB8_OES              0x8B90\n#define GL_PALETTE4_RGBA8_OES             0x8B91\n#define GL_PALETTE4_R5_G6_B5_OES          0x8B92\n#define GL_PALETTE4_RGBA4_OES             0x8B93\n#define GL_PALETTE4_RGB5_A1_OES           0x8B94\n#define GL_PALETTE8_RGB8_OES              0x8B95\n#define GL_PALETTE8_RGBA8_OES             0x8B96\n#define GL_PALETTE8_R5_G6_B5_OES          0x8B97\n#define GL_PALETTE8_RGBA4_OES             0x8B98\n#define GL_PALETTE8_RGB5_A1_OES           0x8B99\n#endif /* GL_OES_compressed_paletted_texture */\n\n#ifndef GL_OES_fixed_point\n#define GL_OES_fixed_point 1\ntypedef GLint GLfixed;\n#define GL_FIXED_OES                      0x140C\ntypedef void (APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref);\ntypedef void (APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth);\ntypedef void (APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation);\ntypedef void (APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation);\ntypedef void (APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width);\ntypedef void (APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param);\ntypedef void (APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz);\ntypedef void (APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size);\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units);\ntypedef void (APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLSAMPLECOVERAGEOESPROC) (GLfixed value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLACCUMXOESPROC) (GLenum op, GLfixed value);\ntypedef void (APIENTRYP PFNGLBITMAPXOESPROC) (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\ntypedef void (APIENTRYP PFNGLBLENDCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCLEARACCUMXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\ntypedef void (APIENTRYP PFNGLCOLOR3XOESPROC) (GLfixed red, GLfixed green, GLfixed blue);\ntypedef void (APIENTRYP PFNGLCOLOR3XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCOLOR4XVOESPROC) (const GLfixed *components);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XOESPROC) (GLfixed u);\ntypedef void (APIENTRYP PFNGLEVALCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XOESPROC) (GLfixed u, GLfixed v);\ntypedef void (APIENTRYP PFNGLEVALCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLFEEDBACKBUFFERXOESPROC) (GLsizei n, GLenum type, const GLfixed *buffer);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETMAPXVOESPROC) (GLenum target, GLenum query, GLfixed *v);\ntypedef void (APIENTRYP PFNGLGETMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLGETPIXELMAPXVPROC) (GLenum map, GLint size, GLfixed *values);\ntypedef void (APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERXVOESPROC) (GLenum target, GLint level, GLenum pname, GLfixed *params);\ntypedef void (APIENTRYP PFNGLINDEXXOESPROC) (GLfixed component);\ntypedef void (APIENTRYP PFNGLINDEXXVOESPROC) (const GLfixed *component);\ntypedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMAP1XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAP2XOESPROC) (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\ntypedef void (APIENTRYP PFNGLMAPGRID1XOESPROC) (GLint n, GLfixed u1, GLfixed u2);\ntypedef void (APIENTRYP PFNGLMAPGRID2XOESPROC) (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\ntypedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXXOESPROC) (const GLfixed *m);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XOESPROC) (GLenum texture, GLfixed s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XOESPROC) (GLenum texture, GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4XVOESPROC) (GLenum texture, const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLNORMAL3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLPASSTHROUGHXOESPROC) (GLfixed token);\ntypedef void (APIENTRYP PFNGLPIXELMAPXPROC) (GLenum map, GLint size, const GLfixed *values);\ntypedef void (APIENTRYP PFNGLPIXELSTOREXPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFERXOESPROC) (GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLPIXELZOOMXOESPROC) (GLfixed xfactor, GLfixed yfactor);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESXOESPROC) (GLsizei n, const GLuint *textures, const GLfixed *priorities);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLRASTERPOS2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLRASTERPOS3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\ntypedef void (APIENTRYP PFNGLRASTERPOS4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLRECTXOESPROC) (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\ntypedef void (APIENTRYP PFNGLRECTXVOESPROC) (const GLfixed *v1, const GLfixed *v2);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XOESPROC) (GLfixed s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XOESPROC) (GLfixed s, GLfixed t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XOESPROC) (GLfixed s, GLfixed t, GLfixed r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XOESPROC) (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param);\ntypedef void (APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params);\ntypedef void (APIENTRYP PFNGLVERTEX2XOESPROC) (GLfixed x);\ntypedef void (APIENTRYP PFNGLVERTEX2XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX3XOESPROC) (GLfixed x, GLfixed y);\ntypedef void (APIENTRYP PFNGLVERTEX3XVOESPROC) (const GLfixed *coords);\ntypedef void (APIENTRYP PFNGLVERTEX4XOESPROC) (GLfixed x, GLfixed y, GLfixed z);\ntypedef void (APIENTRYP PFNGLVERTEX4XVOESPROC) (const GLfixed *coords);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref);\nGLAPI void APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearDepthxOES (GLfixed depth);\nGLAPI void APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation);\nGLAPI void APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glDepthRangexOES (GLfixed n, GLfixed f);\nGLAPI void APIENTRY glFogxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glFogxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation);\nGLAPI void APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glLightModelxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glLineWidthxOES (GLfixed width);\nGLAPI void APIENTRY glLoadMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param);\nGLAPI void APIENTRY glMultMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz);\nGLAPI void APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);\nGLAPI void APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glPointSizexOES (GLfixed size);\nGLAPI void APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units);\nGLAPI void APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glSampleCoverageOES (GLfixed value, GLboolean invert);\nGLAPI void APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glAccumxOES (GLenum op, GLfixed value);\nGLAPI void APIENTRY glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig, GLfixed xmove, GLfixed ymove, const GLubyte *bitmap);\nGLAPI void APIENTRY glBlendColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);\nGLAPI void APIENTRY glColor3xOES (GLfixed red, GLfixed green, GLfixed blue);\nGLAPI void APIENTRY glColor3xvOES (const GLfixed *components);\nGLAPI void APIENTRY glColor4xvOES (const GLfixed *components);\nGLAPI void APIENTRY glConvolutionParameterxOES (GLenum target, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glConvolutionParameterxvOES (GLenum target, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glEvalCoord1xOES (GLfixed u);\nGLAPI void APIENTRY glEvalCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glEvalCoord2xOES (GLfixed u, GLfixed v);\nGLAPI void APIENTRY glEvalCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glFeedbackBufferxOES (GLsizei n, GLenum type, const GLfixed *buffer);\nGLAPI void APIENTRY glGetConvolutionParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetHistogramParameterxvOES (GLenum target, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetLightxOES (GLenum light, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetMapxvOES (GLenum target, GLenum query, GLfixed *v);\nGLAPI void APIENTRY glGetMaterialxOES (GLenum face, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glGetPixelMapxv (GLenum map, GLint size, GLfixed *values);\nGLAPI void APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glGetTexLevelParameterxvOES (GLenum target, GLint level, GLenum pname, GLfixed *params);\nGLAPI void APIENTRY glIndexxOES (GLfixed component);\nGLAPI void APIENTRY glIndexxvOES (const GLfixed *component);\nGLAPI void APIENTRY glLoadTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMap1xOES (GLenum target, GLfixed u1, GLfixed u2, GLint stride, GLint order, GLfixed points);\nGLAPI void APIENTRY glMap2xOES (GLenum target, GLfixed u1, GLfixed u2, GLint ustride, GLint uorder, GLfixed v1, GLfixed v2, GLint vstride, GLint vorder, GLfixed points);\nGLAPI void APIENTRY glMapGrid1xOES (GLint n, GLfixed u1, GLfixed u2);\nGLAPI void APIENTRY glMapGrid2xOES (GLint n, GLfixed u1, GLfixed u2, GLfixed v1, GLfixed v2);\nGLAPI void APIENTRY glMultTransposeMatrixxOES (const GLfixed *m);\nGLAPI void APIENTRY glMultiTexCoord1xOES (GLenum texture, GLfixed s);\nGLAPI void APIENTRY glMultiTexCoord1xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord2xOES (GLenum texture, GLfixed s, GLfixed t);\nGLAPI void APIENTRY glMultiTexCoord2xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord3xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glMultiTexCoord3xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glMultiTexCoord4xvOES (GLenum texture, const GLfixed *coords);\nGLAPI void APIENTRY glNormal3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glPassThroughxOES (GLfixed token);\nGLAPI void APIENTRY glPixelMapx (GLenum map, GLint size, const GLfixed *values);\nGLAPI void APIENTRY glPixelStorex (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelTransferxOES (GLenum pname, GLfixed param);\nGLAPI void APIENTRY glPixelZoomxOES (GLfixed xfactor, GLfixed yfactor);\nGLAPI void APIENTRY glPrioritizeTexturesxOES (GLsizei n, const GLuint *textures, const GLfixed *priorities);\nGLAPI void APIENTRY glRasterPos2xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glRasterPos2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos3xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glRasterPos3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRasterPos4xOES (GLfixed x, GLfixed y, GLfixed z, GLfixed w);\nGLAPI void APIENTRY glRasterPos4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glRectxOES (GLfixed x1, GLfixed y1, GLfixed x2, GLfixed y2);\nGLAPI void APIENTRY glRectxvOES (const GLfixed *v1, const GLfixed *v2);\nGLAPI void APIENTRY glTexCoord1xOES (GLfixed s);\nGLAPI void APIENTRY glTexCoord1xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord2xOES (GLfixed s, GLfixed t);\nGLAPI void APIENTRY glTexCoord2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord3xOES (GLfixed s, GLfixed t, GLfixed r);\nGLAPI void APIENTRY glTexCoord3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexCoord4xOES (GLfixed s, GLfixed t, GLfixed r, GLfixed q);\nGLAPI void APIENTRY glTexCoord4xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param);\nGLAPI void APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params);\nGLAPI void APIENTRY glVertex2xOES (GLfixed x);\nGLAPI void APIENTRY glVertex2xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex3xOES (GLfixed x, GLfixed y);\nGLAPI void APIENTRY glVertex3xvOES (const GLfixed *coords);\nGLAPI void APIENTRY glVertex4xOES (GLfixed x, GLfixed y, GLfixed z);\nGLAPI void APIENTRY glVertex4xvOES (const GLfixed *coords);\n#endif\n#endif /* GL_OES_fixed_point */\n\n#ifndef GL_OES_query_matrix\n#define GL_OES_query_matrix 1\ntypedef GLbitfield (APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLbitfield APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent);\n#endif\n#endif /* GL_OES_query_matrix */\n\n#ifndef GL_OES_read_format\n#define GL_OES_read_format 1\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B\n#endif /* GL_OES_read_format */\n\n#ifndef GL_OES_single_precision\n#define GL_OES_single_precision 1\ntypedef void (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth);\ntypedef void (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation);\ntypedef void (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f);\ntypedef void (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\ntypedef void (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation);\ntypedef void (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glClearDepthfOES (GLclampf depth);\nGLAPI void APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation);\nGLAPI void APIENTRY glDepthRangefOES (GLclampf n, GLclampf f);\nGLAPI void APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\nGLAPI void APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation);\nGLAPI void APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f);\n#endif\n#endif /* GL_OES_single_precision */\n\n#ifndef GL_3DFX_multisample\n#define GL_3DFX_multisample 1\n#define GL_MULTISAMPLE_3DFX               0x86B2\n#define GL_SAMPLE_BUFFERS_3DFX            0x86B3\n#define GL_SAMPLES_3DFX                   0x86B4\n#define GL_MULTISAMPLE_BIT_3DFX           0x20000000\n#endif /* GL_3DFX_multisample */\n\n#ifndef GL_3DFX_tbuffer\n#define GL_3DFX_tbuffer 1\ntypedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTbufferMask3DFX (GLuint mask);\n#endif\n#endif /* GL_3DFX_tbuffer */\n\n#ifndef GL_3DFX_texture_compression_FXT1\n#define GL_3DFX_texture_compression_FXT1 1\n#define GL_COMPRESSED_RGB_FXT1_3DFX       0x86B0\n#define GL_COMPRESSED_RGBA_FXT1_3DFX      0x86B1\n#endif /* GL_3DFX_texture_compression_FXT1 */\n\n#ifndef GL_AMD_blend_minmax_factor\n#define GL_AMD_blend_minmax_factor 1\n#define GL_FACTOR_MIN_AMD                 0x901C\n#define GL_FACTOR_MAX_AMD                 0x901D\n#endif /* GL_AMD_blend_minmax_factor */\n\n#ifndef GL_AMD_conservative_depth\n#define GL_AMD_conservative_depth 1\n#endif /* GL_AMD_conservative_depth */\n\n#ifndef GL_AMD_debug_output\n#define GL_AMD_debug_output 1\ntypedef void (APIENTRY  *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_AMD   0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD  0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_AMD      0x9145\n#define GL_DEBUG_SEVERITY_HIGH_AMD        0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_AMD      0x9147\n#define GL_DEBUG_SEVERITY_LOW_AMD         0x9148\n#define GL_DEBUG_CATEGORY_API_ERROR_AMD   0x9149\n#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A\n#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B\n#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C\n#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D\n#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E\n#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F\n#define GL_DEBUG_CATEGORY_OTHER_AMD       0x9150\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\ntypedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);\ntypedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);\nGLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);\nGLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);\n#endif\n#endif /* GL_AMD_debug_output */\n\n#ifndef GL_AMD_depth_clamp_separate\n#define GL_AMD_depth_clamp_separate 1\n#define GL_DEPTH_CLAMP_NEAR_AMD           0x901E\n#define GL_DEPTH_CLAMP_FAR_AMD            0x901F\n#endif /* GL_AMD_depth_clamp_separate */\n\n#ifndef GL_AMD_draw_buffers_blend\n#define GL_AMD_draw_buffers_blend 1\ntypedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst);\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode);\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst);\nGLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode);\nGLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\n#endif\n#endif /* GL_AMD_draw_buffers_blend */\n\n#ifndef GL_AMD_gcn_shader\n#define GL_AMD_gcn_shader 1\n#endif /* GL_AMD_gcn_shader */\n\n#ifndef GL_AMD_gpu_shader_int64\n#define GL_AMD_gpu_shader_int64 1\ntypedef int64_t GLint64EXT;\n#define GL_INT64_NV                       0x140E\n#define GL_UNSIGNED_INT64_NV              0x140F\n#define GL_INT8_NV                        0x8FE0\n#define GL_INT8_VEC2_NV                   0x8FE1\n#define GL_INT8_VEC3_NV                   0x8FE2\n#define GL_INT8_VEC4_NV                   0x8FE3\n#define GL_INT16_NV                       0x8FE4\n#define GL_INT16_VEC2_NV                  0x8FE5\n#define GL_INT16_VEC3_NV                  0x8FE6\n#define GL_INT16_VEC4_NV                  0x8FE7\n#define GL_INT64_VEC2_NV                  0x8FE9\n#define GL_INT64_VEC3_NV                  0x8FEA\n#define GL_INT64_VEC4_NV                  0x8FEB\n#define GL_UNSIGNED_INT8_NV               0x8FEC\n#define GL_UNSIGNED_INT8_VEC2_NV          0x8FED\n#define GL_UNSIGNED_INT8_VEC3_NV          0x8FEE\n#define GL_UNSIGNED_INT8_VEC4_NV          0x8FEF\n#define GL_UNSIGNED_INT16_NV              0x8FF0\n#define GL_UNSIGNED_INT16_VEC2_NV         0x8FF1\n#define GL_UNSIGNED_INT16_VEC3_NV         0x8FF2\n#define GL_UNSIGNED_INT16_VEC4_NV         0x8FF3\n#define GL_UNSIGNED_INT64_VEC2_NV         0x8FF5\n#define GL_UNSIGNED_INT64_VEC3_NV         0x8FF6\n#define GL_UNSIGNED_INT64_VEC4_NV         0x8FF7\n#define GL_FLOAT16_NV                     0x8FF8\n#define GL_FLOAT16_VEC2_NV                0x8FF9\n#define GL_FLOAT16_VEC3_NV                0x8FFA\n#define GL_FLOAT16_VEC4_NV                0x8FFB\ntypedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x);\nGLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params);\nGLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params);\nGLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x);\nGLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value);\nGLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x);\nGLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n#endif /* GL_AMD_gpu_shader_int64 */\n\n#ifndef GL_AMD_interleaved_elements\n#define GL_AMD_interleaved_elements 1\n#define GL_VERTEX_ELEMENT_SWIZZLE_AMD     0x91A4\n#define GL_VERTEX_ID_SWIZZLE_AMD          0x91A5\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPARAMETERIAMDPROC) (GLuint index, GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribParameteriAMD (GLuint index, GLenum pname, GLint param);\n#endif\n#endif /* GL_AMD_interleaved_elements */\n\n#ifndef GL_AMD_multi_draw_indirect\n#define GL_AMD_multi_draw_indirect 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const void *indirect, GLsizei primcount, GLsizei stride);\nGLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const void *indirect, GLsizei primcount, GLsizei stride);\n#endif\n#endif /* GL_AMD_multi_draw_indirect */\n\n#ifndef GL_AMD_name_gen_delete\n#define GL_AMD_name_gen_delete 1\n#define GL_DATA_BUFFER_AMD                0x9151\n#define GL_PERFORMANCE_MONITOR_AMD        0x9152\n#define GL_QUERY_OBJECT_AMD               0x9153\n#define GL_VERTEX_ARRAY_OBJECT_AMD        0x9154\n#define GL_SAMPLER_OBJECT_AMD             0x9155\ntypedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names);\ntypedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names);\nGLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names);\nGLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name);\n#endif\n#endif /* GL_AMD_name_gen_delete */\n\n#ifndef GL_AMD_occlusion_query_event\n#define GL_AMD_occlusion_query_event 1\n#define GL_OCCLUSION_QUERY_EVENT_MASK_AMD 0x874F\n#define GL_QUERY_DEPTH_PASS_EVENT_BIT_AMD 0x00000001\n#define GL_QUERY_DEPTH_FAIL_EVENT_BIT_AMD 0x00000002\n#define GL_QUERY_STENCIL_FAIL_EVENT_BIT_AMD 0x00000004\n#define GL_QUERY_DEPTH_BOUNDS_FAIL_EVENT_BIT_AMD 0x00000008\n#define GL_QUERY_ALL_EVENT_BITS_AMD       0xFFFFFFFF\ntypedef void (APIENTRYP PFNGLQUERYOBJECTPARAMETERUIAMDPROC) (GLenum target, GLuint id, GLenum pname, GLuint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glQueryObjectParameteruiAMD (GLenum target, GLuint id, GLenum pname, GLuint param);\n#endif\n#endif /* GL_AMD_occlusion_query_event */\n\n#ifndef GL_AMD_performance_monitor\n#define GL_AMD_performance_monitor 1\n#define GL_COUNTER_TYPE_AMD               0x8BC0\n#define GL_COUNTER_RANGE_AMD              0x8BC1\n#define GL_UNSIGNED_INT64_AMD             0x8BC2\n#define GL_PERCENTAGE_AMD                 0x8BC3\n#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4\n#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5\n#define GL_PERFMON_RESULT_AMD             0x8BC6\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);\ntypedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\ntypedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\nGLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\nGLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\nGLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\nGLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);\nGLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\nGLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor);\nGLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\n#endif /* GL_AMD_performance_monitor */\n\n#ifndef GL_AMD_pinned_memory\n#define GL_AMD_pinned_memory 1\n#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160\n#endif /* GL_AMD_pinned_memory */\n\n#ifndef GL_AMD_query_buffer_object\n#define GL_AMD_query_buffer_object 1\n#define GL_QUERY_BUFFER_AMD               0x9192\n#define GL_QUERY_BUFFER_BINDING_AMD       0x9193\n#define GL_QUERY_RESULT_NO_WAIT_AMD       0x9194\n#endif /* GL_AMD_query_buffer_object */\n\n#ifndef GL_AMD_sample_positions\n#define GL_AMD_sample_positions 1\n#define GL_SUBSAMPLE_DISTANCE_AMD         0x883F\ntypedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);\n#endif\n#endif /* GL_AMD_sample_positions */\n\n#ifndef GL_AMD_seamless_cubemap_per_texture\n#define GL_AMD_seamless_cubemap_per_texture 1\n#endif /* GL_AMD_seamless_cubemap_per_texture */\n\n#ifndef GL_AMD_shader_atomic_counter_ops\n#define GL_AMD_shader_atomic_counter_ops 1\n#endif /* GL_AMD_shader_atomic_counter_ops */\n\n#ifndef GL_AMD_shader_stencil_export\n#define GL_AMD_shader_stencil_export 1\n#endif /* GL_AMD_shader_stencil_export */\n\n#ifndef GL_AMD_shader_trinary_minmax\n#define GL_AMD_shader_trinary_minmax 1\n#endif /* GL_AMD_shader_trinary_minmax */\n\n#ifndef GL_AMD_sparse_texture\n#define GL_AMD_sparse_texture 1\n#define GL_VIRTUAL_PAGE_SIZE_X_AMD        0x9195\n#define GL_VIRTUAL_PAGE_SIZE_Y_AMD        0x9196\n#define GL_VIRTUAL_PAGE_SIZE_Z_AMD        0x9197\n#define GL_MAX_SPARSE_TEXTURE_SIZE_AMD    0x9198\n#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD 0x9199\n#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS 0x919A\n#define GL_MIN_SPARSE_LEVEL_AMD           0x919B\n#define GL_MIN_LOD_WARNING_AMD            0x919C\n#define GL_TEXTURE_STORAGE_SPARSE_BIT_AMD 0x00000001\ntypedef void (APIENTRYP PFNGLTEXSTORAGESPARSEAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGESPARSEAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexStorageSparseAMD (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\nGLAPI void APIENTRY glTextureStorageSparseAMD (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags);\n#endif\n#endif /* GL_AMD_sparse_texture */\n\n#ifndef GL_AMD_stencil_operation_extended\n#define GL_AMD_stencil_operation_extended 1\n#define GL_SET_AMD                        0x874A\n#define GL_REPLACE_VALUE_AMD              0x874B\n#define GL_STENCIL_OP_VALUE_AMD           0x874C\n#define GL_STENCIL_BACK_OP_VALUE_AMD      0x874D\ntypedef void (APIENTRYP PFNGLSTENCILOPVALUEAMDPROC) (GLenum face, GLuint value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value);\n#endif\n#endif /* GL_AMD_stencil_operation_extended */\n\n#ifndef GL_AMD_texture_texture4\n#define GL_AMD_texture_texture4 1\n#endif /* GL_AMD_texture_texture4 */\n\n#ifndef GL_AMD_transform_feedback3_lines_triangles\n#define GL_AMD_transform_feedback3_lines_triangles 1\n#endif /* GL_AMD_transform_feedback3_lines_triangles */\n\n#ifndef GL_AMD_transform_feedback4\n#define GL_AMD_transform_feedback4 1\n#define GL_STREAM_RASTERIZATION_AMD       0x91A0\n#endif /* GL_AMD_transform_feedback4 */\n\n#ifndef GL_AMD_vertex_shader_layer\n#define GL_AMD_vertex_shader_layer 1\n#endif /* GL_AMD_vertex_shader_layer */\n\n#ifndef GL_AMD_vertex_shader_tessellator\n#define GL_AMD_vertex_shader_tessellator 1\n#define GL_SAMPLER_BUFFER_AMD             0x9001\n#define GL_INT_SAMPLER_BUFFER_AMD         0x9002\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003\n#define GL_TESSELLATION_MODE_AMD          0x9004\n#define GL_TESSELLATION_FACTOR_AMD        0x9005\n#define GL_DISCRETE_AMD                   0x9006\n#define GL_CONTINUOUS_AMD                 0x9007\ntypedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor);\nGLAPI void APIENTRY glTessellationModeAMD (GLenum mode);\n#endif\n#endif /* GL_AMD_vertex_shader_tessellator */\n\n#ifndef GL_AMD_vertex_shader_viewport_index\n#define GL_AMD_vertex_shader_viewport_index 1\n#endif /* GL_AMD_vertex_shader_viewport_index */\n\n#ifndef GL_APPLE_aux_depth_stencil\n#define GL_APPLE_aux_depth_stencil 1\n#define GL_AUX_DEPTH_STENCIL_APPLE        0x8A14\n#endif /* GL_APPLE_aux_depth_stencil */\n\n#ifndef GL_APPLE_client_storage\n#define GL_APPLE_client_storage 1\n#define GL_UNPACK_CLIENT_STORAGE_APPLE    0x85B2\n#endif /* GL_APPLE_client_storage */\n\n#ifndef GL_APPLE_element_array\n#define GL_APPLE_element_array 1\n#define GL_ELEMENT_ARRAY_APPLE            0x8A0C\n#define GL_ELEMENT_ARRAY_TYPE_APPLE       0x8A0D\n#define GL_ELEMENT_ARRAY_POINTER_APPLE    0x8A0E\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const void *pointer);\nGLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count);\nGLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount);\n#endif\n#endif /* GL_APPLE_element_array */\n\n#ifndef GL_APPLE_fence\n#define GL_APPLE_fence 1\n#define GL_DRAW_PIXELS_APPLE              0x8A0A\n#define GL_FENCE_APPLE                    0x8A0B\ntypedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences);\ntypedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name);\ntypedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences);\nGLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glSetFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence);\nGLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence);\nGLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name);\nGLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name);\n#endif\n#endif /* GL_APPLE_fence */\n\n#ifndef GL_APPLE_float_pixels\n#define GL_APPLE_float_pixels 1\n#define GL_HALF_APPLE                     0x140B\n#define GL_RGBA_FLOAT32_APPLE             0x8814\n#define GL_RGB_FLOAT32_APPLE              0x8815\n#define GL_ALPHA_FLOAT32_APPLE            0x8816\n#define GL_INTENSITY_FLOAT32_APPLE        0x8817\n#define GL_LUMINANCE_FLOAT32_APPLE        0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE  0x8819\n#define GL_RGBA_FLOAT16_APPLE             0x881A\n#define GL_RGB_FLOAT16_APPLE              0x881B\n#define GL_ALPHA_FLOAT16_APPLE            0x881C\n#define GL_INTENSITY_FLOAT16_APPLE        0x881D\n#define GL_LUMINANCE_FLOAT16_APPLE        0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE  0x881F\n#define GL_COLOR_FLOAT_APPLE              0x8A0F\n#endif /* GL_APPLE_float_pixels */\n\n#ifndef GL_APPLE_flush_buffer_range\n#define GL_APPLE_flush_buffer_range 1\n#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12\n#define GL_BUFFER_FLUSHING_UNMAP_APPLE    0x8A13\ntypedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size);\n#endif\n#endif /* GL_APPLE_flush_buffer_range */\n\n#ifndef GL_APPLE_object_purgeable\n#define GL_APPLE_object_purgeable 1\n#define GL_BUFFER_OBJECT_APPLE            0x85B3\n#define GL_RELEASED_APPLE                 0x8A19\n#define GL_VOLATILE_APPLE                 0x8A1A\n#define GL_RETAINED_APPLE                 0x8A1B\n#define GL_UNDEFINED_APPLE                0x8A1C\n#define GL_PURGEABLE_APPLE                0x8A1D\ntypedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option);\ntypedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option);\nGLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params);\n#endif\n#endif /* GL_APPLE_object_purgeable */\n\n#ifndef GL_APPLE_rgb_422\n#define GL_APPLE_rgb_422 1\n#define GL_RGB_422_APPLE                  0x8A1F\n#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB\n#define GL_RGB_RAW_422_APPLE              0x8A51\n#endif /* GL_APPLE_rgb_422 */\n\n#ifndef GL_APPLE_row_bytes\n#define GL_APPLE_row_bytes 1\n#define GL_PACK_ROW_BYTES_APPLE           0x8A15\n#define GL_UNPACK_ROW_BYTES_APPLE         0x8A16\n#endif /* GL_APPLE_row_bytes */\n\n#ifndef GL_APPLE_specular_vector\n#define GL_APPLE_specular_vector 1\n#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0\n#endif /* GL_APPLE_specular_vector */\n\n#ifndef GL_APPLE_texture_range\n#define GL_APPLE_texture_range 1\n#define GL_TEXTURE_RANGE_LENGTH_APPLE     0x85B7\n#define GL_TEXTURE_RANGE_POINTER_APPLE    0x85B8\n#define GL_TEXTURE_STORAGE_HINT_APPLE     0x85BC\n#define GL_STORAGE_PRIVATE_APPLE          0x85BD\n#define GL_STORAGE_CACHED_APPLE           0x85BE\n#define GL_STORAGE_SHARED_APPLE           0x85BF\ntypedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, void **params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const void *pointer);\nGLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params);\n#endif\n#endif /* GL_APPLE_texture_range */\n\n#ifndef GL_APPLE_transform_hint\n#define GL_APPLE_transform_hint 1\n#define GL_TRANSFORM_HINT_APPLE           0x85B1\n#endif /* GL_APPLE_transform_hint */\n\n#ifndef GL_APPLE_vertex_array_object\n#define GL_APPLE_vertex_array_object 1\n#define GL_VERTEX_ARRAY_BINDING_APPLE     0x85B5\ntypedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array);\nGLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays);\nGLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays);\nGLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array);\n#endif\n#endif /* GL_APPLE_vertex_array_object */\n\n#ifndef GL_APPLE_vertex_array_range\n#define GL_APPLE_vertex_array_range 1\n#define GL_VERTEX_ARRAY_RANGE_APPLE       0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E\n#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F\n#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521\n#define GL_STORAGE_CLIENT_APPLE           0x85B4\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, void *pointer);\nGLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, void *pointer);\nGLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param);\n#endif\n#endif /* GL_APPLE_vertex_array_range */\n\n#ifndef GL_APPLE_vertex_program_evaluators\n#define GL_APPLE_vertex_program_evaluators 1\n#define GL_VERTEX_ATTRIB_MAP1_APPLE       0x8A00\n#define GL_VERTEX_ATTRIB_MAP2_APPLE       0x8A01\n#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE  0x8A02\n#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03\n#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04\n#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05\n#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE  0x8A06\n#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07\n#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08\n#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09\ntypedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname);\ntypedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\ntypedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname);\nGLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname);\nGLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);\nGLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);\nGLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);\n#endif\n#endif /* GL_APPLE_vertex_program_evaluators */\n\n#ifndef GL_APPLE_ycbcr_422\n#define GL_APPLE_ycbcr_422 1\n#define GL_YCBCR_422_APPLE                0x85B9\n#endif /* GL_APPLE_ycbcr_422 */\n\n#ifndef GL_ATI_draw_buffers\n#define GL_ATI_draw_buffers 1\n#define GL_MAX_DRAW_BUFFERS_ATI           0x8824\n#define GL_DRAW_BUFFER0_ATI               0x8825\n#define GL_DRAW_BUFFER1_ATI               0x8826\n#define GL_DRAW_BUFFER2_ATI               0x8827\n#define GL_DRAW_BUFFER3_ATI               0x8828\n#define GL_DRAW_BUFFER4_ATI               0x8829\n#define GL_DRAW_BUFFER5_ATI               0x882A\n#define GL_DRAW_BUFFER6_ATI               0x882B\n#define GL_DRAW_BUFFER7_ATI               0x882C\n#define GL_DRAW_BUFFER8_ATI               0x882D\n#define GL_DRAW_BUFFER9_ATI               0x882E\n#define GL_DRAW_BUFFER10_ATI              0x882F\n#define GL_DRAW_BUFFER11_ATI              0x8830\n#define GL_DRAW_BUFFER12_ATI              0x8831\n#define GL_DRAW_BUFFER13_ATI              0x8832\n#define GL_DRAW_BUFFER14_ATI              0x8833\n#define GL_DRAW_BUFFER15_ATI              0x8834\ntypedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs);\n#endif\n#endif /* GL_ATI_draw_buffers */\n\n#ifndef GL_ATI_element_array\n#define GL_ATI_element_array 1\n#define GL_ELEMENT_ARRAY_ATI              0x8768\n#define GL_ELEMENT_ARRAY_TYPE_ATI         0x8769\n#define GL_ELEMENT_ARRAY_POINTER_ATI      0x876A\ntypedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count);\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glElementPointerATI (GLenum type, const void *pointer);\nGLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count);\nGLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count);\n#endif\n#endif /* GL_ATI_element_array */\n\n#ifndef GL_ATI_envmap_bumpmap\n#define GL_ATI_envmap_bumpmap 1\n#define GL_BUMP_ROT_MATRIX_ATI            0x8775\n#define GL_BUMP_ROT_MATRIX_SIZE_ATI       0x8776\n#define GL_BUMP_NUM_TEX_UNITS_ATI         0x8777\n#define GL_BUMP_TEX_UNITS_ATI             0x8778\n#define GL_DUDV_ATI                       0x8779\n#define GL_DU8DV8_ATI                     0x877A\n#define GL_BUMP_ENVMAP_ATI                0x877B\n#define GL_BUMP_TARGET_ATI                0x877C\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param);\ntypedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param);\nGLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param);\nGLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param);\n#endif\n#endif /* GL_ATI_envmap_bumpmap */\n\n#ifndef GL_ATI_fragment_shader\n#define GL_ATI_fragment_shader 1\n#define GL_FRAGMENT_SHADER_ATI            0x8920\n#define GL_REG_0_ATI                      0x8921\n#define GL_REG_1_ATI                      0x8922\n#define GL_REG_2_ATI                      0x8923\n#define GL_REG_3_ATI                      0x8924\n#define GL_REG_4_ATI                      0x8925\n#define GL_REG_5_ATI                      0x8926\n#define GL_REG_6_ATI                      0x8927\n#define GL_REG_7_ATI                      0x8928\n#define GL_REG_8_ATI                      0x8929\n#define GL_REG_9_ATI                      0x892A\n#define GL_REG_10_ATI                     0x892B\n#define GL_REG_11_ATI                     0x892C\n#define GL_REG_12_ATI                     0x892D\n#define GL_REG_13_ATI                     0x892E\n#define GL_REG_14_ATI                     0x892F\n#define GL_REG_15_ATI                     0x8930\n#define GL_REG_16_ATI                     0x8931\n#define GL_REG_17_ATI                     0x8932\n#define GL_REG_18_ATI                     0x8933\n#define GL_REG_19_ATI                     0x8934\n#define GL_REG_20_ATI                     0x8935\n#define GL_REG_21_ATI                     0x8936\n#define GL_REG_22_ATI                     0x8937\n#define GL_REG_23_ATI                     0x8938\n#define GL_REG_24_ATI                     0x8939\n#define GL_REG_25_ATI                     0x893A\n#define GL_REG_26_ATI                     0x893B\n#define GL_REG_27_ATI                     0x893C\n#define GL_REG_28_ATI                     0x893D\n#define GL_REG_29_ATI                     0x893E\n#define GL_REG_30_ATI                     0x893F\n#define GL_REG_31_ATI                     0x8940\n#define GL_CON_0_ATI                      0x8941\n#define GL_CON_1_ATI                      0x8942\n#define GL_CON_2_ATI                      0x8943\n#define GL_CON_3_ATI                      0x8944\n#define GL_CON_4_ATI                      0x8945\n#define GL_CON_5_ATI                      0x8946\n#define GL_CON_6_ATI                      0x8947\n#define GL_CON_7_ATI                      0x8948\n#define GL_CON_8_ATI                      0x8949\n#define GL_CON_9_ATI                      0x894A\n#define GL_CON_10_ATI                     0x894B\n#define GL_CON_11_ATI                     0x894C\n#define GL_CON_12_ATI                     0x894D\n#define GL_CON_13_ATI                     0x894E\n#define GL_CON_14_ATI                     0x894F\n#define GL_CON_15_ATI                     0x8950\n#define GL_CON_16_ATI                     0x8951\n#define GL_CON_17_ATI                     0x8952\n#define GL_CON_18_ATI                     0x8953\n#define GL_CON_19_ATI                     0x8954\n#define GL_CON_20_ATI                     0x8955\n#define GL_CON_21_ATI                     0x8956\n#define GL_CON_22_ATI                     0x8957\n#define GL_CON_23_ATI                     0x8958\n#define GL_CON_24_ATI                     0x8959\n#define GL_CON_25_ATI                     0x895A\n#define GL_CON_26_ATI                     0x895B\n#define GL_CON_27_ATI                     0x895C\n#define GL_CON_28_ATI                     0x895D\n#define GL_CON_29_ATI                     0x895E\n#define GL_CON_30_ATI                     0x895F\n#define GL_CON_31_ATI                     0x8960\n#define GL_MOV_ATI                        0x8961\n#define GL_ADD_ATI                        0x8963\n#define GL_MUL_ATI                        0x8964\n#define GL_SUB_ATI                        0x8965\n#define GL_DOT3_ATI                       0x8966\n#define GL_DOT4_ATI                       0x8967\n#define GL_MAD_ATI                        0x8968\n#define GL_LERP_ATI                       0x8969\n#define GL_CND_ATI                        0x896A\n#define GL_CND0_ATI                       0x896B\n#define GL_DOT2_ADD_ATI                   0x896C\n#define GL_SECONDARY_INTERPOLATOR_ATI     0x896D\n#define GL_NUM_FRAGMENT_REGISTERS_ATI     0x896E\n#define GL_NUM_FRAGMENT_CONSTANTS_ATI     0x896F\n#define GL_NUM_PASSES_ATI                 0x8970\n#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI  0x8971\n#define GL_NUM_INSTRUCTIONS_TOTAL_ATI     0x8972\n#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973\n#define GL_NUM_LOOPBACK_COMPONENTS_ATI    0x8974\n#define GL_COLOR_ALPHA_PAIRING_ATI        0x8975\n#define GL_SWIZZLE_STR_ATI                0x8976\n#define GL_SWIZZLE_STQ_ATI                0x8977\n#define GL_SWIZZLE_STR_DR_ATI             0x8978\n#define GL_SWIZZLE_STQ_DQ_ATI             0x8979\n#define GL_SWIZZLE_STRQ_ATI               0x897A\n#define GL_SWIZZLE_STRQ_DQ_ATI            0x897B\n#define GL_RED_BIT_ATI                    0x00000001\n#define GL_GREEN_BIT_ATI                  0x00000002\n#define GL_BLUE_BIT_ATI                   0x00000004\n#define GL_2X_BIT_ATI                     0x00000001\n#define GL_4X_BIT_ATI                     0x00000002\n#define GL_8X_BIT_ATI                     0x00000004\n#define GL_HALF_BIT_ATI                   0x00000008\n#define GL_QUARTER_BIT_ATI                0x00000010\n#define GL_EIGHTH_BIT_ATI                 0x00000020\n#define GL_SATURATE_BIT_ATI               0x00000040\n#define GL_COMP_BIT_ATI                   0x00000002\n#define GL_NEGATE_BIT_ATI                 0x00000004\n#define GL_BIAS_BIT_ATI                   0x00000008\ntypedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void);\ntypedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\ntypedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range);\nGLAPI void APIENTRY glBindFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id);\nGLAPI void APIENTRY glBeginFragmentShaderATI (void);\nGLAPI void APIENTRY glEndFragmentShaderATI (void);\nGLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle);\nGLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle);\nGLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod);\nGLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod);\nGLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod);\nGLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value);\n#endif\n#endif /* GL_ATI_fragment_shader */\n\n#ifndef GL_ATI_map_object_buffer\n#define GL_ATI_map_object_buffer 1\ntypedef void *(APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void *APIENTRY glMapObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer);\n#endif\n#endif /* GL_ATI_map_object_buffer */\n\n#ifndef GL_ATI_meminfo\n#define GL_ATI_meminfo 1\n#define GL_VBO_FREE_MEMORY_ATI            0x87FB\n#define GL_TEXTURE_FREE_MEMORY_ATI        0x87FC\n#define GL_RENDERBUFFER_FREE_MEMORY_ATI   0x87FD\n#endif /* GL_ATI_meminfo */\n\n#ifndef GL_ATI_pixel_format_float\n#define GL_ATI_pixel_format_float 1\n#define GL_RGBA_FLOAT_MODE_ATI            0x8820\n#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835\n#endif /* GL_ATI_pixel_format_float */\n\n#ifndef GL_ATI_pn_triangles\n#define GL_ATI_pn_triangles 1\n#define GL_PN_TRIANGLES_ATI               0x87F0\n#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1\n#define GL_PN_TRIANGLES_POINT_MODE_ATI    0x87F2\n#define GL_PN_TRIANGLES_NORMAL_MODE_ATI   0x87F3\n#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4\n#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5\n#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6\n#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7\n#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8\ntypedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param);\n#endif\n#endif /* GL_ATI_pn_triangles */\n\n#ifndef GL_ATI_separate_stencil\n#define GL_ATI_separate_stencil 1\n#define GL_STENCIL_BACK_FUNC_ATI          0x8800\n#define GL_STENCIL_BACK_FAIL_ATI          0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803\ntypedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\ntypedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);\nGLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);\n#endif\n#endif /* GL_ATI_separate_stencil */\n\n#ifndef GL_ATI_text_fragment_shader\n#define GL_ATI_text_fragment_shader 1\n#define GL_TEXT_FRAGMENT_SHADER_ATI       0x8200\n#endif /* GL_ATI_text_fragment_shader */\n\n#ifndef GL_ATI_texture_env_combine3\n#define GL_ATI_texture_env_combine3 1\n#define GL_MODULATE_ADD_ATI               0x8744\n#define GL_MODULATE_SIGNED_ADD_ATI        0x8745\n#define GL_MODULATE_SUBTRACT_ATI          0x8746\n#endif /* GL_ATI_texture_env_combine3 */\n\n#ifndef GL_ATI_texture_float\n#define GL_ATI_texture_float 1\n#define GL_RGBA_FLOAT32_ATI               0x8814\n#define GL_RGB_FLOAT32_ATI                0x8815\n#define GL_ALPHA_FLOAT32_ATI              0x8816\n#define GL_INTENSITY_FLOAT32_ATI          0x8817\n#define GL_LUMINANCE_FLOAT32_ATI          0x8818\n#define GL_LUMINANCE_ALPHA_FLOAT32_ATI    0x8819\n#define GL_RGBA_FLOAT16_ATI               0x881A\n#define GL_RGB_FLOAT16_ATI                0x881B\n#define GL_ALPHA_FLOAT16_ATI              0x881C\n#define GL_INTENSITY_FLOAT16_ATI          0x881D\n#define GL_LUMINANCE_FLOAT16_ATI          0x881E\n#define GL_LUMINANCE_ALPHA_FLOAT16_ATI    0x881F\n#endif /* GL_ATI_texture_float */\n\n#ifndef GL_ATI_texture_mirror_once\n#define GL_ATI_texture_mirror_once 1\n#define GL_MIRROR_CLAMP_ATI               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_ATI       0x8743\n#endif /* GL_ATI_texture_mirror_once */\n\n#ifndef GL_ATI_vertex_array_object\n#define GL_ATI_vertex_array_object 1\n#define GL_STATIC_ATI                     0x8760\n#define GL_DYNAMIC_ATI                    0x8761\n#define GL_PRESERVE_ATI                   0x8762\n#define GL_DISCARD_ATI                    0x8763\n#define GL_OBJECT_BUFFER_SIZE_ATI         0x8764\n#define GL_OBJECT_BUFFER_USAGE_ATI        0x8765\n#define GL_ARRAY_OBJECT_BUFFER_ATI        0x8766\n#define GL_ARRAY_OBJECT_OFFSET_ATI        0x8767\ntypedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const void *pointer, GLenum usage);\ntypedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const void *pointer, GLenum usage);\nGLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const void *pointer, GLenum preserve);\nGLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer);\nGLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params);\nGLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ATI_vertex_array_object */\n\n#ifndef GL_ATI_vertex_attrib_array_object\n#define GL_ATI_vertex_attrib_array_object 1\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params);\n#endif\n#endif /* GL_ATI_vertex_attrib_array_object */\n\n#ifndef GL_ATI_vertex_streams\n#define GL_ATI_vertex_streams 1\n#define GL_MAX_VERTEX_STREAMS_ATI         0x876B\n#define GL_VERTEX_STREAM0_ATI             0x876C\n#define GL_VERTEX_STREAM1_ATI             0x876D\n#define GL_VERTEX_STREAM2_ATI             0x876E\n#define GL_VERTEX_STREAM3_ATI             0x876F\n#define GL_VERTEX_STREAM4_ATI             0x8770\n#define GL_VERTEX_STREAM5_ATI             0x8771\n#define GL_VERTEX_STREAM6_ATI             0x8772\n#define GL_VERTEX_STREAM7_ATI             0x8773\n#define GL_VERTEX_SOURCE_ATI              0x8774\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\ntypedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords);\ntypedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x);\nGLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x);\nGLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x);\nGLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x);\nGLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y);\nGLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz);\nGLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords);\nGLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz);\nGLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords);\nGLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz);\nGLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords);\nGLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz);\nGLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords);\nGLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz);\nGLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords);\nGLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream);\nGLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param);\nGLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param);\n#endif\n#endif /* GL_ATI_vertex_streams */\n\n#ifndef GL_EXT_422_pixels\n#define GL_EXT_422_pixels 1\n#define GL_422_EXT                        0x80CC\n#define GL_422_REV_EXT                    0x80CD\n#define GL_422_AVERAGE_EXT                0x80CE\n#define GL_422_REV_AVERAGE_EXT            0x80CF\n#endif /* GL_EXT_422_pixels */\n\n#ifndef GL_EXT_abgr\n#define GL_EXT_abgr 1\n#define GL_ABGR_EXT                       0x8000\n#endif /* GL_EXT_abgr */\n\n#ifndef GL_EXT_bgra\n#define GL_EXT_bgra 1\n#define GL_BGR_EXT                        0x80E0\n#define GL_BGRA_EXT                       0x80E1\n#endif /* GL_EXT_bgra */\n\n#ifndef GL_EXT_bindable_uniform\n#define GL_EXT_bindable_uniform 1\n#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2\n#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3\n#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4\n#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT  0x8DED\n#define GL_UNIFORM_BUFFER_EXT             0x8DEE\n#define GL_UNIFORM_BUFFER_BINDING_EXT     0x8DEF\ntypedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer);\ntypedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location);\ntypedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer);\nGLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location);\nGLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location);\n#endif\n#endif /* GL_EXT_bindable_uniform */\n\n#ifndef GL_EXT_blend_color\n#define GL_EXT_blend_color 1\n#define GL_CONSTANT_COLOR_EXT             0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR_EXT   0x8002\n#define GL_CONSTANT_ALPHA_EXT             0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT   0x8004\n#define GL_BLEND_COLOR_EXT                0x8005\ntypedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendColorEXT (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);\n#endif\n#endif /* GL_EXT_blend_color */\n\n#ifndef GL_EXT_blend_equation_separate\n#define GL_EXT_blend_equation_separate 1\n#define GL_BLEND_EQUATION_RGB_EXT         0x8009\n#define GL_BLEND_EQUATION_ALPHA_EXT       0x883D\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha);\n#endif\n#endif /* GL_EXT_blend_equation_separate */\n\n#ifndef GL_EXT_blend_func_separate\n#define GL_EXT_blend_func_separate 1\n#define GL_BLEND_DST_RGB_EXT              0x80C8\n#define GL_BLEND_SRC_RGB_EXT              0x80C9\n#define GL_BLEND_DST_ALPHA_EXT            0x80CA\n#define GL_BLEND_SRC_ALPHA_EXT            0x80CB\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n#endif /* GL_EXT_blend_func_separate */\n\n#ifndef GL_EXT_blend_logic_op\n#define GL_EXT_blend_logic_op 1\n#endif /* GL_EXT_blend_logic_op */\n\n#ifndef GL_EXT_blend_minmax\n#define GL_EXT_blend_minmax 1\n#define GL_MIN_EXT                        0x8007\n#define GL_MAX_EXT                        0x8008\n#define GL_FUNC_ADD_EXT                   0x8006\n#define GL_BLEND_EQUATION_EXT             0x8009\ntypedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendEquationEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_blend_minmax */\n\n#ifndef GL_EXT_blend_subtract\n#define GL_EXT_blend_subtract 1\n#define GL_FUNC_SUBTRACT_EXT              0x800A\n#define GL_FUNC_REVERSE_SUBTRACT_EXT      0x800B\n#endif /* GL_EXT_blend_subtract */\n\n#ifndef GL_EXT_clip_volume_hint\n#define GL_EXT_clip_volume_hint 1\n#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT  0x80F0\n#endif /* GL_EXT_clip_volume_hint */\n\n#ifndef GL_EXT_cmyka\n#define GL_EXT_cmyka 1\n#define GL_CMYK_EXT                       0x800C\n#define GL_CMYKA_EXT                      0x800D\n#define GL_PACK_CMYK_HINT_EXT             0x800E\n#define GL_UNPACK_CMYK_HINT_EXT           0x800F\n#endif /* GL_EXT_cmyka */\n\n#ifndef GL_EXT_color_subtable\n#define GL_EXT_color_subtable 1\ntypedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);\n#endif\n#endif /* GL_EXT_color_subtable */\n\n#ifndef GL_EXT_compiled_vertex_array\n#define GL_EXT_compiled_vertex_array 1\n#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT   0x81A8\n#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT   0x81A9\ntypedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count);\nGLAPI void APIENTRY glUnlockArraysEXT (void);\n#endif\n#endif /* GL_EXT_compiled_vertex_array */\n\n#ifndef GL_EXT_convolution\n#define GL_EXT_convolution 1\n#define GL_CONVOLUTION_1D_EXT             0x8010\n#define GL_CONVOLUTION_2D_EXT             0x8011\n#define GL_SEPARABLE_2D_EXT               0x8012\n#define GL_CONVOLUTION_BORDER_MODE_EXT    0x8013\n#define GL_CONVOLUTION_FILTER_SCALE_EXT   0x8014\n#define GL_CONVOLUTION_FILTER_BIAS_EXT    0x8015\n#define GL_REDUCE_EXT                     0x8016\n#define GL_CONVOLUTION_FORMAT_EXT         0x8017\n#define GL_CONVOLUTION_WIDTH_EXT          0x8018\n#define GL_CONVOLUTION_HEIGHT_EXT         0x8019\n#define GL_MAX_CONVOLUTION_WIDTH_EXT      0x801A\n#define GL_MAX_CONVOLUTION_HEIGHT_EXT     0x801B\n#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C\n#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D\n#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E\n#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F\n#define GL_POST_CONVOLUTION_RED_BIAS_EXT  0x8020\n#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021\n#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022\n#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params);\ntypedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *image);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\ntypedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image);\nGLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params);\nGLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params);\nGLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, void *image);\nGLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span);\nGLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column);\n#endif\n#endif /* GL_EXT_convolution */\n\n#ifndef GL_EXT_coordinate_frame\n#define GL_EXT_coordinate_frame 1\n#define GL_TANGENT_ARRAY_EXT              0x8439\n#define GL_BINORMAL_ARRAY_EXT             0x843A\n#define GL_CURRENT_TANGENT_EXT            0x843B\n#define GL_CURRENT_BINORMAL_EXT           0x843C\n#define GL_TANGENT_ARRAY_TYPE_EXT         0x843E\n#define GL_TANGENT_ARRAY_STRIDE_EXT       0x843F\n#define GL_BINORMAL_ARRAY_TYPE_EXT        0x8440\n#define GL_BINORMAL_ARRAY_STRIDE_EXT      0x8441\n#define GL_TANGENT_ARRAY_POINTER_EXT      0x8442\n#define GL_BINORMAL_ARRAY_POINTER_EXT     0x8443\n#define GL_MAP1_TANGENT_EXT               0x8444\n#define GL_MAP2_TANGENT_EXT               0x8445\n#define GL_MAP1_BINORMAL_EXT              0x8446\n#define GL_MAP2_BINORMAL_EXT              0x8447\ntypedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz);\ntypedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz);\ntypedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz);\ntypedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz);\ntypedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz);\ntypedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz);\ntypedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz);\nGLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz);\nGLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz);\nGLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz);\nGLAPI void APIENTRY glTangent3ivEXT (const GLint *v);\nGLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz);\nGLAPI void APIENTRY glTangent3svEXT (const GLshort *v);\nGLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz);\nGLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz);\nGLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz);\nGLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz);\nGLAPI void APIENTRY glBinormal3ivEXT (const GLint *v);\nGLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz);\nGLAPI void APIENTRY glBinormal3svEXT (const GLshort *v);\nGLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_coordinate_frame */\n\n#ifndef GL_EXT_copy_texture\n#define GL_EXT_copy_texture 1\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_EXT_copy_texture */\n\n#ifndef GL_EXT_cull_vertex\n#define GL_EXT_cull_vertex 1\n#define GL_CULL_VERTEX_EXT                0x81AA\n#define GL_CULL_VERTEX_EYE_POSITION_EXT   0x81AB\n#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC\ntypedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_cull_vertex */\n\n#ifndef GL_EXT_debug_label\n#define GL_EXT_debug_label 1\n#define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F\n#define GL_PROGRAM_OBJECT_EXT             0x8B40\n#define GL_SHADER_OBJECT_EXT              0x8B48\n#define GL_BUFFER_OBJECT_EXT              0x9151\n#define GL_QUERY_OBJECT_EXT               0x9153\n#define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154\ntypedef void (APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);\ntypedef void (APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);\nGLAPI void APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n#endif /* GL_EXT_debug_label */\n\n#ifndef GL_EXT_debug_marker\n#define GL_EXT_debug_marker 1\ntypedef void (APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);\nGLAPI void APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);\nGLAPI void APIENTRY glPopGroupMarkerEXT (void);\n#endif\n#endif /* GL_EXT_debug_marker */\n\n#ifndef GL_EXT_depth_bounds_test\n#define GL_EXT_depth_bounds_test 1\n#define GL_DEPTH_BOUNDS_TEST_EXT          0x8890\n#define GL_DEPTH_BOUNDS_EXT               0x8891\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax);\n#endif\n#endif /* GL_EXT_depth_bounds_test */\n\n#ifndef GL_EXT_direct_state_access\n#define GL_EXT_direct_state_access 1\n#define GL_PROGRAM_MATRIX_EXT             0x8E2D\n#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT   0x8E2E\n#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F\ntypedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\ntypedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data);\ntypedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, void **data);\ntypedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index);\ntypedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data);\ntypedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\ntypedef 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 void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, void *img);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\ntypedef 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 void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\ntypedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, void *img);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m);\ntypedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);\ntypedef void *(APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access);\ntypedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, void **params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLENABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLECLIENTSTATEIEXTPROC) (GLenum array, GLuint index);\ntypedef void (APIENTRYP PFNGLGETFLOATI_VEXTPROC) (GLenum pname, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETDOUBLEI_VEXTPROC) (GLenum pname, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPOINTERI_VEXTPROC) (GLenum pname, GLuint index, void **params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, void *string);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target);\ntypedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\ntypedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYEDGEFLAGOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYINDEXOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYNORMALOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYTEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYMULTITEXCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYFOGCOORDOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYSECONDARYCOLOROFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYEXTPROC) (GLuint vaobj, GLenum array);\ntypedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);\ntypedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBEXTPROC) (GLuint vaobj, GLuint index);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERVEXTPROC) (GLuint vaobj, GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERVEXTPROC) (GLuint vaobj, GLenum pname, void **param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYINTEGERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);\ntypedef void (APIENTRYP PFNGLGETVERTEXARRAYPOINTERI_VEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, void **param);\ntypedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\ntypedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\ntypedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\ntypedef void (APIENTRYP PFNGLTEXTUREPAGECOMMITMENTEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBDIVISOREXTPROC) (GLuint vaobj, GLuint index, GLuint divisor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glMatrixPopEXT (GLenum mode);\nGLAPI void APIENTRY glMatrixPushEXT (GLenum mode);\nGLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask);\nGLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\nGLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture);\nGLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param);\nGLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params);\nGLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params);\nGLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);\nGLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, void *pixels);\nGLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params);\nGLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data);\nGLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data);\nGLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, void **data);\nGLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index);\nGLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index);\nGLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index);\nGLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data);\nGLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data);\nGLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, void *img);\nGLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *bits);\nGLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, void *img);\nGLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m);\nGLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m);\nGLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);\nGLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);\nGLAPI void *APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access);\nGLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer);\nGLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, void **params);\nGLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);\nGLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);\nGLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);\nGLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\nGLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\nGLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);\nGLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);\nGLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\nGLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\nGLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer);\nGLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);\nGLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glEnableClientStateiEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glDisableClientStateiEXT (GLenum array, GLuint index);\nGLAPI void APIENTRY glGetFloati_vEXT (GLenum pname, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetDoublei_vEXT (GLenum pname, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetPointeri_vEXT (GLenum pname, GLuint index, void **params);\nGLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const void *string);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params);\nGLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params);\nGLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, void *string);\nGLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target);\nGLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target);\nGLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target);\nGLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs);\nGLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode);\nGLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\nGLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face);\nGLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glVertexArrayVertexOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayEdgeFlagOffsetEXT (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayIndexOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayNormalOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayMultiTexCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayFogCoordOffsetEXT (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArraySecondaryColorOffsetEXT (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayVertexAttribOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glVertexArrayVertexAttribIOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glEnableVertexArrayEXT (GLuint vaobj, GLenum array);\nGLAPI void APIENTRY glDisableVertexArrayEXT (GLuint vaobj, GLenum array);\nGLAPI void APIENTRY glEnableVertexArrayAttribEXT (GLuint vaobj, GLuint index);\nGLAPI void APIENTRY glDisableVertexArrayAttribEXT (GLuint vaobj, GLuint index);\nGLAPI void APIENTRY glGetVertexArrayIntegervEXT (GLuint vaobj, GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetVertexArrayPointervEXT (GLuint vaobj, GLenum pname, void **param);\nGLAPI void APIENTRY glGetVertexArrayIntegeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, GLint *param);\nGLAPI void APIENTRY glGetVertexArrayPointeri_vEXT (GLuint vaobj, GLuint index, GLenum pname, void **param);\nGLAPI void *APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length);\nGLAPI void APIENTRY glNamedBufferStorageEXT (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);\nGLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLsizeiptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);\nGLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);\nGLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);\nGLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x);\nGLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);\nGLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\nGLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);\nGLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);\nGLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);\nGLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);\nGLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);\nGLAPI void APIENTRY glTexturePageCommitmentEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);\nGLAPI void APIENTRY glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor);\n#endif\n#endif /* GL_EXT_direct_state_access */\n\n#ifndef GL_EXT_draw_buffers2\n#define GL_EXT_draw_buffers2 1\ntypedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\n#endif\n#endif /* GL_EXT_draw_buffers2 */\n\n#ifndef GL_EXT_draw_instanced\n#define GL_EXT_draw_instanced 1\ntypedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\nGLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\n#endif\n#endif /* GL_EXT_draw_instanced */\n\n#ifndef GL_EXT_draw_range_elements\n#define GL_EXT_draw_range_elements 1\n#define GL_MAX_ELEMENTS_VERTICES_EXT      0x80E8\n#define GL_MAX_ELEMENTS_INDICES_EXT       0x80E9\ntypedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);\n#endif\n#endif /* GL_EXT_draw_range_elements */\n\n#ifndef GL_EXT_fog_coord\n#define GL_EXT_fog_coord 1\n#define GL_FOG_COORDINATE_SOURCE_EXT      0x8450\n#define GL_FOG_COORDINATE_EXT             0x8451\n#define GL_FRAGMENT_DEPTH_EXT             0x8452\n#define GL_CURRENT_FOG_COORDINATE_EXT     0x8453\n#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT  0x8454\n#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455\n#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456\n#define GL_FOG_COORDINATE_ARRAY_EXT       0x8457\ntypedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogCoordfEXT (GLfloat coord);\nGLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord);\nGLAPI void APIENTRY glFogCoorddEXT (GLdouble coord);\nGLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord);\nGLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_fog_coord */\n\n#ifndef GL_EXT_framebuffer_blit\n#define GL_EXT_framebuffer_blit 1\n#define GL_READ_FRAMEBUFFER_EXT           0x8CA8\n#define GL_DRAW_FRAMEBUFFER_EXT           0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_EXT   0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_EXT   0x8CAA\ntypedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n#endif /* GL_EXT_framebuffer_blit */\n\n#ifndef GL_EXT_framebuffer_multisample\n#define GL_EXT_framebuffer_multisample 1\n#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56\n#define GL_MAX_SAMPLES_EXT                0x8D57\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_EXT_framebuffer_multisample */\n\n#ifndef GL_EXT_framebuffer_multisample_blit_scaled\n#define GL_EXT_framebuffer_multisample_blit_scaled 1\n#define GL_SCALED_RESOLVE_FASTEST_EXT     0x90BA\n#define GL_SCALED_RESOLVE_NICEST_EXT      0x90BB\n#endif /* GL_EXT_framebuffer_multisample_blit_scaled */\n\n#ifndef GL_EXT_framebuffer_object\n#define GL_EXT_framebuffer_object 1\n#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506\n#define GL_MAX_RENDERBUFFER_SIZE_EXT      0x84E8\n#define GL_FRAMEBUFFER_BINDING_EXT        0x8CA6\n#define GL_RENDERBUFFER_BINDING_EXT       0x8CA7\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4\n#define GL_FRAMEBUFFER_COMPLETE_EXT       0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9\n#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA\n#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB\n#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC\n#define GL_FRAMEBUFFER_UNSUPPORTED_EXT    0x8CDD\n#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF\n#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0\n#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1\n#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2\n#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3\n#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4\n#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5\n#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6\n#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7\n#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8\n#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9\n#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA\n#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB\n#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC\n#define GL_COLOR_ATTACHMENT13_EXT         0x8CED\n#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE\n#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF\n#define GL_DEPTH_ATTACHMENT_EXT           0x8D00\n#define GL_STENCIL_ATTACHMENT_EXT         0x8D20\n#define GL_FRAMEBUFFER_EXT                0x8D40\n#define GL_RENDERBUFFER_EXT               0x8D41\n#define GL_RENDERBUFFER_WIDTH_EXT         0x8D42\n#define GL_RENDERBUFFER_HEIGHT_EXT        0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44\n#define GL_STENCIL_INDEX1_EXT             0x8D46\n#define GL_STENCIL_INDEX4_EXT             0x8D47\n#define GL_STENCIL_INDEX8_EXT             0x8D48\n#define GL_STENCIL_INDEX16_EXT            0x8D49\n#define GL_RENDERBUFFER_RED_SIZE_EXT      0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE_EXT    0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE_EXT     0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE_EXT    0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE_EXT    0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE_EXT  0x8D55\ntypedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);\ntypedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);\ntypedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);\ntypedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\ntypedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer);\nGLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer);\nGLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers);\nGLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers);\nGLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer);\nGLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer);\nGLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers);\nGLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers);\nGLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target);\nGLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\nGLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGenerateMipmapEXT (GLenum target);\n#endif\n#endif /* GL_EXT_framebuffer_object */\n\n#ifndef GL_EXT_framebuffer_sRGB\n#define GL_EXT_framebuffer_sRGB 1\n#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9\n#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x8DBA\n#endif /* GL_EXT_framebuffer_sRGB */\n\n#ifndef GL_EXT_geometry_shader4\n#define GL_EXT_geometry_shader4 1\n#define GL_GEOMETRY_SHADER_EXT            0x8DD9\n#define GL_GEOMETRY_VERTICES_OUT_EXT      0x8DDA\n#define GL_GEOMETRY_INPUT_TYPE_EXT        0x8DDB\n#define GL_GEOMETRY_OUTPUT_TYPE_EXT       0x8DDC\n#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29\n#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD\n#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE\n#define GL_MAX_VARYING_COMPONENTS_EXT     0x8B4B\n#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF\n#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0\n#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1\n#define GL_LINES_ADJACENCY_EXT            0x000A\n#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B\n#define GL_TRIANGLES_ADJACENCY_EXT        0x000C\n#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8\n#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9\n#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4\n#define GL_PROGRAM_POINT_SIZE_EXT         0x8642\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\n#endif\n#endif /* GL_EXT_geometry_shader4 */\n\n#ifndef GL_EXT_gpu_program_parameters\n#define GL_EXT_gpu_program_parameters 1\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params);\n#endif\n#endif /* GL_EXT_gpu_program_parameters */\n\n#ifndef GL_EXT_gpu_shader4\n#define GL_EXT_gpu_shader4 1\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD\n#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0\n#define GL_SAMPLER_2D_ARRAY_EXT           0x8DC1\n#define GL_SAMPLER_BUFFER_EXT             0x8DC2\n#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT    0x8DC3\n#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT    0x8DC4\n#define GL_SAMPLER_CUBE_SHADOW_EXT        0x8DC5\n#define GL_UNSIGNED_INT_VEC2_EXT          0x8DC6\n#define GL_UNSIGNED_INT_VEC3_EXT          0x8DC7\n#define GL_UNSIGNED_INT_VEC4_EXT          0x8DC8\n#define GL_INT_SAMPLER_1D_EXT             0x8DC9\n#define GL_INT_SAMPLER_2D_EXT             0x8DCA\n#define GL_INT_SAMPLER_3D_EXT             0x8DCB\n#define GL_INT_SAMPLER_CUBE_EXT           0x8DCC\n#define GL_INT_SAMPLER_2D_RECT_EXT        0x8DCD\n#define GL_INT_SAMPLER_1D_ARRAY_EXT       0x8DCE\n#define GL_INT_SAMPLER_2D_ARRAY_EXT       0x8DCF\n#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0\n#define GL_UNSIGNED_INT_SAMPLER_1D_EXT    0x8DD1\n#define GL_UNSIGNED_INT_SAMPLER_2D_EXT    0x8DD2\n#define GL_UNSIGNED_INT_SAMPLER_3D_EXT    0x8DD3\n#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT  0x8DD4\n#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5\n#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6\n#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7\n#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8\n#define GL_MIN_PROGRAM_TEXEL_OFFSET_EXT   0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET_EXT   0x8905\ntypedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params);\ntypedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\ntypedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\ntypedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params);\nGLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name);\nGLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);\nGLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1);\nGLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2);\nGLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\nGLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value);\nGLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value);\n#endif\n#endif /* GL_EXT_gpu_shader4 */\n\n#ifndef GL_EXT_histogram\n#define GL_EXT_histogram 1\n#define GL_HISTOGRAM_EXT                  0x8024\n#define GL_PROXY_HISTOGRAM_EXT            0x8025\n#define GL_HISTOGRAM_WIDTH_EXT            0x8026\n#define GL_HISTOGRAM_FORMAT_EXT           0x8027\n#define GL_HISTOGRAM_RED_SIZE_EXT         0x8028\n#define GL_HISTOGRAM_GREEN_SIZE_EXT       0x8029\n#define GL_HISTOGRAM_BLUE_SIZE_EXT        0x802A\n#define GL_HISTOGRAM_ALPHA_SIZE_EXT       0x802B\n#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT   0x802C\n#define GL_HISTOGRAM_SINK_EXT             0x802D\n#define GL_MINMAX_EXT                     0x802E\n#define GL_MINMAX_FORMAT_EXT              0x802F\n#define GL_MINMAX_SINK_EXT                0x8030\n#define GL_TABLE_TOO_LARGE_EXT            0x8031\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink);\ntypedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values);\nGLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink);\nGLAPI void APIENTRY glResetHistogramEXT (GLenum target);\nGLAPI void APIENTRY glResetMinmaxEXT (GLenum target);\n#endif\n#endif /* GL_EXT_histogram */\n\n#ifndef GL_EXT_index_array_formats\n#define GL_EXT_index_array_formats 1\n#define GL_IUI_V2F_EXT                    0x81AD\n#define GL_IUI_V3F_EXT                    0x81AE\n#define GL_IUI_N3F_V2F_EXT                0x81AF\n#define GL_IUI_N3F_V3F_EXT                0x81B0\n#define GL_T2F_IUI_V2F_EXT                0x81B1\n#define GL_T2F_IUI_V3F_EXT                0x81B2\n#define GL_T2F_IUI_N3F_V2F_EXT            0x81B3\n#define GL_T2F_IUI_N3F_V3F_EXT            0x81B4\n#endif /* GL_EXT_index_array_formats */\n\n#ifndef GL_EXT_index_func\n#define GL_EXT_index_func 1\n#define GL_INDEX_TEST_EXT                 0x81B5\n#define GL_INDEX_TEST_FUNC_EXT            0x81B6\n#define GL_INDEX_TEST_REF_EXT             0x81B7\ntypedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref);\n#endif\n#endif /* GL_EXT_index_func */\n\n#ifndef GL_EXT_index_material\n#define GL_EXT_index_material 1\n#define GL_INDEX_MATERIAL_EXT             0x81B8\n#define GL_INDEX_MATERIAL_PARAMETER_EXT   0x81B9\n#define GL_INDEX_MATERIAL_FACE_EXT        0x81BA\ntypedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode);\n#endif\n#endif /* GL_EXT_index_material */\n\n#ifndef GL_EXT_index_texture\n#define GL_EXT_index_texture 1\n#endif /* GL_EXT_index_texture */\n\n#ifndef GL_EXT_light_texture\n#define GL_EXT_light_texture 1\n#define GL_FRAGMENT_MATERIAL_EXT          0x8349\n#define GL_FRAGMENT_NORMAL_EXT            0x834A\n#define GL_FRAGMENT_COLOR_EXT             0x834C\n#define GL_ATTENUATION_EXT                0x834D\n#define GL_SHADOW_ATTENUATION_EXT         0x834E\n#define GL_TEXTURE_APPLICATION_MODE_EXT   0x834F\n#define GL_TEXTURE_LIGHT_EXT              0x8350\n#define GL_TEXTURE_MATERIAL_FACE_EXT      0x8351\n#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352\ntypedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode);\ntypedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname);\ntypedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glApplyTextureEXT (GLenum mode);\nGLAPI void APIENTRY glTextureLightEXT (GLenum pname);\nGLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode);\n#endif\n#endif /* GL_EXT_light_texture */\n\n#ifndef GL_EXT_misc_attribute\n#define GL_EXT_misc_attribute 1\n#endif /* GL_EXT_misc_attribute */\n\n#ifndef GL_EXT_multi_draw_arrays\n#define GL_EXT_multi_draw_arrays 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\n#endif\n#endif /* GL_EXT_multi_draw_arrays */\n\n#ifndef GL_EXT_multisample\n#define GL_EXT_multisample 1\n#define GL_MULTISAMPLE_EXT                0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_EXT       0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_EXT        0x809F\n#define GL_SAMPLE_MASK_EXT                0x80A0\n#define GL_1PASS_EXT                      0x80A1\n#define GL_2PASS_0_EXT                    0x80A2\n#define GL_2PASS_1_EXT                    0x80A3\n#define GL_4PASS_0_EXT                    0x80A4\n#define GL_4PASS_1_EXT                    0x80A5\n#define GL_4PASS_2_EXT                    0x80A6\n#define GL_4PASS_3_EXT                    0x80A7\n#define GL_SAMPLE_BUFFERS_EXT             0x80A8\n#define GL_SAMPLES_EXT                    0x80A9\n#define GL_SAMPLE_MASK_VALUE_EXT          0x80AA\n#define GL_SAMPLE_MASK_INVERT_EXT         0x80AB\n#define GL_SAMPLE_PATTERN_EXT             0x80AC\n#define GL_MULTISAMPLE_BIT_EXT            0x20000000\ntypedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternEXT (GLenum pattern);\n#endif\n#endif /* GL_EXT_multisample */\n\n#ifndef GL_EXT_packed_depth_stencil\n#define GL_EXT_packed_depth_stencil 1\n#define GL_DEPTH_STENCIL_EXT              0x84F9\n#define GL_UNSIGNED_INT_24_8_EXT          0x84FA\n#define GL_DEPTH24_STENCIL8_EXT           0x88F0\n#define GL_TEXTURE_STENCIL_SIZE_EXT       0x88F1\n#endif /* GL_EXT_packed_depth_stencil */\n\n#ifndef GL_EXT_packed_float\n#define GL_EXT_packed_float 1\n#define GL_R11F_G11F_B10F_EXT             0x8C3A\n#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B\n#define GL_RGBA_SIGNED_COMPONENTS_EXT     0x8C3C\n#endif /* GL_EXT_packed_float */\n\n#ifndef GL_EXT_packed_pixels\n#define GL_EXT_packed_pixels 1\n#define GL_UNSIGNED_BYTE_3_3_2_EXT        0x8032\n#define GL_UNSIGNED_SHORT_4_4_4_4_EXT     0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1_EXT     0x8034\n#define GL_UNSIGNED_INT_8_8_8_8_EXT       0x8035\n#define GL_UNSIGNED_INT_10_10_10_2_EXT    0x8036\n#endif /* GL_EXT_packed_pixels */\n\n#ifndef GL_EXT_paletted_texture\n#define GL_EXT_paletted_texture 1\n#define GL_COLOR_INDEX1_EXT               0x80E2\n#define GL_COLOR_INDEX2_EXT               0x80E3\n#define GL_COLOR_INDEX4_EXT               0x80E4\n#define GL_COLOR_INDEX8_EXT               0x80E5\n#define GL_COLOR_INDEX12_EXT              0x80E6\n#define GL_COLOR_INDEX16_EXT              0x80E7\n#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED\ntypedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, void *data);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, void *data);\nGLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_paletted_texture */\n\n#ifndef GL_EXT_pixel_buffer_object\n#define GL_EXT_pixel_buffer_object 1\n#define GL_PIXEL_PACK_BUFFER_EXT          0x88EB\n#define GL_PIXEL_UNPACK_BUFFER_EXT        0x88EC\n#define GL_PIXEL_PACK_BUFFER_BINDING_EXT  0x88ED\n#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF\n#endif /* GL_EXT_pixel_buffer_object */\n\n#ifndef GL_EXT_pixel_transform\n#define GL_EXT_pixel_transform 1\n#define GL_PIXEL_TRANSFORM_2D_EXT         0x8330\n#define GL_PIXEL_MAG_FILTER_EXT           0x8331\n#define GL_PIXEL_MIN_FILTER_EXT           0x8332\n#define GL_PIXEL_CUBIC_WEIGHT_EXT         0x8333\n#define GL_CUBIC_EXT                      0x8334\n#define GL_AVERAGE_EXT                    0x8335\n#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336\n#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337\n#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT  0x8338\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTransformParameterivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTransformParameterfvEXT (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_EXT_pixel_transform */\n\n#ifndef GL_EXT_pixel_transform_color_table\n#define GL_EXT_pixel_transform_color_table 1\n#endif /* GL_EXT_pixel_transform_color_table */\n\n#ifndef GL_EXT_point_parameters\n#define GL_EXT_point_parameters 1\n#define GL_POINT_SIZE_MIN_EXT             0x8126\n#define GL_POINT_SIZE_MAX_EXT             0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_EXT  0x8128\n#define GL_DISTANCE_ATTENUATION_EXT       0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_EXT_point_parameters */\n\n#ifndef GL_EXT_polygon_offset\n#define GL_EXT_polygon_offset 1\n#define GL_POLYGON_OFFSET_EXT             0x8037\n#define GL_POLYGON_OFFSET_FACTOR_EXT      0x8038\n#define GL_POLYGON_OFFSET_BIAS_EXT        0x8039\ntypedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias);\n#endif\n#endif /* GL_EXT_polygon_offset */\n\n#ifndef GL_EXT_provoking_vertex\n#define GL_EXT_provoking_vertex 1\n#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C\n#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D\n#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E\n#define GL_PROVOKING_VERTEX_EXT           0x8E4F\ntypedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProvokingVertexEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_provoking_vertex */\n\n#ifndef GL_EXT_rescale_normal\n#define GL_EXT_rescale_normal 1\n#define GL_RESCALE_NORMAL_EXT             0x803A\n#endif /* GL_EXT_rescale_normal */\n\n#ifndef GL_EXT_secondary_color\n#define GL_EXT_secondary_color 1\n#define GL_COLOR_SUM_EXT                  0x8458\n#define GL_CURRENT_SECONDARY_COLOR_EXT    0x8459\n#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A\n#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B\n#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C\n#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D\n#define GL_SECONDARY_COLOR_ARRAY_EXT      0x845E\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue);\nGLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v);\nGLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue);\nGLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v);\nGLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue);\nGLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v);\nGLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue);\nGLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v);\nGLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue);\nGLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v);\nGLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue);\nGLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v);\nGLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue);\nGLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v);\nGLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue);\nGLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v);\nGLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_secondary_color */\n\n#ifndef GL_EXT_separate_shader_objects\n#define GL_EXT_separate_shader_objects 1\n#define GL_ACTIVE_PROGRAM_EXT             0x8B8D\ntypedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program);\ntypedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program);\ntypedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program);\nGLAPI void APIENTRY glActiveProgramEXT (GLuint program);\nGLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);\n#endif\n#endif /* GL_EXT_separate_shader_objects */\n\n#ifndef GL_EXT_separate_specular_color\n#define GL_EXT_separate_specular_color 1\n#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT  0x81F8\n#define GL_SINGLE_COLOR_EXT               0x81F9\n#define GL_SEPARATE_SPECULAR_COLOR_EXT    0x81FA\n#endif /* GL_EXT_separate_specular_color */\n\n#ifndef GL_EXT_shader_image_load_formatted\n#define GL_EXT_shader_image_load_formatted 1\n#endif /* GL_EXT_shader_image_load_formatted */\n\n#ifndef GL_EXT_shader_image_load_store\n#define GL_EXT_shader_image_load_store 1\n#define GL_MAX_IMAGE_UNITS_EXT            0x8F38\n#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39\n#define GL_IMAGE_BINDING_NAME_EXT         0x8F3A\n#define GL_IMAGE_BINDING_LEVEL_EXT        0x8F3B\n#define GL_IMAGE_BINDING_LAYERED_EXT      0x8F3C\n#define GL_IMAGE_BINDING_LAYER_EXT        0x8F3D\n#define GL_IMAGE_BINDING_ACCESS_EXT       0x8F3E\n#define GL_IMAGE_1D_EXT                   0x904C\n#define GL_IMAGE_2D_EXT                   0x904D\n#define GL_IMAGE_3D_EXT                   0x904E\n#define GL_IMAGE_2D_RECT_EXT              0x904F\n#define GL_IMAGE_CUBE_EXT                 0x9050\n#define GL_IMAGE_BUFFER_EXT               0x9051\n#define GL_IMAGE_1D_ARRAY_EXT             0x9052\n#define GL_IMAGE_2D_ARRAY_EXT             0x9053\n#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054\n#define GL_IMAGE_2D_MULTISAMPLE_EXT       0x9055\n#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056\n#define GL_INT_IMAGE_1D_EXT               0x9057\n#define GL_INT_IMAGE_2D_EXT               0x9058\n#define GL_INT_IMAGE_3D_EXT               0x9059\n#define GL_INT_IMAGE_2D_RECT_EXT          0x905A\n#define GL_INT_IMAGE_CUBE_EXT             0x905B\n#define GL_INT_IMAGE_BUFFER_EXT           0x905C\n#define GL_INT_IMAGE_1D_ARRAY_EXT         0x905D\n#define GL_INT_IMAGE_2D_ARRAY_EXT         0x905E\n#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F\n#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT   0x9060\n#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061\n#define GL_UNSIGNED_INT_IMAGE_1D_EXT      0x9062\n#define GL_UNSIGNED_INT_IMAGE_2D_EXT      0x9063\n#define GL_UNSIGNED_INT_IMAGE_3D_EXT      0x9064\n#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065\n#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT    0x9066\n#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067\n#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068\n#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069\n#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B\n#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C\n#define GL_MAX_IMAGE_SAMPLES_EXT          0x906D\n#define GL_IMAGE_BINDING_FORMAT_EXT       0x906E\n#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001\n#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT  0x00000002\n#define GL_UNIFORM_BARRIER_BIT_EXT        0x00000004\n#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT  0x00000008\n#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020\n#define GL_COMMAND_BARRIER_BIT_EXT        0x00000040\n#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT   0x00000080\n#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100\n#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT  0x00000200\n#define GL_FRAMEBUFFER_BARRIER_BIT_EXT    0x00000400\n#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800\n#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000\n#define GL_ALL_BARRIER_BITS_EXT           0xFFFFFFFF\ntypedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\ntypedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format);\nGLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers);\n#endif\n#endif /* GL_EXT_shader_image_load_store */\n\n#ifndef GL_EXT_shader_integer_mix\n#define GL_EXT_shader_integer_mix 1\n#endif /* GL_EXT_shader_integer_mix */\n\n#ifndef GL_EXT_shadow_funcs\n#define GL_EXT_shadow_funcs 1\n#endif /* GL_EXT_shadow_funcs */\n\n#ifndef GL_EXT_shared_texture_palette\n#define GL_EXT_shared_texture_palette 1\n#define GL_SHARED_TEXTURE_PALETTE_EXT     0x81FB\n#endif /* GL_EXT_shared_texture_palette */\n\n#ifndef GL_EXT_stencil_clear_tag\n#define GL_EXT_stencil_clear_tag 1\n#define GL_STENCIL_TAG_BITS_EXT           0x88F2\n#define GL_STENCIL_CLEAR_TAG_VALUE_EXT    0x88F3\ntypedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag);\n#endif\n#endif /* GL_EXT_stencil_clear_tag */\n\n#ifndef GL_EXT_stencil_two_side\n#define GL_EXT_stencil_two_side 1\n#define GL_STENCIL_TEST_TWO_SIDE_EXT      0x8910\n#define GL_ACTIVE_STENCIL_FACE_EXT        0x8911\ntypedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face);\n#endif\n#endif /* GL_EXT_stencil_two_side */\n\n#ifndef GL_EXT_stencil_wrap\n#define GL_EXT_stencil_wrap 1\n#define GL_INCR_WRAP_EXT                  0x8507\n#define GL_DECR_WRAP_EXT                  0x8508\n#endif /* GL_EXT_stencil_wrap */\n\n#ifndef GL_EXT_subtexture\n#define GL_EXT_subtexture 1\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_EXT_subtexture */\n\n#ifndef GL_EXT_texture\n#define GL_EXT_texture 1\n#define GL_ALPHA4_EXT                     0x803B\n#define GL_ALPHA8_EXT                     0x803C\n#define GL_ALPHA12_EXT                    0x803D\n#define GL_ALPHA16_EXT                    0x803E\n#define GL_LUMINANCE4_EXT                 0x803F\n#define GL_LUMINANCE8_EXT                 0x8040\n#define GL_LUMINANCE12_EXT                0x8041\n#define GL_LUMINANCE16_EXT                0x8042\n#define GL_LUMINANCE4_ALPHA4_EXT          0x8043\n#define GL_LUMINANCE6_ALPHA2_EXT          0x8044\n#define GL_LUMINANCE8_ALPHA8_EXT          0x8045\n#define GL_LUMINANCE12_ALPHA4_EXT         0x8046\n#define GL_LUMINANCE12_ALPHA12_EXT        0x8047\n#define GL_LUMINANCE16_ALPHA16_EXT        0x8048\n#define GL_INTENSITY_EXT                  0x8049\n#define GL_INTENSITY4_EXT                 0x804A\n#define GL_INTENSITY8_EXT                 0x804B\n#define GL_INTENSITY12_EXT                0x804C\n#define GL_INTENSITY16_EXT                0x804D\n#define GL_RGB2_EXT                       0x804E\n#define GL_RGB4_EXT                       0x804F\n#define GL_RGB5_EXT                       0x8050\n#define GL_RGB8_EXT                       0x8051\n#define GL_RGB10_EXT                      0x8052\n#define GL_RGB12_EXT                      0x8053\n#define GL_RGB16_EXT                      0x8054\n#define GL_RGBA2_EXT                      0x8055\n#define GL_RGBA4_EXT                      0x8056\n#define GL_RGB5_A1_EXT                    0x8057\n#define GL_RGBA8_EXT                      0x8058\n#define GL_RGB10_A2_EXT                   0x8059\n#define GL_RGBA12_EXT                     0x805A\n#define GL_RGBA16_EXT                     0x805B\n#define GL_TEXTURE_RED_SIZE_EXT           0x805C\n#define GL_TEXTURE_GREEN_SIZE_EXT         0x805D\n#define GL_TEXTURE_BLUE_SIZE_EXT          0x805E\n#define GL_TEXTURE_ALPHA_SIZE_EXT         0x805F\n#define GL_TEXTURE_LUMINANCE_SIZE_EXT     0x8060\n#define GL_TEXTURE_INTENSITY_SIZE_EXT     0x8061\n#define GL_REPLACE_EXT                    0x8062\n#define GL_PROXY_TEXTURE_1D_EXT           0x8063\n#define GL_PROXY_TEXTURE_2D_EXT           0x8064\n#define GL_TEXTURE_TOO_LARGE_EXT          0x8065\n#endif /* GL_EXT_texture */\n\n#ifndef GL_EXT_texture3D\n#define GL_EXT_texture3D 1\n#define GL_PACK_SKIP_IMAGES_EXT           0x806B\n#define GL_PACK_IMAGE_HEIGHT_EXT          0x806C\n#define GL_UNPACK_SKIP_IMAGES_EXT         0x806D\n#define GL_UNPACK_IMAGE_HEIGHT_EXT        0x806E\n#define GL_TEXTURE_3D_EXT                 0x806F\n#define GL_PROXY_TEXTURE_3D_EXT           0x8070\n#define GL_TEXTURE_DEPTH_EXT              0x8071\n#define GL_TEXTURE_WRAP_R_EXT             0x8072\n#define GL_MAX_3D_TEXTURE_SIZE_EXT        0x8073\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_EXT_texture3D */\n\n#ifndef GL_EXT_texture_array\n#define GL_EXT_texture_array 1\n#define GL_TEXTURE_1D_ARRAY_EXT           0x8C18\n#define GL_PROXY_TEXTURE_1D_ARRAY_EXT     0x8C19\n#define GL_TEXTURE_2D_ARRAY_EXT           0x8C1A\n#define GL_PROXY_TEXTURE_2D_ARRAY_EXT     0x8C1B\n#define GL_TEXTURE_BINDING_1D_ARRAY_EXT   0x8C1C\n#define GL_TEXTURE_BINDING_2D_ARRAY_EXT   0x8C1D\n#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT   0x88FF\n#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E\n#endif /* GL_EXT_texture_array */\n\n#ifndef GL_EXT_texture_buffer_object\n#define GL_EXT_texture_buffer_object 1\n#define GL_TEXTURE_BUFFER_EXT             0x8C2A\n#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B\n#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C\n#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D\n#define GL_TEXTURE_BUFFER_FORMAT_EXT      0x8C2E\ntypedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);\n#endif\n#endif /* GL_EXT_texture_buffer_object */\n\n#ifndef GL_EXT_texture_compression_latc\n#define GL_EXT_texture_compression_latc 1\n#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70\n#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71\n#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72\n#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73\n#endif /* GL_EXT_texture_compression_latc */\n\n#ifndef GL_EXT_texture_compression_rgtc\n#define GL_EXT_texture_compression_rgtc 1\n#define GL_COMPRESSED_RED_RGTC1_EXT       0x8DBB\n#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC\n#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD\n#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE\n#endif /* GL_EXT_texture_compression_rgtc */\n\n#ifndef GL_EXT_texture_compression_s3tc\n#define GL_EXT_texture_compression_s3tc 1\n#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0\n#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1\n#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2\n#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3\n#endif /* GL_EXT_texture_compression_s3tc */\n\n#ifndef GL_EXT_texture_cube_map\n#define GL_EXT_texture_cube_map 1\n#define GL_NORMAL_MAP_EXT                 0x8511\n#define GL_REFLECTION_MAP_EXT             0x8512\n#define GL_TEXTURE_CUBE_MAP_EXT           0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP_EXT   0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A\n#define GL_PROXY_TEXTURE_CUBE_MAP_EXT     0x851B\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT  0x851C\n#endif /* GL_EXT_texture_cube_map */\n\n#ifndef GL_EXT_texture_env_add\n#define GL_EXT_texture_env_add 1\n#endif /* GL_EXT_texture_env_add */\n\n#ifndef GL_EXT_texture_env_combine\n#define GL_EXT_texture_env_combine 1\n#define GL_COMBINE_EXT                    0x8570\n#define GL_COMBINE_RGB_EXT                0x8571\n#define GL_COMBINE_ALPHA_EXT              0x8572\n#define GL_RGB_SCALE_EXT                  0x8573\n#define GL_ADD_SIGNED_EXT                 0x8574\n#define GL_INTERPOLATE_EXT                0x8575\n#define GL_CONSTANT_EXT                   0x8576\n#define GL_PRIMARY_COLOR_EXT              0x8577\n#define GL_PREVIOUS_EXT                   0x8578\n#define GL_SOURCE0_RGB_EXT                0x8580\n#define GL_SOURCE1_RGB_EXT                0x8581\n#define GL_SOURCE2_RGB_EXT                0x8582\n#define GL_SOURCE0_ALPHA_EXT              0x8588\n#define GL_SOURCE1_ALPHA_EXT              0x8589\n#define GL_SOURCE2_ALPHA_EXT              0x858A\n#define GL_OPERAND0_RGB_EXT               0x8590\n#define GL_OPERAND1_RGB_EXT               0x8591\n#define GL_OPERAND2_RGB_EXT               0x8592\n#define GL_OPERAND0_ALPHA_EXT             0x8598\n#define GL_OPERAND1_ALPHA_EXT             0x8599\n#define GL_OPERAND2_ALPHA_EXT             0x859A\n#endif /* GL_EXT_texture_env_combine */\n\n#ifndef GL_EXT_texture_env_dot3\n#define GL_EXT_texture_env_dot3 1\n#define GL_DOT3_RGB_EXT                   0x8740\n#define GL_DOT3_RGBA_EXT                  0x8741\n#endif /* GL_EXT_texture_env_dot3 */\n\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_EXT_texture_filter_anisotropic 1\n#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE\n#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF\n#endif /* GL_EXT_texture_filter_anisotropic */\n\n#ifndef GL_EXT_texture_integer\n#define GL_EXT_texture_integer 1\n#define GL_RGBA32UI_EXT                   0x8D70\n#define GL_RGB32UI_EXT                    0x8D71\n#define GL_ALPHA32UI_EXT                  0x8D72\n#define GL_INTENSITY32UI_EXT              0x8D73\n#define GL_LUMINANCE32UI_EXT              0x8D74\n#define GL_LUMINANCE_ALPHA32UI_EXT        0x8D75\n#define GL_RGBA16UI_EXT                   0x8D76\n#define GL_RGB16UI_EXT                    0x8D77\n#define GL_ALPHA16UI_EXT                  0x8D78\n#define GL_INTENSITY16UI_EXT              0x8D79\n#define GL_LUMINANCE16UI_EXT              0x8D7A\n#define GL_LUMINANCE_ALPHA16UI_EXT        0x8D7B\n#define GL_RGBA8UI_EXT                    0x8D7C\n#define GL_RGB8UI_EXT                     0x8D7D\n#define GL_ALPHA8UI_EXT                   0x8D7E\n#define GL_INTENSITY8UI_EXT               0x8D7F\n#define GL_LUMINANCE8UI_EXT               0x8D80\n#define GL_LUMINANCE_ALPHA8UI_EXT         0x8D81\n#define GL_RGBA32I_EXT                    0x8D82\n#define GL_RGB32I_EXT                     0x8D83\n#define GL_ALPHA32I_EXT                   0x8D84\n#define GL_INTENSITY32I_EXT               0x8D85\n#define GL_LUMINANCE32I_EXT               0x8D86\n#define GL_LUMINANCE_ALPHA32I_EXT         0x8D87\n#define GL_RGBA16I_EXT                    0x8D88\n#define GL_RGB16I_EXT                     0x8D89\n#define GL_ALPHA16I_EXT                   0x8D8A\n#define GL_INTENSITY16I_EXT               0x8D8B\n#define GL_LUMINANCE16I_EXT               0x8D8C\n#define GL_LUMINANCE_ALPHA16I_EXT         0x8D8D\n#define GL_RGBA8I_EXT                     0x8D8E\n#define GL_RGB8I_EXT                      0x8D8F\n#define GL_ALPHA8I_EXT                    0x8D90\n#define GL_INTENSITY8I_EXT                0x8D91\n#define GL_LUMINANCE8I_EXT                0x8D92\n#define GL_LUMINANCE_ALPHA8I_EXT          0x8D93\n#define GL_RED_INTEGER_EXT                0x8D94\n#define GL_GREEN_INTEGER_EXT              0x8D95\n#define GL_BLUE_INTEGER_EXT               0x8D96\n#define GL_ALPHA_INTEGER_EXT              0x8D97\n#define GL_RGB_INTEGER_EXT                0x8D98\n#define GL_RGBA_INTEGER_EXT               0x8D99\n#define GL_BGR_INTEGER_EXT                0x8D9A\n#define GL_BGRA_INTEGER_EXT               0x8D9B\n#define GL_LUMINANCE_INTEGER_EXT          0x8D9C\n#define GL_LUMINANCE_ALPHA_INTEGER_EXT    0x8D9D\n#define GL_RGBA_INTEGER_MODE_EXT          0x8D9E\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha);\ntypedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);\nGLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha);\nGLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha);\n#endif\n#endif /* GL_EXT_texture_integer */\n\n#ifndef GL_EXT_texture_lod_bias\n#define GL_EXT_texture_lod_bias 1\n#define GL_MAX_TEXTURE_LOD_BIAS_EXT       0x84FD\n#define GL_TEXTURE_FILTER_CONTROL_EXT     0x8500\n#define GL_TEXTURE_LOD_BIAS_EXT           0x8501\n#endif /* GL_EXT_texture_lod_bias */\n\n#ifndef GL_EXT_texture_mirror_clamp\n#define GL_EXT_texture_mirror_clamp 1\n#define GL_MIRROR_CLAMP_EXT               0x8742\n#define GL_MIRROR_CLAMP_TO_EDGE_EXT       0x8743\n#define GL_MIRROR_CLAMP_TO_BORDER_EXT     0x8912\n#endif /* GL_EXT_texture_mirror_clamp */\n\n#ifndef GL_EXT_texture_object\n#define GL_EXT_texture_object 1\n#define GL_TEXTURE_PRIORITY_EXT           0x8066\n#define GL_TEXTURE_RESIDENT_EXT           0x8067\n#define GL_TEXTURE_1D_BINDING_EXT         0x8068\n#define GL_TEXTURE_2D_BINDING_EXT         0x8069\n#define GL_TEXTURE_3D_BINDING_EXT         0x806A\ntypedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures);\ntypedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences);\nGLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture);\nGLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures);\nGLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures);\nGLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture);\nGLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities);\n#endif\n#endif /* GL_EXT_texture_object */\n\n#ifndef GL_EXT_texture_perturb_normal\n#define GL_EXT_texture_perturb_normal 1\n#define GL_PERTURB_EXT                    0x85AE\n#define GL_TEXTURE_NORMAL_EXT             0x85AF\ntypedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureNormalEXT (GLenum mode);\n#endif\n#endif /* GL_EXT_texture_perturb_normal */\n\n#ifndef GL_EXT_texture_sRGB\n#define GL_EXT_texture_sRGB 1\n#define GL_SRGB_EXT                       0x8C40\n#define GL_SRGB8_EXT                      0x8C41\n#define GL_SRGB_ALPHA_EXT                 0x8C42\n#define GL_SRGB8_ALPHA8_EXT               0x8C43\n#define GL_SLUMINANCE_ALPHA_EXT           0x8C44\n#define GL_SLUMINANCE8_ALPHA8_EXT         0x8C45\n#define GL_SLUMINANCE_EXT                 0x8C46\n#define GL_SLUMINANCE8_EXT                0x8C47\n#define GL_COMPRESSED_SRGB_EXT            0x8C48\n#define GL_COMPRESSED_SRGB_ALPHA_EXT      0x8C49\n#define GL_COMPRESSED_SLUMINANCE_EXT      0x8C4A\n#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B\n#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT  0x8C4C\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F\n#endif /* GL_EXT_texture_sRGB */\n\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_EXT_texture_sRGB_decode 1\n#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48\n#define GL_DECODE_EXT                     0x8A49\n#define GL_SKIP_DECODE_EXT                0x8A4A\n#endif /* GL_EXT_texture_sRGB_decode */\n\n#ifndef GL_EXT_texture_shared_exponent\n#define GL_EXT_texture_shared_exponent 1\n#define GL_RGB9_E5_EXT                    0x8C3D\n#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT   0x8C3E\n#define GL_TEXTURE_SHARED_SIZE_EXT        0x8C3F\n#endif /* GL_EXT_texture_shared_exponent */\n\n#ifndef GL_EXT_texture_snorm\n#define GL_EXT_texture_snorm 1\n#define GL_ALPHA_SNORM                    0x9010\n#define GL_LUMINANCE_SNORM                0x9011\n#define GL_LUMINANCE_ALPHA_SNORM          0x9012\n#define GL_INTENSITY_SNORM                0x9013\n#define GL_ALPHA8_SNORM                   0x9014\n#define GL_LUMINANCE8_SNORM               0x9015\n#define GL_LUMINANCE8_ALPHA8_SNORM        0x9016\n#define GL_INTENSITY8_SNORM               0x9017\n#define GL_ALPHA16_SNORM                  0x9018\n#define GL_LUMINANCE16_SNORM              0x9019\n#define GL_LUMINANCE16_ALPHA16_SNORM      0x901A\n#define GL_INTENSITY16_SNORM              0x901B\n#define GL_RED_SNORM                      0x8F90\n#define GL_RG_SNORM                       0x8F91\n#define GL_RGB_SNORM                      0x8F92\n#define GL_RGBA_SNORM                     0x8F93\n#endif /* GL_EXT_texture_snorm */\n\n#ifndef GL_EXT_texture_swizzle\n#define GL_EXT_texture_swizzle 1\n#define GL_TEXTURE_SWIZZLE_R_EXT          0x8E42\n#define GL_TEXTURE_SWIZZLE_G_EXT          0x8E43\n#define GL_TEXTURE_SWIZZLE_B_EXT          0x8E44\n#define GL_TEXTURE_SWIZZLE_A_EXT          0x8E45\n#define GL_TEXTURE_SWIZZLE_RGBA_EXT       0x8E46\n#endif /* GL_EXT_texture_swizzle */\n\n#ifndef GL_EXT_timer_query\n#define GL_EXT_timer_query 1\n#define GL_TIME_ELAPSED_EXT               0x88BF\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);\nGLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);\n#endif\n#endif /* GL_EXT_timer_query */\n\n#ifndef GL_EXT_transform_feedback\n#define GL_EXT_transform_feedback 1\n#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT  0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F\n#define GL_INTERLEAVED_ATTRIBS_EXT        0x8C8C\n#define GL_SEPARATE_ATTRIBS_EXT           0x8C8D\n#define GL_PRIMITIVES_GENERATED_EXT       0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88\n#define GL_RASTERIZER_DISCARD_EXT         0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F\n#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackEXT (void);\nGLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\n#endif\n#endif /* GL_EXT_transform_feedback */\n\n#ifndef GL_EXT_vertex_array\n#define GL_EXT_vertex_array 1\n#define GL_VERTEX_ARRAY_EXT               0x8074\n#define GL_NORMAL_ARRAY_EXT               0x8075\n#define GL_COLOR_ARRAY_EXT                0x8076\n#define GL_INDEX_ARRAY_EXT                0x8077\n#define GL_TEXTURE_COORD_ARRAY_EXT        0x8078\n#define GL_EDGE_FLAG_ARRAY_EXT            0x8079\n#define GL_VERTEX_ARRAY_SIZE_EXT          0x807A\n#define GL_VERTEX_ARRAY_TYPE_EXT          0x807B\n#define GL_VERTEX_ARRAY_STRIDE_EXT        0x807C\n#define GL_VERTEX_ARRAY_COUNT_EXT         0x807D\n#define GL_NORMAL_ARRAY_TYPE_EXT          0x807E\n#define GL_NORMAL_ARRAY_STRIDE_EXT        0x807F\n#define GL_NORMAL_ARRAY_COUNT_EXT         0x8080\n#define GL_COLOR_ARRAY_SIZE_EXT           0x8081\n#define GL_COLOR_ARRAY_TYPE_EXT           0x8082\n#define GL_COLOR_ARRAY_STRIDE_EXT         0x8083\n#define GL_COLOR_ARRAY_COUNT_EXT          0x8084\n#define GL_INDEX_ARRAY_TYPE_EXT           0x8085\n#define GL_INDEX_ARRAY_STRIDE_EXT         0x8086\n#define GL_INDEX_ARRAY_COUNT_EXT          0x8087\n#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT   0x8088\n#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT   0x8089\n#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A\n#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT  0x808B\n#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT     0x808C\n#define GL_EDGE_FLAG_ARRAY_COUNT_EXT      0x808D\n#define GL_VERTEX_ARRAY_POINTER_EXT       0x808E\n#define GL_NORMAL_ARRAY_POINTER_EXT       0x808F\n#define GL_COLOR_ARRAY_POINTER_EXT        0x8090\n#define GL_INDEX_ARRAY_POINTER_EXT        0x8091\n#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092\n#define GL_EDGE_FLAG_ARRAY_POINTER_EXT    0x8093\ntypedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i);\ntypedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);\ntypedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, void **params);\ntypedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glArrayElementEXT (GLint i);\nGLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count);\nGLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer);\nGLAPI void APIENTRY glGetPointervEXT (GLenum pname, void **params);\nGLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\nGLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const void *pointer);\n#endif\n#endif /* GL_EXT_vertex_array */\n\n#ifndef GL_EXT_vertex_array_bgra\n#define GL_EXT_vertex_array_bgra 1\n#endif /* GL_EXT_vertex_array_bgra */\n\n#ifndef GL_EXT_vertex_attrib_64bit\n#define GL_EXT_vertex_attrib_64bit 1\n#define GL_DOUBLE_VEC2_EXT                0x8FFC\n#define GL_DOUBLE_VEC3_EXT                0x8FFD\n#define GL_DOUBLE_VEC4_EXT                0x8FFE\n#define GL_DOUBLE_MAT2_EXT                0x8F46\n#define GL_DOUBLE_MAT3_EXT                0x8F47\n#define GL_DOUBLE_MAT4_EXT                0x8F48\n#define GL_DOUBLE_MAT2x3_EXT              0x8F49\n#define GL_DOUBLE_MAT2x4_EXT              0x8F4A\n#define GL_DOUBLE_MAT3x2_EXT              0x8F4B\n#define GL_DOUBLE_MAT3x4_EXT              0x8F4C\n#define GL_DOUBLE_MAT4x2_EXT              0x8F4D\n#define GL_DOUBLE_MAT4x3_EXT              0x8F4E\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params);\n#endif\n#endif /* GL_EXT_vertex_attrib_64bit */\n\n#ifndef GL_EXT_vertex_shader\n#define GL_EXT_vertex_shader 1\n#define GL_VERTEX_SHADER_EXT              0x8780\n#define GL_VERTEX_SHADER_BINDING_EXT      0x8781\n#define GL_OP_INDEX_EXT                   0x8782\n#define GL_OP_NEGATE_EXT                  0x8783\n#define GL_OP_DOT3_EXT                    0x8784\n#define GL_OP_DOT4_EXT                    0x8785\n#define GL_OP_MUL_EXT                     0x8786\n#define GL_OP_ADD_EXT                     0x8787\n#define GL_OP_MADD_EXT                    0x8788\n#define GL_OP_FRAC_EXT                    0x8789\n#define GL_OP_MAX_EXT                     0x878A\n#define GL_OP_MIN_EXT                     0x878B\n#define GL_OP_SET_GE_EXT                  0x878C\n#define GL_OP_SET_LT_EXT                  0x878D\n#define GL_OP_CLAMP_EXT                   0x878E\n#define GL_OP_FLOOR_EXT                   0x878F\n#define GL_OP_ROUND_EXT                   0x8790\n#define GL_OP_EXP_BASE_2_EXT              0x8791\n#define GL_OP_LOG_BASE_2_EXT              0x8792\n#define GL_OP_POWER_EXT                   0x8793\n#define GL_OP_RECIP_EXT                   0x8794\n#define GL_OP_RECIP_SQRT_EXT              0x8795\n#define GL_OP_SUB_EXT                     0x8796\n#define GL_OP_CROSS_PRODUCT_EXT           0x8797\n#define GL_OP_MULTIPLY_MATRIX_EXT         0x8798\n#define GL_OP_MOV_EXT                     0x8799\n#define GL_OUTPUT_VERTEX_EXT              0x879A\n#define GL_OUTPUT_COLOR0_EXT              0x879B\n#define GL_OUTPUT_COLOR1_EXT              0x879C\n#define GL_OUTPUT_TEXTURE_COORD0_EXT      0x879D\n#define GL_OUTPUT_TEXTURE_COORD1_EXT      0x879E\n#define GL_OUTPUT_TEXTURE_COORD2_EXT      0x879F\n#define GL_OUTPUT_TEXTURE_COORD3_EXT      0x87A0\n#define GL_OUTPUT_TEXTURE_COORD4_EXT      0x87A1\n#define GL_OUTPUT_TEXTURE_COORD5_EXT      0x87A2\n#define GL_OUTPUT_TEXTURE_COORD6_EXT      0x87A3\n#define GL_OUTPUT_TEXTURE_COORD7_EXT      0x87A4\n#define GL_OUTPUT_TEXTURE_COORD8_EXT      0x87A5\n#define GL_OUTPUT_TEXTURE_COORD9_EXT      0x87A6\n#define GL_OUTPUT_TEXTURE_COORD10_EXT     0x87A7\n#define GL_OUTPUT_TEXTURE_COORD11_EXT     0x87A8\n#define GL_OUTPUT_TEXTURE_COORD12_EXT     0x87A9\n#define GL_OUTPUT_TEXTURE_COORD13_EXT     0x87AA\n#define GL_OUTPUT_TEXTURE_COORD14_EXT     0x87AB\n#define GL_OUTPUT_TEXTURE_COORD15_EXT     0x87AC\n#define GL_OUTPUT_TEXTURE_COORD16_EXT     0x87AD\n#define GL_OUTPUT_TEXTURE_COORD17_EXT     0x87AE\n#define GL_OUTPUT_TEXTURE_COORD18_EXT     0x87AF\n#define GL_OUTPUT_TEXTURE_COORD19_EXT     0x87B0\n#define GL_OUTPUT_TEXTURE_COORD20_EXT     0x87B1\n#define GL_OUTPUT_TEXTURE_COORD21_EXT     0x87B2\n#define GL_OUTPUT_TEXTURE_COORD22_EXT     0x87B3\n#define GL_OUTPUT_TEXTURE_COORD23_EXT     0x87B4\n#define GL_OUTPUT_TEXTURE_COORD24_EXT     0x87B5\n#define GL_OUTPUT_TEXTURE_COORD25_EXT     0x87B6\n#define GL_OUTPUT_TEXTURE_COORD26_EXT     0x87B7\n#define GL_OUTPUT_TEXTURE_COORD27_EXT     0x87B8\n#define GL_OUTPUT_TEXTURE_COORD28_EXT     0x87B9\n#define GL_OUTPUT_TEXTURE_COORD29_EXT     0x87BA\n#define GL_OUTPUT_TEXTURE_COORD30_EXT     0x87BB\n#define GL_OUTPUT_TEXTURE_COORD31_EXT     0x87BC\n#define GL_OUTPUT_FOG_EXT                 0x87BD\n#define GL_SCALAR_EXT                     0x87BE\n#define GL_VECTOR_EXT                     0x87BF\n#define GL_MATRIX_EXT                     0x87C0\n#define GL_VARIANT_EXT                    0x87C1\n#define GL_INVARIANT_EXT                  0x87C2\n#define GL_LOCAL_CONSTANT_EXT             0x87C3\n#define GL_LOCAL_EXT                      0x87C4\n#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5\n#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6\n#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7\n#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8\n#define GL_MAX_VERTEX_SHADER_LOCALS_EXT   0x87C9\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD\n#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE\n#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF\n#define GL_VERTEX_SHADER_VARIANTS_EXT     0x87D0\n#define GL_VERTEX_SHADER_INVARIANTS_EXT   0x87D1\n#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2\n#define GL_VERTEX_SHADER_LOCALS_EXT       0x87D3\n#define GL_VERTEX_SHADER_OPTIMIZED_EXT    0x87D4\n#define GL_X_EXT                          0x87D5\n#define GL_Y_EXT                          0x87D6\n#define GL_Z_EXT                          0x87D7\n#define GL_W_EXT                          0x87D8\n#define GL_NEGATIVE_X_EXT                 0x87D9\n#define GL_NEGATIVE_Y_EXT                 0x87DA\n#define GL_NEGATIVE_Z_EXT                 0x87DB\n#define GL_NEGATIVE_W_EXT                 0x87DC\n#define GL_ZERO_EXT                       0x87DD\n#define GL_ONE_EXT                        0x87DE\n#define GL_NEGATIVE_ONE_EXT               0x87DF\n#define GL_NORMALIZED_RANGE_EXT           0x87E0\n#define GL_FULL_RANGE_EXT                 0x87E1\n#define GL_CURRENT_VERTEX_EXT             0x87E2\n#define GL_MVP_MATRIX_EXT                 0x87E3\n#define GL_VARIANT_VALUE_EXT              0x87E4\n#define GL_VARIANT_DATATYPE_EXT           0x87E5\n#define GL_VARIANT_ARRAY_STRIDE_EXT       0x87E6\n#define GL_VARIANT_ARRAY_TYPE_EXT         0x87E7\n#define GL_VARIANT_ARRAY_EXT              0x87E8\n#define GL_VARIANT_ARRAY_POINTER_EXT      0x87E9\n#define GL_INVARIANT_VALUE_EXT            0x87EA\n#define GL_INVARIANT_DATATYPE_EXT         0x87EB\n#define GL_LOCAL_CONSTANT_VALUE_EXT       0x87EC\n#define GL_LOCAL_CONSTANT_DATATYPE_EXT    0x87ED\ntypedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void);\ntypedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range);\ntypedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1);\ntypedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\ntypedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\ntypedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\ntypedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num);\ntypedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\ntypedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr);\ntypedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr);\ntypedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr);\ntypedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr);\ntypedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr);\ntypedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr);\ntypedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id);\ntypedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value);\ntypedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value);\ntypedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap);\ntypedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, void **data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data);\ntypedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVertexShaderEXT (void);\nGLAPI void APIENTRY glEndVertexShaderEXT (void);\nGLAPI void APIENTRY glBindVertexShaderEXT (GLuint id);\nGLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range);\nGLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id);\nGLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1);\nGLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2);\nGLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3);\nGLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW);\nGLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num);\nGLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components);\nGLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const void *addr);\nGLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const void *addr);\nGLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr);\nGLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr);\nGLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr);\nGLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr);\nGLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr);\nGLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr);\nGLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr);\nGLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr);\nGLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const void *addr);\nGLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id);\nGLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id);\nGLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value);\nGLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value);\nGLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value);\nGLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value);\nGLAPI GLuint APIENTRY glBindParameterEXT (GLenum value);\nGLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap);\nGLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, void **data);\nGLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\nGLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data);\nGLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data);\nGLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data);\n#endif\n#endif /* GL_EXT_vertex_shader */\n\n#ifndef GL_EXT_vertex_weighting\n#define GL_EXT_vertex_weighting 1\n#define GL_MODELVIEW0_STACK_DEPTH_EXT     0x0BA3\n#define GL_MODELVIEW1_STACK_DEPTH_EXT     0x8502\n#define GL_MODELVIEW0_MATRIX_EXT          0x0BA6\n#define GL_MODELVIEW1_MATRIX_EXT          0x8506\n#define GL_VERTEX_WEIGHTING_EXT           0x8509\n#define GL_MODELVIEW0_EXT                 0x1700\n#define GL_MODELVIEW1_EXT                 0x850A\n#define GL_CURRENT_VERTEX_WEIGHT_EXT      0x850B\n#define GL_VERTEX_WEIGHT_ARRAY_EXT        0x850C\n#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT   0x850D\n#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT   0x850E\n#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F\n#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight);\nGLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight);\nGLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer);\n#endif\n#endif /* GL_EXT_vertex_weighting */\n\n#ifndef GL_EXT_x11_sync_object\n#define GL_EXT_x11_sync_object 1\n#define GL_SYNC_X11_FENCE_EXT             0x90E1\ntypedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);\n#endif\n#endif /* GL_EXT_x11_sync_object */\n\n#ifndef GL_GREMEDY_frame_terminator\n#define GL_GREMEDY_frame_terminator 1\ntypedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameTerminatorGREMEDY (void);\n#endif\n#endif /* GL_GREMEDY_frame_terminator */\n\n#ifndef GL_GREMEDY_string_marker\n#define GL_GREMEDY_string_marker 1\ntypedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const void *string);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const void *string);\n#endif\n#endif /* GL_GREMEDY_string_marker */\n\n#ifndef GL_HP_convolution_border_modes\n#define GL_HP_convolution_border_modes 1\n#define GL_IGNORE_BORDER_HP               0x8150\n#define GL_CONSTANT_BORDER_HP             0x8151\n#define GL_REPLICATE_BORDER_HP            0x8153\n#define GL_CONVOLUTION_BORDER_COLOR_HP    0x8154\n#endif /* GL_HP_convolution_border_modes */\n\n#ifndef GL_HP_image_transform\n#define GL_HP_image_transform 1\n#define GL_IMAGE_SCALE_X_HP               0x8155\n#define GL_IMAGE_SCALE_Y_HP               0x8156\n#define GL_IMAGE_TRANSLATE_X_HP           0x8157\n#define GL_IMAGE_TRANSLATE_Y_HP           0x8158\n#define GL_IMAGE_ROTATE_ANGLE_HP          0x8159\n#define GL_IMAGE_ROTATE_ORIGIN_X_HP       0x815A\n#define GL_IMAGE_ROTATE_ORIGIN_Y_HP       0x815B\n#define GL_IMAGE_MAG_FILTER_HP            0x815C\n#define GL_IMAGE_MIN_FILTER_HP            0x815D\n#define GL_IMAGE_CUBIC_WEIGHT_HP          0x815E\n#define GL_CUBIC_HP                       0x815F\n#define GL_AVERAGE_HP                     0x8160\n#define GL_IMAGE_TRANSFORM_2D_HP          0x8161\n#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162\n#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param);\nGLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_HP_image_transform */\n\n#ifndef GL_HP_occlusion_test\n#define GL_HP_occlusion_test 1\n#define GL_OCCLUSION_TEST_HP              0x8165\n#define GL_OCCLUSION_TEST_RESULT_HP       0x8166\n#endif /* GL_HP_occlusion_test */\n\n#ifndef GL_HP_texture_lighting\n#define GL_HP_texture_lighting 1\n#define GL_TEXTURE_LIGHTING_MODE_HP       0x8167\n#define GL_TEXTURE_POST_SPECULAR_HP       0x8168\n#define GL_TEXTURE_PRE_SPECULAR_HP        0x8169\n#endif /* GL_HP_texture_lighting */\n\n#ifndef GL_IBM_cull_vertex\n#define GL_IBM_cull_vertex 1\n#define GL_CULL_VERTEX_IBM                103050\n#endif /* GL_IBM_cull_vertex */\n\n#ifndef GL_IBM_multimode_draw_arrays\n#define GL_IBM_multimode_draw_arrays 1\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\ntypedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride);\nGLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, GLint modestride);\n#endif\n#endif /* GL_IBM_multimode_draw_arrays */\n\n#ifndef GL_IBM_rasterpos_clip\n#define GL_IBM_rasterpos_clip 1\n#define GL_RASTER_POSITION_UNCLIPPED_IBM  0x19262\n#endif /* GL_IBM_rasterpos_clip */\n\n#ifndef GL_IBM_static_data\n#define GL_IBM_static_data 1\n#define GL_ALL_STATIC_DATA_IBM            103060\n#define GL_STATIC_VERTEX_ARRAY_IBM        103061\ntypedef void (APIENTRYP PFNGLFLUSHSTATICDATAIBMPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushStaticDataIBM (GLenum target);\n#endif\n#endif /* GL_IBM_static_data */\n\n#ifndef GL_IBM_texture_mirrored_repeat\n#define GL_IBM_texture_mirrored_repeat 1\n#define GL_MIRRORED_REPEAT_IBM            0x8370\n#endif /* GL_IBM_texture_mirrored_repeat */\n\n#ifndef GL_IBM_vertex_array_lists\n#define GL_IBM_vertex_array_lists 1\n#define GL_VERTEX_ARRAY_LIST_IBM          103070\n#define GL_NORMAL_ARRAY_LIST_IBM          103071\n#define GL_COLOR_ARRAY_LIST_IBM           103072\n#define GL_INDEX_ARRAY_LIST_IBM           103073\n#define GL_TEXTURE_COORD_ARRAY_LIST_IBM   103074\n#define GL_EDGE_FLAG_ARRAY_LIST_IBM       103075\n#define GL_FOG_COORDINATE_ARRAY_LIST_IBM  103076\n#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077\n#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM   103080\n#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM   103081\n#define GL_COLOR_ARRAY_LIST_STRIDE_IBM    103082\n#define GL_INDEX_ARRAY_LIST_STRIDE_IBM    103083\n#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084\n#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085\n#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086\n#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087\ntypedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean **pointer, GLint ptrstride);\nGLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\nGLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const void **pointer, GLint ptrstride);\n#endif\n#endif /* GL_IBM_vertex_array_lists */\n\n#ifndef GL_INGR_blend_func_separate\n#define GL_INGR_blend_func_separate 1\ntypedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);\n#endif\n#endif /* GL_INGR_blend_func_separate */\n\n#ifndef GL_INGR_color_clamp\n#define GL_INGR_color_clamp 1\n#define GL_RED_MIN_CLAMP_INGR             0x8560\n#define GL_GREEN_MIN_CLAMP_INGR           0x8561\n#define GL_BLUE_MIN_CLAMP_INGR            0x8562\n#define GL_ALPHA_MIN_CLAMP_INGR           0x8563\n#define GL_RED_MAX_CLAMP_INGR             0x8564\n#define GL_GREEN_MAX_CLAMP_INGR           0x8565\n#define GL_BLUE_MAX_CLAMP_INGR            0x8566\n#define GL_ALPHA_MAX_CLAMP_INGR           0x8567\n#endif /* GL_INGR_color_clamp */\n\n#ifndef GL_INGR_interlace_read\n#define GL_INGR_interlace_read 1\n#define GL_INTERLACE_READ_INGR            0x8568\n#endif /* GL_INGR_interlace_read */\n\n#ifndef GL_INTEL_fragment_shader_ordering\n#define GL_INTEL_fragment_shader_ordering 1\n#endif /* GL_INTEL_fragment_shader_ordering */\n\n#ifndef GL_INTEL_map_texture\n#define GL_INTEL_map_texture 1\n#define GL_TEXTURE_MEMORY_LAYOUT_INTEL    0x83FF\n#define GL_LAYOUT_DEFAULT_INTEL           0\n#define GL_LAYOUT_LINEAR_INTEL            1\n#define GL_LAYOUT_LINEAR_CPU_CACHED_INTEL 2\ntypedef void (APIENTRYP PFNGLSYNCTEXTUREINTELPROC) (GLuint texture);\ntypedef void (APIENTRYP PFNGLUNMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level);\ntypedef void *(APIENTRYP PFNGLMAPTEXTURE2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSyncTextureINTEL (GLuint texture);\nGLAPI void APIENTRY glUnmapTexture2DINTEL (GLuint texture, GLint level);\nGLAPI void *APIENTRY glMapTexture2DINTEL (GLuint texture, GLint level, GLbitfield access, GLint *stride, GLenum *layout);\n#endif\n#endif /* GL_INTEL_map_texture */\n\n#ifndef GL_INTEL_parallel_arrays\n#define GL_INTEL_parallel_arrays 1\n#define GL_PARALLEL_ARRAYS_INTEL          0x83F4\n#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5\n#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6\n#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7\n#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8\ntypedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\ntypedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const void **pointer);\nGLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const void **pointer);\nGLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const void **pointer);\nGLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const void **pointer);\n#endif\n#endif /* GL_INTEL_parallel_arrays */\n\n#ifndef GL_INTEL_performance_query\n#define GL_INTEL_performance_query 1\n#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000\n#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001\n#define GL_PERFQUERY_WAIT_INTEL           0x83FB\n#define GL_PERFQUERY_FLUSH_INTEL          0x83FA\n#define GL_PERFQUERY_DONOT_FLUSH_INTEL    0x83F9\n#define GL_PERFQUERY_COUNTER_EVENT_INTEL  0x94F0\n#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1\n#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2\n#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3\n#define GL_PERFQUERY_COUNTER_RAW_INTEL    0x94F4\n#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5\n#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8\n#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9\n#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA\n#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB\n#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC\n#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD\n#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE\n#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF\n#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500\ntypedef void (APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);\ntypedef void (APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);\ntypedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);\ntypedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);\ntypedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);\ntypedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);\nGLAPI void APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);\nGLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);\nGLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);\nGLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\nGLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\nGLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);\nGLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\n#endif\n#endif /* GL_INTEL_performance_query */\n\n#ifndef GL_MESAX_texture_stack\n#define GL_MESAX_texture_stack 1\n#define GL_TEXTURE_1D_STACK_MESAX         0x8759\n#define GL_TEXTURE_2D_STACK_MESAX         0x875A\n#define GL_PROXY_TEXTURE_1D_STACK_MESAX   0x875B\n#define GL_PROXY_TEXTURE_2D_STACK_MESAX   0x875C\n#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D\n#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E\n#endif /* GL_MESAX_texture_stack */\n\n#ifndef GL_MESA_pack_invert\n#define GL_MESA_pack_invert 1\n#define GL_PACK_INVERT_MESA               0x8758\n#endif /* GL_MESA_pack_invert */\n\n#ifndef GL_MESA_resize_buffers\n#define GL_MESA_resize_buffers 1\ntypedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glResizeBuffersMESA (void);\n#endif\n#endif /* GL_MESA_resize_buffers */\n\n#ifndef GL_MESA_window_pos\n#define GL_MESA_window_pos 1\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y);\nGLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y);\nGLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y);\nGLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y);\nGLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v);\nGLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v);\nGLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v);\nGLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v);\nGLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v);\n#endif\n#endif /* GL_MESA_window_pos */\n\n#ifndef GL_MESA_ycbcr_texture\n#define GL_MESA_ycbcr_texture 1\n#define GL_UNSIGNED_SHORT_8_8_MESA        0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_MESA    0x85BB\n#define GL_YCBCR_MESA                     0x8757\n#endif /* GL_MESA_ycbcr_texture */\n\n#ifndef GL_NVX_conditional_render\n#define GL_NVX_conditional_render 1\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNVX (GLuint id);\nGLAPI void APIENTRY glEndConditionalRenderNVX (void);\n#endif\n#endif /* GL_NVX_conditional_render */\n\n#ifndef GL_NVX_gpu_memory_info\n#define GL_NVX_gpu_memory_info 1\n#define GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047\n#define GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048\n#define GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049\n#define GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A\n#define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B\n#endif /* GL_NVX_gpu_memory_info */\n\n#ifndef GL_NV_bindless_multi_draw_indirect\n#define GL_NV_bindless_multi_draw_indirect 1\ntypedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\ntypedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTBINDLESSNVPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMultiDrawArraysIndirectBindlessNV (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\nGLAPI void APIENTRY glMultiDrawElementsIndirectBindlessNV (GLenum mode, GLenum type, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount);\n#endif\n#endif /* GL_NV_bindless_multi_draw_indirect */\n\n#ifndef GL_NV_bindless_texture\n#define GL_NV_bindless_texture 1\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture);\ntypedef GLuint64 (APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef GLuint64 (APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\ntypedef GLboolean (APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle);\ntypedef GLboolean (APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint64 APIENTRY glGetTextureHandleNV (GLuint texture);\nGLAPI GLuint64 APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler);\nGLAPI void APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle);\nGLAPI GLuint64 APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format);\nGLAPI void APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access);\nGLAPI void APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle);\nGLAPI void APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value);\nGLAPI void APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value);\nGLAPI void APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value);\nGLAPI void APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values);\nGLAPI GLboolean APIENTRY glIsTextureHandleResidentNV (GLuint64 handle);\nGLAPI GLboolean APIENTRY glIsImageHandleResidentNV (GLuint64 handle);\n#endif\n#endif /* GL_NV_bindless_texture */\n\n#ifndef GL_NV_blend_equation_advanced\n#define GL_NV_blend_equation_advanced 1\n#define GL_BLEND_OVERLAP_NV               0x9281\n#define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280\n#define GL_BLUE_NV                        0x1905\n#define GL_COLORBURN_NV                   0x929A\n#define GL_COLORDODGE_NV                  0x9299\n#define GL_CONJOINT_NV                    0x9284\n#define GL_CONTRAST_NV                    0x92A1\n#define GL_DARKEN_NV                      0x9297\n#define GL_DIFFERENCE_NV                  0x929E\n#define GL_DISJOINT_NV                    0x9283\n#define GL_DST_ATOP_NV                    0x928F\n#define GL_DST_IN_NV                      0x928B\n#define GL_DST_NV                         0x9287\n#define GL_DST_OUT_NV                     0x928D\n#define GL_DST_OVER_NV                    0x9289\n#define GL_EXCLUSION_NV                   0x92A0\n#define GL_GREEN_NV                       0x1904\n#define GL_HARDLIGHT_NV                   0x929B\n#define GL_HARDMIX_NV                     0x92A9\n#define GL_HSL_COLOR_NV                   0x92AF\n#define GL_HSL_HUE_NV                     0x92AD\n#define GL_HSL_LUMINOSITY_NV              0x92B0\n#define GL_HSL_SATURATION_NV              0x92AE\n#define GL_INVERT_OVG_NV                  0x92B4\n#define GL_INVERT_RGB_NV                  0x92A3\n#define GL_LIGHTEN_NV                     0x9298\n#define GL_LINEARBURN_NV                  0x92A5\n#define GL_LINEARDODGE_NV                 0x92A4\n#define GL_LINEARLIGHT_NV                 0x92A7\n#define GL_MINUS_CLAMPED_NV               0x92B3\n#define GL_MINUS_NV                       0x929F\n#define GL_MULTIPLY_NV                    0x9294\n#define GL_OVERLAY_NV                     0x9296\n#define GL_PINLIGHT_NV                    0x92A8\n#define GL_PLUS_CLAMPED_ALPHA_NV          0x92B2\n#define GL_PLUS_CLAMPED_NV                0x92B1\n#define GL_PLUS_DARKER_NV                 0x9292\n#define GL_PLUS_NV                        0x9291\n#define GL_RED_NV                         0x1903\n#define GL_SCREEN_NV                      0x9295\n#define GL_SOFTLIGHT_NV                   0x929C\n#define GL_SRC_ATOP_NV                    0x928E\n#define GL_SRC_IN_NV                      0x928A\n#define GL_SRC_NV                         0x9286\n#define GL_SRC_OUT_NV                     0x928C\n#define GL_SRC_OVER_NV                    0x9288\n#define GL_UNCORRELATED_NV                0x9282\n#define GL_VIVIDLIGHT_NV                  0x92A6\n#define GL_XOR_NV                         0x1506\ntypedef void (APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBlendParameteriNV (GLenum pname, GLint value);\nGLAPI void APIENTRY glBlendBarrierNV (void);\n#endif\n#endif /* GL_NV_blend_equation_advanced */\n\n#ifndef GL_NV_blend_equation_advanced_coherent\n#define GL_NV_blend_equation_advanced_coherent 1\n#define GL_BLEND_ADVANCED_COHERENT_NV     0x9285\n#endif /* GL_NV_blend_equation_advanced_coherent */\n\n#ifndef GL_NV_blend_square\n#define GL_NV_blend_square 1\n#endif /* GL_NV_blend_square */\n\n#ifndef GL_NV_compute_program5\n#define GL_NV_compute_program5 1\n#define GL_COMPUTE_PROGRAM_NV             0x90FB\n#define GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV 0x90FC\n#endif /* GL_NV_compute_program5 */\n\n#ifndef GL_NV_conditional_render\n#define GL_NV_conditional_render 1\n#define GL_QUERY_WAIT_NV                  0x8E13\n#define GL_QUERY_NO_WAIT_NV               0x8E14\n#define GL_QUERY_BY_REGION_WAIT_NV        0x8E15\n#define GL_QUERY_BY_REGION_NO_WAIT_NV     0x8E16\ntypedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode);\ntypedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode);\nGLAPI void APIENTRY glEndConditionalRenderNV (void);\n#endif\n#endif /* GL_NV_conditional_render */\n\n#ifndef GL_NV_copy_depth_to_color\n#define GL_NV_copy_depth_to_color 1\n#define GL_DEPTH_STENCIL_TO_RGBA_NV       0x886E\n#define GL_DEPTH_STENCIL_TO_BGRA_NV       0x886F\n#endif /* GL_NV_copy_depth_to_color */\n\n#ifndef GL_NV_copy_image\n#define GL_NV_copy_image 1\ntypedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n#endif /* GL_NV_copy_image */\n\n#ifndef GL_NV_deep_texture3D\n#define GL_NV_deep_texture3D 1\n#define GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV 0x90D0\n#define GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV   0x90D1\n#endif /* GL_NV_deep_texture3D */\n\n#ifndef GL_NV_depth_buffer_float\n#define GL_NV_depth_buffer_float 1\n#define GL_DEPTH_COMPONENT32F_NV          0x8DAB\n#define GL_DEPTH32F_STENCIL8_NV           0x8DAC\n#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD\n#define GL_DEPTH_BUFFER_FLOAT_MODE_NV     0x8DAF\ntypedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar);\ntypedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth);\ntypedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar);\nGLAPI void APIENTRY glClearDepthdNV (GLdouble depth);\nGLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax);\n#endif\n#endif /* GL_NV_depth_buffer_float */\n\n#ifndef GL_NV_depth_clamp\n#define GL_NV_depth_clamp 1\n#define GL_DEPTH_CLAMP_NV                 0x864F\n#endif /* GL_NV_depth_clamp */\n\n#ifndef GL_NV_draw_texture\n#define GL_NV_draw_texture 1\ntypedef void (APIENTRYP PFNGLDRAWTEXTURENVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);\n#endif\n#endif /* GL_NV_draw_texture */\n\n#ifndef GL_NV_evaluators\n#define GL_NV_evaluators 1\n#define GL_EVAL_2D_NV                     0x86C0\n#define GL_EVAL_TRIANGULAR_2D_NV          0x86C1\n#define GL_MAP_TESSELLATION_NV            0x86C2\n#define GL_MAP_ATTRIB_U_ORDER_NV          0x86C3\n#define GL_MAP_ATTRIB_V_ORDER_NV          0x86C4\n#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5\n#define GL_EVAL_VERTEX_ATTRIB0_NV         0x86C6\n#define GL_EVAL_VERTEX_ATTRIB1_NV         0x86C7\n#define GL_EVAL_VERTEX_ATTRIB2_NV         0x86C8\n#define GL_EVAL_VERTEX_ATTRIB3_NV         0x86C9\n#define GL_EVAL_VERTEX_ATTRIB4_NV         0x86CA\n#define GL_EVAL_VERTEX_ATTRIB5_NV         0x86CB\n#define GL_EVAL_VERTEX_ATTRIB6_NV         0x86CC\n#define GL_EVAL_VERTEX_ATTRIB7_NV         0x86CD\n#define GL_EVAL_VERTEX_ATTRIB8_NV         0x86CE\n#define GL_EVAL_VERTEX_ATTRIB9_NV         0x86CF\n#define GL_EVAL_VERTEX_ATTRIB10_NV        0x86D0\n#define GL_EVAL_VERTEX_ATTRIB11_NV        0x86D1\n#define GL_EVAL_VERTEX_ATTRIB12_NV        0x86D2\n#define GL_EVAL_VERTEX_ATTRIB13_NV        0x86D3\n#define GL_EVAL_VERTEX_ATTRIB14_NV        0x86D4\n#define GL_EVAL_VERTEX_ATTRIB15_NV        0x86D5\n#define GL_MAX_MAP_TESSELLATION_NV        0x86D6\n#define GL_MAX_RATIONAL_EVAL_ORDER_NV     0x86D7\ntypedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const void *points);\nGLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, void *points);\nGLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode);\n#endif\n#endif /* GL_NV_evaluators */\n\n#ifndef GL_NV_explicit_multisample\n#define GL_NV_explicit_multisample 1\n#define GL_SAMPLE_POSITION_NV             0x8E50\n#define GL_SAMPLE_MASK_NV                 0x8E51\n#define GL_SAMPLE_MASK_VALUE_NV           0x8E52\n#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53\n#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54\n#define GL_TEXTURE_RENDERBUFFER_NV        0x8E55\n#define GL_SAMPLER_RENDERBUFFER_NV        0x8E56\n#define GL_INT_SAMPLER_RENDERBUFFER_NV    0x8E57\n#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58\n#define GL_MAX_SAMPLE_MASK_WORDS_NV       0x8E59\ntypedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);\ntypedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);\ntypedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val);\nGLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask);\nGLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer);\n#endif\n#endif /* GL_NV_explicit_multisample */\n\n#ifndef GL_NV_fence\n#define GL_NV_fence 1\n#define GL_ALL_COMPLETED_NV               0x84F2\n#define GL_FENCE_STATUS_NV                0x84F3\n#define GL_FENCE_CONDITION_NV             0x84F4\ntypedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\ntypedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\ntypedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\ntypedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\ntypedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\nGLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\nGLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence);\nGLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence);\nGLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\nGLAPI void APIENTRY glFinishFenceNV (GLuint fence);\nGLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\n#endif\n#endif /* GL_NV_fence */\n\n#ifndef GL_NV_float_buffer\n#define GL_NV_float_buffer 1\n#define GL_FLOAT_R_NV                     0x8880\n#define GL_FLOAT_RG_NV                    0x8881\n#define GL_FLOAT_RGB_NV                   0x8882\n#define GL_FLOAT_RGBA_NV                  0x8883\n#define GL_FLOAT_R16_NV                   0x8884\n#define GL_FLOAT_R32_NV                   0x8885\n#define GL_FLOAT_RG16_NV                  0x8886\n#define GL_FLOAT_RG32_NV                  0x8887\n#define GL_FLOAT_RGB16_NV                 0x8888\n#define GL_FLOAT_RGB32_NV                 0x8889\n#define GL_FLOAT_RGBA16_NV                0x888A\n#define GL_FLOAT_RGBA32_NV                0x888B\n#define GL_TEXTURE_FLOAT_COMPONENTS_NV    0x888C\n#define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D\n#define GL_FLOAT_RGBA_MODE_NV             0x888E\n#endif /* GL_NV_float_buffer */\n\n#ifndef GL_NV_fog_distance\n#define GL_NV_fog_distance 1\n#define GL_FOG_DISTANCE_MODE_NV           0x855A\n#define GL_EYE_RADIAL_NV                  0x855B\n#define GL_EYE_PLANE_ABSOLUTE_NV          0x855C\n#endif /* GL_NV_fog_distance */\n\n#ifndef GL_NV_fragment_program\n#define GL_NV_fragment_program 1\n#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868\n#define GL_FRAGMENT_PROGRAM_NV            0x8870\n#define GL_MAX_TEXTURE_COORDS_NV          0x8871\n#define GL_MAX_TEXTURE_IMAGE_UNITS_NV     0x8872\n#define GL_FRAGMENT_PROGRAM_BINDING_NV    0x8873\n#define GL_PROGRAM_ERROR_STRING_NV        0x8874\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v);\nGLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v);\nGLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params);\nGLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params);\n#endif\n#endif /* GL_NV_fragment_program */\n\n#ifndef GL_NV_fragment_program2\n#define GL_NV_fragment_program2 1\n#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4\n#define GL_MAX_PROGRAM_CALL_DEPTH_NV      0x88F5\n#define GL_MAX_PROGRAM_IF_DEPTH_NV        0x88F6\n#define GL_MAX_PROGRAM_LOOP_DEPTH_NV      0x88F7\n#define GL_MAX_PROGRAM_LOOP_COUNT_NV      0x88F8\n#endif /* GL_NV_fragment_program2 */\n\n#ifndef GL_NV_fragment_program4\n#define GL_NV_fragment_program4 1\n#endif /* GL_NV_fragment_program4 */\n\n#ifndef GL_NV_fragment_program_option\n#define GL_NV_fragment_program_option 1\n#endif /* GL_NV_fragment_program_option */\n\n#ifndef GL_NV_framebuffer_multisample_coverage\n#define GL_NV_framebuffer_multisample_coverage 1\n#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB\n#define GL_RENDERBUFFER_COLOR_SAMPLES_NV  0x8E10\n#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11\n#define GL_MULTISAMPLE_COVERAGE_MODES_NV  0x8E12\ntypedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n#endif /* GL_NV_framebuffer_multisample_coverage */\n\n#ifndef GL_NV_geometry_program4\n#define GL_NV_geometry_program4 1\n#define GL_GEOMETRY_PROGRAM_NV            0x8C26\n#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27\n#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28\ntypedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\ntypedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit);\nGLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);\nGLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);\nGLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);\n#endif\n#endif /* GL_NV_geometry_program4 */\n\n#ifndef GL_NV_geometry_shader4\n#define GL_NV_geometry_shader4 1\n#endif /* GL_NV_geometry_shader4 */\n\n#ifndef GL_NV_gpu_program4\n#define GL_NV_gpu_program4 1\n#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV    0x8904\n#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV    0x8905\n#define GL_PROGRAM_ATTRIB_COMPONENTS_NV   0x8906\n#define GL_PROGRAM_RESULT_COMPONENTS_NV   0x8907\n#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908\n#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909\n#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5\n#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params);\nGLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params);\nGLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params);\n#endif\n#endif /* GL_NV_gpu_program4 */\n\n#ifndef GL_NV_gpu_program5\n#define GL_NV_gpu_program5 1\n#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A\n#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B\n#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C\n#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D\n#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E\n#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F\n#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44\n#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV  0x8F45\ntypedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params);\nGLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param);\n#endif\n#endif /* GL_NV_gpu_program5 */\n\n#ifndef GL_NV_gpu_program5_mem_extended\n#define GL_NV_gpu_program5_mem_extended 1\n#endif /* GL_NV_gpu_program5_mem_extended */\n\n#ifndef GL_NV_gpu_shader5\n#define GL_NV_gpu_shader5 1\n#endif /* GL_NV_gpu_shader5 */\n\n#ifndef GL_NV_half_float\n#define GL_NV_half_float 1\ntypedef unsigned short GLhalfNV;\n#define GL_HALF_FLOAT_NV                  0x140B\ntypedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\ntypedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\ntypedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s);\ntypedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\ntypedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);\ntypedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);\ntypedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz);\nGLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha);\nGLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s);\nGLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s);\nGLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t);\nGLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r);\nGLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);\nGLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);\nGLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);\nGLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);\nGLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);\nGLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);\nGLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);\nGLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);\nGLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);\nGLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);\nGLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z);\nGLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w);\nGLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\nGLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);\n#endif\n#endif /* GL_NV_half_float */\n\n#ifndef GL_NV_light_max_exponent\n#define GL_NV_light_max_exponent 1\n#define GL_MAX_SHININESS_NV               0x8504\n#define GL_MAX_SPOT_EXPONENT_NV           0x8505\n#endif /* GL_NV_light_max_exponent */\n\n#ifndef GL_NV_multisample_coverage\n#define GL_NV_multisample_coverage 1\n#define GL_COLOR_SAMPLES_NV               0x8E20\n#endif /* GL_NV_multisample_coverage */\n\n#ifndef GL_NV_multisample_filter_hint\n#define GL_NV_multisample_filter_hint 1\n#define GL_MULTISAMPLE_FILTER_HINT_NV     0x8534\n#endif /* GL_NV_multisample_filter_hint */\n\n#ifndef GL_NV_occlusion_query\n#define GL_NV_occlusion_query 1\n#define GL_PIXEL_COUNTER_BITS_NV          0x8864\n#define GL_CURRENT_OCCLUSION_QUERY_ID_NV  0x8865\n#define GL_PIXEL_COUNT_NV                 0x8866\n#define GL_PIXEL_COUNT_AVAILABLE_NV       0x8867\ntypedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids);\ntypedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids);\nGLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids);\nGLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id);\nGLAPI void APIENTRY glEndOcclusionQueryNV (void);\nGLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_NV_occlusion_query */\n\n#ifndef GL_NV_packed_depth_stencil\n#define GL_NV_packed_depth_stencil 1\n#define GL_DEPTH_STENCIL_NV               0x84F9\n#define GL_UNSIGNED_INT_24_8_NV           0x84FA\n#endif /* GL_NV_packed_depth_stencil */\n\n#ifndef GL_NV_parameter_buffer_object\n#define GL_NV_parameter_buffer_object 1\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0\n#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1\n#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2\n#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3\n#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\ntypedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLfloat *params);\nGLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLint *params);\nGLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindingIndex, GLuint wordIndex, GLsizei count, const GLuint *params);\n#endif\n#endif /* GL_NV_parameter_buffer_object */\n\n#ifndef GL_NV_parameter_buffer_object2\n#define GL_NV_parameter_buffer_object2 1\n#endif /* GL_NV_parameter_buffer_object2 */\n\n#ifndef GL_NV_path_rendering\n#define GL_NV_path_rendering 1\n#define GL_PATH_FORMAT_SVG_NV             0x9070\n#define GL_PATH_FORMAT_PS_NV              0x9071\n#define GL_STANDARD_FONT_NAME_NV          0x9072\n#define GL_SYSTEM_FONT_NAME_NV            0x9073\n#define GL_FILE_NAME_NV                   0x9074\n#define GL_PATH_STROKE_WIDTH_NV           0x9075\n#define GL_PATH_END_CAPS_NV               0x9076\n#define GL_PATH_INITIAL_END_CAP_NV        0x9077\n#define GL_PATH_TERMINAL_END_CAP_NV       0x9078\n#define GL_PATH_JOIN_STYLE_NV             0x9079\n#define GL_PATH_MITER_LIMIT_NV            0x907A\n#define GL_PATH_DASH_CAPS_NV              0x907B\n#define GL_PATH_INITIAL_DASH_CAP_NV       0x907C\n#define GL_PATH_TERMINAL_DASH_CAP_NV      0x907D\n#define GL_PATH_DASH_OFFSET_NV            0x907E\n#define GL_PATH_CLIENT_LENGTH_NV          0x907F\n#define GL_PATH_FILL_MODE_NV              0x9080\n#define GL_PATH_FILL_MASK_NV              0x9081\n#define GL_PATH_FILL_COVER_MODE_NV        0x9082\n#define GL_PATH_STROKE_COVER_MODE_NV      0x9083\n#define GL_PATH_STROKE_MASK_NV            0x9084\n#define GL_COUNT_UP_NV                    0x9088\n#define GL_COUNT_DOWN_NV                  0x9089\n#define GL_PATH_OBJECT_BOUNDING_BOX_NV    0x908A\n#define GL_CONVEX_HULL_NV                 0x908B\n#define GL_BOUNDING_BOX_NV                0x908D\n#define GL_TRANSLATE_X_NV                 0x908E\n#define GL_TRANSLATE_Y_NV                 0x908F\n#define GL_TRANSLATE_2D_NV                0x9090\n#define GL_TRANSLATE_3D_NV                0x9091\n#define GL_AFFINE_2D_NV                   0x9092\n#define GL_AFFINE_3D_NV                   0x9094\n#define GL_TRANSPOSE_AFFINE_2D_NV         0x9096\n#define GL_TRANSPOSE_AFFINE_3D_NV         0x9098\n#define GL_UTF8_NV                        0x909A\n#define GL_UTF16_NV                       0x909B\n#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C\n#define GL_PATH_COMMAND_COUNT_NV          0x909D\n#define GL_PATH_COORD_COUNT_NV            0x909E\n#define GL_PATH_DASH_ARRAY_COUNT_NV       0x909F\n#define GL_PATH_COMPUTED_LENGTH_NV        0x90A0\n#define GL_PATH_FILL_BOUNDING_BOX_NV      0x90A1\n#define GL_PATH_STROKE_BOUNDING_BOX_NV    0x90A2\n#define GL_SQUARE_NV                      0x90A3\n#define GL_ROUND_NV                       0x90A4\n#define GL_TRIANGULAR_NV                  0x90A5\n#define GL_BEVEL_NV                       0x90A6\n#define GL_MITER_REVERT_NV                0x90A7\n#define GL_MITER_TRUNCATE_NV              0x90A8\n#define GL_SKIP_MISSING_GLYPH_NV          0x90A9\n#define GL_USE_MISSING_GLYPH_NV           0x90AA\n#define GL_PATH_ERROR_POSITION_NV         0x90AB\n#define GL_PATH_FOG_GEN_MODE_NV           0x90AC\n#define GL_ACCUM_ADJACENT_PAIRS_NV        0x90AD\n#define GL_ADJACENT_PAIRS_NV              0x90AE\n#define GL_FIRST_TO_REST_NV               0x90AF\n#define GL_PATH_GEN_MODE_NV               0x90B0\n#define GL_PATH_GEN_COEFF_NV              0x90B1\n#define GL_PATH_GEN_COLOR_FORMAT_NV       0x90B2\n#define GL_PATH_GEN_COMPONENTS_NV         0x90B3\n#define GL_PATH_STENCIL_FUNC_NV           0x90B7\n#define GL_PATH_STENCIL_REF_NV            0x90B8\n#define GL_PATH_STENCIL_VALUE_MASK_NV     0x90B9\n#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD\n#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE\n#define GL_PATH_COVER_DEPTH_FUNC_NV       0x90BF\n#define GL_PATH_DASH_OFFSET_RESET_NV      0x90B4\n#define GL_MOVE_TO_RESETS_NV              0x90B5\n#define GL_MOVE_TO_CONTINUES_NV           0x90B6\n#define GL_CLOSE_PATH_NV                  0x00\n#define GL_MOVE_TO_NV                     0x02\n#define GL_RELATIVE_MOVE_TO_NV            0x03\n#define GL_LINE_TO_NV                     0x04\n#define GL_RELATIVE_LINE_TO_NV            0x05\n#define GL_HORIZONTAL_LINE_TO_NV          0x06\n#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07\n#define GL_VERTICAL_LINE_TO_NV            0x08\n#define GL_RELATIVE_VERTICAL_LINE_TO_NV   0x09\n#define GL_QUADRATIC_CURVE_TO_NV          0x0A\n#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B\n#define GL_CUBIC_CURVE_TO_NV              0x0C\n#define GL_RELATIVE_CUBIC_CURVE_TO_NV     0x0D\n#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV   0x0E\n#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F\n#define GL_SMOOTH_CUBIC_CURVE_TO_NV       0x10\n#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11\n#define GL_SMALL_CCW_ARC_TO_NV            0x12\n#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV   0x13\n#define GL_SMALL_CW_ARC_TO_NV             0x14\n#define GL_RELATIVE_SMALL_CW_ARC_TO_NV    0x15\n#define GL_LARGE_CCW_ARC_TO_NV            0x16\n#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV   0x17\n#define GL_LARGE_CW_ARC_TO_NV             0x18\n#define GL_RELATIVE_LARGE_CW_ARC_TO_NV    0x19\n#define GL_RESTART_PATH_NV                0xF0\n#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV    0xF2\n#define GL_DUP_LAST_CUBIC_CURVE_TO_NV     0xF4\n#define GL_RECT_NV                        0xF6\n#define GL_CIRCULAR_CCW_ARC_TO_NV         0xF8\n#define GL_CIRCULAR_CW_ARC_TO_NV          0xFA\n#define GL_CIRCULAR_TANGENT_ARC_TO_NV     0xFC\n#define GL_ARC_TO_NV                      0xFE\n#define GL_RELATIVE_ARC_TO_NV             0xFF\n#define GL_BOLD_BIT_NV                    0x01\n#define GL_ITALIC_BIT_NV                  0x02\n#define GL_GLYPH_WIDTH_BIT_NV             0x01\n#define GL_GLYPH_HEIGHT_BIT_NV            0x02\n#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04\n#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08\n#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10\n#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20\n#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40\n#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80\n#define GL_GLYPH_HAS_KERNING_BIT_NV       0x100\n#define GL_FONT_X_MIN_BOUNDS_BIT_NV       0x00010000\n#define GL_FONT_Y_MIN_BOUNDS_BIT_NV       0x00020000\n#define GL_FONT_X_MAX_BOUNDS_BIT_NV       0x00040000\n#define GL_FONT_Y_MAX_BOUNDS_BIT_NV       0x00080000\n#define GL_FONT_UNITS_PER_EM_BIT_NV       0x00100000\n#define GL_FONT_ASCENDER_BIT_NV           0x00200000\n#define GL_FONT_DESCENDER_BIT_NV          0x00400000\n#define GL_FONT_HEIGHT_BIT_NV             0x00800000\n#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV  0x01000000\n#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000\n#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000\n#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000\n#define GL_FONT_HAS_KERNING_BIT_NV        0x10000000\n#define GL_PRIMARY_COLOR_NV               0x852C\n#define GL_SECONDARY_COLOR_NV             0x852D\ntypedef GLuint (APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISPATHNVPROC) (GLuint path);\ntypedef void (APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);\ntypedef void (APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString);\ntypedef void (APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\ntypedef void (APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\ntypedef void (APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);\ntypedef void (APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\ntypedef void (APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value);\ntypedef void (APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);\ntypedef void (APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);\ntypedef void (APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);\ntypedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);\ntypedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\ntypedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);\ntypedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands);\ntypedef void (APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords);\ntypedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\ntypedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);\ntypedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);\ntypedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);\ntypedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);\ntypedef GLboolean (APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);\nGLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);\nGLAPI GLboolean APIENTRY glIsPathNV (GLuint path);\nGLAPI void APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords);\nGLAPI void APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString);\nGLAPI void APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);\nGLAPI void APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights);\nGLAPI void APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath);\nGLAPI void APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);\nGLAPI void APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value);\nGLAPI void APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value);\nGLAPI void APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value);\nGLAPI void APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value);\nGLAPI void APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray);\nGLAPI void APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask);\nGLAPI void APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units);\nGLAPI void APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask);\nGLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask);\nGLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);\nGLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);\nGLAPI void APIENTRY glPathFogGenNV (GLenum genMode);\nGLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);\nGLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);\nGLAPI void APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands);\nGLAPI void APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords);\nGLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);\nGLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);\nGLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);\nGLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);\nGLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);\nGLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);\nGLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);\nGLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);\nGLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);\nGLAPI GLboolean APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);\n#endif\n#endif /* GL_NV_path_rendering */\n\n#ifndef GL_NV_pixel_data_range\n#define GL_NV_pixel_data_range 1\n#define GL_WRITE_PIXEL_DATA_RANGE_NV      0x8878\n#define GL_READ_PIXEL_DATA_RANGE_NV       0x8879\n#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A\n#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B\n#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C\n#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D\ntypedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, const void *pointer);\ntypedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, const void *pointer);\nGLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target);\n#endif\n#endif /* GL_NV_pixel_data_range */\n\n#ifndef GL_NV_point_sprite\n#define GL_NV_point_sprite 1\n#define GL_POINT_SPRITE_NV                0x8861\n#define GL_COORD_REPLACE_NV               0x8862\n#define GL_POINT_SPRITE_R_MODE_NV         0x8863\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params);\n#endif\n#endif /* GL_NV_point_sprite */\n\n#ifndef GL_NV_present_video\n#define GL_NV_present_video 1\n#define GL_FRAME_NV                       0x8E26\n#define GL_FIELDS_NV                      0x8E27\n#define GL_CURRENT_TIME_NV                0x8E28\n#define GL_NUM_FILL_STREAMS_NV            0x8E29\n#define GL_PRESENT_TIME_NV                0x8E2A\n#define GL_PRESENT_DURATION_NV            0x8E2B\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\ntypedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\ntypedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);\nGLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);\nGLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params);\nGLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params);\n#endif\n#endif /* GL_NV_present_video */\n\n#ifndef GL_NV_primitive_restart\n#define GL_NV_primitive_restart 1\n#define GL_PRIMITIVE_RESTART_NV           0x8558\n#define GL_PRIMITIVE_RESTART_INDEX_NV     0x8559\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void);\ntypedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPrimitiveRestartNV (void);\nGLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index);\n#endif\n#endif /* GL_NV_primitive_restart */\n\n#ifndef GL_NV_register_combiners\n#define GL_NV_register_combiners 1\n#define GL_REGISTER_COMBINERS_NV          0x8522\n#define GL_VARIABLE_A_NV                  0x8523\n#define GL_VARIABLE_B_NV                  0x8524\n#define GL_VARIABLE_C_NV                  0x8525\n#define GL_VARIABLE_D_NV                  0x8526\n#define GL_VARIABLE_E_NV                  0x8527\n#define GL_VARIABLE_F_NV                  0x8528\n#define GL_VARIABLE_G_NV                  0x8529\n#define GL_CONSTANT_COLOR0_NV             0x852A\n#define GL_CONSTANT_COLOR1_NV             0x852B\n#define GL_SPARE0_NV                      0x852E\n#define GL_SPARE1_NV                      0x852F\n#define GL_DISCARD_NV                     0x8530\n#define GL_E_TIMES_F_NV                   0x8531\n#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532\n#define GL_UNSIGNED_IDENTITY_NV           0x8536\n#define GL_UNSIGNED_INVERT_NV             0x8537\n#define GL_EXPAND_NORMAL_NV               0x8538\n#define GL_EXPAND_NEGATE_NV               0x8539\n#define GL_HALF_BIAS_NORMAL_NV            0x853A\n#define GL_HALF_BIAS_NEGATE_NV            0x853B\n#define GL_SIGNED_IDENTITY_NV             0x853C\n#define GL_SIGNED_NEGATE_NV               0x853D\n#define GL_SCALE_BY_TWO_NV                0x853E\n#define GL_SCALE_BY_FOUR_NV               0x853F\n#define GL_SCALE_BY_ONE_HALF_NV           0x8540\n#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV   0x8541\n#define GL_COMBINER_INPUT_NV              0x8542\n#define GL_COMBINER_MAPPING_NV            0x8543\n#define GL_COMBINER_COMPONENT_USAGE_NV    0x8544\n#define GL_COMBINER_AB_DOT_PRODUCT_NV     0x8545\n#define GL_COMBINER_CD_DOT_PRODUCT_NV     0x8546\n#define GL_COMBINER_MUX_SUM_NV            0x8547\n#define GL_COMBINER_SCALE_NV              0x8548\n#define GL_COMBINER_BIAS_NV               0x8549\n#define GL_COMBINER_AB_OUTPUT_NV          0x854A\n#define GL_COMBINER_CD_OUTPUT_NV          0x854B\n#define GL_COMBINER_SUM_OUTPUT_NV         0x854C\n#define GL_MAX_GENERAL_COMBINERS_NV       0x854D\n#define GL_NUM_GENERAL_COMBINERS_NV       0x854E\n#define GL_COLOR_SUM_CLAMP_NV             0x854F\n#define GL_COMBINER0_NV                   0x8550\n#define GL_COMBINER1_NV                   0x8551\n#define GL_COMBINER2_NV                   0x8552\n#define GL_COMBINER3_NV                   0x8553\n#define GL_COMBINER4_NV                   0x8554\n#define GL_COMBINER5_NV                   0x8555\n#define GL_COMBINER6_NV                   0x8556\n#define GL_COMBINER7_NV                   0x8557\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\ntypedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param);\nGLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);\nGLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);\nGLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params);\n#endif\n#endif /* GL_NV_register_combiners */\n\n#ifndef GL_NV_register_combiners2\n#define GL_NV_register_combiners2 1\n#define GL_PER_STAGE_CONSTANTS_NV         0x8535\ntypedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_NV_register_combiners2 */\n\n#ifndef GL_NV_shader_atomic_counters\n#define GL_NV_shader_atomic_counters 1\n#endif /* GL_NV_shader_atomic_counters */\n\n#ifndef GL_NV_shader_atomic_float\n#define GL_NV_shader_atomic_float 1\n#endif /* GL_NV_shader_atomic_float */\n\n#ifndef GL_NV_shader_buffer_load\n#define GL_NV_shader_buffer_load 1\n#define GL_BUFFER_GPU_ADDRESS_NV          0x8F1D\n#define GL_GPU_ADDRESS_NV                 0x8F34\n#define GL_MAX_SHADER_BUFFER_ADDRESS_NV   0x8F35\ntypedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);\ntypedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);\ntypedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);\ntypedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);\ntypedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);\ntypedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access);\nGLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target);\nGLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target);\nGLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access);\nGLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer);\nGLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer);\nGLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result);\nGLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value);\nGLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value);\nGLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value);\n#endif\n#endif /* GL_NV_shader_buffer_load */\n\n#ifndef GL_NV_shader_buffer_store\n#define GL_NV_shader_buffer_store 1\n#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010\n#endif /* GL_NV_shader_buffer_store */\n\n#ifndef GL_NV_shader_storage_buffer_object\n#define GL_NV_shader_storage_buffer_object 1\n#endif /* GL_NV_shader_storage_buffer_object */\n\n#ifndef GL_NV_shader_thread_group\n#define GL_NV_shader_thread_group 1\n#define GL_WARP_SIZE_NV                   0x9339\n#define GL_WARPS_PER_SM_NV                0x933A\n#define GL_SM_COUNT_NV                    0x933B\n#endif /* GL_NV_shader_thread_group */\n\n#ifndef GL_NV_shader_thread_shuffle\n#define GL_NV_shader_thread_shuffle 1\n#endif /* GL_NV_shader_thread_shuffle */\n\n#ifndef GL_NV_tessellation_program5\n#define GL_NV_tessellation_program5 1\n#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV   0x86D8\n#define GL_TESS_CONTROL_PROGRAM_NV        0x891E\n#define GL_TESS_EVALUATION_PROGRAM_NV     0x891F\n#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74\n#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75\n#endif /* GL_NV_tessellation_program5 */\n\n#ifndef GL_NV_texgen_emboss\n#define GL_NV_texgen_emboss 1\n#define GL_EMBOSS_LIGHT_NV                0x855D\n#define GL_EMBOSS_CONSTANT_NV             0x855E\n#define GL_EMBOSS_MAP_NV                  0x855F\n#endif /* GL_NV_texgen_emboss */\n\n#ifndef GL_NV_texgen_reflection\n#define GL_NV_texgen_reflection 1\n#define GL_NORMAL_MAP_NV                  0x8511\n#define GL_REFLECTION_MAP_NV              0x8512\n#endif /* GL_NV_texgen_reflection */\n\n#ifndef GL_NV_texture_barrier\n#define GL_NV_texture_barrier 1\ntypedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureBarrierNV (void);\n#endif\n#endif /* GL_NV_texture_barrier */\n\n#ifndef GL_NV_texture_compression_vtc\n#define GL_NV_texture_compression_vtc 1\n#endif /* GL_NV_texture_compression_vtc */\n\n#ifndef GL_NV_texture_env_combine4\n#define GL_NV_texture_env_combine4 1\n#define GL_COMBINE4_NV                    0x8503\n#define GL_SOURCE3_RGB_NV                 0x8583\n#define GL_SOURCE3_ALPHA_NV               0x858B\n#define GL_OPERAND3_RGB_NV                0x8593\n#define GL_OPERAND3_ALPHA_NV              0x859B\n#endif /* GL_NV_texture_env_combine4 */\n\n#ifndef GL_NV_texture_expand_normal\n#define GL_NV_texture_expand_normal 1\n#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F\n#endif /* GL_NV_texture_expand_normal */\n\n#ifndef GL_NV_texture_multisample\n#define GL_NV_texture_multisample 1\n#define GL_TEXTURE_COVERAGE_SAMPLES_NV    0x9045\n#define GL_TEXTURE_COLOR_SAMPLES_NV       0x9046\ntypedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\ntypedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations);\nGLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations);\n#endif\n#endif /* GL_NV_texture_multisample */\n\n#ifndef GL_NV_texture_rectangle\n#define GL_NV_texture_rectangle 1\n#define GL_TEXTURE_RECTANGLE_NV           0x84F5\n#define GL_TEXTURE_BINDING_RECTANGLE_NV   0x84F6\n#define GL_PROXY_TEXTURE_RECTANGLE_NV     0x84F7\n#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV  0x84F8\n#endif /* GL_NV_texture_rectangle */\n\n#ifndef GL_NV_texture_shader\n#define GL_NV_texture_shader 1\n#define GL_OFFSET_TEXTURE_RECTANGLE_NV    0x864C\n#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D\n#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E\n#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9\n#define GL_UNSIGNED_INT_S8_S8_8_8_NV      0x86DA\n#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV  0x86DB\n#define GL_DSDT_MAG_INTENSITY_NV          0x86DC\n#define GL_SHADER_CONSISTENT_NV           0x86DD\n#define GL_TEXTURE_SHADER_NV              0x86DE\n#define GL_SHADER_OPERATION_NV            0x86DF\n#define GL_CULL_MODES_NV                  0x86E0\n#define GL_OFFSET_TEXTURE_MATRIX_NV       0x86E1\n#define GL_OFFSET_TEXTURE_SCALE_NV        0x86E2\n#define GL_OFFSET_TEXTURE_BIAS_NV         0x86E3\n#define GL_OFFSET_TEXTURE_2D_MATRIX_NV    0x86E1\n#define GL_OFFSET_TEXTURE_2D_SCALE_NV     0x86E2\n#define GL_OFFSET_TEXTURE_2D_BIAS_NV      0x86E3\n#define GL_PREVIOUS_TEXTURE_INPUT_NV      0x86E4\n#define GL_CONST_EYE_NV                   0x86E5\n#define GL_PASS_THROUGH_NV                0x86E6\n#define GL_CULL_FRAGMENT_NV               0x86E7\n#define GL_OFFSET_TEXTURE_2D_NV           0x86E8\n#define GL_DEPENDENT_AR_TEXTURE_2D_NV     0x86E9\n#define GL_DEPENDENT_GB_TEXTURE_2D_NV     0x86EA\n#define GL_DOT_PRODUCT_NV                 0x86EC\n#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV   0x86ED\n#define GL_DOT_PRODUCT_TEXTURE_2D_NV      0x86EE\n#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0\n#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1\n#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2\n#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3\n#define GL_HILO_NV                        0x86F4\n#define GL_DSDT_NV                        0x86F5\n#define GL_DSDT_MAG_NV                    0x86F6\n#define GL_DSDT_MAG_VIB_NV                0x86F7\n#define GL_HILO16_NV                      0x86F8\n#define GL_SIGNED_HILO_NV                 0x86F9\n#define GL_SIGNED_HILO16_NV               0x86FA\n#define GL_SIGNED_RGBA_NV                 0x86FB\n#define GL_SIGNED_RGBA8_NV                0x86FC\n#define GL_SIGNED_RGB_NV                  0x86FE\n#define GL_SIGNED_RGB8_NV                 0x86FF\n#define GL_SIGNED_LUMINANCE_NV            0x8701\n#define GL_SIGNED_LUMINANCE8_NV           0x8702\n#define GL_SIGNED_LUMINANCE_ALPHA_NV      0x8703\n#define GL_SIGNED_LUMINANCE8_ALPHA8_NV    0x8704\n#define GL_SIGNED_ALPHA_NV                0x8705\n#define GL_SIGNED_ALPHA8_NV               0x8706\n#define GL_SIGNED_INTENSITY_NV            0x8707\n#define GL_SIGNED_INTENSITY8_NV           0x8708\n#define GL_DSDT8_NV                       0x8709\n#define GL_DSDT8_MAG8_NV                  0x870A\n#define GL_DSDT8_MAG8_INTENSITY8_NV       0x870B\n#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV   0x870C\n#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D\n#define GL_HI_SCALE_NV                    0x870E\n#define GL_LO_SCALE_NV                    0x870F\n#define GL_DS_SCALE_NV                    0x8710\n#define GL_DT_SCALE_NV                    0x8711\n#define GL_MAGNITUDE_SCALE_NV             0x8712\n#define GL_VIBRANCE_SCALE_NV              0x8713\n#define GL_HI_BIAS_NV                     0x8714\n#define GL_LO_BIAS_NV                     0x8715\n#define GL_DS_BIAS_NV                     0x8716\n#define GL_DT_BIAS_NV                     0x8717\n#define GL_MAGNITUDE_BIAS_NV              0x8718\n#define GL_VIBRANCE_BIAS_NV               0x8719\n#define GL_TEXTURE_BORDER_VALUES_NV       0x871A\n#define GL_TEXTURE_HI_SIZE_NV             0x871B\n#define GL_TEXTURE_LO_SIZE_NV             0x871C\n#define GL_TEXTURE_DS_SIZE_NV             0x871D\n#define GL_TEXTURE_DT_SIZE_NV             0x871E\n#define GL_TEXTURE_MAG_SIZE_NV            0x871F\n#endif /* GL_NV_texture_shader */\n\n#ifndef GL_NV_texture_shader2\n#define GL_NV_texture_shader2 1\n#define GL_DOT_PRODUCT_TEXTURE_3D_NV      0x86EF\n#endif /* GL_NV_texture_shader2 */\n\n#ifndef GL_NV_texture_shader3\n#define GL_NV_texture_shader3 1\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850\n#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852\n#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853\n#define GL_OFFSET_HILO_TEXTURE_2D_NV      0x8854\n#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856\n#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857\n#define GL_DEPENDENT_HILO_TEXTURE_2D_NV   0x8858\n#define GL_DEPENDENT_RGB_TEXTURE_3D_NV    0x8859\n#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A\n#define GL_DOT_PRODUCT_PASS_THROUGH_NV    0x885B\n#define GL_DOT_PRODUCT_TEXTURE_1D_NV      0x885C\n#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D\n#define GL_HILO8_NV                       0x885E\n#define GL_SIGNED_HILO8_NV                0x885F\n#define GL_FORCE_BLUE_TO_ONE_NV           0x8860\n#endif /* GL_NV_texture_shader3 */\n\n#ifndef GL_NV_transform_feedback\n#define GL_NV_transform_feedback 1\n#define GL_BACK_PRIMARY_COLOR_NV          0x8C77\n#define GL_BACK_SECONDARY_COLOR_NV        0x8C78\n#define GL_TEXTURE_COORD_NV               0x8C79\n#define GL_CLIP_DISTANCE_NV               0x8C7A\n#define GL_VERTEX_ID_NV                   0x8C7B\n#define GL_PRIMITIVE_ID_NV                0x8C7C\n#define GL_GENERIC_ATTRIB_NV              0x8C7D\n#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV  0x8C7E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80\n#define GL_ACTIVE_VARYINGS_NV             0x8C81\n#define GL_ACTIVE_VARYING_MAX_LENGTH_NV   0x8C82\n#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83\n#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84\n#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85\n#define GL_TRANSFORM_FEEDBACK_RECORD_NV   0x8C86\n#define GL_PRIMITIVES_GENERATED_NV        0x8C87\n#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88\n#define GL_RASTERIZER_DISCARD_NV          0x8C89\n#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV 0x8C8A\n#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B\n#define GL_INTERLEAVED_ATTRIBS_NV         0x8C8C\n#define GL_SEPARATE_ATTRIBS_NV            0x8C8D\n#define GL_TRANSFORM_FEEDBACK_BUFFER_NV   0x8C8E\n#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F\n#define GL_LAYER_NV                       0x8DAA\n#define GL_NEXT_BUFFER_NV                 -2\n#define GL_SKIP_COMPONENTS4_NV            -3\n#define GL_SKIP_COMPONENTS3_NV            -4\n#define GL_SKIP_COMPONENTS2_NV            -5\n#define GL_SKIP_COMPONENTS1_NV            -6\ntypedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode);\ntypedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\ntypedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\ntypedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\ntypedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name);\ntypedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name);\ntypedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\ntypedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location);\ntypedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode);\nGLAPI void APIENTRY glEndTransformFeedbackNV (void);\nGLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode);\nGLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);\nGLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset);\nGLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer);\nGLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);\nGLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name);\nGLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name);\nGLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);\nGLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location);\nGLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode);\n#endif\n#endif /* GL_NV_transform_feedback */\n\n#ifndef GL_NV_transform_feedback2\n#define GL_NV_transform_feedback2 1\n#define GL_TRANSFORM_FEEDBACK_NV          0x8E22\n#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23\n#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24\n#define GL_TRANSFORM_FEEDBACK_BINDING_NV  0x8E25\ntypedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);\ntypedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);\ntypedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);\ntypedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids);\nGLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids);\nGLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id);\nGLAPI void APIENTRY glPauseTransformFeedbackNV (void);\nGLAPI void APIENTRY glResumeTransformFeedbackNV (void);\nGLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);\n#endif\n#endif /* GL_NV_transform_feedback2 */\n\n#ifndef GL_NV_vdpau_interop\n#define GL_NV_vdpau_interop 1\ntypedef GLintptr GLvdpauSurfaceNV;\n#define GL_SURFACE_STATE_NV               0x86EB\n#define GL_SURFACE_REGISTERED_NV          0x86FD\n#define GL_SURFACE_MAPPED_NV              0x8700\n#define GL_WRITE_DISCARD_NV               0x88BE\ntypedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const void *vdpDevice, const void *getProcAddress);\ntypedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\ntypedef GLboolean (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface);\ntypedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\ntypedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access);\ntypedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\ntypedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVDPAUInitNV (const void *vdpDevice, const void *getProcAddress);\nGLAPI void APIENTRY glVDPAUFiniNV (void);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (const void *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames);\nGLAPI GLboolean APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface);\nGLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\nGLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access);\nGLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces);\nGLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces);\n#endif\n#endif /* GL_NV_vdpau_interop */\n\n#ifndef GL_NV_vertex_array_range\n#define GL_NV_vertex_array_range 1\n#define GL_VERTEX_ARRAY_RANGE_NV          0x851D\n#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV   0x851E\n#define GL_VERTEX_ARRAY_RANGE_VALID_NV    0x851F\n#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520\n#define GL_VERTEX_ARRAY_RANGE_POINTER_NV  0x8521\ntypedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void);\ntypedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const void *pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushVertexArrayRangeNV (void);\nGLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const void *pointer);\n#endif\n#endif /* GL_NV_vertex_array_range */\n\n#ifndef GL_NV_vertex_array_range2\n#define GL_NV_vertex_array_range2 1\n#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533\n#endif /* GL_NV_vertex_array_range2 */\n\n#ifndef GL_NV_vertex_attrib_integer_64bit\n#define GL_NV_vertex_attrib_integer_64bit 1\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x);\nGLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y);\nGLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);\nGLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);\nGLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v);\nGLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params);\nGLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params);\nGLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\n#endif\n#endif /* GL_NV_vertex_attrib_integer_64bit */\n\n#ifndef GL_NV_vertex_buffer_unified_memory\n#define GL_NV_vertex_buffer_unified_memory 1\n#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E\n#define GL_ELEMENT_ARRAY_UNIFIED_NV       0x8F1F\n#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20\n#define GL_VERTEX_ARRAY_ADDRESS_NV        0x8F21\n#define GL_NORMAL_ARRAY_ADDRESS_NV        0x8F22\n#define GL_COLOR_ARRAY_ADDRESS_NV         0x8F23\n#define GL_INDEX_ARRAY_ADDRESS_NV         0x8F24\n#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25\n#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV     0x8F26\n#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27\n#define GL_FOG_COORD_ARRAY_ADDRESS_NV     0x8F28\n#define GL_ELEMENT_ARRAY_ADDRESS_NV       0x8F29\n#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV  0x8F2A\n#define GL_VERTEX_ARRAY_LENGTH_NV         0x8F2B\n#define GL_NORMAL_ARRAY_LENGTH_NV         0x8F2C\n#define GL_COLOR_ARRAY_LENGTH_NV          0x8F2D\n#define GL_INDEX_ARRAY_LENGTH_NV          0x8F2E\n#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV  0x8F2F\n#define GL_EDGE_FLAG_ARRAY_LENGTH_NV      0x8F30\n#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31\n#define GL_FOG_COORD_ARRAY_LENGTH_NV      0x8F32\n#define GL_ELEMENT_ARRAY_LENGTH_NV        0x8F33\n#define GL_DRAW_INDIRECT_UNIFIED_NV       0x8F40\n#define GL_DRAW_INDIRECT_ADDRESS_NV       0x8F41\n#define GL_DRAW_INDIRECT_LENGTH_NV        0x8F42\ntypedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\ntypedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);\ntypedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);\ntypedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);\nGLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride);\nGLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);\nGLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride);\nGLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result);\n#endif\n#endif /* GL_NV_vertex_buffer_unified_memory */\n\n#ifndef GL_NV_vertex_program\n#define GL_NV_vertex_program 1\n#define GL_VERTEX_PROGRAM_NV              0x8620\n#define GL_VERTEX_STATE_PROGRAM_NV        0x8621\n#define GL_ATTRIB_ARRAY_SIZE_NV           0x8623\n#define GL_ATTRIB_ARRAY_STRIDE_NV         0x8624\n#define GL_ATTRIB_ARRAY_TYPE_NV           0x8625\n#define GL_CURRENT_ATTRIB_NV              0x8626\n#define GL_PROGRAM_LENGTH_NV              0x8627\n#define GL_PROGRAM_STRING_NV              0x8628\n#define GL_MODELVIEW_PROJECTION_NV        0x8629\n#define GL_IDENTITY_NV                    0x862A\n#define GL_INVERSE_NV                     0x862B\n#define GL_TRANSPOSE_NV                   0x862C\n#define GL_INVERSE_TRANSPOSE_NV           0x862D\n#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E\n#define GL_MAX_TRACK_MATRICES_NV          0x862F\n#define GL_MATRIX0_NV                     0x8630\n#define GL_MATRIX1_NV                     0x8631\n#define GL_MATRIX2_NV                     0x8632\n#define GL_MATRIX3_NV                     0x8633\n#define GL_MATRIX4_NV                     0x8634\n#define GL_MATRIX5_NV                     0x8635\n#define GL_MATRIX6_NV                     0x8636\n#define GL_MATRIX7_NV                     0x8637\n#define GL_CURRENT_MATRIX_STACK_DEPTH_NV  0x8640\n#define GL_CURRENT_MATRIX_NV              0x8641\n#define GL_VERTEX_PROGRAM_POINT_SIZE_NV   0x8642\n#define GL_VERTEX_PROGRAM_TWO_SIDE_NV     0x8643\n#define GL_PROGRAM_PARAMETER_NV           0x8644\n#define GL_ATTRIB_ARRAY_POINTER_NV        0x8645\n#define GL_PROGRAM_TARGET_NV              0x8646\n#define GL_PROGRAM_RESIDENT_NV            0x8647\n#define GL_TRACK_MATRIX_NV                0x8648\n#define GL_TRACK_MATRIX_TRANSFORM_NV      0x8649\n#define GL_VERTEX_PROGRAM_BINDING_NV      0x864A\n#define GL_PROGRAM_ERROR_POSITION_NV      0x864B\n#define GL_VERTEX_ATTRIB_ARRAY0_NV        0x8650\n#define GL_VERTEX_ATTRIB_ARRAY1_NV        0x8651\n#define GL_VERTEX_ATTRIB_ARRAY2_NV        0x8652\n#define GL_VERTEX_ATTRIB_ARRAY3_NV        0x8653\n#define GL_VERTEX_ATTRIB_ARRAY4_NV        0x8654\n#define GL_VERTEX_ATTRIB_ARRAY5_NV        0x8655\n#define GL_VERTEX_ATTRIB_ARRAY6_NV        0x8656\n#define GL_VERTEX_ATTRIB_ARRAY7_NV        0x8657\n#define GL_VERTEX_ATTRIB_ARRAY8_NV        0x8658\n#define GL_VERTEX_ATTRIB_ARRAY9_NV        0x8659\n#define GL_VERTEX_ATTRIB_ARRAY10_NV       0x865A\n#define GL_VERTEX_ATTRIB_ARRAY11_NV       0x865B\n#define GL_VERTEX_ATTRIB_ARRAY12_NV       0x865C\n#define GL_VERTEX_ATTRIB_ARRAY13_NV       0x865D\n#define GL_VERTEX_ATTRIB_ARRAY14_NV       0x865E\n#define GL_VERTEX_ATTRIB_ARRAY15_NV       0x865F\n#define GL_MAP1_VERTEX_ATTRIB0_4_NV       0x8660\n#define GL_MAP1_VERTEX_ATTRIB1_4_NV       0x8661\n#define GL_MAP1_VERTEX_ATTRIB2_4_NV       0x8662\n#define GL_MAP1_VERTEX_ATTRIB3_4_NV       0x8663\n#define GL_MAP1_VERTEX_ATTRIB4_4_NV       0x8664\n#define GL_MAP1_VERTEX_ATTRIB5_4_NV       0x8665\n#define GL_MAP1_VERTEX_ATTRIB6_4_NV       0x8666\n#define GL_MAP1_VERTEX_ATTRIB7_4_NV       0x8667\n#define GL_MAP1_VERTEX_ATTRIB8_4_NV       0x8668\n#define GL_MAP1_VERTEX_ATTRIB9_4_NV       0x8669\n#define GL_MAP1_VERTEX_ATTRIB10_4_NV      0x866A\n#define GL_MAP1_VERTEX_ATTRIB11_4_NV      0x866B\n#define GL_MAP1_VERTEX_ATTRIB12_4_NV      0x866C\n#define GL_MAP1_VERTEX_ATTRIB13_4_NV      0x866D\n#define GL_MAP1_VERTEX_ATTRIB14_4_NV      0x866E\n#define GL_MAP1_VERTEX_ATTRIB15_4_NV      0x866F\n#define GL_MAP2_VERTEX_ATTRIB0_4_NV       0x8670\n#define GL_MAP2_VERTEX_ATTRIB1_4_NV       0x8671\n#define GL_MAP2_VERTEX_ATTRIB2_4_NV       0x8672\n#define GL_MAP2_VERTEX_ATTRIB3_4_NV       0x8673\n#define GL_MAP2_VERTEX_ATTRIB4_4_NV       0x8674\n#define GL_MAP2_VERTEX_ATTRIB5_4_NV       0x8675\n#define GL_MAP2_VERTEX_ATTRIB6_4_NV       0x8676\n#define GL_MAP2_VERTEX_ATTRIB7_4_NV       0x8677\n#define GL_MAP2_VERTEX_ATTRIB8_4_NV       0x8678\n#define GL_MAP2_VERTEX_ATTRIB9_4_NV       0x8679\n#define GL_MAP2_VERTEX_ATTRIB10_4_NV      0x867A\n#define GL_MAP2_VERTEX_ATTRIB11_4_NV      0x867B\n#define GL_MAP2_VERTEX_ATTRIB12_4_NV      0x867C\n#define GL_MAP2_VERTEX_ATTRIB13_4_NV      0x867D\n#define GL_MAP2_VERTEX_ATTRIB14_4_NV      0x867E\n#define GL_MAP2_VERTEX_ATTRIB15_4_NV      0x867F\ntypedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences);\ntypedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id);\ntypedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program);\ntypedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, void **pointer);\ntypedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id);\ntypedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs);\ntypedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences);\nGLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id);\nGLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params);\nGLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs);\nGLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program);\nGLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params);\nGLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, void **pointer);\nGLAPI GLboolean APIENTRY glIsProgramNV (GLuint id);\nGLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program);\nGLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs);\nGLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform);\nGLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x);\nGLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x);\nGLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x);\nGLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y);\nGLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y);\nGLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z);\nGLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z);\nGLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);\nGLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);\nGLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);\nGLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v);\nGLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v);\nGLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v);\n#endif\n#endif /* GL_NV_vertex_program */\n\n#ifndef GL_NV_vertex_program1_1\n#define GL_NV_vertex_program1_1 1\n#endif /* GL_NV_vertex_program1_1 */\n\n#ifndef GL_NV_vertex_program2\n#define GL_NV_vertex_program2 1\n#endif /* GL_NV_vertex_program2 */\n\n#ifndef GL_NV_vertex_program2_option\n#define GL_NV_vertex_program2_option 1\n#endif /* GL_NV_vertex_program2_option */\n\n#ifndef GL_NV_vertex_program3\n#define GL_NV_vertex_program3 1\n#endif /* GL_NV_vertex_program3 */\n\n#ifndef GL_NV_vertex_program4\n#define GL_NV_vertex_program4 1\n#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v);\ntypedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x);\nGLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y);\nGLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z);\nGLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w);\nGLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x);\nGLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y);\nGLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z);\nGLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);\nGLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v);\nGLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v);\nGLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v);\nGLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v);\nGLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v);\nGLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v);\nGLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);\nGLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params);\n#endif\n#endif /* GL_NV_vertex_program4 */\n\n#ifndef GL_NV_video_capture\n#define GL_NV_video_capture 1\n#define GL_VIDEO_BUFFER_NV                0x9020\n#define GL_VIDEO_BUFFER_BINDING_NV        0x9021\n#define GL_FIELD_UPPER_NV                 0x9022\n#define GL_FIELD_LOWER_NV                 0x9023\n#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV   0x9024\n#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025\n#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026\n#define GL_LAST_VIDEO_CAPTURE_STATUS_NV   0x9027\n#define GL_VIDEO_BUFFER_PITCH_NV          0x9028\n#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029\n#define GL_VIDEO_COLOR_CONVERSION_MAX_NV  0x902A\n#define GL_VIDEO_COLOR_CONVERSION_MIN_NV  0x902B\n#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C\n#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D\n#define GL_PARTIAL_SUCCESS_NV             0x902E\n#define GL_SUCCESS_NV                     0x902F\n#define GL_FAILURE_NV                     0x9030\n#define GL_YCBYCR8_422_NV                 0x9031\n#define GL_YCBAYCR8A_4224_NV              0x9032\n#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV  0x9033\n#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034\n#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV  0x9035\n#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036\n#define GL_Z4Y12Z4CB12Z4CR12_444_NV       0x9037\n#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV   0x9038\n#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV  0x9039\n#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A\n#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B\n#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C\ntypedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\ntypedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\ntypedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\ntypedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset);\nGLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture);\nGLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot);\nGLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params);\nGLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time);\nGLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params);\n#endif\n#endif /* GL_NV_video_capture */\n\n#ifndef GL_OML_interlace\n#define GL_OML_interlace 1\n#define GL_INTERLACE_OML                  0x8980\n#define GL_INTERLACE_READ_OML             0x8981\n#endif /* GL_OML_interlace */\n\n#ifndef GL_OML_resample\n#define GL_OML_resample 1\n#define GL_PACK_RESAMPLE_OML              0x8984\n#define GL_UNPACK_RESAMPLE_OML            0x8985\n#define GL_RESAMPLE_REPLICATE_OML         0x8986\n#define GL_RESAMPLE_ZERO_FILL_OML         0x8987\n#define GL_RESAMPLE_AVERAGE_OML           0x8988\n#define GL_RESAMPLE_DECIMATE_OML          0x8989\n#endif /* GL_OML_resample */\n\n#ifndef GL_OML_subsample\n#define GL_OML_subsample 1\n#define GL_FORMAT_SUBSAMPLE_24_24_OML     0x8982\n#define GL_FORMAT_SUBSAMPLE_244_244_OML   0x8983\n#endif /* GL_OML_subsample */\n\n#ifndef GL_PGI_misc_hints\n#define GL_PGI_misc_hints 1\n#define GL_PREFER_DOUBLEBUFFER_HINT_PGI   0x1A1F8\n#define GL_CONSERVE_MEMORY_HINT_PGI       0x1A1FD\n#define GL_RECLAIM_MEMORY_HINT_PGI        0x1A1FE\n#define GL_NATIVE_GRAPHICS_HANDLE_PGI     0x1A202\n#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203\n#define GL_NATIVE_GRAPHICS_END_HINT_PGI   0x1A204\n#define GL_ALWAYS_FAST_HINT_PGI           0x1A20C\n#define GL_ALWAYS_SOFT_HINT_PGI           0x1A20D\n#define GL_ALLOW_DRAW_OBJ_HINT_PGI        0x1A20E\n#define GL_ALLOW_DRAW_WIN_HINT_PGI        0x1A20F\n#define GL_ALLOW_DRAW_FRG_HINT_PGI        0x1A210\n#define GL_ALLOW_DRAW_MEM_HINT_PGI        0x1A211\n#define GL_STRICT_DEPTHFUNC_HINT_PGI      0x1A216\n#define GL_STRICT_LIGHTING_HINT_PGI       0x1A217\n#define GL_STRICT_SCISSOR_HINT_PGI        0x1A218\n#define GL_FULL_STIPPLE_HINT_PGI          0x1A219\n#define GL_CLIP_NEAR_HINT_PGI             0x1A220\n#define GL_CLIP_FAR_HINT_PGI              0x1A221\n#define GL_WIDE_LINE_HINT_PGI             0x1A222\n#define GL_BACK_NORMALS_HINT_PGI          0x1A223\ntypedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glHintPGI (GLenum target, GLint mode);\n#endif\n#endif /* GL_PGI_misc_hints */\n\n#ifndef GL_PGI_vertex_hints\n#define GL_PGI_vertex_hints 1\n#define GL_VERTEX_DATA_HINT_PGI           0x1A22A\n#define GL_VERTEX_CONSISTENT_HINT_PGI     0x1A22B\n#define GL_MATERIAL_SIDE_HINT_PGI         0x1A22C\n#define GL_MAX_VERTEX_HINT_PGI            0x1A22D\n#define GL_COLOR3_BIT_PGI                 0x00010000\n#define GL_COLOR4_BIT_PGI                 0x00020000\n#define GL_EDGEFLAG_BIT_PGI               0x00040000\n#define GL_INDEX_BIT_PGI                  0x00080000\n#define GL_MAT_AMBIENT_BIT_PGI            0x00100000\n#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000\n#define GL_MAT_DIFFUSE_BIT_PGI            0x00400000\n#define GL_MAT_EMISSION_BIT_PGI           0x00800000\n#define GL_MAT_COLOR_INDEXES_BIT_PGI      0x01000000\n#define GL_MAT_SHININESS_BIT_PGI          0x02000000\n#define GL_MAT_SPECULAR_BIT_PGI           0x04000000\n#define GL_NORMAL_BIT_PGI                 0x08000000\n#define GL_TEXCOORD1_BIT_PGI              0x10000000\n#define GL_TEXCOORD2_BIT_PGI              0x20000000\n#define GL_TEXCOORD3_BIT_PGI              0x40000000\n#define GL_TEXCOORD4_BIT_PGI              0x80000000\n#define GL_VERTEX23_BIT_PGI               0x00000004\n#define GL_VERTEX4_BIT_PGI                0x00000008\n#endif /* GL_PGI_vertex_hints */\n\n#ifndef GL_REND_screen_coordinates\n#define GL_REND_screen_coordinates 1\n#define GL_SCREEN_COORDINATES_REND        0x8490\n#define GL_INVERTED_SCREEN_W_REND         0x8491\n#endif /* GL_REND_screen_coordinates */\n\n#ifndef GL_S3_s3tc\n#define GL_S3_s3tc 1\n#define GL_RGB_S3TC                       0x83A0\n#define GL_RGB4_S3TC                      0x83A1\n#define GL_RGBA_S3TC                      0x83A2\n#define GL_RGBA4_S3TC                     0x83A3\n#define GL_RGBA_DXT5_S3TC                 0x83A4\n#define GL_RGBA4_DXT5_S3TC                0x83A5\n#endif /* GL_S3_s3tc */\n\n#ifndef GL_SGIS_detail_texture\n#define GL_SGIS_detail_texture 1\n#define GL_DETAIL_TEXTURE_2D_SGIS         0x8095\n#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096\n#define GL_LINEAR_DETAIL_SGIS             0x8097\n#define GL_LINEAR_DETAIL_ALPHA_SGIS       0x8098\n#define GL_LINEAR_DETAIL_COLOR_SGIS       0x8099\n#define GL_DETAIL_TEXTURE_LEVEL_SGIS      0x809A\n#define GL_DETAIL_TEXTURE_MODE_SGIS       0x809B\n#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C\ntypedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points);\n#endif\n#endif /* GL_SGIS_detail_texture */\n\n#ifndef GL_SGIS_fog_function\n#define GL_SGIS_fog_function 1\n#define GL_FOG_FUNC_SGIS                  0x812A\n#define GL_FOG_FUNC_POINTS_SGIS           0x812B\n#define GL_MAX_FOG_FUNC_POINTS_SGIS       0x812C\ntypedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points);\n#endif\n#endif /* GL_SGIS_fog_function */\n\n#ifndef GL_SGIS_generate_mipmap\n#define GL_SGIS_generate_mipmap 1\n#define GL_GENERATE_MIPMAP_SGIS           0x8191\n#define GL_GENERATE_MIPMAP_HINT_SGIS      0x8192\n#endif /* GL_SGIS_generate_mipmap */\n\n#ifndef GL_SGIS_multisample\n#define GL_SGIS_multisample 1\n#define GL_MULTISAMPLE_SGIS               0x809D\n#define GL_SAMPLE_ALPHA_TO_MASK_SGIS      0x809E\n#define GL_SAMPLE_ALPHA_TO_ONE_SGIS       0x809F\n#define GL_SAMPLE_MASK_SGIS               0x80A0\n#define GL_1PASS_SGIS                     0x80A1\n#define GL_2PASS_0_SGIS                   0x80A2\n#define GL_2PASS_1_SGIS                   0x80A3\n#define GL_4PASS_0_SGIS                   0x80A4\n#define GL_4PASS_1_SGIS                   0x80A5\n#define GL_4PASS_2_SGIS                   0x80A6\n#define GL_4PASS_3_SGIS                   0x80A7\n#define GL_SAMPLE_BUFFERS_SGIS            0x80A8\n#define GL_SAMPLES_SGIS                   0x80A9\n#define GL_SAMPLE_MASK_VALUE_SGIS         0x80AA\n#define GL_SAMPLE_MASK_INVERT_SGIS        0x80AB\n#define GL_SAMPLE_PATTERN_SGIS            0x80AC\ntypedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert);\ntypedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert);\nGLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern);\n#endif\n#endif /* GL_SGIS_multisample */\n\n#ifndef GL_SGIS_pixel_texture\n#define GL_SGIS_pixel_texture 1\n#define GL_PIXEL_TEXTURE_SGIS             0x8353\n#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354\n#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355\n#define GL_PIXEL_GROUP_COLOR_SGIS         0x8356\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param);\nGLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params);\n#endif\n#endif /* GL_SGIS_pixel_texture */\n\n#ifndef GL_SGIS_point_line_texgen\n#define GL_SGIS_point_line_texgen 1\n#define GL_EYE_DISTANCE_TO_POINT_SGIS     0x81F0\n#define GL_OBJECT_DISTANCE_TO_POINT_SGIS  0x81F1\n#define GL_EYE_DISTANCE_TO_LINE_SGIS      0x81F2\n#define GL_OBJECT_DISTANCE_TO_LINE_SGIS   0x81F3\n#define GL_EYE_POINT_SGIS                 0x81F4\n#define GL_OBJECT_POINT_SGIS              0x81F5\n#define GL_EYE_LINE_SGIS                  0x81F6\n#define GL_OBJECT_LINE_SGIS               0x81F7\n#endif /* GL_SGIS_point_line_texgen */\n\n#ifndef GL_SGIS_point_parameters\n#define GL_SGIS_point_parameters 1\n#define GL_POINT_SIZE_MIN_SGIS            0x8126\n#define GL_POINT_SIZE_MAX_SGIS            0x8127\n#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128\n#define GL_DISTANCE_ATTENUATION_SGIS      0x8129\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params);\n#endif\n#endif /* GL_SGIS_point_parameters */\n\n#ifndef GL_SGIS_sharpen_texture\n#define GL_SGIS_sharpen_texture 1\n#define GL_LINEAR_SHARPEN_SGIS            0x80AD\n#define GL_LINEAR_SHARPEN_ALPHA_SGIS      0x80AE\n#define GL_LINEAR_SHARPEN_COLOR_SGIS      0x80AF\n#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0\ntypedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points);\ntypedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points);\nGLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points);\n#endif\n#endif /* GL_SGIS_sharpen_texture */\n\n#ifndef GL_SGIS_texture4D\n#define GL_SGIS_texture4D 1\n#define GL_PACK_SKIP_VOLUMES_SGIS         0x8130\n#define GL_PACK_IMAGE_DEPTH_SGIS          0x8131\n#define GL_UNPACK_SKIP_VOLUMES_SGIS       0x8132\n#define GL_UNPACK_IMAGE_DEPTH_SGIS        0x8133\n#define GL_TEXTURE_4D_SGIS                0x8134\n#define GL_PROXY_TEXTURE_4D_SGIS          0x8135\n#define GL_TEXTURE_4DSIZE_SGIS            0x8136\n#define GL_TEXTURE_WRAP_Q_SGIS            0x8137\n#define GL_MAX_4D_TEXTURE_SIZE_SGIS       0x8138\n#define GL_TEXTURE_4D_BINDING_SGIS        0x814F\ntypedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);\ntypedef 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 void *pixels);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const void *pixels);\nGLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const void *pixels);\n#endif\n#endif /* GL_SGIS_texture4D */\n\n#ifndef GL_SGIS_texture_border_clamp\n#define GL_SGIS_texture_border_clamp 1\n#define GL_CLAMP_TO_BORDER_SGIS           0x812D\n#endif /* GL_SGIS_texture_border_clamp */\n\n#ifndef GL_SGIS_texture_color_mask\n#define GL_SGIS_texture_color_mask 1\n#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF\ntypedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\n#endif\n#endif /* GL_SGIS_texture_color_mask */\n\n#ifndef GL_SGIS_texture_edge_clamp\n#define GL_SGIS_texture_edge_clamp 1\n#define GL_CLAMP_TO_EDGE_SGIS             0x812F\n#endif /* GL_SGIS_texture_edge_clamp */\n\n#ifndef GL_SGIS_texture_filter4\n#define GL_SGIS_texture_filter4 1\n#define GL_FILTER4_SGIS                   0x8146\n#define GL_TEXTURE_FILTER4_SIZE_SGIS      0x8147\ntypedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights);\ntypedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights);\nGLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights);\n#endif\n#endif /* GL_SGIS_texture_filter4 */\n\n#ifndef GL_SGIS_texture_lod\n#define GL_SGIS_texture_lod 1\n#define GL_TEXTURE_MIN_LOD_SGIS           0x813A\n#define GL_TEXTURE_MAX_LOD_SGIS           0x813B\n#define GL_TEXTURE_BASE_LEVEL_SGIS        0x813C\n#define GL_TEXTURE_MAX_LEVEL_SGIS         0x813D\n#endif /* GL_SGIS_texture_lod */\n\n#ifndef GL_SGIS_texture_select\n#define GL_SGIS_texture_select 1\n#define GL_DUAL_ALPHA4_SGIS               0x8110\n#define GL_DUAL_ALPHA8_SGIS               0x8111\n#define GL_DUAL_ALPHA12_SGIS              0x8112\n#define GL_DUAL_ALPHA16_SGIS              0x8113\n#define GL_DUAL_LUMINANCE4_SGIS           0x8114\n#define GL_DUAL_LUMINANCE8_SGIS           0x8115\n#define GL_DUAL_LUMINANCE12_SGIS          0x8116\n#define GL_DUAL_LUMINANCE16_SGIS          0x8117\n#define GL_DUAL_INTENSITY4_SGIS           0x8118\n#define GL_DUAL_INTENSITY8_SGIS           0x8119\n#define GL_DUAL_INTENSITY12_SGIS          0x811A\n#define GL_DUAL_INTENSITY16_SGIS          0x811B\n#define GL_DUAL_LUMINANCE_ALPHA4_SGIS     0x811C\n#define GL_DUAL_LUMINANCE_ALPHA8_SGIS     0x811D\n#define GL_QUAD_ALPHA4_SGIS               0x811E\n#define GL_QUAD_ALPHA8_SGIS               0x811F\n#define GL_QUAD_LUMINANCE4_SGIS           0x8120\n#define GL_QUAD_LUMINANCE8_SGIS           0x8121\n#define GL_QUAD_INTENSITY4_SGIS           0x8122\n#define GL_QUAD_INTENSITY8_SGIS           0x8123\n#define GL_DUAL_TEXTURE_SELECT_SGIS       0x8124\n#define GL_QUAD_TEXTURE_SELECT_SGIS       0x8125\n#endif /* GL_SGIS_texture_select */\n\n#ifndef GL_SGIX_async\n#define GL_SGIX_async 1\n#define GL_ASYNC_MARKER_SGIX              0x8329\ntypedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker);\ntypedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);\ntypedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);\ntypedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);\ntypedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker);\nGLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp);\nGLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp);\nGLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range);\nGLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range);\nGLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker);\n#endif\n#endif /* GL_SGIX_async */\n\n#ifndef GL_SGIX_async_histogram\n#define GL_SGIX_async_histogram 1\n#define GL_ASYNC_HISTOGRAM_SGIX           0x832C\n#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D\n#endif /* GL_SGIX_async_histogram */\n\n#ifndef GL_SGIX_async_pixel\n#define GL_SGIX_async_pixel 1\n#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C\n#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D\n#define GL_ASYNC_READ_PIXELS_SGIX         0x835E\n#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F\n#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360\n#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361\n#endif /* GL_SGIX_async_pixel */\n\n#ifndef GL_SGIX_blend_alpha_minmax\n#define GL_SGIX_blend_alpha_minmax 1\n#define GL_ALPHA_MIN_SGIX                 0x8320\n#define GL_ALPHA_MAX_SGIX                 0x8321\n#endif /* GL_SGIX_blend_alpha_minmax */\n\n#ifndef GL_SGIX_calligraphic_fragment\n#define GL_SGIX_calligraphic_fragment 1\n#define GL_CALLIGRAPHIC_FRAGMENT_SGIX     0x8183\n#endif /* GL_SGIX_calligraphic_fragment */\n\n#ifndef GL_SGIX_clipmap\n#define GL_SGIX_clipmap 1\n#define GL_LINEAR_CLIPMAP_LINEAR_SGIX     0x8170\n#define GL_TEXTURE_CLIPMAP_CENTER_SGIX    0x8171\n#define GL_TEXTURE_CLIPMAP_FRAME_SGIX     0x8172\n#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX    0x8173\n#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174\n#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175\n#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX     0x8176\n#define GL_MAX_CLIPMAP_DEPTH_SGIX         0x8177\n#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178\n#define GL_NEAREST_CLIPMAP_NEAREST_SGIX   0x844D\n#define GL_NEAREST_CLIPMAP_LINEAR_SGIX    0x844E\n#define GL_LINEAR_CLIPMAP_NEAREST_SGIX    0x844F\n#endif /* GL_SGIX_clipmap */\n\n#ifndef GL_SGIX_convolution_accuracy\n#define GL_SGIX_convolution_accuracy 1\n#define GL_CONVOLUTION_HINT_SGIX          0x8316\n#endif /* GL_SGIX_convolution_accuracy */\n\n#ifndef GL_SGIX_depth_pass_instrument\n#define GL_SGIX_depth_pass_instrument 1\n#endif /* GL_SGIX_depth_pass_instrument */\n\n#ifndef GL_SGIX_depth_texture\n#define GL_SGIX_depth_texture 1\n#define GL_DEPTH_COMPONENT16_SGIX         0x81A5\n#define GL_DEPTH_COMPONENT24_SGIX         0x81A6\n#define GL_DEPTH_COMPONENT32_SGIX         0x81A7\n#endif /* GL_SGIX_depth_texture */\n\n#ifndef GL_SGIX_flush_raster\n#define GL_SGIX_flush_raster 1\ntypedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFlushRasterSGIX (void);\n#endif\n#endif /* GL_SGIX_flush_raster */\n\n#ifndef GL_SGIX_fog_offset\n#define GL_SGIX_fog_offset 1\n#define GL_FOG_OFFSET_SGIX                0x8198\n#define GL_FOG_OFFSET_VALUE_SGIX          0x8199\n#endif /* GL_SGIX_fog_offset */\n\n#ifndef GL_SGIX_fragment_lighting\n#define GL_SGIX_fragment_lighting 1\n#define GL_FRAGMENT_LIGHTING_SGIX         0x8400\n#define GL_FRAGMENT_COLOR_MATERIAL_SGIX   0x8401\n#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402\n#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403\n#define GL_MAX_FRAGMENT_LIGHTS_SGIX       0x8404\n#define GL_MAX_ACTIVE_LIGHTS_SGIX         0x8405\n#define GL_CURRENT_RASTER_NORMAL_SGIX     0x8406\n#define GL_LIGHT_ENV_MODE_SGIX            0x8407\n#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408\n#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409\n#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A\n#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B\n#define GL_FRAGMENT_LIGHT0_SGIX           0x840C\n#define GL_FRAGMENT_LIGHT1_SGIX           0x840D\n#define GL_FRAGMENT_LIGHT2_SGIX           0x840E\n#define GL_FRAGMENT_LIGHT3_SGIX           0x840F\n#define GL_FRAGMENT_LIGHT4_SGIX           0x8410\n#define GL_FRAGMENT_LIGHT5_SGIX           0x8411\n#define GL_FRAGMENT_LIGHT6_SGIX           0x8412\n#define GL_FRAGMENT_LIGHT7_SGIX           0x8413\ntypedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode);\nGLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params);\nGLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param);\nGLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params);\nGLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params);\nGLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param);\n#endif\n#endif /* GL_SGIX_fragment_lighting */\n\n#ifndef GL_SGIX_framezoom\n#define GL_SGIX_framezoom 1\n#define GL_FRAMEZOOM_SGIX                 0x818B\n#define GL_FRAMEZOOM_FACTOR_SGIX          0x818C\n#define GL_MAX_FRAMEZOOM_FACTOR_SGIX      0x818D\ntypedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFrameZoomSGIX (GLint factor);\n#endif\n#endif /* GL_SGIX_framezoom */\n\n#ifndef GL_SGIX_igloo_interface\n#define GL_SGIX_igloo_interface 1\ntypedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const void *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const void *params);\n#endif\n#endif /* GL_SGIX_igloo_interface */\n\n#ifndef GL_SGIX_instruments\n#define GL_SGIX_instruments 1\n#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180\n#define GL_INSTRUMENT_MEASUREMENTS_SGIX   0x8181\ntypedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer);\ntypedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p);\ntypedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker);\ntypedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void);\ntypedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI GLint APIENTRY glGetInstrumentsSGIX (void);\nGLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer);\nGLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p);\nGLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker);\nGLAPI void APIENTRY glStartInstrumentsSGIX (void);\nGLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker);\n#endif\n#endif /* GL_SGIX_instruments */\n\n#ifndef GL_SGIX_interlace\n#define GL_SGIX_interlace 1\n#define GL_INTERLACE_SGIX                 0x8094\n#endif /* GL_SGIX_interlace */\n\n#ifndef GL_SGIX_ir_instrument1\n#define GL_SGIX_ir_instrument1 1\n#define GL_IR_INSTRUMENT1_SGIX            0x817F\n#endif /* GL_SGIX_ir_instrument1 */\n\n#ifndef GL_SGIX_list_priority\n#define GL_SGIX_list_priority 1\n#define GL_LIST_PRIORITY_SGIX             0x8182\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params);\nGLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param);\nGLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param);\nGLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params);\n#endif\n#endif /* GL_SGIX_list_priority */\n\n#ifndef GL_SGIX_pixel_texture\n#define GL_SGIX_pixel_texture 1\n#define GL_PIXEL_TEX_GEN_SGIX             0x8139\n#define GL_PIXEL_TEX_GEN_MODE_SGIX        0x832B\ntypedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode);\n#endif\n#endif /* GL_SGIX_pixel_texture */\n\n#ifndef GL_SGIX_pixel_tiles\n#define GL_SGIX_pixel_tiles 1\n#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E\n#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F\n#define GL_PIXEL_TILE_WIDTH_SGIX          0x8140\n#define GL_PIXEL_TILE_HEIGHT_SGIX         0x8141\n#define GL_PIXEL_TILE_GRID_WIDTH_SGIX     0x8142\n#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX    0x8143\n#define GL_PIXEL_TILE_GRID_DEPTH_SGIX     0x8144\n#define GL_PIXEL_TILE_CACHE_SIZE_SGIX     0x8145\n#endif /* GL_SGIX_pixel_tiles */\n\n#ifndef GL_SGIX_polynomial_ffd\n#define GL_SGIX_polynomial_ffd 1\n#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001\n#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002\n#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194\n#define GL_TEXTURE_DEFORMATION_SGIX       0x8195\n#define GL_DEFORMATIONS_MASK_SGIX         0x8196\n#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197\ntypedef 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);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask);\ntypedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);\nGLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);\nGLAPI void APIENTRY glDeformSGIX (GLbitfield mask);\nGLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask);\n#endif\n#endif /* GL_SGIX_polynomial_ffd */\n\n#ifndef GL_SGIX_reference_plane\n#define GL_SGIX_reference_plane 1\n#define GL_REFERENCE_PLANE_SGIX           0x817D\n#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E\ntypedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);\n#endif\n#endif /* GL_SGIX_reference_plane */\n\n#ifndef GL_SGIX_resample\n#define GL_SGIX_resample 1\n#define GL_PACK_RESAMPLE_SGIX             0x842C\n#define GL_UNPACK_RESAMPLE_SGIX           0x842D\n#define GL_RESAMPLE_REPLICATE_SGIX        0x842E\n#define GL_RESAMPLE_ZERO_FILL_SGIX        0x842F\n#define GL_RESAMPLE_DECIMATE_SGIX         0x8430\n#endif /* GL_SGIX_resample */\n\n#ifndef GL_SGIX_scalebias_hint\n#define GL_SGIX_scalebias_hint 1\n#define GL_SCALEBIAS_HINT_SGIX            0x8322\n#endif /* GL_SGIX_scalebias_hint */\n\n#ifndef GL_SGIX_shadow\n#define GL_SGIX_shadow 1\n#define GL_TEXTURE_COMPARE_SGIX           0x819A\n#define GL_TEXTURE_COMPARE_OPERATOR_SGIX  0x819B\n#define GL_TEXTURE_LEQUAL_R_SGIX          0x819C\n#define GL_TEXTURE_GEQUAL_R_SGIX          0x819D\n#endif /* GL_SGIX_shadow */\n\n#ifndef GL_SGIX_shadow_ambient\n#define GL_SGIX_shadow_ambient 1\n#define GL_SHADOW_AMBIENT_SGIX            0x80BF\n#endif /* GL_SGIX_shadow_ambient */\n\n#ifndef GL_SGIX_sprite\n#define GL_SGIX_sprite 1\n#define GL_SPRITE_SGIX                    0x8148\n#define GL_SPRITE_MODE_SGIX               0x8149\n#define GL_SPRITE_AXIS_SGIX               0x814A\n#define GL_SPRITE_TRANSLATION_SGIX        0x814B\n#define GL_SPRITE_AXIAL_SGIX              0x814C\n#define GL_SPRITE_OBJECT_ALIGNED_SGIX     0x814D\n#define GL_SPRITE_EYE_ALIGNED_SGIX        0x814E\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param);\ntypedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param);\nGLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param);\nGLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params);\n#endif\n#endif /* GL_SGIX_sprite */\n\n#ifndef GL_SGIX_subsample\n#define GL_SGIX_subsample 1\n#define GL_PACK_SUBSAMPLE_RATE_SGIX       0x85A0\n#define GL_UNPACK_SUBSAMPLE_RATE_SGIX     0x85A1\n#define GL_PIXEL_SUBSAMPLE_4444_SGIX      0x85A2\n#define GL_PIXEL_SUBSAMPLE_2424_SGIX      0x85A3\n#define GL_PIXEL_SUBSAMPLE_4242_SGIX      0x85A4\n#endif /* GL_SGIX_subsample */\n\n#ifndef GL_SGIX_tag_sample_buffer\n#define GL_SGIX_tag_sample_buffer 1\ntypedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glTagSampleBufferSGIX (void);\n#endif\n#endif /* GL_SGIX_tag_sample_buffer */\n\n#ifndef GL_SGIX_texture_add_env\n#define GL_SGIX_texture_add_env 1\n#define GL_TEXTURE_ENV_BIAS_SGIX          0x80BE\n#endif /* GL_SGIX_texture_add_env */\n\n#ifndef GL_SGIX_texture_coordinate_clamp\n#define GL_SGIX_texture_coordinate_clamp 1\n#define GL_TEXTURE_MAX_CLAMP_S_SGIX       0x8369\n#define GL_TEXTURE_MAX_CLAMP_T_SGIX       0x836A\n#define GL_TEXTURE_MAX_CLAMP_R_SGIX       0x836B\n#endif /* GL_SGIX_texture_coordinate_clamp */\n\n#ifndef GL_SGIX_texture_lod_bias\n#define GL_SGIX_texture_lod_bias 1\n#define GL_TEXTURE_LOD_BIAS_S_SGIX        0x818E\n#define GL_TEXTURE_LOD_BIAS_T_SGIX        0x818F\n#define GL_TEXTURE_LOD_BIAS_R_SGIX        0x8190\n#endif /* GL_SGIX_texture_lod_bias */\n\n#ifndef GL_SGIX_texture_multi_buffer\n#define GL_SGIX_texture_multi_buffer 1\n#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E\n#endif /* GL_SGIX_texture_multi_buffer */\n\n#ifndef GL_SGIX_texture_scale_bias\n#define GL_SGIX_texture_scale_bias 1\n#define GL_POST_TEXTURE_FILTER_BIAS_SGIX  0x8179\n#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A\n#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B\n#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C\n#endif /* GL_SGIX_texture_scale_bias */\n\n#ifndef GL_SGIX_vertex_preclip\n#define GL_SGIX_vertex_preclip 1\n#define GL_VERTEX_PRECLIP_SGIX            0x83EE\n#define GL_VERTEX_PRECLIP_HINT_SGIX       0x83EF\n#endif /* GL_SGIX_vertex_preclip */\n\n#ifndef GL_SGIX_ycrcb\n#define GL_SGIX_ycrcb 1\n#define GL_YCRCB_422_SGIX                 0x81BB\n#define GL_YCRCB_444_SGIX                 0x81BC\n#endif /* GL_SGIX_ycrcb */\n\n#ifndef GL_SGIX_ycrcb_subsample\n#define GL_SGIX_ycrcb_subsample 1\n#endif /* GL_SGIX_ycrcb_subsample */\n\n#ifndef GL_SGIX_ycrcba\n#define GL_SGIX_ycrcba 1\n#define GL_YCRCB_SGIX                     0x8318\n#define GL_YCRCBA_SGIX                    0x8319\n#endif /* GL_SGIX_ycrcba */\n\n#ifndef GL_SGI_color_matrix\n#define GL_SGI_color_matrix 1\n#define GL_COLOR_MATRIX_SGI               0x80B1\n#define GL_COLOR_MATRIX_STACK_DEPTH_SGI   0x80B2\n#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3\n#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4\n#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5\n#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6\n#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7\n#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8\n#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9\n#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA\n#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB\n#endif /* GL_SGI_color_matrix */\n\n#ifndef GL_SGI_color_table\n#define GL_SGI_color_table 1\n#define GL_COLOR_TABLE_SGI                0x80D0\n#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1\n#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2\n#define GL_PROXY_COLOR_TABLE_SGI          0x80D3\n#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4\n#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5\n#define GL_COLOR_TABLE_SCALE_SGI          0x80D6\n#define GL_COLOR_TABLE_BIAS_SGI           0x80D7\n#define GL_COLOR_TABLE_FORMAT_SGI         0x80D8\n#define GL_COLOR_TABLE_WIDTH_SGI          0x80D9\n#define GL_COLOR_TABLE_RED_SIZE_SGI       0x80DA\n#define GL_COLOR_TABLE_GREEN_SIZE_SGI     0x80DB\n#define GL_COLOR_TABLE_BLUE_SIZE_SGI      0x80DC\n#define GL_COLOR_TABLE_ALPHA_SIZE_SGI     0x80DD\n#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE\n#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF\ntypedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params);\ntypedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params);\ntypedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, void *table);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params);\ntypedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table);\nGLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params);\nGLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params);\nGLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);\nGLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, void *table);\nGLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params);\nGLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params);\n#endif\n#endif /* GL_SGI_color_table */\n\n#ifndef GL_SGI_texture_color_table\n#define GL_SGI_texture_color_table 1\n#define GL_TEXTURE_COLOR_TABLE_SGI        0x80BC\n#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI  0x80BD\n#endif /* GL_SGI_texture_color_table */\n\n#ifndef GL_SUNX_constant_data\n#define GL_SUNX_constant_data 1\n#define GL_UNPACK_CONSTANT_DATA_SUNX      0x81D5\n#define GL_TEXTURE_CONSTANT_DATA_SUNX     0x81D6\ntypedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glFinishTextureSUNX (void);\n#endif\n#endif /* GL_SUNX_constant_data */\n\n#ifndef GL_SUN_convolution_border_modes\n#define GL_SUN_convolution_border_modes 1\n#define GL_WRAP_BORDER_SUN                0x81D4\n#endif /* GL_SUN_convolution_border_modes */\n\n#ifndef GL_SUN_global_alpha\n#define GL_SUN_global_alpha 1\n#define GL_GLOBAL_ALPHA_SUN               0x81D9\n#define GL_GLOBAL_ALPHA_FACTOR_SUN        0x81DA\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor);\ntypedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor);\nGLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor);\nGLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor);\nGLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor);\nGLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor);\nGLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor);\n#endif\n#endif /* GL_SUN_global_alpha */\n\n#ifndef GL_SUN_mesh_array\n#define GL_SUN_mesh_array 1\n#define GL_QUAD_MESH_SUN                  0x8614\n#define GL_TRIANGLE_MESH_SUN              0x8615\ntypedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width);\n#endif\n#endif /* GL_SUN_mesh_array */\n\n#ifndef GL_SUN_slice_accum\n#define GL_SUN_slice_accum 1\n#define GL_SLICE_ACCUM_SUN                0x85CC\n#endif /* GL_SUN_slice_accum */\n\n#ifndef GL_SUN_triangle_list\n#define GL_SUN_triangle_list 1\n#define GL_RESTART_SUN                    0x0001\n#define GL_REPLACE_MIDDLE_SUN             0x0002\n#define GL_REPLACE_OLDEST_SUN             0x0003\n#define GL_TRIANGLE_LIST_SUN              0x81D7\n#define GL_REPLACEMENT_CODE_SUN           0x81D8\n#define GL_REPLACEMENT_CODE_ARRAY_SUN     0x85C0\n#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1\n#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2\n#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3\n#define GL_R1UI_V3F_SUN                   0x85C4\n#define GL_R1UI_C4UB_V3F_SUN              0x85C5\n#define GL_R1UI_C3F_V3F_SUN               0x85C6\n#define GL_R1UI_N3F_V3F_SUN               0x85C7\n#define GL_R1UI_C4F_N3F_V3F_SUN           0x85C8\n#define GL_R1UI_T2F_V3F_SUN               0x85C9\n#define GL_R1UI_T2F_N3F_V3F_SUN           0x85CA\n#define GL_R1UI_T2F_C4F_N3F_V3F_SUN       0x85CB\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const void **pointer);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code);\nGLAPI void APIENTRY glReplacementCodeusSUN (GLushort code);\nGLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code);\nGLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code);\nGLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code);\nGLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code);\nGLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const void **pointer);\n#endif\n#endif /* GL_SUN_triangle_list */\n\n#ifndef GL_SUN_vertex\n#define GL_SUN_vertex 1\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\ntypedef 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);\ntypedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#ifdef GL_GLEXT_PROTOTYPES\nGLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y);\nGLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z);\nGLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v);\n#endif\n#endif /* GL_SUN_vertex */\n\n#ifndef GL_WIN_phong_shading\n#define GL_WIN_phong_shading 1\n#define GL_PHONG_WIN                      0x80EA\n#define GL_PHONG_HINT_WIN                 0x80EB\n#endif /* GL_WIN_phong_shading */\n\n#ifndef GL_WIN_specular_fog\n#define GL_WIN_specular_fog 1\n#define GL_FOG_SPECULAR_TEXTURE_WIN       0x80EC\n#endif /* GL_WIN_specular_fog */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengles.h\n *\n *  This is a simple file to encapsulate the OpenGL ES 1.X API headers.\n */\n#include \"SDL_config.h\"\n\n#ifdef __IPHONEOS__\n#include <OpenGLES/ES1/gl.h>\n#include <OpenGLES/ES1/glext.h>\n#else\n#include <GLES/gl.h>\n#include <GLES/glext.h>\n#endif\n\n#ifndef APIENTRY\n#define APIENTRY\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles2.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_opengles2.h\n *\n *  This is a simple file to encapsulate the OpenGL ES 2.0 API headers.\n */\n#include \"SDL_config.h\"\n\n#ifndef _MSC_VER\n\n#ifdef __IPHONEOS__\n#include <OpenGLES/ES2/gl.h>\n#include <OpenGLES/ES2/glext.h>\n#else\n#include <GLES2/gl2platform.h>\n#include <GLES2/gl2.h>\n#include <GLES2/gl2ext.h>\n#endif\n\n#else /* _MSC_VER */\n\n/* OpenGL ES2 headers for Visual Studio */\n#include \"SDL_opengles2_khrplatform.h\"\n#include \"SDL_opengles2_gl2platform.h\"\n#include \"SDL_opengles2_gl2.h\"\n#include \"SDL_opengles2_gl2ext.h\"\n\n#endif /* _MSC_VER */\n\n#ifndef APIENTRY\n#define APIENTRY GL_APIENTRY\n#endif\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles2_gl2.h",
    "content": "#ifndef __gl2_h_\n#define __gl2_h_\n\n/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */\n\n/*#include <GLES2/gl2platform.h>*/\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n/*-------------------------------------------------------------------------\n * Data type definitions\n *-----------------------------------------------------------------------*/\n\ntypedef void             GLvoid;\ntypedef char             GLchar;\ntypedef unsigned int     GLenum;\ntypedef unsigned char    GLboolean;\ntypedef unsigned int     GLbitfield;\ntypedef khronos_int8_t   GLbyte;\ntypedef short            GLshort;\ntypedef int              GLint;\ntypedef int              GLsizei;\ntypedef khronos_uint8_t  GLubyte;\ntypedef unsigned short   GLushort;\ntypedef unsigned int     GLuint;\ntypedef khronos_float_t  GLfloat;\ntypedef khronos_float_t  GLclampf;\ntypedef khronos_int32_t  GLfixed;\n\n/* GL types for handling large vertex buffer objects */\ntypedef khronos_intptr_t GLintptr;\ntypedef khronos_ssize_t  GLsizeiptr;\n\n/* OpenGL ES core versions */\n#define GL_ES_VERSION_2_0                 1\n\n/* ClearBufferMask */\n#define GL_DEPTH_BUFFER_BIT               0x00000100\n#define GL_STENCIL_BUFFER_BIT             0x00000400\n#define GL_COLOR_BUFFER_BIT               0x00004000\n\n/* Boolean */\n#define GL_FALSE                          0\n#define GL_TRUE                           1\n\n/* BeginMode */\n#define GL_POINTS                         0x0000\n#define GL_LINES                          0x0001\n#define GL_LINE_LOOP                      0x0002\n#define GL_LINE_STRIP                     0x0003\n#define GL_TRIANGLES                      0x0004\n#define GL_TRIANGLE_STRIP                 0x0005\n#define GL_TRIANGLE_FAN                   0x0006\n\n/* AlphaFunction (not supported in ES20) */\n/*      GL_NEVER */\n/*      GL_LESS */\n/*      GL_EQUAL */\n/*      GL_LEQUAL */\n/*      GL_GREATER */\n/*      GL_NOTEQUAL */\n/*      GL_GEQUAL */\n/*      GL_ALWAYS */\n\n/* BlendingFactorDest */\n#define GL_ZERO                           0\n#define GL_ONE                            1\n#define GL_SRC_COLOR                      0x0300\n#define GL_ONE_MINUS_SRC_COLOR            0x0301\n#define GL_SRC_ALPHA                      0x0302\n#define GL_ONE_MINUS_SRC_ALPHA            0x0303\n#define GL_DST_ALPHA                      0x0304\n#define GL_ONE_MINUS_DST_ALPHA            0x0305\n\n/* BlendingFactorSrc */\n/*      GL_ZERO */\n/*      GL_ONE */\n#define GL_DST_COLOR                      0x0306\n#define GL_ONE_MINUS_DST_COLOR            0x0307\n#define GL_SRC_ALPHA_SATURATE             0x0308\n/*      GL_SRC_ALPHA */\n/*      GL_ONE_MINUS_SRC_ALPHA */\n/*      GL_DST_ALPHA */\n/*      GL_ONE_MINUS_DST_ALPHA */\n\n/* BlendEquationSeparate */\n#define GL_FUNC_ADD                       0x8006\n#define GL_BLEND_EQUATION                 0x8009\n#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */\n#define GL_BLEND_EQUATION_ALPHA           0x883D\n\n/* BlendSubtract */\n#define GL_FUNC_SUBTRACT                  0x800A\n#define GL_FUNC_REVERSE_SUBTRACT          0x800B\n\n/* Separate Blend Functions */\n#define GL_BLEND_DST_RGB                  0x80C8\n#define GL_BLEND_SRC_RGB                  0x80C9\n#define GL_BLEND_DST_ALPHA                0x80CA\n#define GL_BLEND_SRC_ALPHA                0x80CB\n#define GL_CONSTANT_COLOR                 0x8001\n#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002\n#define GL_CONSTANT_ALPHA                 0x8003\n#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004\n#define GL_BLEND_COLOR                    0x8005\n\n/* Buffer Objects */\n#define GL_ARRAY_BUFFER                   0x8892\n#define GL_ELEMENT_ARRAY_BUFFER           0x8893\n#define GL_ARRAY_BUFFER_BINDING           0x8894\n#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895\n\n#define GL_STREAM_DRAW                    0x88E0\n#define GL_STATIC_DRAW                    0x88E4\n#define GL_DYNAMIC_DRAW                   0x88E8\n\n#define GL_BUFFER_SIZE                    0x8764\n#define GL_BUFFER_USAGE                   0x8765\n\n#define GL_CURRENT_VERTEX_ATTRIB          0x8626\n\n/* CullFaceMode */\n#define GL_FRONT                          0x0404\n#define GL_BACK                           0x0405\n#define GL_FRONT_AND_BACK                 0x0408\n\n/* DepthFunction */\n/*      GL_NEVER */\n/*      GL_LESS */\n/*      GL_EQUAL */\n/*      GL_LEQUAL */\n/*      GL_GREATER */\n/*      GL_NOTEQUAL */\n/*      GL_GEQUAL */\n/*      GL_ALWAYS */\n\n/* EnableCap */\n#define GL_TEXTURE_2D                     0x0DE1\n#define GL_CULL_FACE                      0x0B44\n#define GL_BLEND                          0x0BE2\n#define GL_DITHER                         0x0BD0\n#define GL_STENCIL_TEST                   0x0B90\n#define GL_DEPTH_TEST                     0x0B71\n#define GL_SCISSOR_TEST                   0x0C11\n#define GL_POLYGON_OFFSET_FILL            0x8037\n#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E\n#define GL_SAMPLE_COVERAGE                0x80A0\n\n/* ErrorCode */\n#define GL_NO_ERROR                       0\n#define GL_INVALID_ENUM                   0x0500\n#define GL_INVALID_VALUE                  0x0501\n#define GL_INVALID_OPERATION              0x0502\n#define GL_OUT_OF_MEMORY                  0x0505\n\n/* FrontFaceDirection */\n#define GL_CW                             0x0900\n#define GL_CCW                            0x0901\n\n/* GetPName */\n#define GL_LINE_WIDTH                     0x0B21\n#define GL_ALIASED_POINT_SIZE_RANGE       0x846D\n#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E\n#define GL_CULL_FACE_MODE                 0x0B45\n#define GL_FRONT_FACE                     0x0B46\n#define GL_DEPTH_RANGE                    0x0B70\n#define GL_DEPTH_WRITEMASK                0x0B72\n#define GL_DEPTH_CLEAR_VALUE              0x0B73\n#define GL_DEPTH_FUNC                     0x0B74\n#define GL_STENCIL_CLEAR_VALUE            0x0B91\n#define GL_STENCIL_FUNC                   0x0B92\n#define GL_STENCIL_FAIL                   0x0B94\n#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95\n#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96\n#define GL_STENCIL_REF                    0x0B97\n#define GL_STENCIL_VALUE_MASK             0x0B93\n#define GL_STENCIL_WRITEMASK              0x0B98\n#define GL_STENCIL_BACK_FUNC              0x8800\n#define GL_STENCIL_BACK_FAIL              0x8801\n#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802\n#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803\n#define GL_STENCIL_BACK_REF               0x8CA3\n#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4\n#define GL_STENCIL_BACK_WRITEMASK         0x8CA5\n#define GL_VIEWPORT                       0x0BA2\n#define GL_SCISSOR_BOX                    0x0C10\n/*      GL_SCISSOR_TEST */\n#define GL_COLOR_CLEAR_VALUE              0x0C22\n#define GL_COLOR_WRITEMASK                0x0C23\n#define GL_UNPACK_ALIGNMENT               0x0CF5\n#define GL_PACK_ALIGNMENT                 0x0D05\n#define GL_MAX_TEXTURE_SIZE               0x0D33\n#define GL_MAX_VIEWPORT_DIMS              0x0D3A\n#define GL_SUBPIXEL_BITS                  0x0D50\n#define GL_RED_BITS                       0x0D52\n#define GL_GREEN_BITS                     0x0D53\n#define GL_BLUE_BITS                      0x0D54\n#define GL_ALPHA_BITS                     0x0D55\n#define GL_DEPTH_BITS                     0x0D56\n#define GL_STENCIL_BITS                   0x0D57\n#define GL_POLYGON_OFFSET_UNITS           0x2A00\n/*      GL_POLYGON_OFFSET_FILL */\n#define GL_POLYGON_OFFSET_FACTOR          0x8038\n#define GL_TEXTURE_BINDING_2D             0x8069\n#define GL_SAMPLE_BUFFERS                 0x80A8\n#define GL_SAMPLES                        0x80A9\n#define GL_SAMPLE_COVERAGE_VALUE          0x80AA\n#define GL_SAMPLE_COVERAGE_INVERT         0x80AB\n\n/* GetTextureParameter */\n/*      GL_TEXTURE_MAG_FILTER */\n/*      GL_TEXTURE_MIN_FILTER */\n/*      GL_TEXTURE_WRAP_S */\n/*      GL_TEXTURE_WRAP_T */\n\n#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2\n#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3\n\n/* HintMode */\n#define GL_DONT_CARE                      0x1100\n#define GL_FASTEST                        0x1101\n#define GL_NICEST                         0x1102\n\n/* HintTarget */\n#define GL_GENERATE_MIPMAP_HINT            0x8192\n\n/* DataType */\n#define GL_BYTE                           0x1400\n#define GL_UNSIGNED_BYTE                  0x1401\n#define GL_SHORT                          0x1402\n#define GL_UNSIGNED_SHORT                 0x1403\n#define GL_INT                            0x1404\n#define GL_UNSIGNED_INT                   0x1405\n#define GL_FLOAT                          0x1406\n#define GL_FIXED                          0x140C\n\n/* PixelFormat */\n#define GL_DEPTH_COMPONENT                0x1902\n#define GL_ALPHA                          0x1906\n#define GL_RGB                            0x1907\n#define GL_RGBA                           0x1908\n#define GL_LUMINANCE                      0x1909\n#define GL_LUMINANCE_ALPHA                0x190A\n\n/* PixelType */\n/*      GL_UNSIGNED_BYTE */\n#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033\n#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034\n#define GL_UNSIGNED_SHORT_5_6_5           0x8363\n\n/* Shaders */\n#define GL_FRAGMENT_SHADER                  0x8B30\n#define GL_VERTEX_SHADER                    0x8B31\n#define GL_MAX_VERTEX_ATTRIBS               0x8869\n#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB\n#define GL_MAX_VARYING_VECTORS              0x8DFC\n#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D\n#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C\n#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872\n#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD\n#define GL_SHADER_TYPE                      0x8B4F\n#define GL_DELETE_STATUS                    0x8B80\n#define GL_LINK_STATUS                      0x8B82\n#define GL_VALIDATE_STATUS                  0x8B83\n#define GL_ATTACHED_SHADERS                 0x8B85\n#define GL_ACTIVE_UNIFORMS                  0x8B86\n#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87\n#define GL_ACTIVE_ATTRIBUTES                0x8B89\n#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A\n#define GL_SHADING_LANGUAGE_VERSION         0x8B8C\n#define GL_CURRENT_PROGRAM                  0x8B8D\n\n/* StencilFunction */\n#define GL_NEVER                          0x0200\n#define GL_LESS                           0x0201\n#define GL_EQUAL                          0x0202\n#define GL_LEQUAL                         0x0203\n#define GL_GREATER                        0x0204\n#define GL_NOTEQUAL                       0x0205\n#define GL_GEQUAL                         0x0206\n#define GL_ALWAYS                         0x0207\n\n/* StencilOp */\n/*      GL_ZERO */\n#define GL_KEEP                           0x1E00\n#define GL_REPLACE                        0x1E01\n#define GL_INCR                           0x1E02\n#define GL_DECR                           0x1E03\n#define GL_INVERT                         0x150A\n#define GL_INCR_WRAP                      0x8507\n#define GL_DECR_WRAP                      0x8508\n\n/* StringName */\n#define GL_VENDOR                         0x1F00\n#define GL_RENDERER                       0x1F01\n#define GL_VERSION                        0x1F02\n#define GL_EXTENSIONS                     0x1F03\n\n/* TextureMagFilter */\n#define GL_NEAREST                        0x2600\n#define GL_LINEAR                         0x2601\n\n/* TextureMinFilter */\n/*      GL_NEAREST */\n/*      GL_LINEAR */\n#define GL_NEAREST_MIPMAP_NEAREST         0x2700\n#define GL_LINEAR_MIPMAP_NEAREST          0x2701\n#define GL_NEAREST_MIPMAP_LINEAR          0x2702\n#define GL_LINEAR_MIPMAP_LINEAR           0x2703\n\n/* TextureParameterName */\n#define GL_TEXTURE_MAG_FILTER             0x2800\n#define GL_TEXTURE_MIN_FILTER             0x2801\n#define GL_TEXTURE_WRAP_S                 0x2802\n#define GL_TEXTURE_WRAP_T                 0x2803\n\n/* TextureTarget */\n/*      GL_TEXTURE_2D */\n#define GL_TEXTURE                        0x1702\n\n#define GL_TEXTURE_CUBE_MAP               0x8513\n#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518\n#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519\n#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A\n#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C\n\n/* TextureUnit */\n#define GL_TEXTURE0                       0x84C0\n#define GL_TEXTURE1                       0x84C1\n#define GL_TEXTURE2                       0x84C2\n#define GL_TEXTURE3                       0x84C3\n#define GL_TEXTURE4                       0x84C4\n#define GL_TEXTURE5                       0x84C5\n#define GL_TEXTURE6                       0x84C6\n#define GL_TEXTURE7                       0x84C7\n#define GL_TEXTURE8                       0x84C8\n#define GL_TEXTURE9                       0x84C9\n#define GL_TEXTURE10                      0x84CA\n#define GL_TEXTURE11                      0x84CB\n#define GL_TEXTURE12                      0x84CC\n#define GL_TEXTURE13                      0x84CD\n#define GL_TEXTURE14                      0x84CE\n#define GL_TEXTURE15                      0x84CF\n#define GL_TEXTURE16                      0x84D0\n#define GL_TEXTURE17                      0x84D1\n#define GL_TEXTURE18                      0x84D2\n#define GL_TEXTURE19                      0x84D3\n#define GL_TEXTURE20                      0x84D4\n#define GL_TEXTURE21                      0x84D5\n#define GL_TEXTURE22                      0x84D6\n#define GL_TEXTURE23                      0x84D7\n#define GL_TEXTURE24                      0x84D8\n#define GL_TEXTURE25                      0x84D9\n#define GL_TEXTURE26                      0x84DA\n#define GL_TEXTURE27                      0x84DB\n#define GL_TEXTURE28                      0x84DC\n#define GL_TEXTURE29                      0x84DD\n#define GL_TEXTURE30                      0x84DE\n#define GL_TEXTURE31                      0x84DF\n#define GL_ACTIVE_TEXTURE                 0x84E0\n\n/* TextureWrapMode */\n#define GL_REPEAT                         0x2901\n#define GL_CLAMP_TO_EDGE                  0x812F\n#define GL_MIRRORED_REPEAT                0x8370\n\n/* Uniform Types */\n#define GL_FLOAT_VEC2                     0x8B50\n#define GL_FLOAT_VEC3                     0x8B51\n#define GL_FLOAT_VEC4                     0x8B52\n#define GL_INT_VEC2                       0x8B53\n#define GL_INT_VEC3                       0x8B54\n#define GL_INT_VEC4                       0x8B55\n#define GL_BOOL                           0x8B56\n#define GL_BOOL_VEC2                      0x8B57\n#define GL_BOOL_VEC3                      0x8B58\n#define GL_BOOL_VEC4                      0x8B59\n#define GL_FLOAT_MAT2                     0x8B5A\n#define GL_FLOAT_MAT3                     0x8B5B\n#define GL_FLOAT_MAT4                     0x8B5C\n#define GL_SAMPLER_2D                     0x8B5E\n#define GL_SAMPLER_CUBE                   0x8B60\n\n/* Vertex Arrays */\n#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622\n#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623\n#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624\n#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625\n#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A\n#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645\n#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F\n\n/* Read Format */\n#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A\n#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B\n\n/* Shader Source */\n#define GL_COMPILE_STATUS                 0x8B81\n#define GL_INFO_LOG_LENGTH                0x8B84\n#define GL_SHADER_SOURCE_LENGTH           0x8B88\n#define GL_SHADER_COMPILER                0x8DFA\n\n/* Shader Binary */\n#define GL_SHADER_BINARY_FORMATS          0x8DF8\n#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9\n\n/* Shader Precision-Specified Types */\n#define GL_LOW_FLOAT                      0x8DF0\n#define GL_MEDIUM_FLOAT                   0x8DF1\n#define GL_HIGH_FLOAT                     0x8DF2\n#define GL_LOW_INT                        0x8DF3\n#define GL_MEDIUM_INT                     0x8DF4\n#define GL_HIGH_INT                       0x8DF5\n\n/* Framebuffer Object. */\n#define GL_FRAMEBUFFER                    0x8D40\n#define GL_RENDERBUFFER                   0x8D41\n\n#define GL_RGBA4                          0x8056\n#define GL_RGB5_A1                        0x8057\n#define GL_RGB565                         0x8D62\n#define GL_DEPTH_COMPONENT16              0x81A5\n#define GL_STENCIL_INDEX8                 0x8D48\n\n#define GL_RENDERBUFFER_WIDTH             0x8D42\n#define GL_RENDERBUFFER_HEIGHT            0x8D43\n#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44\n#define GL_RENDERBUFFER_RED_SIZE          0x8D50\n#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51\n#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52\n#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53\n#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54\n#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55\n\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0\n#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3\n\n#define GL_COLOR_ATTACHMENT0              0x8CE0\n#define GL_DEPTH_ATTACHMENT               0x8D00\n#define GL_STENCIL_ATTACHMENT             0x8D20\n\n#define GL_NONE                           0\n\n#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5\n#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6\n#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7\n#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9\n#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD\n\n#define GL_FRAMEBUFFER_BINDING            0x8CA6\n#define GL_RENDERBUFFER_BINDING           0x8CA7\n#define GL_MAX_RENDERBUFFER_SIZE          0x84E8\n\n#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506\n\n/*-------------------------------------------------------------------------\n * GL core functions.\n *-----------------------------------------------------------------------*/\n\nGL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);\nGL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);\nGL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);\nGL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);\nGL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);\nGL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);\nGL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\nGL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );\nGL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);\nGL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);\nGL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\nGL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);\nGL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);\nGL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);\nGL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);\nGL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);\nGL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);\nGL_APICALL void         GL_APIENTRY glClearStencil (GLint s);\nGL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);\nGL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);\nGL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);\nGL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);\nGL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);\nGL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);\nGL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);\nGL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);\nGL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);\nGL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);\nGL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);\nGL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);\nGL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);\nGL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);\nGL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);\nGL_APICALL void         GL_APIENTRY glDisable (GLenum cap);\nGL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);\nGL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);\nGL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);\nGL_APICALL void         GL_APIENTRY glEnable (GLenum cap);\nGL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);\nGL_APICALL void         GL_APIENTRY glFinish (void);\nGL_APICALL void         GL_APIENTRY glFlush (void);\nGL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);\nGL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);\nGL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);\nGL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);\nGL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);\nGL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);\nGL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);\nGL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);\nGL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);\nGL_APICALL GLint        GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);\nGL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL GLenum       GL_APIENTRY glGetError (void);\nGL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);\nGL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);\nGL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);\nGL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);\nGL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);\nGL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);\nGL_APICALL GLint        GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);\nGL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);\nGL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);\nGL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);\nGL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);\nGL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);\nGL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);\nGL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);\nGL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);\nGL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);\nGL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);\nGL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);\nGL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);\nGL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);\nGL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);\nGL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);\nGL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);\nGL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);\nGL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);\nGL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);\nGL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);\nGL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);\nGL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);\nGL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);\nGL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);\nGL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);\nGL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);\nGL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);\nGL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);\nGL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);\nGL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);\nGL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);\nGL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);\nGL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);\nGL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);\nGL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);\nGL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl2_h_ */\n\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles2_gl2ext.h",
    "content": "#ifndef __gl2ext_h_\n#define __gl2ext_h_\n\n/* $Revision: 22801 $ on $Date:: 2013-08-21 03:20:48 -0700 #$ */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n#ifndef GL_APIENTRYP\n#   define GL_APIENTRYP GL_APIENTRY*\n#endif\n\n/* New types shared by several extensions */\n\n#ifndef __gl3_h_\n/* These are defined with respect to <inttypes.h> in the\n * Apple extension spec, but they are also used by non-APPLE\n * extensions, and in the Khronos header we use the Khronos\n * portable types in khrplatform.h, which must be defined.\n */\ntypedef khronos_int64_t GLint64;\ntypedef khronos_uint64_t GLuint64;\ntypedef struct __GLsync *GLsync;\n#endif\n\n\n/*------------------------------------------------------------------------*\n * OES extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_OES_compressed_ETC1_RGB8_texture */\n#ifndef GL_OES_compressed_ETC1_RGB8_texture\n#define GL_ETC1_RGB8_OES                                        0x8D64\n#endif\n\n/* GL_OES_compressed_paletted_texture */\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_PALETTE4_RGB8_OES                                    0x8B90\n#define GL_PALETTE4_RGBA8_OES                                   0x8B91\n#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92\n#define GL_PALETTE4_RGBA4_OES                                   0x8B93\n#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94\n#define GL_PALETTE8_RGB8_OES                                    0x8B95\n#define GL_PALETTE8_RGBA8_OES                                   0x8B96\n#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97\n#define GL_PALETTE8_RGBA4_OES                                   0x8B98\n#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99\n#endif\n\n/* GL_OES_depth24 */\n#ifndef GL_OES_depth24\n#define GL_DEPTH_COMPONENT24_OES                                0x81A6\n#endif\n\n/* GL_OES_depth32 */\n#ifndef GL_OES_depth32\n#define GL_DEPTH_COMPONENT32_OES                                0x81A7\n#endif\n\n/* GL_OES_depth_texture */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\ntypedef void* GLeglImageOES;\n#endif\n\n/* GL_OES_EGL_image_external */\n#ifndef GL_OES_EGL_image_external\n/* GLeglImageOES defined in GL_OES_EGL_image already. */\n#define GL_TEXTURE_EXTERNAL_OES                                 0x8D65\n#define GL_SAMPLER_EXTERNAL_OES                                 0x8D66\n#define GL_TEXTURE_BINDING_EXTERNAL_OES                         0x8D67\n#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES                     0x8D68\n#endif\n\n/* GL_OES_element_index_uint */\n#ifndef GL_OES_element_index_uint\n#define GL_UNSIGNED_INT                                         0x1405\n#endif\n\n/* GL_OES_get_program_binary */\n#ifndef GL_OES_get_program_binary\n#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741\n#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE\n#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF\n#endif\n\n/* GL_OES_mapbuffer */\n#ifndef GL_OES_mapbuffer\n#define GL_WRITE_ONLY_OES                                       0x88B9\n#define GL_BUFFER_ACCESS_OES                                    0x88BB\n#define GL_BUFFER_MAPPED_OES                                    0x88BC\n#define GL_BUFFER_MAP_POINTER_OES                               0x88BD\n#endif\n\n/* GL_OES_packed_depth_stencil */\n#ifndef GL_OES_packed_depth_stencil\n#define GL_DEPTH_STENCIL_OES                                    0x84F9\n#define GL_UNSIGNED_INT_24_8_OES                                0x84FA\n#define GL_DEPTH24_STENCIL8_OES                                 0x88F0\n#endif\n\n/* GL_OES_required_internalformat */\n#ifndef GL_OES_required_internalformat\n#define GL_ALPHA8_OES                                           0x803C\n#define GL_DEPTH_COMPONENT16_OES                                0x81A5\n/* reuse GL_DEPTH_COMPONENT24_OES */\n/* reuse GL_DEPTH24_STENCIL8_OES */\n/* reuse GL_DEPTH_COMPONENT32_OES */\n#define GL_LUMINANCE4_ALPHA4_OES                                0x8043\n#define GL_LUMINANCE8_ALPHA8_OES                                0x8045\n#define GL_LUMINANCE8_OES                                       0x8040\n#define GL_RGBA4_OES                                            0x8056\n#define GL_RGB5_A1_OES                                          0x8057\n#define GL_RGB565_OES                                           0x8D62\n/* reuse GL_RGB8_OES */\n/* reuse GL_RGBA8_OES */\n/* reuse GL_RGB10_EXT */\n/* reuse GL_RGB10_A2_EXT */\n#endif\n\n/* GL_OES_rgb8_rgba8 */\n#ifndef GL_OES_rgb8_rgba8\n#define GL_RGB8_OES                                             0x8051\n#define GL_RGBA8_OES                                            0x8058\n#endif\n\n/* GL_OES_standard_derivatives */\n#ifndef GL_OES_standard_derivatives\n#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B\n#endif\n\n/* GL_OES_stencil1 */\n#ifndef GL_OES_stencil1\n#define GL_STENCIL_INDEX1_OES                                   0x8D46\n#endif\n\n/* GL_OES_stencil4 */\n#ifndef GL_OES_stencil4\n#define GL_STENCIL_INDEX4_OES                                   0x8D47\n#endif\n\n#ifndef GL_OES_surfaceless_context\n#define GL_FRAMEBUFFER_UNDEFINED_OES                            0x8219\n#endif\n\n/* GL_OES_texture_3D */\n#ifndef GL_OES_texture_3D\n#define GL_TEXTURE_WRAP_R_OES                                   0x8072\n#define GL_TEXTURE_3D_OES                                       0x806F\n#define GL_TEXTURE_BINDING_3D_OES                               0x806A\n#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073\n#define GL_SAMPLER_3D_OES                                       0x8B5F\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4\n#endif\n\n/* GL_OES_texture_float */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_float_linear */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_half_float */\n#ifndef GL_OES_texture_half_float\n#define GL_HALF_FLOAT_OES                                       0x8D61\n#endif\n\n/* GL_OES_texture_half_float_linear */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_texture_npot */\n/* No new tokens introduced by this extension. */\n\n/* GL_OES_vertex_array_object */\n#ifndef GL_OES_vertex_array_object\n#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5\n#endif\n\n/* GL_OES_vertex_half_float */\n/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */\n\n/* GL_OES_vertex_type_10_10_10_2 */\n#ifndef GL_OES_vertex_type_10_10_10_2\n#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6\n#define GL_INT_10_10_10_2_OES                                   0x8DF7\n#endif\n\n/*------------------------------------------------------------------------*\n * KHR extension tokens\n *------------------------------------------------------------------------*/\n\n#ifndef GL_KHR_debug\ntypedef void (GL_APIENTRYP GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\n#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR                         0x8242\n#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR                 0x8243\n#define GL_DEBUG_CALLBACK_FUNCTION_KHR                          0x8244\n#define GL_DEBUG_CALLBACK_USER_PARAM_KHR                        0x8245\n#define GL_DEBUG_SOURCE_API_KHR                                 0x8246\n#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR                       0x8247\n#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR                     0x8248\n#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR                         0x8249\n#define GL_DEBUG_SOURCE_APPLICATION_KHR                         0x824A\n#define GL_DEBUG_SOURCE_OTHER_KHR                               0x824B\n#define GL_DEBUG_TYPE_ERROR_KHR                                 0x824C\n#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR                   0x824D\n#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR                    0x824E\n#define GL_DEBUG_TYPE_PORTABILITY_KHR                           0x824F\n#define GL_DEBUG_TYPE_PERFORMANCE_KHR                           0x8250\n#define GL_DEBUG_TYPE_OTHER_KHR                                 0x8251\n#define GL_DEBUG_TYPE_MARKER_KHR                                0x8268\n#define GL_DEBUG_TYPE_PUSH_GROUP_KHR                            0x8269\n#define GL_DEBUG_TYPE_POP_GROUP_KHR                             0x826A\n#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR                      0x826B\n#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR                      0x826C\n#define GL_DEBUG_GROUP_STACK_DEPTH_KHR                          0x826D\n#define GL_BUFFER_KHR                                           0x82E0\n#define GL_SHADER_KHR                                           0x82E1\n#define GL_PROGRAM_KHR                                          0x82E2\n#define GL_QUERY_KHR                                            0x82E3\n/* PROGRAM_PIPELINE only in GL */\n#define GL_SAMPLER_KHR                                          0x82E6\n/* DISPLAY_LIST only in GL */\n#define GL_MAX_LABEL_LENGTH_KHR                                 0x82E8\n#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR                         0x9143\n#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR                        0x9144\n#define GL_DEBUG_LOGGED_MESSAGES_KHR                            0x9145\n#define GL_DEBUG_SEVERITY_HIGH_KHR                              0x9146\n#define GL_DEBUG_SEVERITY_MEDIUM_KHR                            0x9147\n#define GL_DEBUG_SEVERITY_LOW_KHR                               0x9148\n#define GL_DEBUG_OUTPUT_KHR                                     0x92E0\n#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR                           0x00000002\n#define GL_STACK_OVERFLOW_KHR                                   0x0503\n#define GL_STACK_UNDERFLOW_KHR                                  0x0504\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR                         0x93B0\n#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR                         0x93B1\n#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR                         0x93B2\n#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR                         0x93B3\n#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR                         0x93B4\n#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR                         0x93B5\n#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR                         0x93B6\n#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR                         0x93B7\n#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR                        0x93B8\n#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR                        0x93B9\n#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR                        0x93BA\n#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR                       0x93BB\n#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR                       0x93BC\n#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR                       0x93BD\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR                 0x93D0\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR                 0x93D1\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR                 0x93D2\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR                 0x93D3\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR                 0x93D4\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR                 0x93D5\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR                 0x93D6\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR                 0x93D7\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR                0x93D8\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR                0x93D9\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR                0x93DA\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR               0x93DB\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR               0x93DC\n#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR               0x93DD\n#endif\n\n/*------------------------------------------------------------------------*\n * AMD extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_AMD_compressed_3DC_texture */\n#ifndef GL_AMD_compressed_3DC_texture\n#define GL_3DC_X_AMD                                            0x87F9\n#define GL_3DC_XY_AMD                                           0x87FA\n#endif\n\n/* GL_AMD_compressed_ATC_texture */\n#ifndef GL_AMD_compressed_ATC_texture\n#define GL_ATC_RGB_AMD                                          0x8C92\n#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93\n#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE\n#endif\n\n/* GL_AMD_performance_monitor */\n#ifndef GL_AMD_performance_monitor\n#define GL_COUNTER_TYPE_AMD                                     0x8BC0\n#define GL_COUNTER_RANGE_AMD                                    0x8BC1\n#define GL_UNSIGNED_INT64_AMD                                   0x8BC2\n#define GL_PERCENTAGE_AMD                                       0x8BC3\n#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4\n#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5\n#define GL_PERFMON_RESULT_AMD                                   0x8BC6\n#endif\n\n/* GL_AMD_program_binary_Z400 */\n#ifndef GL_AMD_program_binary_Z400\n#define GL_Z400_BINARY_AMD                                      0x8740\n#endif\n\n/*------------------------------------------------------------------------*\n * ANGLE extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_ANGLE_depth_texture */\n#ifndef GL_ANGLE_depth_texture\n#define GL_DEPTH_COMPONENT                                      0x1902\n#define GL_DEPTH_STENCIL_OES                                    0x84F9\n#define GL_UNSIGNED_SHORT                                       0x1403\n#define GL_UNSIGNED_INT                                         0x1405\n#define GL_UNSIGNED_INT_24_8_OES                                0x84FA\n#define GL_DEPTH_COMPONENT16                                    0x81A5\n#define GL_DEPTH_COMPONENT32_OES                                0x81A7\n#define GL_DEPTH24_STENCIL8_OES                                 0x88F0\n#endif\n\n/* GL_ANGLE_framebuffer_blit */\n#ifndef GL_ANGLE_framebuffer_blit\n#define GL_READ_FRAMEBUFFER_ANGLE                               0x8CA8\n#define GL_DRAW_FRAMEBUFFER_ANGLE                               0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE                       0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_ANGLE                       0x8CAA\n#endif\n\n/* GL_ANGLE_framebuffer_multisample */\n#ifndef GL_ANGLE_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_ANGLE                           0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE             0x8D56\n#define GL_MAX_SAMPLES_ANGLE                                    0x8D57\n#endif\n\n/* GL_ANGLE_instanced_arrays */\n#ifndef GL_ANGLE_instanced_arrays\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE                    0x88FE\n#endif\n\n/* GL_ANGLE_pack_reverse_row_order */\n#ifndef GL_ANGLE_pack_reverse_row_order\n#define GL_PACK_REVERSE_ROW_ORDER_ANGLE                         0x93A4\n#endif\n\n/* GL_ANGLE_program_binary */\n#ifndef GL_ANGLE_program_binary\n#define GL_PROGRAM_BINARY_ANGLE                                 0x93A6\n#endif\n\n/* GL_ANGLE_texture_compression_dxt3 */\n#ifndef GL_ANGLE_texture_compression_dxt3\n#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE                      0x83F2\n#endif\n\n/* GL_ANGLE_texture_compression_dxt5 */\n#ifndef GL_ANGLE_texture_compression_dxt5\n#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE                      0x83F3\n#endif\n\n/* GL_ANGLE_texture_usage */\n#ifndef GL_ANGLE_texture_usage\n#define GL_TEXTURE_USAGE_ANGLE                                  0x93A2\n#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE                         0x93A3\n#endif\n\n/* GL_ANGLE_translated_shader_source */\n#ifndef GL_ANGLE_translated_shader_source\n#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE                0x93A0\n#endif\n\n/*------------------------------------------------------------------------*\n * APPLE extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_APPLE_copy_texture_levels */\n/* No new tokens introduced by this extension. */\n\n/* GL_APPLE_framebuffer_multisample */\n#ifndef GL_APPLE_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_APPLE                           0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE             0x8D56\n#define GL_MAX_SAMPLES_APPLE                                    0x8D57\n#define GL_READ_FRAMEBUFFER_APPLE                               0x8CA8\n#define GL_DRAW_FRAMEBUFFER_APPLE                               0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE                       0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_APPLE                       0x8CAA\n#endif\n\n/* GL_APPLE_rgb_422 */\n#ifndef GL_APPLE_rgb_422\n#define GL_RGB_422_APPLE                                        0x8A1F\n#define GL_UNSIGNED_SHORT_8_8_APPLE                             0x85BA\n#define GL_UNSIGNED_SHORT_8_8_REV_APPLE                         0x85BB\n#endif\n\n/* GL_APPLE_sync */\n#ifndef GL_APPLE_sync\n\n#define GL_SYNC_OBJECT_APPLE                                    0x8A53\n#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE                        0x9111\n#define GL_OBJECT_TYPE_APPLE                                    0x9112\n#define GL_SYNC_CONDITION_APPLE                                 0x9113\n#define GL_SYNC_STATUS_APPLE                                    0x9114\n#define GL_SYNC_FLAGS_APPLE                                     0x9115\n#define GL_SYNC_FENCE_APPLE                                     0x9116\n#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE                     0x9117\n#define GL_UNSIGNALED_APPLE                                     0x9118\n#define GL_SIGNALED_APPLE                                       0x9119\n#define GL_ALREADY_SIGNALED_APPLE                               0x911A\n#define GL_TIMEOUT_EXPIRED_APPLE                                0x911B\n#define GL_CONDITION_SATISFIED_APPLE                            0x911C\n#define GL_WAIT_FAILED_APPLE                                    0x911D\n#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE                        0x00000001\n#define GL_TIMEOUT_IGNORED_APPLE                                0xFFFFFFFFFFFFFFFFull\n#endif\n\n/* GL_APPLE_texture_format_BGRA8888 */\n#ifndef GL_APPLE_texture_format_BGRA8888\n#define GL_BGRA_EXT                                             0x80E1\n#endif\n\n/* GL_APPLE_texture_max_level */\n#ifndef GL_APPLE_texture_max_level\n#define GL_TEXTURE_MAX_LEVEL_APPLE                              0x813D\n#endif\n\n/*------------------------------------------------------------------------*\n * ARM extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_ARM_mali_program_binary */\n#ifndef GL_ARM_mali_program_binary\n#define GL_MALI_PROGRAM_BINARY_ARM                              0x8F61\n#endif\n\n/* GL_ARM_mali_shader_binary */\n#ifndef GL_ARM_mali_shader_binary\n#define GL_MALI_SHADER_BINARY_ARM                               0x8F60\n#endif\n\n/* GL_ARM_rgba8 */\n/* No new tokens introduced by this extension. */\n\n/*------------------------------------------------------------------------*\n * EXT extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_EXT_blend_minmax */\n#ifndef GL_EXT_blend_minmax\n#define GL_MIN_EXT                                              0x8007\n#define GL_MAX_EXT                                              0x8008\n#endif\n\n/* GL_EXT_color_buffer_half_float */\n#ifndef GL_EXT_color_buffer_half_float\n#define GL_RGBA16F_EXT                                          0x881A\n#define GL_RGB16F_EXT                                           0x881B\n#define GL_RG16F_EXT                                            0x822F\n#define GL_R16F_EXT                                             0x822D\n#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT            0x8211\n#define GL_UNSIGNED_NORMALIZED_EXT                              0x8C17\n#endif\n\n/* GL_EXT_debug_label */\n#ifndef GL_EXT_debug_label\n#define GL_PROGRAM_PIPELINE_OBJECT_EXT                          0x8A4F\n#define GL_PROGRAM_OBJECT_EXT                                   0x8B40\n#define GL_SHADER_OBJECT_EXT                                    0x8B48\n#define GL_BUFFER_OBJECT_EXT                                    0x9151\n#define GL_QUERY_OBJECT_EXT                                     0x9153\n#define GL_VERTEX_ARRAY_OBJECT_EXT                              0x9154\n#endif\n\n/* GL_EXT_debug_marker */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_discard_framebuffer */\n#ifndef GL_EXT_discard_framebuffer\n#define GL_COLOR_EXT                                            0x1800\n#define GL_DEPTH_EXT                                            0x1801\n#define GL_STENCIL_EXT                                          0x1802\n#endif\n\n#ifndef GL_EXT_disjoint_timer_query\n#define GL_QUERY_COUNTER_BITS_EXT                               0x8864\n#define GL_CURRENT_QUERY_EXT                                    0x8865\n#define GL_QUERY_RESULT_EXT                                     0x8866\n#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867\n#define GL_TIME_ELAPSED_EXT                                     0x88BF\n#define GL_TIMESTAMP_EXT                                        0x8E28\n#define GL_GPU_DISJOINT_EXT                                     0x8FBB\n#endif\n\n#ifndef GL_EXT_draw_buffers\n#define GL_EXT_draw_buffers 1\n#define GL_MAX_COLOR_ATTACHMENTS_EXT                            0x8CDF\n#define GL_MAX_DRAW_BUFFERS_EXT                                 0x8824\n#define GL_DRAW_BUFFER0_EXT                                     0x8825\n#define GL_DRAW_BUFFER1_EXT                                     0x8826\n#define GL_DRAW_BUFFER2_EXT                                     0x8827\n#define GL_DRAW_BUFFER3_EXT                                     0x8828\n#define GL_DRAW_BUFFER4_EXT                                     0x8829\n#define GL_DRAW_BUFFER5_EXT                                     0x882A\n#define GL_DRAW_BUFFER6_EXT                                     0x882B\n#define GL_DRAW_BUFFER7_EXT                                     0x882C\n#define GL_DRAW_BUFFER8_EXT                                     0x882D\n#define GL_DRAW_BUFFER9_EXT                                     0x882E\n#define GL_DRAW_BUFFER10_EXT                                    0x882F\n#define GL_DRAW_BUFFER11_EXT                                    0x8830\n#define GL_DRAW_BUFFER12_EXT                                    0x8831\n#define GL_DRAW_BUFFER13_EXT                                    0x8832\n#define GL_DRAW_BUFFER14_EXT                                    0x8833\n#define GL_DRAW_BUFFER15_EXT                                    0x8834\n#define GL_COLOR_ATTACHMENT0_EXT                                0x8CE0\n#define GL_COLOR_ATTACHMENT1_EXT                                0x8CE1\n#define GL_COLOR_ATTACHMENT2_EXT                                0x8CE2\n#define GL_COLOR_ATTACHMENT3_EXT                                0x8CE3\n#define GL_COLOR_ATTACHMENT4_EXT                                0x8CE4\n#define GL_COLOR_ATTACHMENT5_EXT                                0x8CE5\n#define GL_COLOR_ATTACHMENT6_EXT                                0x8CE6\n#define GL_COLOR_ATTACHMENT7_EXT                                0x8CE7\n#define GL_COLOR_ATTACHMENT8_EXT                                0x8CE8\n#define GL_COLOR_ATTACHMENT9_EXT                                0x8CE9\n#define GL_COLOR_ATTACHMENT10_EXT                               0x8CEA\n#define GL_COLOR_ATTACHMENT11_EXT                               0x8CEB\n#define GL_COLOR_ATTACHMENT12_EXT                               0x8CEC\n#define GL_COLOR_ATTACHMENT13_EXT                               0x8CED\n#define GL_COLOR_ATTACHMENT14_EXT                               0x8CEE\n#define GL_COLOR_ATTACHMENT15_EXT                               0x8CEF\n#endif\n\n/* GL_EXT_map_buffer_range */\n#ifndef GL_EXT_map_buffer_range\n#define GL_MAP_READ_BIT_EXT                                     0x0001\n#define GL_MAP_WRITE_BIT_EXT                                    0x0002\n#define GL_MAP_INVALIDATE_RANGE_BIT_EXT                         0x0004\n#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT                        0x0008\n#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT                           0x0010\n#define GL_MAP_UNSYNCHRONIZED_BIT_EXT                           0x0020\n#endif\n\n/* GL_EXT_multisampled_render_to_texture */\n#ifndef GL_EXT_multisampled_render_to_texture\n#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT           0x8D6C\n/* reuse values from GL_EXT_framebuffer_multisample (desktop extension) */\n#define GL_RENDERBUFFER_SAMPLES_EXT                             0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT               0x8D56\n#define GL_MAX_SAMPLES_EXT                                      0x8D57\n#endif\n\n/* GL_EXT_multiview_draw_buffers */\n#ifndef GL_EXT_multiview_draw_buffers\n#define GL_COLOR_ATTACHMENT_EXT                                 0x90F0\n#define GL_MULTIVIEW_EXT                                        0x90F1\n#define GL_DRAW_BUFFER_EXT                                      0x0C01\n#define GL_READ_BUFFER_EXT                                      0x0C02\n#define GL_MAX_MULTIVIEW_BUFFERS_EXT                            0x90F2\n#endif\n\n/* GL_EXT_multi_draw_arrays */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_occlusion_query_boolean */\n#ifndef GL_EXT_occlusion_query_boolean\n#define GL_ANY_SAMPLES_PASSED_EXT                               0x8C2F\n#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT                  0x8D6A\n#define GL_CURRENT_QUERY_EXT                                    0x8865\n#define GL_QUERY_RESULT_EXT                                     0x8866\n#define GL_QUERY_RESULT_AVAILABLE_EXT                           0x8867\n#endif\n\n/* GL_EXT_read_format_bgra */\n#ifndef GL_EXT_read_format_bgra\n#define GL_BGRA_EXT                                             0x80E1\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365\n#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366\n#endif\n\n/* GL_EXT_robustness */\n#ifndef GL_EXT_robustness\n/* reuse GL_NO_ERROR */\n#define GL_GUILTY_CONTEXT_RESET_EXT                             0x8253\n#define GL_INNOCENT_CONTEXT_RESET_EXT                           0x8254\n#define GL_UNKNOWN_CONTEXT_RESET_EXT                            0x8255\n#define GL_CONTEXT_ROBUST_ACCESS_EXT                            0x90F3\n#define GL_RESET_NOTIFICATION_STRATEGY_EXT                      0x8256\n#define GL_LOSE_CONTEXT_ON_RESET_EXT                            0x8252\n#define GL_NO_RESET_NOTIFICATION_EXT                            0x8261\n#endif\n\n/* GL_EXT_separate_shader_objects */\n#ifndef GL_EXT_separate_shader_objects\n#define GL_VERTEX_SHADER_BIT_EXT                                0x00000001\n#define GL_FRAGMENT_SHADER_BIT_EXT                              0x00000002\n#define GL_ALL_SHADER_BITS_EXT                                  0xFFFFFFFF\n#define GL_PROGRAM_SEPARABLE_EXT                                0x8258\n#define GL_ACTIVE_PROGRAM_EXT                                   0x8259\n#define GL_PROGRAM_PIPELINE_BINDING_EXT                         0x825A\n#endif\n\n/* GL_EXT_shader_framebuffer_fetch */\n#ifndef GL_EXT_shader_framebuffer_fetch\n#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT                 0x8A52\n#endif\n\n/* GL_EXT_shader_texture_lod */\n/* No new tokens introduced by this extension. */\n\n/* GL_EXT_shadow_samplers */\n#ifndef GL_EXT_shadow_samplers\n#define GL_TEXTURE_COMPARE_MODE_EXT                             0x884C\n#define GL_TEXTURE_COMPARE_FUNC_EXT                             0x884D\n#define GL_COMPARE_REF_TO_TEXTURE_EXT                           0x884E\n#define GL_SAMPLER_2D_SHADOW_EXT                                0x8B62\n#endif\n\n/* GL_EXT_sRGB */\n#ifndef GL_EXT_sRGB\n#define GL_SRGB_EXT                                             0x8C40\n#define GL_SRGB_ALPHA_EXT                                       0x8C42\n#define GL_SRGB8_ALPHA8_EXT                                     0x8C43\n#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT            0x8210\n#endif\n\n/* GL_EXT_sRGB_write_control */\n#ifndef GL_EXT_sRGB_write_control\n#define GL_EXT_sRGB_write_control 1\n#define GL_FRAMEBUFFER_SRGB_EXT                                 0x8DB9\n#endif\n\n/* GL_EXT_texture_compression_dxt1 */\n#ifndef GL_EXT_texture_compression_dxt1\n#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                         0x83F0\n#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                        0x83F1\n#endif\n\n/* GL_EXT_texture_filter_anisotropic */\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE\n#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF\n#endif\n\n/* GL_EXT_texture_format_BGRA8888 */\n#ifndef GL_EXT_texture_format_BGRA8888\n#define GL_BGRA_EXT                                             0x80E1\n#endif\n\n/* GL_EXT_texture_rg */\n#ifndef GL_EXT_texture_rg\n#define GL_RED_EXT                                              0x1903\n#define GL_RG_EXT                                               0x8227\n#define GL_R8_EXT                                               0x8229\n#define GL_RG8_EXT                                              0x822B\n#endif\n\n/* GL_EXT_texture_sRGB_decode */\n#ifndef GL_EXT_texture_sRGB_decode\n#define GL_EXT_texture_sRGB_decode 1\n#define GL_TEXTURE_SRGB_DECODE_EXT                              0x8A48\n#define GL_DECODE_EXT                                           0x8A49\n#define GL_SKIP_DECODE_EXT                                      0x8A4A\n#endif\n\n/* GL_EXT_texture_storage */\n#ifndef GL_EXT_texture_storage\n#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT                         0x912F\n#define GL_ALPHA8_EXT                                           0x803C\n#define GL_LUMINANCE8_EXT                                       0x8040\n#define GL_LUMINANCE8_ALPHA8_EXT                                0x8045\n#define GL_RGBA32F_EXT                                          0x8814\n#define GL_RGB32F_EXT                                           0x8815\n#define GL_ALPHA32F_EXT                                         0x8816\n#define GL_LUMINANCE32F_EXT                                     0x8818\n#define GL_LUMINANCE_ALPHA32F_EXT                               0x8819\n/* reuse GL_RGBA16F_EXT */\n/* reuse GL_RGB16F_EXT */\n#define GL_ALPHA16F_EXT                                         0x881C\n#define GL_LUMINANCE16F_EXT                                     0x881E\n#define GL_LUMINANCE_ALPHA16F_EXT                               0x881F\n#define GL_RGB10_A2_EXT                                         0x8059\n#define GL_RGB10_EXT                                            0x8052\n#define GL_BGRA8_EXT                                            0x93A1\n#define GL_R8_EXT                                               0x8229\n#define GL_RG8_EXT                                              0x822B\n#define GL_R32F_EXT                                             0x822E\n#define GL_RG32F_EXT                                            0x8230\n#define GL_R16F_EXT                                             0x822D\n#define GL_RG16F_EXT                                            0x822F\n#endif\n\n/* GL_EXT_texture_type_2_10_10_10_REV */\n#ifndef GL_EXT_texture_type_2_10_10_10_REV\n#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368\n#endif\n\n/* GL_EXT_unpack_subimage */\n#ifndef GL_EXT_unpack_subimage\n#define GL_UNPACK_ROW_LENGTH_EXT                                0x0CF2\n#define GL_UNPACK_SKIP_ROWS_EXT                                 0x0CF3\n#define GL_UNPACK_SKIP_PIXELS_EXT                               0x0CF4\n#endif\n\n/*------------------------------------------------------------------------*\n * DMP extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_DMP_shader_binary */\n#ifndef GL_DMP_shader_binary\n#define GL_SHADER_BINARY_DMP                                    0x9250\n#endif\n\n/*------------------------------------------------------------------------*\n * FJ extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_FJ_shader_binary_GCCSO */\n#ifndef GL_FJ_shader_binary_GCCSO\n#define GL_GCCSO_SHADER_BINARY_FJ                               0x9260\n#endif\n\n/*------------------------------------------------------------------------*\n * IMG extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_IMG_program_binary */\n#ifndef GL_IMG_program_binary\n#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130\n#endif\n\n/* GL_IMG_read_format */\n#ifndef GL_IMG_read_format\n#define GL_BGRA_IMG                                             0x80E1\n#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365\n#endif\n\n/* GL_IMG_shader_binary */\n#ifndef GL_IMG_shader_binary\n#define GL_SGX_BINARY_IMG                                       0x8C0A\n#endif\n\n/* GL_IMG_texture_compression_pvrtc */\n#ifndef GL_IMG_texture_compression_pvrtc\n#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00\n#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01\n#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02\n#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03\n#endif\n\n/* GL_IMG_texture_compression_pvrtc2 */\n#ifndef GL_IMG_texture_compression_pvrtc2\n#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG                     0x9137\n#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG                     0x9138\n#endif\n\n/* GL_IMG_multisampled_render_to_texture */\n#ifndef GL_IMG_multisampled_render_to_texture\n#define GL_RENDERBUFFER_SAMPLES_IMG                             0x9133\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG               0x9134\n#define GL_MAX_SAMPLES_IMG                                      0x9135\n#define GL_TEXTURE_SAMPLES_IMG                                  0x9136\n#endif\n\n/*------------------------------------------------------------------------*\n * NV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_NV_coverage_sample */\n#ifndef GL_NV_coverage_sample\n#define GL_COVERAGE_COMPONENT_NV                                0x8ED0\n#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1\n#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2\n#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3\n#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4\n#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5\n#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6\n#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7\n#define GL_COVERAGE_BUFFER_BIT_NV                               0x00008000\n#endif\n\n/* GL_NV_depth_nonlinear */\n#ifndef GL_NV_depth_nonlinear\n#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C\n#endif\n\n/* GL_NV_draw_buffers */\n#ifndef GL_NV_draw_buffers\n#define GL_MAX_DRAW_BUFFERS_NV                                  0x8824\n#define GL_DRAW_BUFFER0_NV                                      0x8825\n#define GL_DRAW_BUFFER1_NV                                      0x8826\n#define GL_DRAW_BUFFER2_NV                                      0x8827\n#define GL_DRAW_BUFFER3_NV                                      0x8828\n#define GL_DRAW_BUFFER4_NV                                      0x8829\n#define GL_DRAW_BUFFER5_NV                                      0x882A\n#define GL_DRAW_BUFFER6_NV                                      0x882B\n#define GL_DRAW_BUFFER7_NV                                      0x882C\n#define GL_DRAW_BUFFER8_NV                                      0x882D\n#define GL_DRAW_BUFFER9_NV                                      0x882E\n#define GL_DRAW_BUFFER10_NV                                     0x882F\n#define GL_DRAW_BUFFER11_NV                                     0x8830\n#define GL_DRAW_BUFFER12_NV                                     0x8831\n#define GL_DRAW_BUFFER13_NV                                     0x8832\n#define GL_DRAW_BUFFER14_NV                                     0x8833\n#define GL_DRAW_BUFFER15_NV                                     0x8834\n#define GL_COLOR_ATTACHMENT0_NV                                 0x8CE0\n#define GL_COLOR_ATTACHMENT1_NV                                 0x8CE1\n#define GL_COLOR_ATTACHMENT2_NV                                 0x8CE2\n#define GL_COLOR_ATTACHMENT3_NV                                 0x8CE3\n#define GL_COLOR_ATTACHMENT4_NV                                 0x8CE4\n#define GL_COLOR_ATTACHMENT5_NV                                 0x8CE5\n#define GL_COLOR_ATTACHMENT6_NV                                 0x8CE6\n#define GL_COLOR_ATTACHMENT7_NV                                 0x8CE7\n#define GL_COLOR_ATTACHMENT8_NV                                 0x8CE8\n#define GL_COLOR_ATTACHMENT9_NV                                 0x8CE9\n#define GL_COLOR_ATTACHMENT10_NV                                0x8CEA\n#define GL_COLOR_ATTACHMENT11_NV                                0x8CEB\n#define GL_COLOR_ATTACHMENT12_NV                                0x8CEC\n#define GL_COLOR_ATTACHMENT13_NV                                0x8CED\n#define GL_COLOR_ATTACHMENT14_NV                                0x8CEE\n#define GL_COLOR_ATTACHMENT15_NV                                0x8CEF\n#endif\n\n/* GL_NV_draw_instanced */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_fbo_color_attachments */\n#ifndef GL_NV_fbo_color_attachments\n#define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF\n/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */\n#endif\n\n/* GL_NV_fence */\n#ifndef GL_NV_fence\n#define GL_ALL_COMPLETED_NV                                     0x84F2\n#define GL_FENCE_STATUS_NV                                      0x84F3\n#define GL_FENCE_CONDITION_NV                                   0x84F4\n#endif\n\n/* GL_NV_framebuffer_blit */\n#ifndef GL_NV_framebuffer_blit\n#define GL_READ_FRAMEBUFFER_NV                                  0x8CA8\n#define GL_DRAW_FRAMEBUFFER_NV                                  0x8CA9\n#define GL_DRAW_FRAMEBUFFER_BINDING_NV                          0x8CA6\n#define GL_READ_FRAMEBUFFER_BINDING_NV                          0x8CAA\n#endif\n\n/* GL_NV_framebuffer_multisample */\n#ifndef GL_NV_framebuffer_multisample\n#define GL_RENDERBUFFER_SAMPLES_NV                              0x8CAB\n#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV                0x8D56\n#define GL_MAX_SAMPLES_NV                                       0x8D57\n#endif\n\n/* GL_NV_generate_mipmap_sRGB */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_instanced_arrays */\n#ifndef GL_NV_instanced_arrays\n#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV                       0x88FE\n#endif\n\n/* GL_NV_read_buffer */\n#ifndef GL_NV_read_buffer\n#define GL_READ_BUFFER_NV                                       0x0C02\n#endif\n\n/* GL_NV_read_buffer_front */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_depth */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_depth_stencil */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_read_stencil */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_shadow_samplers_array */\n#ifndef GL_NV_shadow_samplers_array\n#define GL_SAMPLER_2D_ARRAY_SHADOW_NV                           0x8DC4\n#endif\n\n/* GL_NV_shadow_samplers_cube */\n#ifndef GL_NV_shadow_samplers_cube\n#define GL_SAMPLER_CUBE_SHADOW_NV                               0x8DC5\n#endif\n\n/* GL_NV_sRGB_formats */\n#ifndef GL_NV_sRGB_formats\n#define GL_SLUMINANCE_NV                                        0x8C46\n#define GL_SLUMINANCE_ALPHA_NV                                  0x8C44\n#define GL_SRGB8_NV                                             0x8C41\n#define GL_SLUMINANCE8_NV                                       0x8C47\n#define GL_SLUMINANCE8_ALPHA8_NV                                0x8C45\n#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV                         0x8C4C\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV                   0x8C4D\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV                   0x8C4E\n#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV                   0x8C4F\n#define GL_ETC1_SRGB8_NV                                        0x88EE\n#endif\n\n/* GL_NV_texture_border_clamp */\n#ifndef GL_NV_texture_border_clamp\n#define GL_TEXTURE_BORDER_COLOR_NV                              0x1004\n#define GL_CLAMP_TO_BORDER_NV                                   0x812D\n#endif\n\n/* GL_NV_texture_compression_s3tc_update */\n/* No new tokens introduced by this extension. */\n\n/* GL_NV_texture_npot_2D_mipmap */\n/* No new tokens introduced by this extension. */\n\n/*------------------------------------------------------------------------*\n * QCOM extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_QCOM_alpha_test */\n#ifndef GL_QCOM_alpha_test\n#define GL_ALPHA_TEST_QCOM                                      0x0BC0\n#define GL_ALPHA_TEST_FUNC_QCOM                                 0x0BC1\n#define GL_ALPHA_TEST_REF_QCOM                                  0x0BC2\n#endif\n\n/* GL_QCOM_binning_control */\n#ifndef GL_QCOM_binning_control\n#define GL_BINNING_CONTROL_HINT_QCOM                            0x8FB0\n#define GL_CPU_OPTIMIZED_QCOM                                   0x8FB1\n#define GL_GPU_OPTIMIZED_QCOM                                   0x8FB2\n#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM                    0x8FB3\n#endif\n\n/* GL_QCOM_driver_control */\n/* No new tokens introduced by this extension. */\n\n/* GL_QCOM_extended_get */\n#ifndef GL_QCOM_extended_get\n#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2\n#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3\n#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4\n#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5\n#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6\n#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7\n#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8\n#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9\n#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA\n#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB\n#define GL_STATE_RESTORE                                        0x8BDC\n#endif\n\n/* GL_QCOM_extended_get2 */\n/* No new tokens introduced by this extension. */\n\n/* GL_QCOM_perfmon_global_mode */\n#ifndef GL_QCOM_perfmon_global_mode\n#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0\n#endif\n\n/* GL_QCOM_writeonly_rendering */\n#ifndef GL_QCOM_writeonly_rendering\n#define GL_WRITEONLY_RENDERING_QCOM                             0x8823\n#endif\n\n/* GL_QCOM_tiled_rendering */\n#ifndef GL_QCOM_tiled_rendering\n#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001\n#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002\n#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004\n#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008\n#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010\n#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020\n#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040\n#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080\n#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100\n#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200\n#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400\n#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800\n#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000\n#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000\n#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000\n#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000\n#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000\n#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000\n#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000\n#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000\n#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000\n#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000\n#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000\n#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000\n#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000\n#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000\n#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000\n#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000\n#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000\n#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000\n#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000\n#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000\n#endif\n\n/*------------------------------------------------------------------------*\n * VIV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_VIV_shader_binary */\n#ifndef GL_VIV_shader_binary\n#define GL_SHADER_BINARY_VIV                                    0x8FC4\n#endif\n\n/*------------------------------------------------------------------------*\n * End of extension tokens, start of corresponding extension functions\n *------------------------------------------------------------------------*/\n\n/*------------------------------------------------------------------------*\n * OES extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_OES_compressed_ETC1_RGB8_texture */\n#ifndef GL_OES_compressed_ETC1_RGB8_texture\n#define GL_OES_compressed_ETC1_RGB8_texture 1\n#endif\n\n/* GL_OES_compressed_paletted_texture */\n#ifndef GL_OES_compressed_paletted_texture\n#define GL_OES_compressed_paletted_texture 1\n#endif\n\n/* GL_OES_depth24 */\n#ifndef GL_OES_depth24\n#define GL_OES_depth24 1\n#endif\n\n/* GL_OES_depth32 */\n#ifndef GL_OES_depth32\n#define GL_OES_depth32 1\n#endif\n\n/* GL_OES_depth_texture */\n#ifndef GL_OES_depth_texture\n#define GL_OES_depth_texture 1\n#endif\n\n/* GL_OES_EGL_image */\n#ifndef GL_OES_EGL_image\n#define GL_OES_EGL_image 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);\nGL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);\ntypedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);\n#endif\n\n/* GL_OES_EGL_image_external */\n#ifndef GL_OES_EGL_image_external\n#define GL_OES_EGL_image_external 1\n/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */\n#endif\n\n/* GL_OES_element_index_uint */\n#ifndef GL_OES_element_index_uint\n#define GL_OES_element_index_uint 1\n#endif\n\n/* GL_OES_fbo_render_mipmap */\n#ifndef GL_OES_fbo_render_mipmap\n#define GL_OES_fbo_render_mipmap 1\n#endif\n\n/* GL_OES_fragment_precision_high */\n#ifndef GL_OES_fragment_precision_high\n#define GL_OES_fragment_precision_high 1\n#endif\n\n/* GL_OES_get_program_binary */\n#ifndef GL_OES_get_program_binary\n#define GL_OES_get_program_binary 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\nGL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);\n#endif\n\n/* GL_OES_mapbuffer */\n#ifndef GL_OES_mapbuffer\n#define GL_OES_mapbuffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);\nGL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);\nGL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid **params);\n#endif\ntypedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);\ntypedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);\ntypedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid **params);\n#endif\n\n/* GL_OES_packed_depth_stencil */\n#ifndef GL_OES_packed_depth_stencil\n#define GL_OES_packed_depth_stencil 1\n#endif\n\n/* GL_OES_required_internalformat */\n#ifndef GL_OES_required_internalformat\n#define GL_OES_required_internalformat 1\n#endif\n\n/* GL_OES_rgb8_rgba8 */\n#ifndef GL_OES_rgb8_rgba8\n#define GL_OES_rgb8_rgba8 1\n#endif\n\n/* GL_OES_standard_derivatives */\n#ifndef GL_OES_standard_derivatives\n#define GL_OES_standard_derivatives 1\n#endif\n\n/* GL_OES_stencil1 */\n#ifndef GL_OES_stencil1\n#define GL_OES_stencil1 1\n#endif\n\n/* GL_OES_stencil4 */\n#ifndef GL_OES_stencil4\n#define GL_OES_stencil4 1\n#endif\n\n#ifndef GL_OES_surfaceless_context\n#define GL_OES_surfaceless_context 1\n#endif\n\n/* GL_OES_texture_3D */\n#ifndef GL_OES_texture_3D\n#define GL_OES_texture_3D 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);\nGL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);\nGL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\n#endif\ntypedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);\ntypedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);\ntypedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);\ntypedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\n#endif\n\n/* GL_OES_texture_float */\n#ifndef GL_OES_texture_float\n#define GL_OES_texture_float 1\n#endif\n\n/* GL_OES_texture_float_linear */\n#ifndef GL_OES_texture_float_linear\n#define GL_OES_texture_float_linear 1\n#endif\n\n/* GL_OES_texture_half_float */\n#ifndef GL_OES_texture_half_float\n#define GL_OES_texture_half_float 1\n#endif\n\n/* GL_OES_texture_half_float_linear */\n#ifndef GL_OES_texture_half_float_linear\n#define GL_OES_texture_half_float_linear 1\n#endif\n\n/* GL_OES_texture_npot */\n#ifndef GL_OES_texture_npot\n#define GL_OES_texture_npot 1\n#endif\n\n/* GL_OES_vertex_array_object */\n#ifndef GL_OES_vertex_array_object\n#define GL_OES_vertex_array_object 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);\nGL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);\nGL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);\nGL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);\ntypedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);\ntypedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);\ntypedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);\n#endif\n\n/* GL_OES_vertex_half_float */\n#ifndef GL_OES_vertex_half_float\n#define GL_OES_vertex_half_float 1\n#endif\n\n/* GL_OES_vertex_type_10_10_10_2 */\n#ifndef GL_OES_vertex_type_10_10_10_2\n#define GL_OES_vertex_type_10_10_10_2 1\n#endif\n\n/*------------------------------------------------------------------------*\n * KHR extension functions\n *------------------------------------------------------------------------*/\n\n#ifndef GL_KHR_debug\n#define GL_KHR_debug 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\nGL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\nGL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);\nGL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\nGL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);\nGL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);\nGL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\nGL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\nGL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, GLvoid **params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\ntypedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);\ntypedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\ntypedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\ntypedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);\ntypedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, GLvoid **params);\n#endif\n\n#ifndef GL_KHR_texture_compression_astc_ldr\n#define GL_KHR_texture_compression_astc_ldr 1\n#endif\n\n\n/*------------------------------------------------------------------------*\n * AMD extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_AMD_compressed_3DC_texture */\n#ifndef GL_AMD_compressed_3DC_texture\n#define GL_AMD_compressed_3DC_texture 1\n#endif\n\n/* GL_AMD_compressed_ATC_texture */\n#ifndef GL_AMD_compressed_ATC_texture\n#define GL_AMD_compressed_ATC_texture 1\n#endif\n\n/* AMD_performance_monitor */\n#ifndef GL_AMD_performance_monitor\n#define GL_AMD_performance_monitor 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\nGL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\nGL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);\nGL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\nGL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);\nGL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);\ntypedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\ntypedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);\ntypedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\ntypedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\n#endif\n\n/* GL_AMD_program_binary_Z400 */\n#ifndef GL_AMD_program_binary_Z400\n#define GL_AMD_program_binary_Z400 1\n#endif\n\n/*------------------------------------------------------------------------*\n * ANGLE extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_ANGLE_depth_texture */\n#ifndef GL_ANGLE_depth_texture\n#define GL_ANGLE_depth_texture 1\n#endif\n\n/* GL_ANGLE_framebuffer_blit */\n#ifndef GL_ANGLE_framebuffer_blit\n#define GL_ANGLE_framebuffer_blit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n\n/* GL_ANGLE_framebuffer_multisample */\n#ifndef GL_ANGLE_framebuffer_multisample\n#define GL_ANGLE_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n#ifndef GL_ANGLE_instanced_arrays\n#define GL_ANGLE_instanced_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);\n#endif\n\n/* GL_ANGLE_pack_reverse_row_order */\n#ifndef GL_ANGLE_pack_reverse_row_order\n#define GL_ANGLE_pack_reverse_row_order 1\n#endif\n\n/* GL_ANGLE_program_binary */\n#ifndef GL_ANGLE_program_binary\n#define GL_ANGLE_program_binary 1\n#endif\n\n/* GL_ANGLE_texture_compression_dxt3 */\n#ifndef GL_ANGLE_texture_compression_dxt3\n#define GL_ANGLE_texture_compression_dxt3 1\n#endif\n\n/* GL_ANGLE_texture_compression_dxt5 */\n#ifndef GL_ANGLE_texture_compression_dxt5\n#define GL_ANGLE_texture_compression_dxt5 1\n#endif\n\n/* GL_ANGLE_texture_usage */\n#ifndef GL_ANGLE_texture_usage\n#define GL_ANGLE_texture_usage 1\n#endif\n\n#ifndef GL_ANGLE_translated_shader_source\n#define GL_ANGLE_translated_shader_source 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\n#endif\n\n/*------------------------------------------------------------------------*\n * APPLE extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_APPLE_copy_texture_levels */\n#ifndef GL_APPLE_copy_texture_levels\n#define GL_APPLE_copy_texture_levels 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\n#endif\ntypedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\n#endif\n\n/* GL_APPLE_framebuffer_multisample */\n#ifndef GL_APPLE_framebuffer_multisample\n#define GL_APPLE_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);\n#endif\n\n/* GL_APPLE_rgb_422 */\n#ifndef GL_APPLE_rgb_422\n#define GL_APPLE_rgb_422 1\n#endif\n\n/* GL_APPLE_sync */\n#ifndef GL_APPLE_sync\n#define GL_APPLE_sync 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);\nGL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);\nGL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);\nGL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\nGL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);\nGL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif\ntypedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);\ntypedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);\ntypedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);\ntypedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\ntypedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);\ntypedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\n#endif\n\n/* GL_APPLE_texture_format_BGRA8888 */\n#ifndef GL_APPLE_texture_format_BGRA8888\n#define GL_APPLE_texture_format_BGRA8888 1\n#endif\n\n/* GL_APPLE_texture_max_level */\n#ifndef GL_APPLE_texture_max_level\n#define GL_APPLE_texture_max_level 1\n#endif\n\n/*------------------------------------------------------------------------*\n * ARM extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_ARM_mali_program_binary */\n#ifndef GL_ARM_mali_program_binary\n#define GL_ARM_mali_program_binary 1\n#endif\n\n/* GL_ARM_mali_shader_binary */\n#ifndef GL_ARM_mali_shader_binary\n#define GL_ARM_mali_shader_binary 1\n#endif\n\n/* GL_ARM_rgba8 */\n#ifndef GL_ARM_rgba8\n#define GL_ARM_rgba8 1\n#endif\n\n/*------------------------------------------------------------------------*\n * EXT extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_EXT_blend_minmax */\n#ifndef GL_EXT_blend_minmax\n#define GL_EXT_blend_minmax 1\n#endif\n\n/* GL_EXT_color_buffer_half_float */\n#ifndef GL_EXT_color_buffer_half_float\n#define GL_EXT_color_buffer_half_float 1\n#endif\n\n/* GL_EXT_debug_label */\n#ifndef GL_EXT_debug_label\n#define GL_EXT_debug_label 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);\nGL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\ntypedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);\ntypedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\n#endif\n\n/* GL_EXT_debug_marker */\n#ifndef GL_EXT_debug_marker\n#define GL_EXT_debug_marker 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);\nGL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);\nGL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);\n#endif\ntypedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);\ntypedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);\n#endif\n\n/* GL_EXT_discard_framebuffer */\n#ifndef GL_EXT_discard_framebuffer\n#define GL_EXT_discard_framebuffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\n#endif\n\n#ifndef GL_EXT_disjoint_timer_query\n#define GL_EXT_disjoint_timer_query 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);\nGL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);\nGL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);\nGL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);\nGL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);\nGL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);\nGL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);\nGL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);\ntypedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);\ntypedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);\ntypedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);\ntypedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);\ntypedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);\ntypedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);\n#endif /* GL_EXT_disjoint_timer_query */\n\n#ifndef GL_EXT_draw_buffers\n#define GL_EXT_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);\n#endif /* GL_EXT_draw_buffers */\n\n/* GL_EXT_map_buffer_range */\n#ifndef GL_EXT_map_buffer_range\n#define GL_EXT_map_buffer_range 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void* GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\nGL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif\ntypedef void* (GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\ntypedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\n#endif\n\n/* GL_EXT_multisampled_render_to_texture */\n#ifndef GL_EXT_multisampled_render_to_texture\n#define GL_EXT_multisampled_render_to_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);             \nGL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\n\n/* GL_EXT_multiview_draw_buffers */\n#ifndef GL_EXT_multiview_draw_buffers\n#define GL_EXT_multiview_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);\nGL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);\nGL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);\n#endif\ntypedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);\ntypedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);\n#endif\n\n#ifndef GL_EXT_multi_draw_arrays\n#define GL_EXT_multi_draw_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);\n#endif /* GL_GLEXT_PROTOTYPES */\ntypedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);\n#endif\n\n/* GL_EXT_occlusion_query_boolean */\n#ifndef GL_EXT_occlusion_query_boolean\n#define GL_EXT_occlusion_query_boolean 1\n/* All entry points also exist in GL_EXT_disjoint_timer_query */\n#endif\n\n/* GL_EXT_read_format_bgra */\n#ifndef GL_EXT_read_format_bgra\n#define GL_EXT_read_format_bgra 1\n#endif\n\n/* GL_EXT_robustness */\n#ifndef GL_EXT_robustness\n#define GL_EXT_robustness 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);\nGL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\nGL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\nGL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);\n#endif\ntypedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);\ntypedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);\ntypedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\ntypedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\n#endif\n\n/* GL_EXT_separate_shader_objects */\n#ifndef GL_EXT_separate_shader_objects\n#define GL_EXT_separate_shader_objects 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);\nGL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);\nGL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);\nGL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);\nGL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);\nGL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\nGL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);\nGL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);\nGL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);\nGL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);\nGL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);\nGL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);\nGL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);\nGL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\nGL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\nGL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\nGL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);\nGL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif\ntypedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\ntypedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);\ntypedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);\ntypedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);\ntypedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);\ntypedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\ntypedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\ntypedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\n#endif\n\n/* GL_EXT_shader_framebuffer_fetch */\n#ifndef GL_EXT_shader_framebuffer_fetch\n#define GL_EXT_shader_framebuffer_fetch 1\n#endif\n\n/* GL_EXT_shader_texture_lod */\n#ifndef GL_EXT_shader_texture_lod\n#define GL_EXT_shader_texture_lod 1\n#endif\n\n/* GL_EXT_shadow_samplers */\n#ifndef GL_EXT_shadow_samplers\n#define GL_EXT_shadow_samplers 1\n#endif\n\n/* GL_EXT_sRGB */\n#ifndef GL_EXT_sRGB\n#define GL_EXT_sRGB 1\n#endif\n\n/* GL_EXT_texture_compression_dxt1 */\n#ifndef GL_EXT_texture_compression_dxt1\n#define GL_EXT_texture_compression_dxt1 1\n#endif\n\n/* GL_EXT_texture_filter_anisotropic */\n#ifndef GL_EXT_texture_filter_anisotropic\n#define GL_EXT_texture_filter_anisotropic 1\n#endif\n\n/* GL_EXT_texture_format_BGRA8888 */\n#ifndef GL_EXT_texture_format_BGRA8888\n#define GL_EXT_texture_format_BGRA8888 1\n#endif\n\n/* GL_EXT_texture_rg */\n#ifndef GL_EXT_texture_rg\n#define GL_EXT_texture_rg 1\n#endif\n\n/* GL_EXT_texture_storage */\n#ifndef GL_EXT_texture_storage\n#define GL_EXT_texture_storage 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\nGL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\nGL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\n#endif\n\n/* GL_EXT_texture_type_2_10_10_10_REV */\n#ifndef GL_EXT_texture_type_2_10_10_10_REV\n#define GL_EXT_texture_type_2_10_10_10_REV 1\n#endif\n\n/* GL_EXT_unpack_subimage */\n#ifndef GL_EXT_unpack_subimage\n#define GL_EXT_unpack_subimage 1\n#endif\n\n/*------------------------------------------------------------------------*\n * DMP extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_DMP_shader_binary */\n#ifndef GL_DMP_shader_binary\n#define GL_DMP_shader_binary 1\n#endif\n\n/*------------------------------------------------------------------------*\n * FJ extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_FJ_shader_binary_GCCSO */\n#ifndef GL_FJ_shader_binary_GCCSO\n#define GL_FJ_shader_binary_GCCSO 1\n#endif\n\n/*------------------------------------------------------------------------*\n * IMG extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_IMG_program_binary */\n#ifndef GL_IMG_program_binary\n#define GL_IMG_program_binary 1\n#endif\n\n/* GL_IMG_read_format */\n#ifndef GL_IMG_read_format\n#define GL_IMG_read_format 1\n#endif\n\n/* GL_IMG_shader_binary */\n#ifndef GL_IMG_shader_binary\n#define GL_IMG_shader_binary 1\n#endif\n\n/* GL_IMG_texture_compression_pvrtc */\n#ifndef GL_IMG_texture_compression_pvrtc\n#define GL_IMG_texture_compression_pvrtc 1\n#endif\n\n/* GL_IMG_texture_compression_pvrtc2 */\n#ifndef GL_IMG_texture_compression_pvrtc2\n#define GL_IMG_texture_compression_pvrtc2 1\n#endif\n\n/* GL_IMG_multisampled_render_to_texture */\n#ifndef GL_IMG_multisampled_render_to_texture\n#define GL_IMG_multisampled_render_to_texture 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\nGL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\ntypedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\n#endif\n\n/*------------------------------------------------------------------------*\n * NV extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_NV_coverage_sample */\n#ifndef GL_NV_coverage_sample\n#define GL_NV_coverage_sample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);\nGL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);\n#endif\ntypedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);\ntypedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);\n#endif\n\n/* GL_NV_depth_nonlinear */\n#ifndef GL_NV_depth_nonlinear\n#define GL_NV_depth_nonlinear 1\n#endif\n\n/* GL_NV_draw_buffers */\n#ifndef GL_NV_draw_buffers\n#define GL_NV_draw_buffers 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);\n#endif\n\n/* GL_NV_draw_instanced */\n#ifndef GL_NV_draw_instanced\n#define GL_NV_draw_instanced 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\nGL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\ntypedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);\n#endif\n\n/* GL_NV_fbo_color_attachments */\n#ifndef GL_NV_fbo_color_attachments\n#define GL_NV_fbo_color_attachments 1\n#endif\n\n/* GL_NV_fence */\n#ifndef GL_NV_fence\n#define GL_NV_fence 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\nGL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\nGL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);\nGL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);\nGL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);\nGL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\n#endif\ntypedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\ntypedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\ntypedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\ntypedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\ntypedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\ntypedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\n#endif\n\n/* GL_NV_framebuffer_blit */\n#ifndef GL_NV_framebuffer_blit\n#define GL_NV_framebuffer_blit 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\ntypedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\n#endif\n\n/* GL_NV_framebuffer_multisample */\n#ifndef GL_NV_framebuffer_multisample\n#define GL_NV_framebuffer_multisample 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\ntypedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\n#endif\n\n/* GL_NV_generate_mipmap_sRGB */\n#ifndef GL_NV_generate_mipmap_sRGB\n#define GL_NV_generate_mipmap_sRGB 1\n#endif\n\n/* GL_NV_instanced_arrays */\n#ifndef GL_NV_instanced_arrays\n#define GL_NV_instanced_arrays 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);\n#endif\ntypedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);\n#endif\n\n/* GL_NV_read_buffer */\n#ifndef GL_NV_read_buffer\n#define GL_NV_read_buffer 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);\n#endif\ntypedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);\n#endif\n\n/* GL_NV_read_buffer_front */\n#ifndef GL_NV_read_buffer_front\n#define GL_NV_read_buffer_front 1\n#endif\n\n/* GL_NV_read_depth */\n#ifndef GL_NV_read_depth\n#define GL_NV_read_depth 1\n#endif\n\n/* GL_NV_read_depth_stencil */\n#ifndef GL_NV_read_depth_stencil\n#define GL_NV_read_depth_stencil 1\n#endif\n\n/* GL_NV_read_stencil */\n#ifndef GL_NV_read_stencil\n#define GL_NV_read_stencil 1\n#endif\n\n/* GL_NV_shadow_samplers_array */\n#ifndef GL_NV_shadow_samplers_array\n#define GL_NV_shadow_samplers_array 1\n#endif\n\n/* GL_NV_shadow_samplers_cube */\n#ifndef GL_NV_shadow_samplers_cube\n#define GL_NV_shadow_samplers_cube 1\n#endif\n\n/* GL_NV_sRGB_formats */\n#ifndef GL_NV_sRGB_formats\n#define GL_NV_sRGB_formats 1\n#endif\n\n/* GL_NV_texture_border_clamp */\n#ifndef GL_NV_texture_border_clamp\n#define GL_NV_texture_border_clamp 1\n#endif\n\n/* GL_NV_texture_compression_s3tc_update */\n#ifndef GL_NV_texture_compression_s3tc_update\n#define GL_NV_texture_compression_s3tc_update 1\n#endif\n\n/* GL_NV_texture_npot_2D_mipmap */\n#ifndef GL_NV_texture_npot_2D_mipmap\n#define GL_NV_texture_npot_2D_mipmap 1\n#endif\n\n/*------------------------------------------------------------------------*\n * QCOM extension functions\n *------------------------------------------------------------------------*/\n\n/* GL_QCOM_alpha_test */\n#ifndef GL_QCOM_alpha_test\n#define GL_QCOM_alpha_test 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);\n#endif\ntypedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);\n#endif\n\n/* GL_QCOM_binning_control */\n#ifndef GL_QCOM_binning_control\n#define GL_QCOM_binning_control 1\n#endif\n\n/* GL_QCOM_driver_control */\n#ifndef GL_QCOM_driver_control\n#define GL_QCOM_driver_control 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);\nGL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\nGL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);\nGL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);\n#endif\ntypedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);\ntypedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\ntypedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\ntypedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\n#endif\n\n/* GL_QCOM_extended_get */\n#ifndef GL_QCOM_extended_get\n#define GL_QCOM_extended_get 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);\nGL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\nGL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\nGL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\nGL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\nGL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);\nGL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);\nGL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);\ntypedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\ntypedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);\ntypedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);\ntypedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);\n#endif\n\n/* GL_QCOM_extended_get2 */\n#ifndef GL_QCOM_extended_get2\n#define GL_QCOM_extended_get2 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);\nGL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\nGL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);\nGL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\n#endif\ntypedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);\ntypedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\ntypedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);\ntypedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\n#endif\n\n/* GL_QCOM_perfmon_global_mode */\n#ifndef GL_QCOM_perfmon_global_mode\n#define GL_QCOM_perfmon_global_mode 1\n#endif\n\n/* GL_QCOM_writeonly_rendering */\n#ifndef GL_QCOM_writeonly_rendering\n#define GL_QCOM_writeonly_rendering 1\n#endif\n\n/* GL_QCOM_tiled_rendering */\n#ifndef GL_QCOM_tiled_rendering\n#define GL_QCOM_tiled_rendering 1\n#ifdef GL_GLEXT_PROTOTYPES\nGL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\nGL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);\n#endif\ntypedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\ntypedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);\n#endif\n\n/*------------------------------------------------------------------------*\n * VIV extension tokens\n *------------------------------------------------------------------------*/\n\n/* GL_VIV_shader_binary */\n#ifndef GL_VIV_shader_binary\n#define GL_VIV_shader_binary 1\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* __gl2ext_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles2_gl2platform.h",
    "content": "#ifndef __gl2platform_h_\n#define __gl2platform_h_\n\n/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */\n\n/*\n * This document is licensed under the SGI Free Software B License Version\n * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\n */\n\n/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h\n *\n * Adopters may modify khrplatform.h and this file to suit their platform.\n * You are encouraged to submit all modifications to the Khronos group so that\n * they can be included in future versions of this file.  Please submit changes\n * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)\n * by filing a bug against product \"OpenGL-ES\" component \"Registry\".\n */\n\n/*#include <KHR/khrplatform.h>*/\n\n#ifndef GL_APICALL\n#define GL_APICALL  KHRONOS_APICALL\n#endif\n\n#ifndef GL_APIENTRY\n#define GL_APIENTRY KHRONOS_APIENTRY\n#endif\n\n#endif /* __gl2platform_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_opengles2_khrplatform.h",
    "content": "#ifndef __khrplatform_h_\n#define __khrplatform_h_\n\n/*\n** Copyright (c) 2008-2009 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n/* Khronos platform-specific types and definitions.\n *\n * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $\n *\n * Adopters may modify this file to suit their platform. Adopters are\n * encouraged to submit platform specific modifications to the Khronos\n * group so that they can be included in future versions of this file.\n * Please submit changes by sending them to the public Khronos Bugzilla\n * (http://khronos.org/bugzilla) by filing a bug against product\n * \"Khronos (general)\" component \"Registry\".\n *\n * A predefined template which fills in some of the bug fields can be\n * reached using http://tinyurl.com/khrplatform-h-bugreport, but you\n * must create a Bugzilla login first.\n *\n *\n * See the Implementer's Guidelines for information about where this file\n * should be located on your system and for more details of its use:\n *    http://www.khronos.org/registry/implementers_guide.pdf\n *\n * This file should be included as\n *        #include <KHR/khrplatform.h>\n * by Khronos client API header files that use its types and defines.\n *\n * The types in khrplatform.h should only be used to define API-specific types.\n *\n * Types defined in khrplatform.h:\n *    khronos_int8_t              signed   8  bit\n *    khronos_uint8_t             unsigned 8  bit\n *    khronos_int16_t             signed   16 bit\n *    khronos_uint16_t            unsigned 16 bit\n *    khronos_int32_t             signed   32 bit\n *    khronos_uint32_t            unsigned 32 bit\n *    khronos_int64_t             signed   64 bit\n *    khronos_uint64_t            unsigned 64 bit\n *    khronos_intptr_t            signed   same number of bits as a pointer\n *    khronos_uintptr_t           unsigned same number of bits as a pointer\n *    khronos_ssize_t             signed   size\n *    khronos_usize_t             unsigned size\n *    khronos_float_t             signed   32 bit floating point\n *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\n *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\n *                                         nanoseconds\n *    khronos_stime_nanoseconds_t signed time interval in nanoseconds\n *    khronos_boolean_enum_t      enumerated boolean type. This should\n *      only be used as a base type when a client API's boolean type is\n *      an enum. Client APIs which use an integer or other type for\n *      booleans cannot use this as the base type for their boolean.\n *\n * Tokens defined in khrplatform.h:\n *\n *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\n *\n *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\n *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\n *\n * Calling convention macros defined in this file:\n *    KHRONOS_APICALL\n *    KHRONOS_APIENTRY\n *    KHRONOS_APIATTRIBUTES\n *\n * These may be used in function prototypes as:\n *\n *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\n *                                  int arg1,\n *                                  int arg2) KHRONOS_APIATTRIBUTES;\n */\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APICALL\n *-------------------------------------------------------------------------\n * This precedes the return type of the function in the function prototype.\n */\n#if defined(_WIN32) && !defined(__SCITECH_SNAP__)\n#   define KHRONOS_APICALL __declspec(dllimport)\n#elif defined (__SYMBIAN32__)\n#   define KHRONOS_APICALL IMPORT_C\n#else\n#   define KHRONOS_APICALL\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIENTRY\n *-------------------------------------------------------------------------\n * This follows the return type of the function  and precedes the function\n * name in the function prototype.\n */\n#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\n    /* Win32 but not WinCE */\n#   define KHRONOS_APIENTRY __stdcall\n#else\n#   define KHRONOS_APIENTRY\n#endif\n\n/*-------------------------------------------------------------------------\n * Definition of KHRONOS_APIATTRIBUTES\n *-------------------------------------------------------------------------\n * This follows the closing parenthesis of the function prototype arguments.\n */\n#if defined (__ARMCC_2__)\n#define KHRONOS_APIATTRIBUTES __softfp\n#else\n#define KHRONOS_APIATTRIBUTES\n#endif\n\n/*-------------------------------------------------------------------------\n * basic type definitions\n *-----------------------------------------------------------------------*/\n#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\n\n\n/*\n * Using <stdint.h>\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__VMS ) || defined(__sgi)\n\n/*\n * Using <inttypes.h>\n */\n#include <inttypes.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\n\n/*\n * Win32\n */\ntypedef __int32                 khronos_int32_t;\ntypedef unsigned __int32        khronos_uint32_t;\ntypedef __int64                 khronos_int64_t;\ntypedef unsigned __int64        khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif defined(__sun__) || defined(__digital__)\n\n/*\n * Sun or Digital\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#if defined(__arch64__) || defined(_LP64)\ntypedef long int                khronos_int64_t;\ntypedef unsigned long int       khronos_uint64_t;\n#else\ntypedef long long int           khronos_int64_t;\ntypedef unsigned long long int  khronos_uint64_t;\n#endif /* __arch64__ */\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#elif 0\n\n/*\n * Hypothetical platform with no float or int64 support\n */\ntypedef int                     khronos_int32_t;\ntypedef unsigned int            khronos_uint32_t;\n#define KHRONOS_SUPPORT_INT64   0\n#define KHRONOS_SUPPORT_FLOAT   0\n\n#else\n\n/*\n * Generic fallback\n */\n#include <stdint.h>\ntypedef int32_t                 khronos_int32_t;\ntypedef uint32_t                khronos_uint32_t;\ntypedef int64_t                 khronos_int64_t;\ntypedef uint64_t                khronos_uint64_t;\n#define KHRONOS_SUPPORT_INT64   1\n#define KHRONOS_SUPPORT_FLOAT   1\n\n#endif\n\n\n/*\n * Types that are (so far) the same on all platforms\n */\ntypedef signed   char          khronos_int8_t;\ntypedef unsigned char          khronos_uint8_t;\ntypedef signed   short int     khronos_int16_t;\ntypedef unsigned short int     khronos_uint16_t;\n\n/*\n * Types that differ between LLP64 and LP64 architectures - in LLP64, \n * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears\n * to be the only LLP64 architecture in current use.\n */\n#ifdef _WIN64\ntypedef signed   long long int khronos_intptr_t;\ntypedef unsigned long long int khronos_uintptr_t;\ntypedef signed   long long int khronos_ssize_t;\ntypedef unsigned long long int khronos_usize_t;\n#else\ntypedef signed   long  int     khronos_intptr_t;\ntypedef unsigned long  int     khronos_uintptr_t;\ntypedef signed   long  int     khronos_ssize_t;\ntypedef unsigned long  int     khronos_usize_t;\n#endif\n\n#if KHRONOS_SUPPORT_FLOAT\n/*\n * Float type\n */\ntypedef          float         khronos_float_t;\n#endif\n\n#if KHRONOS_SUPPORT_INT64\n/* Time types\n *\n * These types can be used to represent a time interval in nanoseconds or\n * an absolute Unadjusted System Time.  Unadjusted System Time is the number\n * of nanoseconds since some arbitrary system event (e.g. since the last\n * time the system booted).  The Unadjusted System Time is an unsigned\n * 64 bit value that wraps back to 0 every 584 years.  Time intervals\n * may be either signed or unsigned.\n */\ntypedef khronos_uint64_t       khronos_utime_nanoseconds_t;\ntypedef khronos_int64_t        khronos_stime_nanoseconds_t;\n#endif\n\n/*\n * Dummy value used to pad enum types to 32 bits.\n */\n#ifndef KHRONOS_MAX_ENUM\n#define KHRONOS_MAX_ENUM 0x7FFFFFFF\n#endif\n\n/*\n * Enumerated boolean type\n *\n * Values other than zero should be considered to be true.  Therefore\n * comparisons should not be made against KHRONOS_TRUE.\n */\ntypedef enum {\n    KHRONOS_FALSE = 0,\n    KHRONOS_TRUE  = 1,\n    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\n} khronos_boolean_enum_t;\n\n#endif /* __khrplatform_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_pixels.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_pixels.h\n *\n *  Header for the enumerated pixel format definitions.\n */\n\n#ifndef SDL_pixels_h_\n#define SDL_pixels_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_endian.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\name Transparency definitions\n *\n *  These define alpha as the opacity of a surface.\n */\n/* @{ */\n#define SDL_ALPHA_OPAQUE 255\n#define SDL_ALPHA_TRANSPARENT 0\n/* @} */\n\n/** Pixel type. */\nenum\n{\n    SDL_PIXELTYPE_UNKNOWN,\n    SDL_PIXELTYPE_INDEX1,\n    SDL_PIXELTYPE_INDEX4,\n    SDL_PIXELTYPE_INDEX8,\n    SDL_PIXELTYPE_PACKED8,\n    SDL_PIXELTYPE_PACKED16,\n    SDL_PIXELTYPE_PACKED32,\n    SDL_PIXELTYPE_ARRAYU8,\n    SDL_PIXELTYPE_ARRAYU16,\n    SDL_PIXELTYPE_ARRAYU32,\n    SDL_PIXELTYPE_ARRAYF16,\n    SDL_PIXELTYPE_ARRAYF32\n};\n\n/** Bitmap pixel order, high bit -> low bit. */\nenum\n{\n    SDL_BITMAPORDER_NONE,\n    SDL_BITMAPORDER_4321,\n    SDL_BITMAPORDER_1234\n};\n\n/** Packed component order, high bit -> low bit. */\nenum\n{\n    SDL_PACKEDORDER_NONE,\n    SDL_PACKEDORDER_XRGB,\n    SDL_PACKEDORDER_RGBX,\n    SDL_PACKEDORDER_ARGB,\n    SDL_PACKEDORDER_RGBA,\n    SDL_PACKEDORDER_XBGR,\n    SDL_PACKEDORDER_BGRX,\n    SDL_PACKEDORDER_ABGR,\n    SDL_PACKEDORDER_BGRA\n};\n\n/** Array component order, low byte -> high byte. */\n/* !!! FIXME: in 2.1, make these not overlap differently with\n   !!! FIXME:  SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */\nenum\n{\n    SDL_ARRAYORDER_NONE,\n    SDL_ARRAYORDER_RGB,\n    SDL_ARRAYORDER_RGBA,\n    SDL_ARRAYORDER_ARGB,\n    SDL_ARRAYORDER_BGR,\n    SDL_ARRAYORDER_BGRA,\n    SDL_ARRAYORDER_ABGR\n};\n\n/** Packed component layout. */\nenum\n{\n    SDL_PACKEDLAYOUT_NONE,\n    SDL_PACKEDLAYOUT_332,\n    SDL_PACKEDLAYOUT_4444,\n    SDL_PACKEDLAYOUT_1555,\n    SDL_PACKEDLAYOUT_5551,\n    SDL_PACKEDLAYOUT_565,\n    SDL_PACKEDLAYOUT_8888,\n    SDL_PACKEDLAYOUT_2101010,\n    SDL_PACKEDLAYOUT_1010102\n};\n\n#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)\n\n#define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \\\n    ((1 << 28) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \\\n     ((bits) << 8) | ((bytes) << 0))\n\n#define SDL_PIXELFLAG(X)    (((X) >> 28) & 0x0F)\n#define SDL_PIXELTYPE(X)    (((X) >> 24) & 0x0F)\n#define SDL_PIXELORDER(X)   (((X) >> 20) & 0x0F)\n#define SDL_PIXELLAYOUT(X)  (((X) >> 16) & 0x0F)\n#define SDL_BITSPERPIXEL(X) (((X) >> 8) & 0xFF)\n#define SDL_BYTESPERPIXEL(X) \\\n    (SDL_ISPIXELFORMAT_FOURCC(X) ? \\\n        ((((X) == SDL_PIXELFORMAT_YUY2) || \\\n          ((X) == SDL_PIXELFORMAT_UYVY) || \\\n          ((X) == SDL_PIXELFORMAT_YVYU)) ? 2 : 1) : (((X) >> 0) & 0xFF))\n\n#define SDL_ISPIXELFORMAT_INDEXED(format)   \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX1) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))\n\n#define SDL_ISPIXELFORMAT_PACKED(format) \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))\n\n#define SDL_ISPIXELFORMAT_ARRAY(format) \\\n    (!SDL_ISPIXELFORMAT_FOURCC(format) && \\\n     ((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \\\n      (SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))\n\n#define SDL_ISPIXELFORMAT_ALPHA(format)   \\\n    ((SDL_ISPIXELFORMAT_PACKED(format) && \\\n     ((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \\\n      (SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \\\n    (SDL_ISPIXELFORMAT_ARRAY(format) && \\\n     ((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \\\n      (SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))\n\n/* The flag is set to 1 because 0x1? is not in the printable ASCII range */\n#define SDL_ISPIXELFORMAT_FOURCC(format)    \\\n    ((format) && (SDL_PIXELFLAG(format) != 1))\n\n/* Note: If you modify this list, update SDL_GetPixelFormatName() */\ntypedef enum\n{\n    SDL_PIXELFORMAT_UNKNOWN,\n    SDL_PIXELFORMAT_INDEX1LSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_4321, 0,\n                               1, 0),\n    SDL_PIXELFORMAT_INDEX1MSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1, SDL_BITMAPORDER_1234, 0,\n                               1, 0),\n    SDL_PIXELFORMAT_INDEX4LSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_4321, 0,\n                               4, 0),\n    SDL_PIXELFORMAT_INDEX4MSB =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4, SDL_BITMAPORDER_1234, 0,\n                               4, 0),\n    SDL_PIXELFORMAT_INDEX8 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8, 0, 0, 8, 1),\n    SDL_PIXELFORMAT_RGB332 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_332, 8, 1),\n    SDL_PIXELFORMAT_RGB444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_4444, 12, 2),\n    SDL_PIXELFORMAT_RGB555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_1555, 15, 2),\n    SDL_PIXELFORMAT_BGR555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_1555, 15, 2),\n    SDL_PIXELFORMAT_ARGB4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_RGBA4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_ABGR4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_BGRA4444 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_4444, 16, 2),\n    SDL_PIXELFORMAT_ARGB1555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_1555, 16, 2),\n    SDL_PIXELFORMAT_RGBA5551 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_5551, 16, 2),\n    SDL_PIXELFORMAT_ABGR1555 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_1555, 16, 2),\n    SDL_PIXELFORMAT_BGRA5551 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_5551, 16, 2),\n    SDL_PIXELFORMAT_RGB565 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_565, 16, 2),\n    SDL_PIXELFORMAT_BGR565 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_565, 16, 2),\n    SDL_PIXELFORMAT_RGB24 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_RGB, 0,\n                               24, 3),\n    SDL_PIXELFORMAT_BGR24 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,\n                               24, 3),\n    SDL_PIXELFORMAT_RGB888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_RGBX8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_BGR888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_BGRX8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,\n                               SDL_PACKEDLAYOUT_8888, 24, 4),\n    SDL_PIXELFORMAT_ARGB8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_RGBA8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBA,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_ABGR8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ABGR,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_BGRA8888 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRA,\n                               SDL_PACKEDLAYOUT_8888, 32, 4),\n    SDL_PIXELFORMAT_ARGB2101010 =\n        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,\n                               SDL_PACKEDLAYOUT_2101010, 32, 4),\n\n    /* Aliases for RGBA byte arrays of color data, for the current platform */\n#if SDL_BYTEORDER == SDL_BIG_ENDIAN\n    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,\n    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,\n    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,\n    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,\n#else\n    SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,\n    SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,\n    SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,\n    SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,\n#endif\n\n    SDL_PIXELFORMAT_YV12 =      /**< Planar mode: Y + V + U  (3 planes) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),\n    SDL_PIXELFORMAT_IYUV =      /**< Planar mode: Y + U + V  (3 planes) */\n        SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),\n    SDL_PIXELFORMAT_YUY2 =      /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),\n    SDL_PIXELFORMAT_UYVY =      /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),\n    SDL_PIXELFORMAT_YVYU =      /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */\n        SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),\n    SDL_PIXELFORMAT_NV12 =      /**< Planar mode: Y + U/V interleaved  (2 planes) */\n        SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),\n    SDL_PIXELFORMAT_NV21 =      /**< Planar mode: Y + V/U interleaved  (2 planes) */\n        SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),\n    SDL_PIXELFORMAT_EXTERNAL_OES =      /**< Android video texture format */\n        SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')\n} SDL_PixelFormatEnum;\n\ntypedef struct SDL_Color\n{\n    Uint8 r;\n    Uint8 g;\n    Uint8 b;\n    Uint8 a;\n} SDL_Color;\n#define SDL_Colour SDL_Color\n\ntypedef struct SDL_Palette\n{\n    int ncolors;\n    SDL_Color *colors;\n    Uint32 version;\n    int refcount;\n} SDL_Palette;\n\n/**\n *  \\note Everything in the pixel format structure is read-only.\n */\ntypedef struct SDL_PixelFormat\n{\n    Uint32 format;\n    SDL_Palette *palette;\n    Uint8 BitsPerPixel;\n    Uint8 BytesPerPixel;\n    Uint8 padding[2];\n    Uint32 Rmask;\n    Uint32 Gmask;\n    Uint32 Bmask;\n    Uint32 Amask;\n    Uint8 Rloss;\n    Uint8 Gloss;\n    Uint8 Bloss;\n    Uint8 Aloss;\n    Uint8 Rshift;\n    Uint8 Gshift;\n    Uint8 Bshift;\n    Uint8 Ashift;\n    int refcount;\n    struct SDL_PixelFormat *next;\n} SDL_PixelFormat;\n\n/**\n * \\brief Get the human readable name of a pixel format\n */\nextern DECLSPEC const char* SDLCALL SDL_GetPixelFormatName(Uint32 format);\n\n/**\n *  \\brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.\n *\n *  \\return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.\n *\n *  \\sa SDL_MasksToPixelFormatEnum()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_PixelFormatEnumToMasks(Uint32 format,\n                                                            int *bpp,\n                                                            Uint32 * Rmask,\n                                                            Uint32 * Gmask,\n                                                            Uint32 * Bmask,\n                                                            Uint32 * Amask);\n\n/**\n *  \\brief Convert a bpp and RGBA masks to an enumerated pixel format.\n *\n *  \\return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion\n *          wasn't possible.\n *\n *  \\sa SDL_PixelFormatEnumToMasks()\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MasksToPixelFormatEnum(int bpp,\n                                                          Uint32 Rmask,\n                                                          Uint32 Gmask,\n                                                          Uint32 Bmask,\n                                                          Uint32 Amask);\n\n/**\n *  \\brief Create an SDL_PixelFormat structure from a pixel format enum.\n */\nextern DECLSPEC SDL_PixelFormat * SDLCALL SDL_AllocFormat(Uint32 pixel_format);\n\n/**\n *  \\brief Free an SDL_PixelFormat structure.\n */\nextern DECLSPEC void SDLCALL SDL_FreeFormat(SDL_PixelFormat *format);\n\n/**\n *  \\brief Create a palette structure with the specified number of color\n *         entries.\n *\n *  \\return A new palette, or NULL if there wasn't enough memory.\n *\n *  \\note The palette entries are initialized to white.\n *\n *  \\sa SDL_FreePalette()\n */\nextern DECLSPEC SDL_Palette *SDLCALL SDL_AllocPalette(int ncolors);\n\n/**\n *  \\brief Set the palette for a pixel format structure.\n */\nextern DECLSPEC int SDLCALL SDL_SetPixelFormatPalette(SDL_PixelFormat * format,\n                                                      SDL_Palette *palette);\n\n/**\n *  \\brief Set a range of colors in a palette.\n *\n *  \\param palette    The palette to modify.\n *  \\param colors     An array of colors to copy into the palette.\n *  \\param firstcolor The index of the first palette entry to modify.\n *  \\param ncolors    The number of entries to modify.\n *\n *  \\return 0 on success, or -1 if not all of the colors could be set.\n */\nextern DECLSPEC int SDLCALL SDL_SetPaletteColors(SDL_Palette * palette,\n                                                 const SDL_Color * colors,\n                                                 int firstcolor, int ncolors);\n\n/**\n *  \\brief Free a palette created with SDL_AllocPalette().\n *\n *  \\sa SDL_AllocPalette()\n */\nextern DECLSPEC void SDLCALL SDL_FreePalette(SDL_Palette * palette);\n\n/**\n *  \\brief Maps an RGB triple to an opaque pixel value for a given pixel format.\n *\n *  \\sa SDL_MapRGBA\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MapRGB(const SDL_PixelFormat * format,\n                                          Uint8 r, Uint8 g, Uint8 b);\n\n/**\n *  \\brief Maps an RGBA quadruple to a pixel value for a given pixel format.\n *\n *  \\sa SDL_MapRGB\n */\nextern DECLSPEC Uint32 SDLCALL SDL_MapRGBA(const SDL_PixelFormat * format,\n                                           Uint8 r, Uint8 g, Uint8 b,\n                                           Uint8 a);\n\n/**\n *  \\brief Get the RGB components from a pixel of the specified format.\n *\n *  \\sa SDL_GetRGBA\n */\nextern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,\n                                        const SDL_PixelFormat * format,\n                                        Uint8 * r, Uint8 * g, Uint8 * b);\n\n/**\n *  \\brief Get the RGBA components from a pixel of the specified format.\n *\n *  \\sa SDL_GetRGB\n */\nextern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,\n                                         const SDL_PixelFormat * format,\n                                         Uint8 * r, Uint8 * g, Uint8 * b,\n                                         Uint8 * a);\n\n/**\n *  \\brief Calculate a 256 entry gamma ramp for a gamma value.\n */\nextern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_pixels_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_platform.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_platform.h\n *\n *  Try to get a standard set of platform defines.\n */\n\n#ifndef SDL_platform_h_\n#define SDL_platform_h_\n\n#if defined(_AIX)\n#undef __AIX__\n#define __AIX__     1\n#endif\n#if defined(__HAIKU__)\n#undef __HAIKU__\n#define __HAIKU__   1\n#endif\n#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)\n#undef __BSDI__\n#define __BSDI__    1\n#endif\n#if defined(_arch_dreamcast)\n#undef __DREAMCAST__\n#define __DREAMCAST__   1\n#endif\n#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)\n#undef __FREEBSD__\n#define __FREEBSD__ 1\n#endif\n#if defined(hpux) || defined(__hpux) || defined(__hpux__)\n#undef __HPUX__\n#define __HPUX__    1\n#endif\n#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)\n#undef __IRIX__\n#define __IRIX__    1\n#endif\n#if (defined(linux) || defined(__linux) || defined(__linux__))\n#undef __LINUX__\n#define __LINUX__   1\n#endif\n#if defined(ANDROID) || defined(__ANDROID__)\n#undef __ANDROID__\n#undef __LINUX__ /* do we need to do this? */\n#define __ANDROID__ 1\n#endif\n\n#if defined(__APPLE__)\n/* lets us know what version of Mac OS X we're compiling on */\n#include \"AvailabilityMacros.h\"\n#include \"TargetConditionals.h\"\n#if TARGET_OS_TV\n#undef __TVOS__\n#define __TVOS__ 1\n#endif\n#if TARGET_OS_IPHONE\n/* if compiling for iOS */\n#undef __IPHONEOS__\n#define __IPHONEOS__ 1\n#undef __MACOSX__\n#else\n/* if not compiling for iOS */\n#undef __MACOSX__\n#define __MACOSX__  1\n#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060\n# error SDL for Mac OS X only supports deploying on 10.6 and above.\n#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */\n#endif /* TARGET_OS_IPHONE */\n#endif /* defined(__APPLE__) */\n\n#if defined(__NetBSD__)\n#undef __NETBSD__\n#define __NETBSD__  1\n#endif\n#if defined(__OpenBSD__)\n#undef __OPENBSD__\n#define __OPENBSD__ 1\n#endif\n#if defined(__OS2__) || defined(__EMX__)\n#undef __OS2__\n#define __OS2__     1\n#endif\n#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)\n#undef __OSF__\n#define __OSF__     1\n#endif\n#if defined(__QNXNTO__)\n#undef __QNXNTO__\n#define __QNXNTO__  1\n#endif\n#if defined(riscos) || defined(__riscos) || defined(__riscos__)\n#undef __RISCOS__\n#define __RISCOS__  1\n#endif\n#if defined(__sun) && defined(__SVR4)\n#undef __SOLARIS__\n#define __SOLARIS__ 1\n#endif\n\n#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)\n/* Try to find out if we're compiling for WinRT or non-WinRT */\n#if defined(_MSC_VER) && defined(__has_include)\n#if __has_include(<winapifamily.h>)\n#define HAVE_WINAPIFAMILY_H 1\n#else\n#define HAVE_WINAPIFAMILY_H 0\n#endif\n\n/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */\n#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_)    /* _MSC_VER == 1700 for Visual Studio 2012 */\n#define HAVE_WINAPIFAMILY_H 1\n#else\n#define HAVE_WINAPIFAMILY_H 0\n#endif\n\n#if HAVE_WINAPIFAMILY_H\n#include <winapifamily.h>\n#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))\n#else\n#define WINAPI_FAMILY_WINRT 0\n#endif /* HAVE_WINAPIFAMILY_H */\n\n#if WINAPI_FAMILY_WINRT\n#undef __WINRT__\n#define __WINRT__ 1\n#else\n#undef __WINDOWS__\n#define __WINDOWS__ 1\n#endif\n#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */\n\n#if defined(__WINDOWS__)\n#undef __WIN32__\n#define __WIN32__ 1\n#endif\n#if defined(__PSP__)\n#undef __PSP__\n#define __PSP__ 1\n#endif\n\n/* The NACL compiler defines __native_client__ and __pnacl__\n * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi\n */\n#if defined(__native_client__)\n#undef __LINUX__\n#undef __NACL__\n#define __NACL__ 1\n#endif\n#if defined(__pnacl__)\n#undef __LINUX__\n#undef __PNACL__\n#define __PNACL__ 1\n/* PNACL with newlib supports static linking only */\n#define __SDL_NOGETPROCADDR__\n#endif\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Gets the name of the platform.\n */\nextern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_platform_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_power.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_power_h_\n#define SDL_power_h_\n\n/**\n *  \\file SDL_power.h\n *\n *  Header for the SDL power management routines.\n */\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief The basic state for the system's power supply.\n */\ntypedef enum\n{\n    SDL_POWERSTATE_UNKNOWN,      /**< cannot determine power status */\n    SDL_POWERSTATE_ON_BATTERY,   /**< Not plugged in, running on the battery */\n    SDL_POWERSTATE_NO_BATTERY,   /**< Plugged in, no battery available */\n    SDL_POWERSTATE_CHARGING,     /**< Plugged in, charging battery */\n    SDL_POWERSTATE_CHARGED       /**< Plugged in, battery charged */\n} SDL_PowerState;\n\n\n/**\n *  \\brief Get the current power supply details.\n *\n *  \\param secs Seconds of battery life left. You can pass a NULL here if\n *              you don't care. Will return -1 if we can't determine a\n *              value, or we're not running on a battery.\n *\n *  \\param pct Percentage of battery life left, between 0 and 100. You can\n *             pass a NULL here if you don't care. Will return -1 if we\n *             can't determine a value, or we're not running on a battery.\n *\n *  \\return The state of the battery (if any).\n */\nextern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_power_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_quit.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_quit.h\n *\n *  Include file for SDL quit event handling.\n */\n\n#ifndef SDL_quit_h_\n#define SDL_quit_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n/**\n *  \\file SDL_quit.h\n *\n *  An ::SDL_QUIT event is generated when the user tries to close the application\n *  window.  If it is ignored or filtered out, the window will remain open.\n *  If it is not ignored or filtered, it is queued normally and the window\n *  is allowed to close.  When the window is closed, screen updates will\n *  complete, but have no effect.\n *\n *  SDL_Init() installs signal handlers for SIGINT (keyboard interrupt)\n *  and SIGTERM (system termination request), if handlers do not already\n *  exist, that generate ::SDL_QUIT events as well.  There is no way\n *  to determine the cause of an ::SDL_QUIT event, but setting a signal\n *  handler in your application will override the default generation of\n *  quit events for that signal.\n *\n *  \\sa SDL_Quit()\n */\n\n/* There are no functions directly affecting the quit event */\n\n#define SDL_QuitRequested() \\\n        (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))\n\n#endif /* SDL_quit_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_rect.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_rect.h\n *\n *  Header file for SDL_rect definition and management functions.\n */\n\n#ifndef SDL_rect_h_\n#define SDL_rect_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  The structure that defines a point (integer)\n *\n *  \\sa SDL_EnclosePoints\n *  \\sa SDL_PointInRect\n */\ntypedef struct SDL_Point\n{\n    int x;\n    int y;\n} SDL_Point;\n\n/**\n *  \\brief  The structure that defines a point (floating point)\n *\n *  \\sa SDL_EnclosePoints\n *  \\sa SDL_PointInRect\n */\ntypedef struct SDL_FPoint\n{\n    float x;\n    float y;\n} SDL_FPoint;\n\n\n/**\n *  \\brief A rectangle, with the origin at the upper left (integer).\n *\n *  \\sa SDL_RectEmpty\n *  \\sa SDL_RectEquals\n *  \\sa SDL_HasIntersection\n *  \\sa SDL_IntersectRect\n *  \\sa SDL_UnionRect\n *  \\sa SDL_EnclosePoints\n */\ntypedef struct SDL_Rect\n{\n    int x, y;\n    int w, h;\n} SDL_Rect;\n\n\n/**\n *  \\brief A rectangle, with the origin at the upper left (floating point).\n */\ntypedef struct SDL_FRect\n{\n    float x;\n    float y;\n    float w;\n    float h;\n} SDL_FRect;\n\n\n/**\n *  \\brief Returns true if point resides inside a rectangle.\n */\nSDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)\n{\n    return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&\n             (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Returns true if the rectangle has no area.\n */\nSDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)\n{\n    return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Returns true if the two rectangles are equal.\n */\nSDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b)\n{\n    return (a && b && (a->x == b->x) && (a->y == b->y) &&\n            (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE;\n}\n\n/**\n *  \\brief Determine whether two rectangles intersect.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A,\n                                                     const SDL_Rect * B);\n\n/**\n *  \\brief Calculate the intersection of two rectangles.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A,\n                                                   const SDL_Rect * B,\n                                                   SDL_Rect * result);\n\n/**\n *  \\brief Calculate the union of two rectangles.\n */\nextern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A,\n                                           const SDL_Rect * B,\n                                           SDL_Rect * result);\n\n/**\n *  \\brief Calculate a minimal rectangle enclosing a set of points\n *\n *  \\return SDL_TRUE if any points were within the clipping rect\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points,\n                                                   int count,\n                                                   const SDL_Rect * clip,\n                                                   SDL_Rect * result);\n\n/**\n *  \\brief Calculate the intersection of a rectangle and line segment.\n *\n *  \\return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *\n                                                          rect, int *X1,\n                                                          int *Y1, int *X2,\n                                                          int *Y2);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_rect_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_render.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_render.h\n *\n *  Header file for SDL 2D rendering functions.\n *\n *  This API supports the following features:\n *      * single pixel points\n *      * single pixel lines\n *      * filled rectangles\n *      * texture images\n *\n *  The primitives may be drawn in opaque, blended, or additive modes.\n *\n *  The texture images may be drawn in opaque, blended, or additive modes.\n *  They can have an additional color tint or alpha modulation applied to\n *  them, and may also be stretched with linear interpolation.\n *\n *  This API is designed to accelerate simple 2D operations. You may\n *  want more functionality such as polygons and particle effects and\n *  in that case you should use SDL's OpenGL/Direct3D support or one\n *  of the many good 3D engines.\n *\n *  These functions must be called from the main thread.\n *  See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995\n */\n\n#ifndef SDL_render_h_\n#define SDL_render_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Flags used when creating a rendering context\n */\ntypedef enum\n{\n    SDL_RENDERER_SOFTWARE = 0x00000001,         /**< The renderer is a software fallback */\n    SDL_RENDERER_ACCELERATED = 0x00000002,      /**< The renderer uses hardware\n                                                     acceleration */\n    SDL_RENDERER_PRESENTVSYNC = 0x00000004,     /**< Present is synchronized\n                                                     with the refresh rate */\n    SDL_RENDERER_TARGETTEXTURE = 0x00000008     /**< The renderer supports\n                                                     rendering to texture */\n} SDL_RendererFlags;\n\n/**\n *  \\brief Information on the capabilities of a render driver or context.\n */\ntypedef struct SDL_RendererInfo\n{\n    const char *name;           /**< The name of the renderer */\n    Uint32 flags;               /**< Supported ::SDL_RendererFlags */\n    Uint32 num_texture_formats; /**< The number of available texture formats */\n    Uint32 texture_formats[16]; /**< The available texture formats */\n    int max_texture_width;      /**< The maximum texture width */\n    int max_texture_height;     /**< The maximum texture height */\n} SDL_RendererInfo;\n\n/**\n *  \\brief The access pattern allowed for a texture.\n */\ntypedef enum\n{\n    SDL_TEXTUREACCESS_STATIC,    /**< Changes rarely, not lockable */\n    SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */\n    SDL_TEXTUREACCESS_TARGET     /**< Texture can be used as a render target */\n} SDL_TextureAccess;\n\n/**\n *  \\brief The texture channel modulation used in SDL_RenderCopy().\n */\ntypedef enum\n{\n    SDL_TEXTUREMODULATE_NONE = 0x00000000,     /**< No modulation */\n    SDL_TEXTUREMODULATE_COLOR = 0x00000001,    /**< srcC = srcC * color */\n    SDL_TEXTUREMODULATE_ALPHA = 0x00000002     /**< srcA = srcA * alpha */\n} SDL_TextureModulate;\n\n/**\n *  \\brief Flip constants for SDL_RenderCopyEx\n */\ntypedef enum\n{\n    SDL_FLIP_NONE = 0x00000000,     /**< Do not flip */\n    SDL_FLIP_HORIZONTAL = 0x00000001,    /**< flip horizontally */\n    SDL_FLIP_VERTICAL = 0x00000002     /**< flip vertically */\n} SDL_RendererFlip;\n\n/**\n *  \\brief A structure representing rendering state\n */\nstruct SDL_Renderer;\ntypedef struct SDL_Renderer SDL_Renderer;\n\n/**\n *  \\brief An efficient driver-specific representation of pixel data\n */\nstruct SDL_Texture;\ntypedef struct SDL_Texture SDL_Texture;\n\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of 2D rendering drivers available for the current\n *         display.\n *\n *  A render driver is a set of code that handles rendering and texture\n *  management on a particular display.  Normally there is only one, but\n *  some drivers may have several available with different capabilities.\n *\n *  \\sa SDL_GetRenderDriverInfo()\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);\n\n/**\n *  \\brief Get information about a specific 2D rendering driver for the current\n *         display.\n *\n *  \\param index The index of the driver to query information about.\n *  \\param info  A pointer to an SDL_RendererInfo struct to be filled with\n *               information on the rendering driver.\n *\n *  \\return 0 on success, -1 if the index was out of range.\n *\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,\n                                                    SDL_RendererInfo * info);\n\n/**\n *  \\brief Create a window and default renderer\n *\n *  \\param width    The width of the window\n *  \\param height   The height of the window\n *  \\param window_flags The flags used to create the window\n *  \\param window   A pointer filled with the window, or NULL on error\n *  \\param renderer A pointer filled with the renderer, or NULL on error\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer(\n                                int width, int height, Uint32 window_flags,\n                                SDL_Window **window, SDL_Renderer **renderer);\n\n\n/**\n *  \\brief Create a 2D rendering context for a window.\n *\n *  \\param window The window where rendering is displayed.\n *  \\param index    The index of the rendering driver to initialize, or -1 to\n *                  initialize the first one supporting the requested flags.\n *  \\param flags    ::SDL_RendererFlags.\n *\n *  \\return A valid rendering context or NULL if there was an error.\n *\n *  \\sa SDL_CreateSoftwareRenderer()\n *  \\sa SDL_GetRendererInfo()\n *  \\sa SDL_DestroyRenderer()\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,\n                                               int index, Uint32 flags);\n\n/**\n *  \\brief Create a 2D software rendering context for a surface.\n *\n *  \\param surface The surface where rendering is done.\n *\n *  \\return A valid rendering context or NULL if there was an error.\n *\n *  \\sa SDL_CreateRenderer()\n *  \\sa SDL_DestroyRenderer()\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);\n\n/**\n *  \\brief Get the renderer associated with a window.\n */\nextern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);\n\n/**\n *  \\brief Get information about a rendering context.\n */\nextern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,\n                                                SDL_RendererInfo * info);\n\n/**\n *  \\brief Get the output size in pixels of a rendering context.\n */\nextern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Create a texture for a rendering context.\n *\n *  \\param renderer The renderer.\n *  \\param format The format of the texture.\n *  \\param access One of the enumerated values in ::SDL_TextureAccess.\n *  \\param w      The width of the texture in pixels.\n *  \\param h      The height of the texture in pixels.\n *\n *  \\return The created texture is returned, or NULL if no rendering context was\n *          active,  the format was unsupported, or the width or height were out\n *          of range.\n *\n *  \\note The contents of the texture are not defined at creation.\n *\n *  \\sa SDL_QueryTexture()\n *  \\sa SDL_UpdateTexture()\n *  \\sa SDL_DestroyTexture()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,\n                                                        Uint32 format,\n                                                        int access, int w,\n                                                        int h);\n\n/**\n *  \\brief Create a texture from an existing surface.\n *\n *  \\param renderer The renderer.\n *  \\param surface The surface containing pixel data used to fill the texture.\n *\n *  \\return The created texture is returned, or NULL on error.\n *\n *  \\note The surface is not modified or freed by this function.\n *\n *  \\sa SDL_QueryTexture()\n *  \\sa SDL_DestroyTexture()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface);\n\n/**\n *  \\brief Query the attributes of a texture\n *\n *  \\param texture A texture to be queried.\n *  \\param format  A pointer filled in with the raw format of the texture.  The\n *                 actual format may differ, but pixel transfers will use this\n *                 format.\n *  \\param access  A pointer filled in with the actual access to the texture.\n *  \\param w       A pointer filled in with the width of the texture in pixels.\n *  \\param h       A pointer filled in with the height of the texture in pixels.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n */\nextern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,\n                                             Uint32 * format, int *access,\n                                             int *w, int *h);\n\n/**\n *  \\brief Set an additional color value used in render copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param r       The red color value multiplied into copy operations.\n *  \\param g       The green color value multiplied into copy operations.\n *  \\param b       The blue color value multiplied into copy operations.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or color modulation\n *          is not supported.\n *\n *  \\sa SDL_GetTextureColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,\n                                                   Uint8 r, Uint8 g, Uint8 b);\n\n\n/**\n *  \\brief Get the additional color value used in render copy operations.\n *\n *  \\param texture The texture to query.\n *  \\param r         A pointer filled in with the current red color value.\n *  \\param g         A pointer filled in with the current green color value.\n *  \\param b         A pointer filled in with the current blue color value.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,\n                                                   Uint8 * r, Uint8 * g,\n                                                   Uint8 * b);\n\n/**\n *  \\brief Set an additional alpha value used in render copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param alpha     The alpha value multiplied into copy operations.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or alpha modulation\n *          is not supported.\n *\n *  \\sa SDL_GetTextureAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,\n                                                   Uint8 alpha);\n\n/**\n *  \\brief Get the additional alpha value used in render copy operations.\n *\n *  \\param texture The texture to query.\n *  \\param alpha     A pointer filled in with the current alpha value.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,\n                                                   Uint8 * alpha);\n\n/**\n *  \\brief Set the blend mode used for texture copy operations.\n *\n *  \\param texture The texture to update.\n *  \\param blendMode ::SDL_BlendMode to use for texture blending.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or the blend mode is\n *          not supported.\n *\n *  \\note If the blend mode is not supported, the closest supported mode is\n *        chosen.\n *\n *  \\sa SDL_GetTextureBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,\n                                                    SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for texture copy operations.\n *\n *  \\param texture   The texture to query.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\sa SDL_SetTextureBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,\n                                                    SDL_BlendMode *blendMode);\n\n/**\n *  \\brief Update the given texture rectangle with new pixel data.\n *\n *  \\param texture   The texture to update\n *  \\param rect      A pointer to the rectangle of pixels to update, or NULL to\n *                   update the entire texture.\n *  \\param pixels    The raw pixel data in the format of the texture.\n *  \\param pitch     The number of bytes in a row of pixel data, including padding between lines.\n *\n *  The pixel data must be in the format of the texture. The pixel format can be\n *  queried with SDL_QueryTexture.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\note This is a fairly slow function.\n */\nextern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,\n                                              const SDL_Rect * rect,\n                                              const void *pixels, int pitch);\n\n/**\n *  \\brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.\n *\n *  \\param texture   The texture to update\n *  \\param rect      A pointer to the rectangle of pixels to update, or NULL to\n *                   update the entire texture.\n *  \\param Yplane    The raw pixel data for the Y plane.\n *  \\param Ypitch    The number of bytes between rows of pixel data for the Y plane.\n *  \\param Uplane    The raw pixel data for the U plane.\n *  \\param Upitch    The number of bytes between rows of pixel data for the U plane.\n *  \\param Vplane    The raw pixel data for the V plane.\n *  \\param Vpitch    The number of bytes between rows of pixel data for the V plane.\n *\n *  \\return 0 on success, or -1 if the texture is not valid.\n *\n *  \\note You can use SDL_UpdateTexture() as long as your pixel data is\n *        a contiguous block of Y and U/V planes in the proper order, but\n *        this function is available if your pixel data is not contiguous.\n */\nextern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture,\n                                                 const SDL_Rect * rect,\n                                                 const Uint8 *Yplane, int Ypitch,\n                                                 const Uint8 *Uplane, int Upitch,\n                                                 const Uint8 *Vplane, int Vpitch);\n\n/**\n *  \\brief Lock a portion of the texture for write-only pixel access.\n *\n *  \\param texture   The texture to lock for access, which was created with\n *                   ::SDL_TEXTUREACCESS_STREAMING.\n *  \\param rect      A pointer to the rectangle to lock for access. If the rect\n *                   is NULL, the entire texture will be locked.\n *  \\param pixels    This is filled in with a pointer to the locked pixels,\n *                   appropriately offset by the locked area.\n *  \\param pitch     This is filled in with the pitch of the locked pixels.\n *\n *  \\return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.\n *\n *  \\sa SDL_UnlockTexture()\n */\nextern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,\n                                            const SDL_Rect * rect,\n                                            void **pixels, int *pitch);\n\n/**\n *  \\brief Unlock a texture, uploading the changes to video memory, if needed.\n *\n *  \\sa SDL_LockTexture()\n */\nextern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);\n\n/**\n * \\brief Determines whether a window supports the use of render targets\n *\n * \\param renderer The renderer that will be checked\n *\n * \\return SDL_TRUE if supported, SDL_FALSE if not.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);\n\n/**\n * \\brief Set a texture as the current rendering target.\n *\n * \\param renderer The renderer.\n * \\param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target\n *\n * \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_GetRenderTarget()\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,\n                                                SDL_Texture *texture);\n\n/**\n * \\brief Get the current render target or NULL for the default render target.\n *\n * \\return The current render target\n *\n *  \\sa SDL_SetRenderTarget()\n */\nextern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer);\n\n/**\n *  \\brief Set device independent resolution for rendering\n *\n *  \\param renderer The renderer for which resolution should be set.\n *  \\param w      The width of the logical resolution\n *  \\param h      The height of the logical resolution\n *\n *  This function uses the viewport and scaling functionality to allow a fixed logical\n *  resolution for rendering, regardless of the actual output resolution.  If the actual\n *  output resolution doesn't have the same aspect ratio the output rendering will be\n *  centered within the output display.\n *\n *  If the output display is a window, mouse events in the window will be filtered\n *  and scaled so they seem to arrive within the logical resolution.\n *\n *  \\note If this function results in scaling or subpixel drawing by the\n *        rendering backend, it will be handled using the appropriate\n *        quality hints.\n *\n *  \\sa SDL_RenderGetLogicalSize()\n *  \\sa SDL_RenderSetScale()\n *  \\sa SDL_RenderSetViewport()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h);\n\n/**\n *  \\brief Get device independent resolution for rendering\n *\n *  \\param renderer The renderer from which resolution should be queried.\n *  \\param w      A pointer filled with the width of the logical resolution\n *  \\param h      A pointer filled with the height of the logical resolution\n *\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);\n\n/**\n *  \\brief Set whether to force integer scales for resolution-independent rendering\n *\n *  \\param renderer The renderer for which integer scaling should be set.\n *  \\param enable   Enable or disable integer scaling\n *\n *  This function restricts the logical viewport to integer values - that is, when\n *  a resolution is between two multiples of a logical size, the viewport size is\n *  rounded down to the lower multiple.\n *\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,\n                                                      SDL_bool enable);\n\n/**\n *  \\brief Get whether integer scales are forced for resolution-independent rendering\n *\n *  \\param renderer The renderer from which integer scaling should be queried.\n *\n *  \\sa SDL_RenderSetIntegerScale()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);\n\n/**\n *  \\brief Set the drawing area for rendering on the current target.\n *\n *  \\param renderer The renderer for which the drawing area should be set.\n *  \\param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target.\n *\n *  The x,y of the viewport rect represents the origin for rendering.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\note If the window associated with the renderer is resized, the viewport is automatically reset.\n *\n *  \\sa SDL_RenderGetViewport()\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,\n                                                  const SDL_Rect * rect);\n\n/**\n *  \\brief Get the drawing area for the current target.\n *\n *  \\sa SDL_RenderSetViewport()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,\n                                                   SDL_Rect * rect);\n\n/**\n *  \\brief Set the clip rectangle for the current target.\n *\n *  \\param renderer The renderer for which clip rectangle should be set.\n *  \\param rect   A pointer to the rectangle to set as the clip rectangle, or\n *                NULL to disable clipping.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_RenderGetClipRect()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,\n                                                  const SDL_Rect * rect);\n\n/**\n *  \\brief Get the clip rectangle for the current target.\n *\n *  \\param renderer The renderer from which clip rectangle should be queried.\n *  \\param rect   A pointer filled in with the current clip rectangle, or\n *                an empty rectangle if clipping is disabled.\n *\n *  \\sa SDL_RenderSetClipRect()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,\n                                                   SDL_Rect * rect);\n\n/**\n *  \\brief Get whether clipping is enabled on the given renderer.\n *\n *  \\param renderer The renderer from which clip state should be queried.\n *\n *  \\sa SDL_RenderGetClipRect()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);\n\n\n/**\n *  \\brief Set the drawing scale for rendering on the current target.\n *\n *  \\param renderer The renderer for which the drawing scale should be set.\n *  \\param scaleX The horizontal scaling factor\n *  \\param scaleY The vertical scaling factor\n *\n *  The drawing coordinates are scaled by the x/y scaling factors\n *  before they are used by the renderer.  This allows resolution\n *  independent drawing with a single coordinate system.\n *\n *  \\note If this results in scaling or subpixel drawing by the\n *        rendering backend, it will be handled using the appropriate\n *        quality hints.  For best results use integer scaling factors.\n *\n *  \\sa SDL_RenderGetScale()\n *  \\sa SDL_RenderSetLogicalSize()\n */\nextern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,\n                                               float scaleX, float scaleY);\n\n/**\n *  \\brief Get the drawing scale for the current target.\n *\n *  \\param renderer The renderer from which drawing scale should be queried.\n *  \\param scaleX A pointer filled in with the horizontal scaling factor\n *  \\param scaleY A pointer filled in with the vertical scaling factor\n *\n *  \\sa SDL_RenderSetScale()\n */\nextern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,\n                                               float *scaleX, float *scaleY);\n\n/**\n *  \\brief Set the color used for drawing operations (Rect, Line and Clear).\n *\n *  \\param renderer The renderer for which drawing color should be set.\n *  \\param r The red value used to draw on the rendering target.\n *  \\param g The green value used to draw on the rendering target.\n *  \\param b The blue value used to draw on the rendering target.\n *  \\param a The alpha value used to draw on the rendering target, usually\n *           ::SDL_ALPHA_OPAQUE (255).\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer,\n                                           Uint8 r, Uint8 g, Uint8 b,\n                                           Uint8 a);\n\n/**\n *  \\brief Get the color used for drawing operations (Rect, Line and Clear).\n *\n *  \\param renderer The renderer from which drawing color should be queried.\n *  \\param r A pointer to the red value used to draw on the rendering target.\n *  \\param g A pointer to the green value used to draw on the rendering target.\n *  \\param b A pointer to the blue value used to draw on the rendering target.\n *  \\param a A pointer to the alpha value used to draw on the rendering target,\n *           usually ::SDL_ALPHA_OPAQUE (255).\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,\n                                           Uint8 * r, Uint8 * g, Uint8 * b,\n                                           Uint8 * a);\n\n/**\n *  \\brief Set the blend mode used for drawing operations (Fill and Line).\n *\n *  \\param renderer The renderer for which blend mode should be set.\n *  \\param blendMode ::SDL_BlendMode to use for blending.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\note If the blend mode is not supported, the closest supported mode is\n *        chosen.\n *\n *  \\sa SDL_GetRenderDrawBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,\n                                                       SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for drawing operations.\n *\n *  \\param renderer The renderer from which blend mode should be queried.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 on error\n *\n *  \\sa SDL_SetRenderDrawBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,\n                                                       SDL_BlendMode *blendMode);\n\n/**\n *  \\brief Clear the current rendering target with the drawing color\n *\n *  This function clears the entire rendering target, ignoring the viewport and\n *  the clip rectangle.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);\n\n/**\n *  \\brief Draw a point on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a point.\n *  \\param x The x coordinate of the point.\n *  \\param y The y coordinate of the point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,\n                                                int x, int y);\n\n/**\n *  \\brief Draw multiple points on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple points.\n *  \\param points The points to draw\n *  \\param count The number of points to draw\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,\n                                                 const SDL_Point * points,\n                                                 int count);\n\n/**\n *  \\brief Draw a line on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a line.\n *  \\param x1 The x coordinate of the start point.\n *  \\param y1 The y coordinate of the start point.\n *  \\param x2 The x coordinate of the end point.\n *  \\param y2 The y coordinate of the end point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,\n                                               int x1, int y1, int x2, int y2);\n\n/**\n *  \\brief Draw a series of connected lines on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple lines.\n *  \\param points The points along the lines\n *  \\param count The number of points, drawing count-1 lines\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,\n                                                const SDL_Point * points,\n                                                int count);\n\n/**\n *  \\brief Draw a rectangle on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,\n                                               const SDL_Rect * rect);\n\n/**\n *  \\brief Draw some number of rectangles on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,\n                                                const SDL_Rect * rects,\n                                                int count);\n\n/**\n *  \\brief Fill a rectangle on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL for the entire\n *              rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,\n                                               const SDL_Rect * rect);\n\n/**\n *  \\brief Fill some number of rectangles on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,\n                                                const SDL_Rect * rects,\n                                                int count);\n\n/**\n *  \\brief Copy a portion of the texture to the current rendering target.\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,\n                                           SDL_Texture * texture,\n                                           const SDL_Rect * srcrect,\n                                           const SDL_Rect * dstrect);\n\n/**\n *  \\brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *  \\param angle    An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction\n *  \\param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).\n *  \\param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,\n                                           SDL_Texture * texture,\n                                           const SDL_Rect * srcrect,\n                                           const SDL_Rect * dstrect,\n                                           const double angle,\n                                           const SDL_Point *center,\n                                           const SDL_RendererFlip flip);\n\n\n/**\n *  \\brief Draw a point on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a point.\n *  \\param x The x coordinate of the point.\n *  \\param y The y coordinate of the point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,\n                                                 float x, float y);\n\n/**\n *  \\brief Draw multiple points on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple points.\n *  \\param points The points to draw\n *  \\param count The number of points to draw\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,\n                                                  const SDL_FPoint * points,\n                                                  int count);\n\n/**\n *  \\brief Draw a line on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a line.\n *  \\param x1 The x coordinate of the start point.\n *  \\param y1 The y coordinate of the start point.\n *  \\param x2 The x coordinate of the end point.\n *  \\param y2 The y coordinate of the end point.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,\n                                                float x1, float y1, float x2, float y2);\n\n/**\n *  \\brief Draw a series of connected lines on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple lines.\n *  \\param points The points along the lines\n *  \\param count The number of points, drawing count-1 lines\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,\n                                                const SDL_FPoint * points,\n                                                int count);\n\n/**\n *  \\brief Draw a rectangle on the current rendering target.\n *\n *  \\param renderer The renderer which should draw a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,\n                                               const SDL_FRect * rect);\n\n/**\n *  \\brief Draw some number of rectangles on the current rendering target.\n *\n *  \\param renderer The renderer which should draw multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,\n                                                 const SDL_FRect * rects,\n                                                 int count);\n\n/**\n *  \\brief Fill a rectangle on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill a rectangle.\n *  \\param rect A pointer to the destination rectangle, or NULL for the entire\n *              rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,\n                                                const SDL_FRect * rect);\n\n/**\n *  \\brief Fill some number of rectangles on the current rendering target with the drawing color.\n *\n *  \\param renderer The renderer which should fill multiple rectangles.\n *  \\param rects A pointer to an array of destination rectangles.\n *  \\param count The number of rectangles.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,\n                                                 const SDL_FRect * rects,\n                                                 int count);\n\n/**\n *  \\brief Copy a portion of the texture to the current rendering target.\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,\n                                            SDL_Texture * texture,\n                                            const SDL_Rect * srcrect,\n                                            const SDL_FRect * dstrect);\n\n/**\n *  \\brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center\n *\n *  \\param renderer The renderer which should copy parts of a texture.\n *  \\param texture The source texture.\n *  \\param srcrect   A pointer to the source rectangle, or NULL for the entire\n *                   texture.\n *  \\param dstrect   A pointer to the destination rectangle, or NULL for the\n *                   entire rendering target.\n *  \\param angle    An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction\n *  \\param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).\n *  \\param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture\n *\n *  \\return 0 on success, or -1 on error\n */\nextern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,\n                                            SDL_Texture * texture,\n                                            const SDL_Rect * srcrect,\n                                            const SDL_FRect * dstrect,\n                                            const double angle,\n                                            const SDL_FPoint *center,\n                                            const SDL_RendererFlip flip);\n\n/**\n *  \\brief Read pixels from the current rendering target.\n *\n *  \\param renderer The renderer from which pixels should be read.\n *  \\param rect   A pointer to the rectangle to read, or NULL for the entire\n *                render target.\n *  \\param format The desired format of the pixel data, or 0 to use the format\n *                of the rendering target\n *  \\param pixels A pointer to be filled in with the pixel data\n *  \\param pitch  The pitch of the pixels parameter.\n *\n *  \\return 0 on success, or -1 if pixel reading is not supported.\n *\n *  \\warning This is a very slow operation, and should not be used frequently.\n */\nextern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,\n                                                 const SDL_Rect * rect,\n                                                 Uint32 format,\n                                                 void *pixels, int pitch);\n\n/**\n *  \\brief Update the screen with rendering performed.\n */\nextern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer);\n\n/**\n *  \\brief Destroy the specified texture.\n *\n *  \\sa SDL_CreateTexture()\n *  \\sa SDL_CreateTextureFromSurface()\n */\nextern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);\n\n/**\n *  \\brief Destroy the rendering context for a window and free associated\n *         textures.\n *\n *  \\sa SDL_CreateRenderer()\n */\nextern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);\n\n/**\n *  \\brief Force the rendering context to flush any pending commands to the\n *         underlying rendering API.\n *\n *  You do not need to (and in fact, shouldn't) call this function unless\n *  you are planning to call into OpenGL/Direct3D/Metal/whatever directly\n *  in addition to using an SDL_Renderer.\n *\n *  This is for a very-specific case: if you are using SDL's render API,\n *  you asked for a specific renderer backend (OpenGL, Direct3D, etc),\n *  you set SDL_HINT_RENDER_BATCHING to \"1\", and you plan to make\n *  OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of\n *  this applies, you should call SDL_RenderFlush() between calls to SDL's\n *  render API and the low-level API you're using in cooperation.\n *\n *  In all other cases, you can ignore this function. This is only here to\n *  get maximum performance out of a specific situation. In all other cases,\n *  SDL will do the right thing, perhaps at a performance loss.\n *\n *  This function is first available in SDL 2.0.10, and is not needed in\n *  2.0.9 and earlier, as earlier versions did not queue rendering commands\n *  at all, instead flushing them to the OS immediately.\n */\nextern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);\n\n\n/**\n *  \\brief Bind the texture to the current OpenGL/ES/ES2 context for use with\n *         OpenGL instructions.\n *\n *  \\param texture  The SDL texture to bind\n *  \\param texw     A pointer to a float that will be filled with the texture width\n *  \\param texh     A pointer to a float that will be filled with the texture height\n *\n *  \\return 0 on success, or -1 if the operation is not supported\n */\nextern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);\n\n/**\n *  \\brief Unbind a texture from the current OpenGL/ES/ES2 context.\n *\n *  \\param texture  The SDL texture to unbind\n *\n *  \\return 0 on success, or -1 if the operation is not supported\n */\nextern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);\n\n/**\n *  \\brief Get the CAMetalLayer associated with the given Metal renderer\n *\n *  \\param renderer The renderer to query\n *\n *  \\return CAMetalLayer* on success, or NULL if the renderer isn't a Metal renderer\n *\n *  \\sa SDL_RenderGetMetalCommandEncoder()\n */\nextern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);\n\n/**\n *  \\brief Get the Metal command encoder for the current frame\n *\n *  \\param renderer The renderer to query\n *\n *  \\return id<MTLRenderCommandEncoder> on success, or NULL if the renderer isn't a Metal renderer\n *\n *  \\sa SDL_RenderGetMetalLayer()\n */\nextern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_render_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_revision.h",
    "content": "#define SDL_REVISION \"hg-12952:bc90ce38f1e2\"\n#define SDL_REVISION_NUMBER 12952\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_rwops.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_rwops.h\n *\n *  This file provides a general interface for SDL to read and write\n *  data streams.  It can easily be extended to files, memory, etc.\n */\n\n#ifndef SDL_rwops_h_\n#define SDL_rwops_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* RWops Types */\n#define SDL_RWOPS_UNKNOWN   0U  /**< Unknown stream type */\n#define SDL_RWOPS_WINFILE   1U  /**< Win32 file */\n#define SDL_RWOPS_STDFILE   2U  /**< Stdio file */\n#define SDL_RWOPS_JNIFILE   3U  /**< Android asset */\n#define SDL_RWOPS_MEMORY    4U  /**< Memory stream */\n#define SDL_RWOPS_MEMORY_RO 5U  /**< Read-Only memory stream */\n\n/**\n * This is the read/write operation structure -- very basic.\n */\ntypedef struct SDL_RWops\n{\n    /**\n     *  Return the size of the file in this rwops, or -1 if unknown\n     */\n    Sint64 (SDLCALL * size) (struct SDL_RWops * context);\n\n    /**\n     *  Seek to \\c offset relative to \\c whence, one of stdio's whence values:\n     *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END\n     *\n     *  \\return the final offset in the data stream, or -1 on error.\n     */\n    Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset,\n                             int whence);\n\n    /**\n     *  Read up to \\c maxnum objects each of size \\c size from the data\n     *  stream to the area pointed at by \\c ptr.\n     *\n     *  \\return the number of objects read, or 0 at error or end of file.\n     */\n    size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr,\n                             size_t size, size_t maxnum);\n\n    /**\n     *  Write exactly \\c num objects each of size \\c size from the area\n     *  pointed at by \\c ptr to data stream.\n     *\n     *  \\return the number of objects written, or 0 at error or end of file.\n     */\n    size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr,\n                              size_t size, size_t num);\n\n    /**\n     *  Close and free an allocated SDL_RWops structure.\n     *\n     *  \\return 0 if successful or -1 on write error when flushing data.\n     */\n    int (SDLCALL * close) (struct SDL_RWops * context);\n\n    Uint32 type;\n    union\n    {\n#if defined(__ANDROID__)\n        struct\n        {\n            void *fileNameRef;\n            void *inputStreamRef;\n            void *readableByteChannelRef;\n            void *readMethod;\n            void *assetFileDescriptorRef;\n            long position;\n            long size;\n            long offset;\n            int fd;\n        } androidio;\n#elif defined(__WIN32__)\n        struct\n        {\n            SDL_bool append;\n            void *h;\n            struct\n            {\n                void *data;\n                size_t size;\n                size_t left;\n            } buffer;\n        } windowsio;\n#endif\n\n#ifdef HAVE_STDIO_H\n        struct\n        {\n            SDL_bool autoclose;\n            FILE *fp;\n        } stdio;\n#endif\n        struct\n        {\n            Uint8 *base;\n            Uint8 *here;\n            Uint8 *stop;\n        } mem;\n        struct\n        {\n            void *data1;\n            void *data2;\n        } unknown;\n    } hidden;\n\n} SDL_RWops;\n\n\n/**\n *  \\name RWFrom functions\n *\n *  Functions to create SDL_RWops structures from various data streams.\n */\n/* @{ */\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,\n                                                  const char *mode);\n\n#ifdef HAVE_STDIO_H\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,\n                                                SDL_bool autoclose);\n#else\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,\n                                                SDL_bool autoclose);\n#endif\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);\nextern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,\n                                                      int size);\n\n/* @} *//* RWFrom functions */\n\n\nextern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);\nextern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);\n\n#define RW_SEEK_SET 0       /**< Seek from the beginning of data */\n#define RW_SEEK_CUR 1       /**< Seek relative to current read point */\n#define RW_SEEK_END 2       /**< Seek relative to the end of data */\n\n/**\n *  Return the size of the file in this rwops, or -1 if unknown\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);\n\n/**\n *  Seek to \\c offset relative to \\c whence, one of stdio's whence values:\n *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END\n *\n *  \\return the final offset in the data stream, or -1 on error.\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,\n                                          Sint64 offset, int whence);\n\n/**\n *  Return the current offset in the data stream, or -1 on error.\n */\nextern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);\n\n/**\n *  Read up to \\c maxnum objects each of size \\c size from the data\n *  stream to the area pointed at by \\c ptr.\n *\n *  \\return the number of objects read, or 0 at error or end of file.\n */\nextern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,\n                                          void *ptr, size_t size, size_t maxnum);\n\n/**\n *  Write exactly \\c num objects each of size \\c size from the area\n *  pointed at by \\c ptr to data stream.\n *\n *  \\return the number of objects written, or 0 at error or end of file.\n */\nextern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,\n                                           const void *ptr, size_t size, size_t num);\n\n/**\n *  Close and free an allocated SDL_RWops structure.\n *\n *  \\return 0 if successful or -1 on write error when flushing data.\n */\nextern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);\n\n/**\n *  Load all the data from an SDL data stream.\n *\n *  The data is allocated with a zero byte at the end (null terminated)\n *\n *  If \\c datasize is not NULL, it is filled with the size of the data read.\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The data should be freed with SDL_free().\n *\n *  \\return the data, or NULL if there was an error.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,\n                                                    int freesrc);\n\n/**\n *  Load an entire file.\n *\n *  The data is allocated with a zero byte at the end (null terminated)\n *\n *  If \\c datasize is not NULL, it is filled with the size of the data read.\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The data should be freed with SDL_free().\n *\n *  \\return the data, or NULL if there was an error.\n */\nextern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);\n\n/**\n *  \\name Read endian functions\n *\n *  Read an item of the specified endianness and return in native format.\n */\n/* @{ */\nextern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src);\nextern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);\nextern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);\nextern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);\nextern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);\nextern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);\nextern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);\n/* @} *//* Read endian functions */\n\n/**\n *  \\name Write endian functions\n *\n *  Write an item of native format to the specified endianness.\n */\n/* @{ */\nextern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);\nextern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);\n/* @} *//* Write endian functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_rwops_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_scancode.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_scancode.h\n *\n *  Defines keyboard scancodes.\n */\n\n#ifndef SDL_scancode_h_\n#define SDL_scancode_h_\n\n#include \"SDL_stdinc.h\"\n\n/**\n *  \\brief The SDL keyboard scancode representation.\n *\n *  Values of this type are used to represent keyboard keys, among other places\n *  in the \\link SDL_Keysym::scancode key.keysym.scancode \\endlink field of the\n *  SDL_Event structure.\n *\n *  The values in this enumeration are based on the USB usage page standard:\n *  https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf\n */\ntypedef enum\n{\n    SDL_SCANCODE_UNKNOWN = 0,\n\n    /**\n     *  \\name Usage page 0x07\n     *\n     *  These values are from usage page 0x07 (USB keyboard page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_A = 4,\n    SDL_SCANCODE_B = 5,\n    SDL_SCANCODE_C = 6,\n    SDL_SCANCODE_D = 7,\n    SDL_SCANCODE_E = 8,\n    SDL_SCANCODE_F = 9,\n    SDL_SCANCODE_G = 10,\n    SDL_SCANCODE_H = 11,\n    SDL_SCANCODE_I = 12,\n    SDL_SCANCODE_J = 13,\n    SDL_SCANCODE_K = 14,\n    SDL_SCANCODE_L = 15,\n    SDL_SCANCODE_M = 16,\n    SDL_SCANCODE_N = 17,\n    SDL_SCANCODE_O = 18,\n    SDL_SCANCODE_P = 19,\n    SDL_SCANCODE_Q = 20,\n    SDL_SCANCODE_R = 21,\n    SDL_SCANCODE_S = 22,\n    SDL_SCANCODE_T = 23,\n    SDL_SCANCODE_U = 24,\n    SDL_SCANCODE_V = 25,\n    SDL_SCANCODE_W = 26,\n    SDL_SCANCODE_X = 27,\n    SDL_SCANCODE_Y = 28,\n    SDL_SCANCODE_Z = 29,\n\n    SDL_SCANCODE_1 = 30,\n    SDL_SCANCODE_2 = 31,\n    SDL_SCANCODE_3 = 32,\n    SDL_SCANCODE_4 = 33,\n    SDL_SCANCODE_5 = 34,\n    SDL_SCANCODE_6 = 35,\n    SDL_SCANCODE_7 = 36,\n    SDL_SCANCODE_8 = 37,\n    SDL_SCANCODE_9 = 38,\n    SDL_SCANCODE_0 = 39,\n\n    SDL_SCANCODE_RETURN = 40,\n    SDL_SCANCODE_ESCAPE = 41,\n    SDL_SCANCODE_BACKSPACE = 42,\n    SDL_SCANCODE_TAB = 43,\n    SDL_SCANCODE_SPACE = 44,\n\n    SDL_SCANCODE_MINUS = 45,\n    SDL_SCANCODE_EQUALS = 46,\n    SDL_SCANCODE_LEFTBRACKET = 47,\n    SDL_SCANCODE_RIGHTBRACKET = 48,\n    SDL_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return\n                                  *   key on ISO keyboards and at the right end\n                                  *   of the QWERTY row on ANSI keyboards.\n                                  *   Produces REVERSE SOLIDUS (backslash) and\n                                  *   VERTICAL LINE in a US layout, REVERSE\n                                  *   SOLIDUS and VERTICAL LINE in a UK Mac\n                                  *   layout, NUMBER SIGN and TILDE in a UK\n                                  *   Windows layout, DOLLAR SIGN and POUND SIGN\n                                  *   in a Swiss German layout, NUMBER SIGN and\n                                  *   APOSTROPHE in a German layout, GRAVE\n                                  *   ACCENT and POUND SIGN in a French Mac\n                                  *   layout, and ASTERISK and MICRO SIGN in a\n                                  *   French Windows layout.\n                                  */\n    SDL_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code\n                                  *   instead of 49 for the same key, but all\n                                  *   OSes I've seen treat the two codes\n                                  *   identically. So, as an implementor, unless\n                                  *   your keyboard generates both of those\n                                  *   codes and your OS treats them differently,\n                                  *   you should generate SDL_SCANCODE_BACKSLASH\n                                  *   instead of this code. As a user, you\n                                  *   should not rely on this code because SDL\n                                  *   will never generate it with most (all?)\n                                  *   keyboards.\n                                  */\n    SDL_SCANCODE_SEMICOLON = 51,\n    SDL_SCANCODE_APOSTROPHE = 52,\n    SDL_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI\n                              *   and ISO keyboards). Produces GRAVE ACCENT and\n                              *   TILDE in a US Windows layout and in US and UK\n                              *   Mac layouts on ANSI keyboards, GRAVE ACCENT\n                              *   and NOT SIGN in a UK Windows layout, SECTION\n                              *   SIGN and PLUS-MINUS SIGN in US and UK Mac\n                              *   layouts on ISO keyboards, SECTION SIGN and\n                              *   DEGREE SIGN in a Swiss German layout (Mac:\n                              *   only on ISO keyboards), CIRCUMFLEX ACCENT and\n                              *   DEGREE SIGN in a German layout (Mac: only on\n                              *   ISO keyboards), SUPERSCRIPT TWO and TILDE in a\n                              *   French Windows layout, COMMERCIAL AT and\n                              *   NUMBER SIGN in a French Mac layout on ISO\n                              *   keyboards, and LESS-THAN SIGN and GREATER-THAN\n                              *   SIGN in a Swiss German, German, or French Mac\n                              *   layout on ANSI keyboards.\n                              */\n    SDL_SCANCODE_COMMA = 54,\n    SDL_SCANCODE_PERIOD = 55,\n    SDL_SCANCODE_SLASH = 56,\n\n    SDL_SCANCODE_CAPSLOCK = 57,\n\n    SDL_SCANCODE_F1 = 58,\n    SDL_SCANCODE_F2 = 59,\n    SDL_SCANCODE_F3 = 60,\n    SDL_SCANCODE_F4 = 61,\n    SDL_SCANCODE_F5 = 62,\n    SDL_SCANCODE_F6 = 63,\n    SDL_SCANCODE_F7 = 64,\n    SDL_SCANCODE_F8 = 65,\n    SDL_SCANCODE_F9 = 66,\n    SDL_SCANCODE_F10 = 67,\n    SDL_SCANCODE_F11 = 68,\n    SDL_SCANCODE_F12 = 69,\n\n    SDL_SCANCODE_PRINTSCREEN = 70,\n    SDL_SCANCODE_SCROLLLOCK = 71,\n    SDL_SCANCODE_PAUSE = 72,\n    SDL_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but\n                                   does send code 73, not 117) */\n    SDL_SCANCODE_HOME = 74,\n    SDL_SCANCODE_PAGEUP = 75,\n    SDL_SCANCODE_DELETE = 76,\n    SDL_SCANCODE_END = 77,\n    SDL_SCANCODE_PAGEDOWN = 78,\n    SDL_SCANCODE_RIGHT = 79,\n    SDL_SCANCODE_LEFT = 80,\n    SDL_SCANCODE_DOWN = 81,\n    SDL_SCANCODE_UP = 82,\n\n    SDL_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards\n                                     */\n    SDL_SCANCODE_KP_DIVIDE = 84,\n    SDL_SCANCODE_KP_MULTIPLY = 85,\n    SDL_SCANCODE_KP_MINUS = 86,\n    SDL_SCANCODE_KP_PLUS = 87,\n    SDL_SCANCODE_KP_ENTER = 88,\n    SDL_SCANCODE_KP_1 = 89,\n    SDL_SCANCODE_KP_2 = 90,\n    SDL_SCANCODE_KP_3 = 91,\n    SDL_SCANCODE_KP_4 = 92,\n    SDL_SCANCODE_KP_5 = 93,\n    SDL_SCANCODE_KP_6 = 94,\n    SDL_SCANCODE_KP_7 = 95,\n    SDL_SCANCODE_KP_8 = 96,\n    SDL_SCANCODE_KP_9 = 97,\n    SDL_SCANCODE_KP_0 = 98,\n    SDL_SCANCODE_KP_PERIOD = 99,\n\n    SDL_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO\n                                        *   keyboards have over ANSI ones,\n                                        *   located between left shift and Y.\n                                        *   Produces GRAVE ACCENT and TILDE in a\n                                        *   US or UK Mac layout, REVERSE SOLIDUS\n                                        *   (backslash) and VERTICAL LINE in a\n                                        *   US or UK Windows layout, and\n                                        *   LESS-THAN SIGN and GREATER-THAN SIGN\n                                        *   in a Swiss German, German, or French\n                                        *   layout. */\n    SDL_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */\n    SDL_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,\n                               *   not a physical key - but some Mac keyboards\n                               *   do have a power key. */\n    SDL_SCANCODE_KP_EQUALS = 103,\n    SDL_SCANCODE_F13 = 104,\n    SDL_SCANCODE_F14 = 105,\n    SDL_SCANCODE_F15 = 106,\n    SDL_SCANCODE_F16 = 107,\n    SDL_SCANCODE_F17 = 108,\n    SDL_SCANCODE_F18 = 109,\n    SDL_SCANCODE_F19 = 110,\n    SDL_SCANCODE_F20 = 111,\n    SDL_SCANCODE_F21 = 112,\n    SDL_SCANCODE_F22 = 113,\n    SDL_SCANCODE_F23 = 114,\n    SDL_SCANCODE_F24 = 115,\n    SDL_SCANCODE_EXECUTE = 116,\n    SDL_SCANCODE_HELP = 117,\n    SDL_SCANCODE_MENU = 118,\n    SDL_SCANCODE_SELECT = 119,\n    SDL_SCANCODE_STOP = 120,\n    SDL_SCANCODE_AGAIN = 121,   /**< redo */\n    SDL_SCANCODE_UNDO = 122,\n    SDL_SCANCODE_CUT = 123,\n    SDL_SCANCODE_COPY = 124,\n    SDL_SCANCODE_PASTE = 125,\n    SDL_SCANCODE_FIND = 126,\n    SDL_SCANCODE_MUTE = 127,\n    SDL_SCANCODE_VOLUMEUP = 128,\n    SDL_SCANCODE_VOLUMEDOWN = 129,\n/* not sure whether there's a reason to enable these */\n/*     SDL_SCANCODE_LOCKINGCAPSLOCK = 130,  */\n/*     SDL_SCANCODE_LOCKINGNUMLOCK = 131, */\n/*     SDL_SCANCODE_LOCKINGSCROLLLOCK = 132, */\n    SDL_SCANCODE_KP_COMMA = 133,\n    SDL_SCANCODE_KP_EQUALSAS400 = 134,\n\n    SDL_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see\n                                            footnotes in USB doc */\n    SDL_SCANCODE_INTERNATIONAL2 = 136,\n    SDL_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */\n    SDL_SCANCODE_INTERNATIONAL4 = 138,\n    SDL_SCANCODE_INTERNATIONAL5 = 139,\n    SDL_SCANCODE_INTERNATIONAL6 = 140,\n    SDL_SCANCODE_INTERNATIONAL7 = 141,\n    SDL_SCANCODE_INTERNATIONAL8 = 142,\n    SDL_SCANCODE_INTERNATIONAL9 = 143,\n    SDL_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */\n    SDL_SCANCODE_LANG2 = 145, /**< Hanja conversion */\n    SDL_SCANCODE_LANG3 = 146, /**< Katakana */\n    SDL_SCANCODE_LANG4 = 147, /**< Hiragana */\n    SDL_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */\n    SDL_SCANCODE_LANG6 = 149, /**< reserved */\n    SDL_SCANCODE_LANG7 = 150, /**< reserved */\n    SDL_SCANCODE_LANG8 = 151, /**< reserved */\n    SDL_SCANCODE_LANG9 = 152, /**< reserved */\n\n    SDL_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */\n    SDL_SCANCODE_SYSREQ = 154,\n    SDL_SCANCODE_CANCEL = 155,\n    SDL_SCANCODE_CLEAR = 156,\n    SDL_SCANCODE_PRIOR = 157,\n    SDL_SCANCODE_RETURN2 = 158,\n    SDL_SCANCODE_SEPARATOR = 159,\n    SDL_SCANCODE_OUT = 160,\n    SDL_SCANCODE_OPER = 161,\n    SDL_SCANCODE_CLEARAGAIN = 162,\n    SDL_SCANCODE_CRSEL = 163,\n    SDL_SCANCODE_EXSEL = 164,\n\n    SDL_SCANCODE_KP_00 = 176,\n    SDL_SCANCODE_KP_000 = 177,\n    SDL_SCANCODE_THOUSANDSSEPARATOR = 178,\n    SDL_SCANCODE_DECIMALSEPARATOR = 179,\n    SDL_SCANCODE_CURRENCYUNIT = 180,\n    SDL_SCANCODE_CURRENCYSUBUNIT = 181,\n    SDL_SCANCODE_KP_LEFTPAREN = 182,\n    SDL_SCANCODE_KP_RIGHTPAREN = 183,\n    SDL_SCANCODE_KP_LEFTBRACE = 184,\n    SDL_SCANCODE_KP_RIGHTBRACE = 185,\n    SDL_SCANCODE_KP_TAB = 186,\n    SDL_SCANCODE_KP_BACKSPACE = 187,\n    SDL_SCANCODE_KP_A = 188,\n    SDL_SCANCODE_KP_B = 189,\n    SDL_SCANCODE_KP_C = 190,\n    SDL_SCANCODE_KP_D = 191,\n    SDL_SCANCODE_KP_E = 192,\n    SDL_SCANCODE_KP_F = 193,\n    SDL_SCANCODE_KP_XOR = 194,\n    SDL_SCANCODE_KP_POWER = 195,\n    SDL_SCANCODE_KP_PERCENT = 196,\n    SDL_SCANCODE_KP_LESS = 197,\n    SDL_SCANCODE_KP_GREATER = 198,\n    SDL_SCANCODE_KP_AMPERSAND = 199,\n    SDL_SCANCODE_KP_DBLAMPERSAND = 200,\n    SDL_SCANCODE_KP_VERTICALBAR = 201,\n    SDL_SCANCODE_KP_DBLVERTICALBAR = 202,\n    SDL_SCANCODE_KP_COLON = 203,\n    SDL_SCANCODE_KP_HASH = 204,\n    SDL_SCANCODE_KP_SPACE = 205,\n    SDL_SCANCODE_KP_AT = 206,\n    SDL_SCANCODE_KP_EXCLAM = 207,\n    SDL_SCANCODE_KP_MEMSTORE = 208,\n    SDL_SCANCODE_KP_MEMRECALL = 209,\n    SDL_SCANCODE_KP_MEMCLEAR = 210,\n    SDL_SCANCODE_KP_MEMADD = 211,\n    SDL_SCANCODE_KP_MEMSUBTRACT = 212,\n    SDL_SCANCODE_KP_MEMMULTIPLY = 213,\n    SDL_SCANCODE_KP_MEMDIVIDE = 214,\n    SDL_SCANCODE_KP_PLUSMINUS = 215,\n    SDL_SCANCODE_KP_CLEAR = 216,\n    SDL_SCANCODE_KP_CLEARENTRY = 217,\n    SDL_SCANCODE_KP_BINARY = 218,\n    SDL_SCANCODE_KP_OCTAL = 219,\n    SDL_SCANCODE_KP_DECIMAL = 220,\n    SDL_SCANCODE_KP_HEXADECIMAL = 221,\n\n    SDL_SCANCODE_LCTRL = 224,\n    SDL_SCANCODE_LSHIFT = 225,\n    SDL_SCANCODE_LALT = 226, /**< alt, option */\n    SDL_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */\n    SDL_SCANCODE_RCTRL = 228,\n    SDL_SCANCODE_RSHIFT = 229,\n    SDL_SCANCODE_RALT = 230, /**< alt gr, option */\n    SDL_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */\n\n    SDL_SCANCODE_MODE = 257,    /**< I'm not sure if this is really not covered\n                                 *   by any of the above, but since there's a\n                                 *   special KMOD_MODE for it I'm adding it here\n                                 */\n\n    /* @} *//* Usage page 0x07 */\n\n    /**\n     *  \\name Usage page 0x0C\n     *\n     *  These values are mapped from usage page 0x0C (USB consumer page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_AUDIONEXT = 258,\n    SDL_SCANCODE_AUDIOPREV = 259,\n    SDL_SCANCODE_AUDIOSTOP = 260,\n    SDL_SCANCODE_AUDIOPLAY = 261,\n    SDL_SCANCODE_AUDIOMUTE = 262,\n    SDL_SCANCODE_MEDIASELECT = 263,\n    SDL_SCANCODE_WWW = 264,\n    SDL_SCANCODE_MAIL = 265,\n    SDL_SCANCODE_CALCULATOR = 266,\n    SDL_SCANCODE_COMPUTER = 267,\n    SDL_SCANCODE_AC_SEARCH = 268,\n    SDL_SCANCODE_AC_HOME = 269,\n    SDL_SCANCODE_AC_BACK = 270,\n    SDL_SCANCODE_AC_FORWARD = 271,\n    SDL_SCANCODE_AC_STOP = 272,\n    SDL_SCANCODE_AC_REFRESH = 273,\n    SDL_SCANCODE_AC_BOOKMARKS = 274,\n\n    /* @} *//* Usage page 0x0C */\n\n    /**\n     *  \\name Walther keys\n     *\n     *  These are values that Christian Walther added (for mac keyboard?).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_BRIGHTNESSDOWN = 275,\n    SDL_SCANCODE_BRIGHTNESSUP = 276,\n    SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display\n                                           switch, video mode switch */\n    SDL_SCANCODE_KBDILLUMTOGGLE = 278,\n    SDL_SCANCODE_KBDILLUMDOWN = 279,\n    SDL_SCANCODE_KBDILLUMUP = 280,\n    SDL_SCANCODE_EJECT = 281,\n    SDL_SCANCODE_SLEEP = 282,\n\n    SDL_SCANCODE_APP1 = 283,\n    SDL_SCANCODE_APP2 = 284,\n\n    /* @} *//* Walther keys */\n\n    /**\n     *  \\name Usage page 0x0C (additional media keys)\n     *\n     *  These values are mapped from usage page 0x0C (USB consumer page).\n     */\n    /* @{ */\n\n    SDL_SCANCODE_AUDIOREWIND = 285,\n    SDL_SCANCODE_AUDIOFASTFORWARD = 286,\n\n    /* @} *//* Usage page 0x0C (additional media keys) */\n\n    /* Add any other keys here. */\n\n    SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes\n                                 for array bounds */\n} SDL_Scancode;\n\n#endif /* SDL_scancode_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_sensor.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_sensor.h\n *\n *  Include file for SDL sensor event handling\n *\n */\n\n#ifndef SDL_sensor_h_\n#define SDL_sensor_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\n/* *INDENT-OFF* */\nextern \"C\" {\n/* *INDENT-ON* */\n#endif\n\n/**\n *  \\brief SDL_sensor.h\n *\n *  In order to use these functions, SDL_Init() must have been called\n *  with the ::SDL_INIT_SENSOR flag.  This causes SDL to scan the system\n *  for sensors, and load appropriate drivers.\n */\n\nstruct _SDL_Sensor;\ntypedef struct _SDL_Sensor SDL_Sensor;\n\n/**\n * This is a unique ID for a sensor for the time it is connected to the system,\n * and is never reused for the lifetime of the application.\n *\n * The ID value starts at 0 and increments from there. The value -1 is an invalid ID.\n */\ntypedef Sint32 SDL_SensorID;\n\n/* The different sensors defined by SDL\n *\n * Additional sensors may be available, using platform dependent semantics.\n *\n * Hare are the additional Android sensors:\n * https://developer.android.com/reference/android/hardware/SensorEvent.html#values\n */\ntypedef enum\n{\n    SDL_SENSOR_INVALID = -1,    /**< Returned for an invalid sensor */\n    SDL_SENSOR_UNKNOWN,         /**< Unknown sensor type */\n    SDL_SENSOR_ACCEL,           /**< Accelerometer */\n    SDL_SENSOR_GYRO             /**< Gyroscope */\n} SDL_SensorType;\n\n/**\n * Accelerometer sensor\n *\n * The accelerometer returns the current acceleration in SI meters per\n * second squared. This includes gravity, so a device at rest will have\n * an acceleration of SDL_STANDARD_GRAVITY straight down.\n *\n * values[0]: Acceleration on the x axis\n * values[1]: Acceleration on the y axis\n * values[2]: Acceleration on the z axis\n *\n * For phones held in portrait mode, the axes are defined as follows:\n * -X ... +X : left ... right\n * -Y ... +Y : bottom ... top\n * -Z ... +Z : farther ... closer\n * \n * The axis data is not changed when the phone is rotated.\n *\n * \\sa SDL_GetDisplayOrientation()\n */\n#define SDL_STANDARD_GRAVITY    9.80665f\n\n/**\n * Gyroscope sensor\n *\n * The gyroscope returns the current rate of rotation in radians per second.\n * The rotation is positive in the counter-clockwise direction. That is,\n * an observer looking from a positive location on one of the axes would\n * see positive rotation on that axis when it appeared to be rotating\n * counter-clockwise.\n *\n * values[0]: Angular speed around the x axis\n * values[1]: Angular speed around the y axis\n * values[2]: Angular speed around the z axis\n *\n * For phones held in portrait mode, the axes are defined as follows:\n * -X ... +X : left ... right\n * -Y ... +Y : bottom ... top\n * -Z ... +Z : farther ... closer\n * \n * The axis data is not changed when the phone is rotated.\n *\n * \\sa SDL_GetDisplayOrientation()\n */\n\n/* Function prototypes */\n\n/**\n *  \\brief Count the number of sensors attached to the system right now\n */\nextern DECLSPEC int SDLCALL SDL_NumSensors(void);\n\n/**\n *  \\brief Get the implementation dependent name of a sensor.\n *\n *  This can be called before any sensors are opened.\n * \n *  \\return The sensor name, or NULL if device_index is out of range.\n */\nextern DECLSPEC const char *SDLCALL SDL_SensorGetDeviceName(int device_index);\n\n/**\n *  \\brief Get the type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor type, or SDL_SENSOR_INVALID if device_index is out of range.\n */\nextern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetDeviceType(int device_index);\n\n/**\n *  \\brief Get the platform dependent type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor platform dependent type, or -1 if device_index is out of range.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetDeviceNonPortableType(int device_index);\n\n/**\n *  \\brief Get the instance ID of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor instance ID, or -1 if device_index is out of range.\n */\nextern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetDeviceInstanceID(int device_index);\n\n/**\n *  \\brief Open a sensor for use.\n *\n *  The index passed as an argument refers to the N'th sensor on the system.\n *\n *  \\return A sensor identifier, or NULL if an error occurred.\n */\nextern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorOpen(int device_index);\n\n/**\n * Return the SDL_Sensor associated with an instance id.\n */\nextern DECLSPEC SDL_Sensor *SDLCALL SDL_SensorFromInstanceID(SDL_SensorID instance_id);\n\n/**\n *  \\brief Get the implementation dependent name of a sensor.\n *\n *  \\return The sensor name, or NULL if the sensor is NULL.\n */\nextern DECLSPEC const char *SDLCALL SDL_SensorGetName(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor type, or SDL_SENSOR_INVALID if the sensor is NULL.\n */\nextern DECLSPEC SDL_SensorType SDLCALL SDL_SensorGetType(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the platform dependent type of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor platform dependent type, or -1 if the sensor is NULL.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetNonPortableType(SDL_Sensor *sensor);\n\n/**\n *  \\brief Get the instance ID of a sensor.\n *\n *  This can be called before any sensors are opened.\n *\n *  \\return The sensor instance ID, or -1 if the sensor is NULL.\n */\nextern DECLSPEC SDL_SensorID SDLCALL SDL_SensorGetInstanceID(SDL_Sensor *sensor);\n\n/**\n *  Get the current state of an opened sensor.\n *\n *  The number of values and interpretation of the data is sensor dependent.\n *\n *  \\param sensor The sensor to query\n *  \\param data A pointer filled with the current sensor state\n *  \\param num_values The number of values to write to data\n *\n *  \\return 0 or -1 if an error occurred.\n */\nextern DECLSPEC int SDLCALL SDL_SensorGetData(SDL_Sensor * sensor, float *data, int num_values);\n\n/**\n *  Close a sensor previously opened with SDL_SensorOpen()\n */\nextern DECLSPEC void SDLCALL SDL_SensorClose(SDL_Sensor * sensor);\n\n/**\n *  Update the current state of the open sensors.\n *\n *  This is called automatically by the event loop if sensor events are enabled.\n *\n *  This needs to be called from the thread that initialized the sensor subsystem.\n */\nextern DECLSPEC void SDLCALL SDL_SensorUpdate(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n/* *INDENT-OFF* */\n}\n/* *INDENT-ON* */\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_sensor_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_shape.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_shape_h_\n#define SDL_shape_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_surface.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/** \\file SDL_shape.h\n *\n * Header file for the shaped window API.\n */\n\n#define SDL_NONSHAPEABLE_WINDOW -1\n#define SDL_INVALID_SHAPE_ARGUMENT -2\n#define SDL_WINDOW_LACKS_SHAPE -3\n\n/**\n *  \\brief Create a window that can be shaped with the specified position, dimensions, and flags.\n *\n *  \\param title The title of the window, in UTF-8 encoding.\n *  \\param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param w     The width of the window.\n *  \\param h     The height of the window.\n *  \\param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following:\n *               ::SDL_WINDOW_OPENGL,     ::SDL_WINDOW_INPUT_GRABBED,\n *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_RESIZABLE,\n *               ::SDL_WINDOW_MAXIMIZED,  ::SDL_WINDOW_MINIMIZED,\n *       ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset.\n *\n *  \\return The window created, or NULL if window creation failed.\n *\n *  \\sa SDL_DestroyWindow()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);\n\n/**\n * \\brief Return whether the given window is a shaped window.\n *\n * \\param window The window to query for being shaped.\n *\n * \\return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.\n *\n * \\sa SDL_CreateShapedWindow\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);\n\n/** \\brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */\ntypedef enum {\n    /** \\brief The default mode, a binarized alpha cutoff of 1. */\n    ShapeModeDefault,\n    /** \\brief A binarized alpha cutoff with a given integer value. */\n    ShapeModeBinarizeAlpha,\n    /** \\brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */\n    ShapeModeReverseBinarizeAlpha,\n    /** \\brief A color key is applied. */\n    ShapeModeColorKey\n} WindowShapeMode;\n\n#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)\n\n/** \\brief A union containing parameters for shaped windows. */\ntypedef union {\n    /** \\brief A cutoff alpha value for binarization of the window shape's alpha channel. */\n    Uint8 binarizationCutoff;\n    SDL_Color colorKey;\n} SDL_WindowShapeParams;\n\n/** \\brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */\ntypedef struct SDL_WindowShapeMode {\n    /** \\brief The mode of these window-shape parameters. */\n    WindowShapeMode mode;\n    /** \\brief Window-shape parameters. */\n    SDL_WindowShapeParams parameters;\n} SDL_WindowShapeMode;\n\n/**\n * \\brief Set the shape and parameters of a shaped window.\n *\n * \\param window The shaped window whose parameters should be set.\n * \\param shape A surface encoding the desired shape for the window.\n * \\param shape_mode The parameters to set for the shaped window.\n *\n * \\return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW\n *           if the SDL_Window given does not reference a valid shaped window.\n *\n * \\sa SDL_WindowShapeMode\n * \\sa SDL_GetShapedWindowMode.\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);\n\n/**\n * \\brief Get the shape parameters of a shaped window.\n *\n * \\param window The shaped window whose parameters should be retrieved.\n * \\param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape.\n *\n * \\return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode\n *           data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if\n *           the SDL_Window given is a shapeable window currently lacking a shape.\n *\n * \\sa SDL_WindowShapeMode\n * \\sa SDL_SetWindowShape\n */\nextern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_shape_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_stdinc.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_stdinc.h\n *\n *  This is a general header that includes C language support.\n */\n\n#ifndef SDL_stdinc_h_\n#define SDL_stdinc_h_\n\n#include \"SDL_config.h\"\n\n#ifdef HAVE_SYS_TYPES_H\n#include <sys/types.h>\n#endif\n#ifdef HAVE_STDIO_H\n#include <stdio.h>\n#endif\n#if defined(STDC_HEADERS)\n# include <stdlib.h>\n# include <stddef.h>\n# include <stdarg.h>\n#else\n# if defined(HAVE_STDLIB_H)\n#  include <stdlib.h>\n# elif defined(HAVE_MALLOC_H)\n#  include <malloc.h>\n# endif\n# if defined(HAVE_STDDEF_H)\n#  include <stddef.h>\n# endif\n# if defined(HAVE_STDARG_H)\n#  include <stdarg.h>\n# endif\n#endif\n#ifdef HAVE_STRING_H\n# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)\n#  include <memory.h>\n# endif\n# include <string.h>\n#endif\n#ifdef HAVE_STRINGS_H\n# include <strings.h>\n#endif\n#ifdef HAVE_WCHAR_H\n# include <wchar.h>\n#endif\n#if defined(HAVE_INTTYPES_H)\n# include <inttypes.h>\n#elif defined(HAVE_STDINT_H)\n# include <stdint.h>\n#endif\n#ifdef HAVE_CTYPE_H\n# include <ctype.h>\n#endif\n#ifdef HAVE_MATH_H\n# if defined(__WINRT__)\n/* Defining _USE_MATH_DEFINES is required to get M_PI to be defined on\n   WinRT.  See http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx\n   for more information.\n*/\n#  define _USE_MATH_DEFINES\n# endif\n# include <math.h>\n#endif\n#ifdef HAVE_FLOAT_H\n# include <float.h>\n#endif\n#if defined(HAVE_ALLOCA) && !defined(alloca)\n# if defined(HAVE_ALLOCA_H)\n#  include <alloca.h>\n# elif defined(__GNUC__)\n#  define alloca __builtin_alloca\n# elif defined(_MSC_VER)\n#  include <malloc.h>\n#  define alloca _alloca\n# elif defined(__WATCOMC__)\n#  include <malloc.h>\n# elif defined(__BORLANDC__)\n#  include <malloc.h>\n# elif defined(__DMC__)\n#  include <stdlib.h>\n# elif defined(__AIX__)\n#pragma alloca\n# elif defined(__MRC__)\nvoid *alloca(unsigned);\n# else\nchar *alloca();\n# endif\n#endif\n\n/**\n *  The number of elements in an array.\n */\n#define SDL_arraysize(array)    (sizeof(array)/sizeof(array[0]))\n#define SDL_TABLESIZE(table)    SDL_arraysize(table)\n\n/**\n *  Macro useful for building other macros with strings in them\n *\n *  e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) \": \" X \"\\n\")\n */\n#define SDL_STRINGIFY_ARG(arg)  #arg\n\n/**\n *  \\name Cast operators\n *\n *  Use proper C++ casts when compiled as C++ to be compatible with the option\n *  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).\n */\n/* @{ */\n#ifdef __cplusplus\n#define SDL_reinterpret_cast(type, expression) reinterpret_cast<type>(expression)\n#define SDL_static_cast(type, expression) static_cast<type>(expression)\n#define SDL_const_cast(type, expression) const_cast<type>(expression)\n#else\n#define SDL_reinterpret_cast(type, expression) ((type)(expression))\n#define SDL_static_cast(type, expression) ((type)(expression))\n#define SDL_const_cast(type, expression) ((type)(expression))\n#endif\n/* @} *//* Cast operators */\n\n/* Define a four character code as a Uint32 */\n#define SDL_FOURCC(A, B, C, D) \\\n    ((SDL_static_cast(Uint32, SDL_static_cast(Uint8, (A))) << 0) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (B))) << 8) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (C))) << 16) | \\\n     (SDL_static_cast(Uint32, SDL_static_cast(Uint8, (D))) << 24))\n\n/**\n *  \\name Basic data types\n */\n/* @{ */\n\n#ifdef __CC_ARM\n/* ARM's compiler throws warnings if we use an enum: like \"SDL_bool x = a < b;\" */\n#define SDL_FALSE 0\n#define SDL_TRUE 1\ntypedef int SDL_bool;\n#else\ntypedef enum\n{\n    SDL_FALSE = 0,\n    SDL_TRUE = 1\n} SDL_bool;\n#endif\n\n/**\n * \\brief A signed 8-bit integer type.\n */\n#define SDL_MAX_SINT8   ((Sint8)0x7F)           /* 127 */\n#define SDL_MIN_SINT8   ((Sint8)(~0x7F))        /* -128 */\ntypedef int8_t Sint8;\n/**\n * \\brief An unsigned 8-bit integer type.\n */\n#define SDL_MAX_UINT8   ((Uint8)0xFF)           /* 255 */\n#define SDL_MIN_UINT8   ((Uint8)0x00)           /* 0 */\ntypedef uint8_t Uint8;\n/**\n * \\brief A signed 16-bit integer type.\n */\n#define SDL_MAX_SINT16  ((Sint16)0x7FFF)        /* 32767 */\n#define SDL_MIN_SINT16  ((Sint16)(~0x7FFF))     /* -32768 */\ntypedef int16_t Sint16;\n/**\n * \\brief An unsigned 16-bit integer type.\n */\n#define SDL_MAX_UINT16  ((Uint16)0xFFFF)        /* 65535 */\n#define SDL_MIN_UINT16  ((Uint16)0x0000)        /* 0 */\ntypedef uint16_t Uint16;\n/**\n * \\brief A signed 32-bit integer type.\n */\n#define SDL_MAX_SINT32  ((Sint32)0x7FFFFFFF)    /* 2147483647 */\n#define SDL_MIN_SINT32  ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */\ntypedef int32_t Sint32;\n/**\n * \\brief An unsigned 32-bit integer type.\n */\n#define SDL_MAX_UINT32  ((Uint32)0xFFFFFFFFu)   /* 4294967295 */\n#define SDL_MIN_UINT32  ((Uint32)0x00000000)    /* 0 */\ntypedef uint32_t Uint32;\n\n/**\n * \\brief A signed 64-bit integer type.\n */\n#define SDL_MAX_SINT64  ((Sint64)0x7FFFFFFFFFFFFFFFll)      /* 9223372036854775807 */\n#define SDL_MIN_SINT64  ((Sint64)(~0x7FFFFFFFFFFFFFFFll))   /* -9223372036854775808 */\ntypedef int64_t Sint64;\n/**\n * \\brief An unsigned 64-bit integer type.\n */\n#define SDL_MAX_UINT64  ((Uint64)0xFFFFFFFFFFFFFFFFull)     /* 18446744073709551615 */\n#define SDL_MIN_UINT64  ((Uint64)(0x0000000000000000ull))   /* 0 */\ntypedef uint64_t Uint64;\n\n/* @} *//* Basic data types */\n\n/* Make sure we have macros for printing 64 bit values.\n * <stdint.h> should define these but this is not true all platforms.\n * (for example win32) */\n#ifndef SDL_PRIs64\n#ifdef PRIs64\n#define SDL_PRIs64 PRIs64\n#elif defined(__WIN32__)\n#define SDL_PRIs64 \"I64d\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIs64 \"ld\"\n#else\n#define SDL_PRIs64 \"lld\"\n#endif\n#endif\n#ifndef SDL_PRIu64\n#ifdef PRIu64\n#define SDL_PRIu64 PRIu64\n#elif defined(__WIN32__)\n#define SDL_PRIu64 \"I64u\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIu64 \"lu\"\n#else\n#define SDL_PRIu64 \"llu\"\n#endif\n#endif\n#ifndef SDL_PRIx64\n#ifdef PRIx64\n#define SDL_PRIx64 PRIx64\n#elif defined(__WIN32__)\n#define SDL_PRIx64 \"I64x\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIx64 \"lx\"\n#else\n#define SDL_PRIx64 \"llx\"\n#endif\n#endif\n#ifndef SDL_PRIX64\n#ifdef PRIX64\n#define SDL_PRIX64 PRIX64\n#elif defined(__WIN32__)\n#define SDL_PRIX64 \"I64X\"\n#elif defined(__LINUX__) && defined(__LP64__)\n#define SDL_PRIX64 \"lX\"\n#else\n#define SDL_PRIX64 \"llX\"\n#endif\n#endif\n\n/* Annotations to help code analysis tools */\n#ifdef SDL_DISABLE_ANALYZE_MACROS\n#define SDL_IN_BYTECAP(x)\n#define SDL_INOUT_Z_CAP(x)\n#define SDL_OUT_Z_CAP(x)\n#define SDL_OUT_CAP(x)\n#define SDL_OUT_BYTECAP(x)\n#define SDL_OUT_Z_BYTECAP(x)\n#define SDL_PRINTF_FORMAT_STRING\n#define SDL_SCANF_FORMAT_STRING\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber )\n#else\n#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */\n#include <sal.h>\n\n#define SDL_IN_BYTECAP(x) _In_bytecount_(x)\n#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)\n#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)\n#define SDL_OUT_CAP(x) _Out_cap_(x)\n#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)\n#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)\n\n#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_\n#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_\n#else\n#define SDL_IN_BYTECAP(x)\n#define SDL_INOUT_Z_CAP(x)\n#define SDL_OUT_Z_CAP(x)\n#define SDL_OUT_CAP(x)\n#define SDL_OUT_BYTECAP(x)\n#define SDL_OUT_Z_BYTECAP(x)\n#define SDL_PRINTF_FORMAT_STRING\n#define SDL_SCANF_FORMAT_STRING\n#endif\n#if defined(__GNUC__)\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))\n#else\n#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )\n#define SDL_SCANF_VARARG_FUNC( fmtargnumber )\n#endif\n#endif /* SDL_DISABLE_ANALYZE_MACROS */\n\n#define SDL_COMPILE_TIME_ASSERT(name, x)               \\\n       typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]\n/** \\cond */\n#ifndef DOXYGEN_SHOULD_IGNORE_THIS\nSDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);\nSDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);\nSDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);\nSDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);\nSDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);\nSDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);\nSDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);\nSDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);\n#endif /* DOXYGEN_SHOULD_IGNORE_THIS */\n/** \\endcond */\n\n/* Check to make sure enums are the size of ints, for structure packing.\n   For both Watcom C/C++ and Borland C/C++ the compiler option that makes\n   enums having the size of an int must be enabled.\n   This is \"-b\" for Borland C/C++ and \"-ei\" for Watcom C/C++ (v11).\n*/\n\n/** \\cond */\n#ifndef DOXYGEN_SHOULD_IGNORE_THIS\n#if !defined(__ANDROID__)\n   /* TODO: include/SDL_stdinc.h:174: error: size of array 'SDL_dummy_enum' is negative */\ntypedef enum\n{\n    DUMMY_ENUM_VALUE\n} SDL_DUMMY_ENUM;\n\nSDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));\n#endif\n#endif /* DOXYGEN_SHOULD_IGNORE_THIS */\n/** \\endcond */\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifdef HAVE_ALLOCA\n#define SDL_stack_alloc(type, count)    (type*)alloca(sizeof(type)*(count))\n#define SDL_stack_free(data)\n#else\n#define SDL_stack_alloc(type, count)    (type*)SDL_malloc(sizeof(type)*(count))\n#define SDL_stack_free(data)            SDL_free(data)\n#endif\n\nextern DECLSPEC void *SDLCALL SDL_malloc(size_t size);\nextern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);\nextern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);\nextern DECLSPEC void SDLCALL SDL_free(void *mem);\n\ntypedef void *(SDLCALL *SDL_malloc_func)(size_t size);\ntypedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);\ntypedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);\ntypedef void (SDLCALL *SDL_free_func)(void *mem);\n\n/**\n *  \\brief Get the current set of SDL memory functions\n */\nextern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,\n                                                    SDL_calloc_func *calloc_func,\n                                                    SDL_realloc_func *realloc_func,\n                                                    SDL_free_func *free_func);\n\n/**\n *  \\brief Replace SDL's memory allocation functions with a custom set\n *\n *  \\note If you are replacing SDL's memory functions, you should call\n *        SDL_GetNumAllocations() and be very careful if it returns non-zero.\n *        That means that your free function will be called with memory\n *        allocated by the previous memory allocation functions.\n */\nextern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,\n                                                   SDL_calloc_func calloc_func,\n                                                   SDL_realloc_func realloc_func,\n                                                   SDL_free_func free_func);\n\n/**\n *  \\brief Get the number of outstanding (unfreed) allocations\n */\nextern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);\n\nextern DECLSPEC char *SDLCALL SDL_getenv(const char *name);\nextern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);\n\nextern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *));\n\nextern DECLSPEC int SDLCALL SDL_abs(int x);\n\n/* !!! FIXME: these have side effects. You probably shouldn't use them. */\n/* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */\n#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))\n#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))\n\nextern DECLSPEC int SDLCALL SDL_isdigit(int x);\nextern DECLSPEC int SDLCALL SDL_isspace(int x);\nextern DECLSPEC int SDLCALL SDL_toupper(int x);\nextern DECLSPEC int SDLCALL SDL_tolower(int x);\n\nextern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);\n\n#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))\n#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))\n\n/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */\nSDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)\n{\n#if defined(__GNUC__) && defined(i386)\n    int u0, u1, u2;\n    __asm__ __volatile__ (\n        \"cld \\n\\t\"\n        \"rep ; stosl \\n\\t\"\n        : \"=&D\" (u0), \"=&a\" (u1), \"=&c\" (u2)\n        : \"0\" (dst), \"1\" (val), \"2\" (SDL_static_cast(Uint32, dwords))\n        : \"memory\"\n    );\n#else\n    size_t _n = (dwords + 3) / 4;\n    Uint32 *_p = SDL_static_cast(Uint32 *, dst);\n    Uint32 _val = (val);\n    if (dwords == 0)\n        return;\n    switch (dwords % 4)\n    {\n        case 0: do {    *_p++ = _val;   /* fallthrough */\n        case 3:         *_p++ = _val;   /* fallthrough */\n        case 2:         *_p++ = _val;   /* fallthrough */\n        case 1:         *_p++ = _val;   /* fallthrough */\n        } while ( --_n );\n    }\n#endif\n}\n\nextern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);\n\nextern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);\nextern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);\n\nextern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);\nextern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);\nextern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);\nextern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);\nextern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);\n\nextern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);\nextern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);\nextern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);\nextern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);\nextern DECLSPEC char *SDLCALL SDL_strdup(const char *str);\nextern DECLSPEC char *SDLCALL SDL_strrev(char *str);\nextern DECLSPEC char *SDLCALL SDL_strupr(char *str);\nextern DECLSPEC char *SDLCALL SDL_strlwr(char *str);\nextern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);\nextern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);\nextern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);\nextern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);\n\nextern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix);\nextern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix);\n\nextern DECLSPEC int SDLCALL SDL_atoi(const char *str);\nextern DECLSPEC double SDLCALL SDL_atof(const char *str);\nextern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base);\nextern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);\nextern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base);\nextern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base);\nextern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp);\n\nextern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);\nextern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);\nextern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);\nextern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);\n\nextern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);\nextern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);\nextern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);\nextern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);\n\n#ifndef HAVE_M_PI\n#ifndef M_PI\n#define M_PI    3.14159265358979323846264338327950288   /**< pi */\n#endif\n#endif\n\nextern DECLSPEC double SDLCALL SDL_acos(double x);\nextern DECLSPEC float SDLCALL SDL_acosf(float x);\nextern DECLSPEC double SDLCALL SDL_asin(double x);\nextern DECLSPEC float SDLCALL SDL_asinf(float x);\nextern DECLSPEC double SDLCALL SDL_atan(double x);\nextern DECLSPEC float SDLCALL SDL_atanf(float x);\nextern DECLSPEC double SDLCALL SDL_atan2(double x, double y);\nextern DECLSPEC float SDLCALL SDL_atan2f(float x, float y);\nextern DECLSPEC double SDLCALL SDL_ceil(double x);\nextern DECLSPEC float SDLCALL SDL_ceilf(float x);\nextern DECLSPEC double SDLCALL SDL_copysign(double x, double y);\nextern DECLSPEC float SDLCALL SDL_copysignf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_cos(double x);\nextern DECLSPEC float SDLCALL SDL_cosf(float x);\nextern DECLSPEC double SDLCALL SDL_exp(double x);\nextern DECLSPEC float SDLCALL SDL_expf(float x);\nextern DECLSPEC double SDLCALL SDL_fabs(double x);\nextern DECLSPEC float SDLCALL SDL_fabsf(float x);\nextern DECLSPEC double SDLCALL SDL_floor(double x);\nextern DECLSPEC float SDLCALL SDL_floorf(float x);\nextern DECLSPEC double SDLCALL SDL_fmod(double x, double y);\nextern DECLSPEC float SDLCALL SDL_fmodf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_log(double x);\nextern DECLSPEC float SDLCALL SDL_logf(float x);\nextern DECLSPEC double SDLCALL SDL_log10(double x);\nextern DECLSPEC float SDLCALL SDL_log10f(float x);\nextern DECLSPEC double SDLCALL SDL_pow(double x, double y);\nextern DECLSPEC float SDLCALL SDL_powf(float x, float y);\nextern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);\nextern DECLSPEC float SDLCALL SDL_scalbnf(float x, int n);\nextern DECLSPEC double SDLCALL SDL_sin(double x);\nextern DECLSPEC float SDLCALL SDL_sinf(float x);\nextern DECLSPEC double SDLCALL SDL_sqrt(double x);\nextern DECLSPEC float SDLCALL SDL_sqrtf(float x);\nextern DECLSPEC double SDLCALL SDL_tan(double x);\nextern DECLSPEC float SDLCALL SDL_tanf(float x);\n\n/* The SDL implementation of iconv() returns these error codes */\n#define SDL_ICONV_ERROR     (size_t)-1\n#define SDL_ICONV_E2BIG     (size_t)-2\n#define SDL_ICONV_EILSEQ    (size_t)-3\n#define SDL_ICONV_EINVAL    (size_t)-4\n\n/* SDL_iconv_* are now always real symbols/types, not macros or inlined. */\ntypedef struct _SDL_iconv_t *SDL_iconv_t;\nextern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode,\n                                                   const char *fromcode);\nextern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);\nextern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, const char **inbuf,\n                                         size_t * inbytesleft, char **outbuf,\n                                         size_t * outbytesleft);\n/**\n *  This function converts a string between encodings in one pass, returning a\n *  string that must be freed with SDL_free() or NULL on error.\n */\nextern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,\n                                               const char *fromcode,\n                                               const char *inbuf,\n                                               size_t inbytesleft);\n#define SDL_iconv_utf8_locale(S)    SDL_iconv_string(\"\", \"UTF-8\", S, SDL_strlen(S)+1)\n#define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string(\"UCS-2-INTERNAL\", \"UTF-8\", S, SDL_strlen(S)+1)\n#define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string(\"UCS-4-INTERNAL\", \"UTF-8\", S, SDL_strlen(S)+1)\n\n/* force builds using Clang's static analysis tools to use literal C runtime\n   here, since there are possibly tests that are ineffective otherwise. */\n#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)\n#define SDL_malloc malloc\n#define SDL_calloc calloc\n#define SDL_realloc realloc\n#define SDL_free free\n#define SDL_memset memset\n#define SDL_memcpy memcpy\n#define SDL_memmove memmove\n#define SDL_memcmp memcmp\n#define SDL_strlen strlen\n#define SDL_strlcpy strlcpy\n#define SDL_strlcat strlcat\n#define SDL_strdup strdup\n#define SDL_strchr strchr\n#define SDL_strrchr strrchr\n#define SDL_strstr strstr\n#define SDL_strcmp strcmp\n#define SDL_strncmp strncmp\n#define SDL_strcasecmp strcasecmp\n#define SDL_strncasecmp strncasecmp\n#define SDL_sscanf sscanf\n#define SDL_vsscanf vsscanf\n#define SDL_snprintf snprintf\n#define SDL_vsnprintf vsnprintf\n#endif\n\nSDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)\n{\n    return SDL_memcpy(dst, src, dwords * 4);\n}\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_stdinc_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_surface.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_surface.h\n *\n *  Header file for ::SDL_Surface definition and management functions.\n */\n\n#ifndef SDL_surface_h_\n#define SDL_surface_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_blendmode.h\"\n#include \"SDL_rwops.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\name Surface flags\n *\n *  These are the currently supported flags for the ::SDL_Surface.\n *\n *  \\internal\n *  Used internally (read-only).\n */\n/* @{ */\n#define SDL_SWSURFACE       0           /**< Just here for compatibility */\n#define SDL_PREALLOC        0x00000001  /**< Surface uses preallocated memory */\n#define SDL_RLEACCEL        0x00000002  /**< Surface is RLE encoded */\n#define SDL_DONTFREE        0x00000004  /**< Surface is referenced internally */\n#define SDL_SIMD_ALIGNED    0x00000008  /**< Surface uses aligned memory */\n/* @} *//* Surface flags */\n\n/**\n *  Evaluates to true if the surface needs to be locked before access.\n */\n#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0)\n\n/**\n * \\brief A collection of pixels used in software blitting.\n *\n * \\note  This structure should be treated as read-only, except for \\c pixels,\n *        which, if not NULL, contains the raw pixel data for the surface.\n */\ntypedef struct SDL_Surface\n{\n    Uint32 flags;               /**< Read-only */\n    SDL_PixelFormat *format;    /**< Read-only */\n    int w, h;                   /**< Read-only */\n    int pitch;                  /**< Read-only */\n    void *pixels;               /**< Read-write */\n\n    /** Application data associated with the surface */\n    void *userdata;             /**< Read-write */\n\n    /** information needed for surfaces requiring locks */\n    int locked;                 /**< Read-only */\n    void *lock_data;            /**< Read-only */\n\n    /** clipping information */\n    SDL_Rect clip_rect;         /**< Read-only */\n\n    /** info for fast blit mapping to other surfaces */\n    struct SDL_BlitMap *map;    /**< Private */\n\n    /** Reference count -- used when freeing surface */\n    int refcount;               /**< Read-mostly */\n} SDL_Surface;\n\n/**\n * \\brief The type of function used for surface blitting functions.\n */\ntypedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,\n                                 struct SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n * \\brief The formula used for converting between YUV and RGB\n */\ntypedef enum\n{\n    SDL_YUV_CONVERSION_JPEG,        /**< Full range JPEG */\n    SDL_YUV_CONVERSION_BT601,       /**< BT.601 (the default) */\n    SDL_YUV_CONVERSION_BT709,       /**< BT.709 */\n    SDL_YUV_CONVERSION_AUTOMATIC    /**< BT.601 for SD content, BT.709 for HD content */\n} SDL_YUV_CONVERSION_MODE;\n\n/**\n *  Allocate and free an RGB surface.\n *\n *  If the depth is 4 or 8 bits, an empty palette is allocated for the surface.\n *  If the depth is greater than 8 bits, the pixel format is set using the\n *  flags '[RGB]mask'.\n *\n *  If the function runs out of memory, it will return NULL.\n *\n *  \\param flags The \\c flags are obsolete and should be set to 0.\n *  \\param width The width in pixels of the surface to create.\n *  \\param height The height in pixels of the surface to create.\n *  \\param depth The depth in bits of the surface to create.\n *  \\param Rmask The red mask of the surface to create.\n *  \\param Gmask The green mask of the surface to create.\n *  \\param Bmask The blue mask of the surface to create.\n *  \\param Amask The alpha mask of the surface to create.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface\n    (Uint32 flags, int width, int height, int depth,\n     Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);\n\n/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat\n    (Uint32 flags, int width, int height, int depth, Uint32 format);\n\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,\n                                                              int width,\n                                                              int height,\n                                                              int depth,\n                                                              int pitch,\n                                                              Uint32 Rmask,\n                                                              Uint32 Gmask,\n                                                              Uint32 Bmask,\n                                                              Uint32 Amask);\nextern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom\n    (void *pixels, int width, int height, int depth, int pitch, Uint32 format);\nextern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);\n\n/**\n *  \\brief Set the palette used by a surface.\n *\n *  \\return 0, or -1 if the surface format doesn't use a palette.\n *\n *  \\note A single palette can be shared with many surfaces.\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,\n                                                  SDL_Palette * palette);\n\n/**\n *  \\brief Sets up a surface for directly accessing the pixels.\n *\n *  Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write\n *  to and read from \\c surface->pixels, using the pixel format stored in\n *  \\c surface->format.  Once you are done accessing the surface, you should\n *  use SDL_UnlockSurface() to release it.\n *\n *  Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates\n *  to 0, then you can read and write to the surface at any time, and the\n *  pixel format of the surface will not change.\n *\n *  No operating system or library calls should be made between lock/unlock\n *  pairs, as critical system locks may be held during this time.\n *\n *  SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.\n *\n *  \\sa SDL_UnlockSurface()\n */\nextern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface);\n/** \\sa SDL_LockSurface() */\nextern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface);\n\n/**\n *  Load a surface from a seekable SDL data stream (memory or file).\n *\n *  If \\c freesrc is non-zero, the stream will be closed after being read.\n *\n *  The new surface should be freed with SDL_FreeSurface().\n *\n *  \\return the new surface, or NULL if there was an error.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,\n                                                    int freesrc);\n\n/**\n *  Load a surface from a file.\n *\n *  Convenience macro.\n */\n#define SDL_LoadBMP(file)   SDL_LoadBMP_RW(SDL_RWFromFile(file, \"rb\"), 1)\n\n/**\n *  Save a surface to a seekable SDL data stream (memory or file).\n *\n *  Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the\n *  BMP directly. Other RGB formats with 8-bit or higher get converted to a\n *  24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit\n *  surface before they are saved. YUV and paletted 1-bit and 4-bit formats are\n *  not supported.\n *\n *  If \\c freedst is non-zero, the stream will be closed after being written.\n *\n *  \\return 0 if successful or -1 if there was an error.\n */\nextern DECLSPEC int SDLCALL SDL_SaveBMP_RW\n    (SDL_Surface * surface, SDL_RWops * dst, int freedst);\n\n/**\n *  Save a surface to a file.\n *\n *  Convenience macro.\n */\n#define SDL_SaveBMP(surface, file) \\\n        SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, \"wb\"), 1)\n\n/**\n *  \\brief Sets the RLE acceleration hint for a surface.\n *\n *  \\return 0 on success, or -1 if the surface is not valid\n *\n *  \\note If RLE is enabled, colorkey and alpha blending blits are much faster,\n *        but the surface must be locked before directly accessing the pixels.\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface,\n                                              int flag);\n\n/**\n *  \\brief Sets the color key (transparent pixel) in a blittable surface.\n *\n *  \\param surface The surface to update\n *  \\param flag Non-zero to enable colorkey and 0 to disable colorkey\n *  \\param key The transparent pixel in the native surface format\n *\n *  \\return 0 on success, or -1 if the surface is not valid\n *\n *  You can pass SDL_RLEACCEL to enable RLE accelerated blits.\n */\nextern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface,\n                                            int flag, Uint32 key);\n\n/**\n *  \\brief Returns whether the surface has a color key\n *\n *  \\return SDL_TRUE if the surface has a color key, or SDL_FALSE if the surface is NULL or has no color key\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_HasColorKey(SDL_Surface * surface);\n\n/**\n *  \\brief Gets the color key (transparent pixel) in a blittable surface.\n *\n *  \\param surface The surface to update\n *  \\param key A pointer filled in with the transparent pixel in the native\n *             surface format\n *\n *  \\return 0 on success, or -1 if the surface is not valid or colorkey is not\n *          enabled.\n */\nextern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface,\n                                            Uint32 * key);\n\n/**\n *  \\brief Set an additional color value used in blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param r The red color value multiplied into blit operations.\n *  \\param g The green color value multiplied into blit operations.\n *  \\param b The blue color value multiplied into blit operations.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_GetSurfaceColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,\n                                                   Uint8 r, Uint8 g, Uint8 b);\n\n\n/**\n *  \\brief Get the additional color value used in blit operations.\n *\n *  \\param surface The surface to query.\n *  \\param r A pointer filled in with the current red color value.\n *  \\param g A pointer filled in with the current green color value.\n *  \\param b A pointer filled in with the current blue color value.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceColorMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface,\n                                                   Uint8 * r, Uint8 * g,\n                                                   Uint8 * b);\n\n/**\n *  \\brief Set an additional alpha value used in blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param alpha The alpha value multiplied into blit operations.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_GetSurfaceAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,\n                                                   Uint8 alpha);\n\n/**\n *  \\brief Get the additional alpha value used in blit operations.\n *\n *  \\param surface The surface to query.\n *  \\param alpha A pointer filled in with the current alpha value.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceAlphaMod()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface,\n                                                   Uint8 * alpha);\n\n/**\n *  \\brief Set the blend mode used for blit operations.\n *\n *  \\param surface The surface to update.\n *  \\param blendMode ::SDL_BlendMode to use for blit blending.\n *\n *  \\return 0 on success, or -1 if the parameters are not valid.\n *\n *  \\sa SDL_GetSurfaceBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,\n                                                    SDL_BlendMode blendMode);\n\n/**\n *  \\brief Get the blend mode used for blit operations.\n *\n *  \\param surface   The surface to query.\n *  \\param blendMode A pointer filled in with the current blend mode.\n *\n *  \\return 0 on success, or -1 if the surface is not valid.\n *\n *  \\sa SDL_SetSurfaceBlendMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface,\n                                                    SDL_BlendMode *blendMode);\n\n/**\n *  Sets the clipping rectangle for the destination surface in a blit.\n *\n *  If the clip rectangle is NULL, clipping will be disabled.\n *\n *  If the clip rectangle doesn't intersect the surface, the function will\n *  return SDL_FALSE and blits will be completely clipped.  Otherwise the\n *  function returns SDL_TRUE and blits to the surface will be clipped to\n *  the intersection of the surface area and the clipping rectangle.\n *\n *  Note that blits are automatically clipped to the edges of the source\n *  and destination surfaces.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,\n                                                 const SDL_Rect * rect);\n\n/**\n *  Gets the clipping rectangle for the destination surface in a blit.\n *\n *  \\c rect must be a pointer to a valid rectangle which will be filled\n *  with the correct values.\n */\nextern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface,\n                                             SDL_Rect * rect);\n\n/*\n * Creates a new surface identical to the existing surface\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface);\n\n/**\n *  Creates a new surface of the specified format, and then copies and maps\n *  the given surface to it so the blit of the converted surface will be as\n *  fast as possible.  If this function fails, it returns NULL.\n *\n *  The \\c flags parameter is passed to SDL_CreateRGBSurface() and has those\n *  semantics.  You can also pass ::SDL_RLEACCEL in the flags parameter and\n *  SDL will try to RLE accelerate colorkey and alpha blits in the resulting\n *  surface.\n */\nextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface\n    (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags);\nextern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat\n    (SDL_Surface * src, Uint32 pixel_format, Uint32 flags);\n\n/**\n * \\brief Copy a block of pixels of one format to another format\n *\n *  \\return 0 on success, or -1 if there was an error\n */\nextern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height,\n                                              Uint32 src_format,\n                                              const void * src, int src_pitch,\n                                              Uint32 dst_format,\n                                              void * dst, int dst_pitch);\n\n/**\n *  Performs a fast fill of the given rectangle with \\c color.\n *\n *  If \\c rect is NULL, the whole surface will be filled with \\c color.\n *\n *  The color should be a pixel of the format used by the surface, and\n *  can be generated by the SDL_MapRGB() function.\n *\n *  \\return 0 on success, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_FillRect\n    (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);\nextern DECLSPEC int SDLCALL SDL_FillRects\n    (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);\n\n/**\n *  Performs a fast blit from the source surface to the destination surface.\n *\n *  This assumes that the source and destination rectangles are\n *  the same size.  If either \\c srcrect or \\c dstrect are NULL, the entire\n *  surface (\\c src or \\c dst) is copied.  The final blit rectangles are saved\n *  in \\c srcrect and \\c dstrect after all clipping is performed.\n *\n *  \\return If the blit is successful, it returns 0, otherwise it returns -1.\n *\n *  The blit function should not be called on a locked surface.\n *\n *  The blit semantics for surfaces with and without blending and colorkey\n *  are defined as follows:\n *  \\verbatim\n    RGBA->RGB:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source alpha-channel and per-surface alpha)\n        SDL_SRCCOLORKEY ignored.\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB.\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        RGB values of the source color key, ignoring alpha in the\n        comparison.\n\n    RGB->RGBA:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source per-surface alpha)\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB, set destination alpha to source per-surface alpha value.\n      both:\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        source color key.\n\n    RGBA->RGBA:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source alpha-channel and per-surface alpha)\n        SDL_SRCCOLORKEY ignored.\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy all of RGBA to the destination.\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        RGB values of the source color key, ignoring alpha in the\n        comparison.\n\n    RGB->RGB:\n      Source surface blend mode set to SDL_BLENDMODE_BLEND:\n        alpha-blend (using the source per-surface alpha)\n      Source surface blend mode set to SDL_BLENDMODE_NONE:\n        copy RGB.\n      both:\n        if SDL_SRCCOLORKEY set, only copy the pixels matching the\n        source color key.\n    \\endverbatim\n *\n *  You should call SDL_BlitSurface() unless you know exactly how SDL\n *  blitting works internally and how to use the other blit functions.\n */\n#define SDL_BlitSurface SDL_UpperBlit\n\n/**\n *  This is the public blit function, SDL_BlitSurface(), and it performs\n *  rectangle validation and clipping before passing it to SDL_LowerBlit()\n */\nextern DECLSPEC int SDLCALL SDL_UpperBlit\n    (SDL_Surface * src, const SDL_Rect * srcrect,\n     SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  This is a semi-private blit function and it performs low-level surface\n *  blitting only.\n */\nextern DECLSPEC int SDLCALL SDL_LowerBlit\n    (SDL_Surface * src, SDL_Rect * srcrect,\n     SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  \\brief Perform a fast, low quality, stretch blit between two surfaces of the\n *         same pixel format.\n *\n *  \\note This function uses a static buffer, and is not thread-safe.\n */\nextern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,\n                                            const SDL_Rect * srcrect,\n                                            SDL_Surface * dst,\n                                            const SDL_Rect * dstrect);\n\n#define SDL_BlitScaled SDL_UpperBlitScaled\n\n/**\n *  This is the public scaled blit function, SDL_BlitScaled(), and it performs\n *  rectangle validation and clipping before passing it to SDL_LowerBlitScaled()\n */\nextern DECLSPEC int SDLCALL SDL_UpperBlitScaled\n    (SDL_Surface * src, const SDL_Rect * srcrect,\n    SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  This is a semi-private blit function and it performs low-level surface\n *  scaled blitting only.\n */\nextern DECLSPEC int SDLCALL SDL_LowerBlitScaled\n    (SDL_Surface * src, SDL_Rect * srcrect,\n    SDL_Surface * dst, SDL_Rect * dstrect);\n\n/**\n *  \\brief Set the YUV conversion mode\n */\nextern DECLSPEC void SDLCALL SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode);\n\n/**\n *  \\brief Get the YUV conversion mode\n */\nextern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionMode(void);\n\n/**\n *  \\brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC\n */\nextern DECLSPEC SDL_YUV_CONVERSION_MODE SDLCALL SDL_GetYUVConversionModeForResolution(int width, int height);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_surface_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_system.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_system.h\n *\n *  Include file for platform specific SDL API functions\n */\n\n#ifndef SDL_system_h_\n#define SDL_system_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_keyboard.h\"\n#include \"SDL_render.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* Platform specific functions for Windows */\n#ifdef __WIN32__\n\t\n/**\n   \\brief Set a function that is called for every windows message, before TranslateMessage()\n*/\ntypedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);\nextern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);\n\n/**\n   \\brief Returns the D3D9 adapter index that matches the specified display index.\n\n   This adapter index can be passed to IDirect3D9::CreateDevice and controls\n   on which monitor a full screen application will appear.\n*/\nextern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );\n\ntypedef struct IDirect3DDevice9 IDirect3DDevice9;\n/**\n   \\brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.\n\n   Once you are done using the device, you should release it to avoid a resource leak.\n */\nextern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);\n\n/**\n   \\brief Returns the DXGI Adapter and Output indices for the specified display index.\n\n   These can be passed to EnumAdapters and EnumOutputs respectively to get the objects\n   required to create a DX10 or DX11 device and swap chain.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );\n\n#endif /* __WIN32__ */\n\n\n/* Platform specific functions for Linux */\n#ifdef __LINUX__\n\n/**\n   \\brief Sets the UNIX nice value for a thread, using setpriority() if possible, and RealtimeKit if available.\n\n   \\return 0 on success, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);\n \n#endif /* __LINUX__ */\n\t\n/* Platform specific functions for iOS */\n#if defined(__IPHONEOS__) && __IPHONEOS__\n\n#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)\nextern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);\n\n#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)\nextern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);\n\n#endif /* __IPHONEOS__ */\n\n\n/* Platform specific functions for Android */\n#if defined(__ANDROID__) && __ANDROID__\n\n/**\n   \\brief Get the JNI environment for the current thread\n\n   This returns JNIEnv*, but the prototype is void* so we don't need jni.h\n */\nextern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);\n\n/**\n   \\brief Get the SDL Activity object for the application\n\n   This returns jobject, but the prototype is void* so we don't need jni.h\n   The jobject returned by SDL_AndroidGetActivity is a local reference.\n   It is the caller's responsibility to properly release it\n   (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)\n */\nextern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);\n\n/**\n   \\brief Return true if the application is running on Android TV\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);\n\n/**\n   \\brief Return true if the application is running on a Chromebook\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);\n\n/**\n  \\brief Return true is the application is running on a Samsung DeX docking station\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);\n\n/**\n \\brief Trigger the Android system back button behavior.\n */\nextern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);\n\n/**\n   See the official Android developer guide for more information:\n   http://developer.android.com/guide/topics/data/data-storage.html\n*/\n#define SDL_ANDROID_EXTERNAL_STORAGE_READ   0x01\n#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE  0x02\n\n/**\n   \\brief Get the path used for internal storage for this application.\n\n   This path is unique to your application and cannot be written to\n   by other applications.\n */\nextern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);\n\n/**\n   \\brief Get the current state of external storage, a bitmask of these values:\n    SDL_ANDROID_EXTERNAL_STORAGE_READ\n    SDL_ANDROID_EXTERNAL_STORAGE_WRITE\n\n   If external storage is currently unavailable, this will return 0.\n*/\nextern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);\n\n/**\n   \\brief Get the path used for external storage for this application.\n\n   This path is unique to your application, but is public and can be\n   written to by other applications.\n */\nextern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);\n\n#endif /* __ANDROID__ */\n\n/* Platform specific functions for WinRT */\n#if defined(__WINRT__) && __WINRT__\n\n/**\n *  \\brief WinRT / Windows Phone path types\n */\ntypedef enum\n{\n    /** \\brief The installed app's root directory.\n        Files here are likely to be read-only. */\n    SDL_WINRT_PATH_INSTALLED_LOCATION,\n\n    /** \\brief The app's local data store.  Files may be written here */\n    SDL_WINRT_PATH_LOCAL_FOLDER,\n\n    /** \\brief The app's roaming data store.  Unsupported on Windows Phone.\n        Files written here may be copied to other machines via a network\n        connection.\n    */\n    SDL_WINRT_PATH_ROAMING_FOLDER,\n\n    /** \\brief The app's temporary data store.  Unsupported on Windows Phone.\n        Files written here may be deleted at any time. */\n    SDL_WINRT_PATH_TEMP_FOLDER\n} SDL_WinRT_Path;\n\n\n/**\n *  \\brief WinRT Device Family\n */\ntypedef enum\n{\n    /** \\brief Unknown family  */\n    SDL_WINRT_DEVICEFAMILY_UNKNOWN,\n\n    /** \\brief Desktop family*/\n    SDL_WINRT_DEVICEFAMILY_DESKTOP,\n\n    /** \\brief Mobile family (for example smartphone) */\n    SDL_WINRT_DEVICEFAMILY_MOBILE,\n\n    /** \\brief XBox family */\n    SDL_WINRT_DEVICEFAMILY_XBOX,\n} SDL_WinRT_DeviceFamily;\n\n\n/**\n *  \\brief Retrieves a WinRT defined path on the local file system\n *\n *  \\note Documentation on most app-specific path types on WinRT\n *      can be found on MSDN, at the URL:\n *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx\n *\n *  \\param pathType The type of path to retrieve.\n *  \\return A UCS-2 string (16-bit, wide-char) containing the path, or NULL\n *      if the path is not available for any reason.  Not all paths are\n *      available on all versions of Windows.  This is especially true on\n *      Windows Phone.  Check the documentation for the given\n *      SDL_WinRT_Path for more information on which path types are\n *      supported where.\n */\nextern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType);\n\n/**\n *  \\brief Retrieves a WinRT defined path on the local file system\n *\n *  \\note Documentation on most app-specific path types on WinRT\n *      can be found on MSDN, at the URL:\n *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx\n *\n *  \\param pathType The type of path to retrieve.\n *  \\return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL\n *      if the path is not available for any reason.  Not all paths are\n *      available on all versions of Windows.  This is especially true on\n *      Windows Phone.  Check the documentation for the given\n *      SDL_WinRT_Path for more information on which path types are\n *      supported where.\n */\nextern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType);\n\n/**\n *  \\brief Detects the device family of WinRT plattform on runtime\n *\n *  \\return Device family\n */\nextern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();\n\n#endif /* __WINRT__ */\n\n/**\n \\brief Return true if the current device is a tablet.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_system_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_syswm.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_syswm.h\n *\n *  Include file for SDL custom system window manager hooks.\n */\n\n#ifndef SDL_syswm_h_\n#define SDL_syswm_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n#include \"SDL_version.h\"\n\n/**\n *  \\brief SDL_syswm.h\n *\n *  Your application has access to a special type of event ::SDL_SYSWMEVENT,\n *  which contains window-manager specific information and arrives whenever\n *  an unhandled window event occurs.  This event is ignored by default, but\n *  you can enable it with SDL_EventState().\n */\nstruct SDL_SysWMinfo;\n\n#if !defined(SDL_PROTOTYPES_ONLY)\n\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#include <windows.h>\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_WINRT)\n#include <Inspectable.h>\n#endif\n\n/* This is the structure for custom window manager events */\n#if defined(SDL_VIDEO_DRIVER_X11)\n#if defined(__APPLE__) && defined(__MACH__)\n/* conflicts with Quickdraw.h */\n#define Cursor X11Cursor\n#endif\n\n#include <X11/Xlib.h>\n#include <X11/Xatom.h>\n\n#if defined(__APPLE__) && defined(__MACH__)\n/* matches the re-define above */\n#undef Cursor\n#endif\n\n#endif /* defined(SDL_VIDEO_DRIVER_X11) */\n\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n#include <directfb.h>\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n#ifdef __OBJC__\n@class NSWindow;\n#else\ntypedef struct _NSWindow NSWindow;\n#endif\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n#ifdef __OBJC__\n#include <UIKit/UIKit.h>\n#else\ntypedef struct _UIWindow UIWindow;\ntypedef struct _UIViewController UIViewController;\n#endif\ntypedef Uint32 GLuint;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_ANDROID)\ntypedef struct ANativeWindow ANativeWindow;\ntypedef void *EGLSurface;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n#include \"SDL_egl.h\"\n#endif\n#endif /* SDL_PROTOTYPES_ONLY */\n\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#if !defined(SDL_PROTOTYPES_ONLY)\n/**\n *  These are the various supported windowing subsystems\n */\ntypedef enum\n{\n    SDL_SYSWM_UNKNOWN,\n    SDL_SYSWM_WINDOWS,\n    SDL_SYSWM_X11,\n    SDL_SYSWM_DIRECTFB,\n    SDL_SYSWM_COCOA,\n    SDL_SYSWM_UIKIT,\n    SDL_SYSWM_WAYLAND,\n    SDL_SYSWM_MIR,  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */\n    SDL_SYSWM_WINRT,\n    SDL_SYSWM_ANDROID,\n    SDL_SYSWM_VIVANTE,\n    SDL_SYSWM_OS2\n} SDL_SYSWM_TYPE;\n\n/**\n *  The custom event structure.\n */\nstruct SDL_SysWMmsg\n{\n    SDL_version version;\n    SDL_SYSWM_TYPE subsystem;\n    union\n    {\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n        struct {\n            HWND hwnd;                  /**< The window for the message */\n            UINT msg;                   /**< The type of message */\n            WPARAM wParam;              /**< WORD message parameter */\n            LPARAM lParam;              /**< LONG message parameter */\n        } win;\n#endif\n#if defined(SDL_VIDEO_DRIVER_X11)\n        struct {\n            XEvent event;\n        } x11;\n#endif\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n        struct {\n            DFBEvent event;\n        } dfb;\n#endif\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n        struct\n        {\n            /* Latest version of Xcode clang complains about empty structs in C v. C++:\n                 error: empty struct has size 0 in C, size 1 in C++\n             */\n            int dummy;\n            /* No Cocoa window events yet */\n        } cocoa;\n#endif\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n        struct\n        {\n            int dummy;\n            /* No UIKit window events yet */\n        } uikit;\n#endif\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n        struct\n        {\n            int dummy;\n            /* No Vivante window events yet */\n        } vivante;\n#endif\n        /* Can't have an empty union */\n        int dummy;\n    } msg;\n};\n\n/**\n *  The custom window manager information structure.\n *\n *  When this structure is returned, it holds information about which\n *  low level system it is using, and will be one of SDL_SYSWM_TYPE.\n */\nstruct SDL_SysWMinfo\n{\n    SDL_version version;\n    SDL_SYSWM_TYPE subsystem;\n    union\n    {\n#if defined(SDL_VIDEO_DRIVER_WINDOWS)\n        struct\n        {\n            HWND window;                /**< The window handle */\n            HDC hdc;                    /**< The window device context */\n            HINSTANCE hinstance;        /**< The instance handle */\n        } win;\n#endif\n#if defined(SDL_VIDEO_DRIVER_WINRT)\n        struct\n        {\n            IInspectable * window;      /**< The WinRT CoreWindow */\n        } winrt;\n#endif\n#if defined(SDL_VIDEO_DRIVER_X11)\n        struct\n        {\n            Display *display;           /**< The X11 display */\n            Window window;              /**< The X11 window */\n        } x11;\n#endif\n#if defined(SDL_VIDEO_DRIVER_DIRECTFB)\n        struct\n        {\n            IDirectFB *dfb;             /**< The directfb main interface */\n            IDirectFBWindow *window;    /**< The directfb window handle */\n            IDirectFBSurface *surface;  /**< The directfb client surface */\n        } dfb;\n#endif\n#if defined(SDL_VIDEO_DRIVER_COCOA)\n        struct\n        {\n#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)\n            NSWindow __unsafe_unretained *window; /**< The Cocoa window */\n#else\n            NSWindow *window;                     /**< The Cocoa window */\n#endif\n        } cocoa;\n#endif\n#if defined(SDL_VIDEO_DRIVER_UIKIT)\n        struct\n        {\n#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)\n            UIWindow __unsafe_unretained *window; /**< The UIKit window */\n#else\n            UIWindow *window;                     /**< The UIKit window */\n#endif\n            GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */\n            GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */\n            GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */\n        } uikit;\n#endif\n#if defined(SDL_VIDEO_DRIVER_WAYLAND)\n        struct\n        {\n            struct wl_display *display;            /**< Wayland display */\n            struct wl_surface *surface;            /**< Wayland surface */\n            struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */\n        } wl;\n#endif\n#if defined(SDL_VIDEO_DRIVER_MIR)  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */\n        struct\n        {\n            void *connection;  /**< Mir display server connection */\n            void *surface;  /**< Mir surface */\n        } mir;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_ANDROID)\n        struct\n        {\n            ANativeWindow *window;\n            EGLSurface surface;\n        } android;\n#endif\n\n#if defined(SDL_VIDEO_DRIVER_VIVANTE)\n        struct\n        {\n            EGLNativeDisplayType display;\n            EGLNativeWindowType window;\n        } vivante;\n#endif\n\n        /* Make sure this union is always 64 bytes (8 64-bit pointers). */\n        /* Be careful not to overflow this if you add a new target! */\n        Uint8 dummy[64];\n    } info;\n};\n\n#endif /* SDL_PROTOTYPES_ONLY */\n\ntypedef struct SDL_SysWMinfo SDL_SysWMinfo;\n\n/* Function prototypes */\n/**\n *  \\brief This function allows access to driver-dependent window information.\n *\n *  \\param window The window about which information is being requested\n *  \\param info This structure must be initialized with the SDL version, and is\n *              then filled in with information about the given window.\n *\n *  \\return SDL_TRUE if the function is implemented and the version member of\n *          the \\c info struct is valid, SDL_FALSE otherwise.\n *\n *  You typically use this function like this:\n *  \\code\n *  SDL_SysWMinfo info;\n *  SDL_VERSION(&info.version);\n *  if ( SDL_GetWindowWMInfo(window, &info) ) { ... }\n *  \\endcode\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,\n                                                     SDL_SysWMinfo * info);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_syswm_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_h_\n#define SDL_test_h_\n\n#include \"SDL.h\"\n#include \"SDL_test_assert.h\"\n#include \"SDL_test_common.h\"\n#include \"SDL_test_compare.h\"\n#include \"SDL_test_crc32.h\"\n#include \"SDL_test_font.h\"\n#include \"SDL_test_fuzzer.h\"\n#include \"SDL_test_harness.h\"\n#include \"SDL_test_images.h\"\n#include \"SDL_test_log.h\"\n#include \"SDL_test_md5.h\"\n#include \"SDL_test_memory.h\"\n#include \"SDL_test_random.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Global definitions */\n\n/*\n * Note: Maximum size of SDLTest log message is less than SDL's limit\n * to ensure we can fit additional information such as the timestamp.\n */\n#define SDLTEST_MAX_LOGMESSAGE_LENGTH   3584\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_assert.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_assert.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n *\n * Assert API for test code and test cases\n *\n */\n\n#ifndef SDL_test_assert_h_\n#define SDL_test_assert_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Fails the assert.\n */\n#define ASSERT_FAIL     0\n\n/**\n * \\brief Passes the assert.\n */\n#define ASSERT_PASS     1\n\n/**\n * \\brief Assert that logs and break execution flow on failures.\n *\n * \\param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).\n * \\param assertDescription Message to log with the assert describing it.\n */\nvoid SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n * \\brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.\n *\n * \\param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).\n * \\param assertDescription Message to log with the assert describing it.\n *\n * \\returns Returns the assertCondition so it can be used to externally to break execution flow if desired.\n */\nint SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);\n\n/**\n * \\brief Explicitly pass without checking an assertion condition. Updates assertion counter.\n *\n * \\param assertDescription Message to log with the assert describing it.\n */\nvoid SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n * \\brief Resets the assert summary counters to zero.\n */\nvoid SDLTest_ResetAssertSummary(void);\n\n/**\n * \\brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.\n */\nvoid SDLTest_LogAssertSummary(void);\n\n\n/**\n * \\brief Converts the current assert summary state to a test result.\n *\n * \\returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT\n */\nint SDLTest_AssertSummaryToTestResult(void);\n\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_assert_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_common.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_common.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/* Ported from original test\\common.h file. */\n\n#ifndef SDL_test_common_h_\n#define SDL_test_common_h_\n\n#include \"SDL.h\"\n\n#if defined(__PSP__)\n#define DEFAULT_WINDOW_WIDTH  480\n#define DEFAULT_WINDOW_HEIGHT 272\n#else\n#define DEFAULT_WINDOW_WIDTH  640\n#define DEFAULT_WINDOW_HEIGHT 480\n#endif\n\n#define VERBOSE_VIDEO   0x00000001\n#define VERBOSE_MODES   0x00000002\n#define VERBOSE_RENDER  0x00000004\n#define VERBOSE_EVENT   0x00000008\n#define VERBOSE_AUDIO   0x00000010\n\ntypedef struct\n{\n    /* SDL init flags */\n    char **argv;\n    Uint32 flags;\n    Uint32 verbose;\n\n    /* Video info */\n    const char *videodriver;\n    int display;\n    const char *window_title;\n    const char *window_icon;\n    Uint32 window_flags;\n    int window_x;\n    int window_y;\n    int window_w;\n    int window_h;\n    int window_minW;\n    int window_minH;\n    int window_maxW;\n    int window_maxH;\n    int logical_w;\n    int logical_h;\n    float scale;\n    int depth;\n    int refresh_rate;\n    int num_windows;\n    SDL_Window **windows;\n\n    /* Renderer info */\n    const char *renderdriver;\n    Uint32 render_flags;\n    SDL_bool skip_renderer;\n    SDL_Renderer **renderers;\n    SDL_Texture **targets;\n\n    /* Audio info */\n    const char *audiodriver;\n    SDL_AudioSpec audiospec;\n\n    /* GL settings */\n    int gl_red_size;\n    int gl_green_size;\n    int gl_blue_size;\n    int gl_alpha_size;\n    int gl_buffer_size;\n    int gl_depth_size;\n    int gl_stencil_size;\n    int gl_double_buffer;\n    int gl_accum_red_size;\n    int gl_accum_green_size;\n    int gl_accum_blue_size;\n    int gl_accum_alpha_size;\n    int gl_stereo;\n    int gl_multisamplebuffers;\n    int gl_multisamplesamples;\n    int gl_retained_backing;\n    int gl_accelerated;\n    int gl_major_version;\n    int gl_minor_version;\n    int gl_debug;\n    int gl_profile_mask;\n} SDLTest_CommonState;\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n/**\n * \\brief Parse command line parameters and create common state.\n *\n * \\param argv Array of command line parameters\n * \\param flags Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO)\n *\n * \\returns Returns a newly allocated common state object.\n */\nSDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);\n\n/**\n * \\brief Process one common argument.\n *\n * \\param state The common state describing the test window to create.\n * \\param index The index of the argument to process in argv[].\n *\n * \\returns The number of arguments processed (i.e. 1 for --fullscreen, 2 for --video [videodriver], or -1 on error.\n */\nint SDLTest_CommonArg(SDLTest_CommonState * state, int index);\n\n\n/**\n * \\brief Logs command line usage info.\n *\n * This logs the appropriate command line options for the subsystems in use\n *  plus other common options, and then any application-specific options.\n *  This uses the SDL_Log() function and splits up output to be friendly to\n *  80-character-wide terminals.\n *\n * \\param state The common state describing the test window for the app.\n * \\param argv0 argv[0], as passed to main/SDL_main.\n * \\param options an array of strings for application specific options. The last element of the array should be NULL.\n */\nvoid SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);\n\n/**\n * \\brief Open test window.\n *\n * \\param state The common state describing the test window to create.\n *\n * \\returns True if initialization succeeded, false otherwise\n */\nSDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);\n\n/**\n * \\brief Easy argument handling when test app doesn't need any custom args.\n *\n * \\param state The common state describing the test window to create.\n * \\param argc argc, as supplied to SDL_main\n * \\param argv argv, as supplied to SDL_main\n *\n * \\returns False if app should quit, true otherwise.\n */\nSDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);\n\n/**\n * \\brief Common event handler for test windows.\n *\n * \\param state The common state used to create test window.\n * \\param event The event to handle.\n * \\param done Flag indicating we are done.\n *\n */\nvoid SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done);\n\n/**\n * \\brief Close test window.\n *\n * \\param state The common state used to create test window.\n *\n */\nvoid SDLTest_CommonQuit(SDLTest_CommonState * state);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_common_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_compare.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_compare.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Defines comparison functions (i.e. for surfaces).\n\n*/\n\n#ifndef SDL_test_compare_h_\n#define SDL_test_compare_h_\n\n#include \"SDL.h\"\n\n#include \"SDL_test_images.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Compares a surface and with reference image data for equality\n *\n * \\param surface Surface used in comparison\n * \\param referenceSurface Test Surface used in comparison\n * \\param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.\n *\n * \\returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.\n */\nint SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_compare_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_crc32.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_crc32.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Implements CRC32 calculations (default output is Perl String::CRC32 compatible).\n\n*/\n\n#ifndef SDL_test_crc32_h_\n#define SDL_test_crc32_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* ------------ Definitions --------- */\n\n/* Definition shared by all CRC routines */\n\n#ifndef CrcUint32\n #define CrcUint32  unsigned int\n#endif\n#ifndef CrcUint8\n #define CrcUint8   unsigned char\n#endif\n\n#ifdef ORIGINAL_METHOD\n #define CRC32_POLY 0x04c11db7   /* AUTODIN II, Ethernet, & FDDI */\n#else\n #define CRC32_POLY 0xEDB88320   /* Perl String::CRC32 compatible */\n#endif\n\n/**\n * Data structure for CRC32 (checksum) computation\n */\n  typedef struct {\n    CrcUint32    crc32_table[256]; /* CRC table */\n  } SDLTest_Crc32Context;\n\n/* ---------- Function Prototypes ------------- */\n\n/**\n * \\brief Initialize the CRC context\n *\n * Note: The function initializes the crc table required for all crc calculations.\n *\n * \\param crcContext        pointer to context variable\n *\n * \\returns 0 for OK, -1 on error\n *\n */\n int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);\n\n\n/**\n * \\brief calculate a crc32 from a data block\n *\n * \\param crcContext         pointer to context variable\n * \\param inBuf              input buffer to checksum\n * \\param inLen              length of input buffer\n * \\param crc32              pointer to Uint32 to store the final CRC into\n *\n * \\returns 0 for OK, -1 on error\n *\n */\nint SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);\n\n/* Same routine broken down into three steps */\nint SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);\nint SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);\nint SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);\n\n\n/**\n * \\brief clean up CRC context\n *\n * \\param crcContext        pointer to context variable\n *\n * \\returns 0 for OK, -1 on error\n *\n*/\n\nint SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_crc32_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_font.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_font.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_font_h_\n#define SDL_test_font_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Function prototypes */\n\n#define FONT_CHARACTER_SIZE  8\n\n/**\n *  \\brief Draw a string in the currently set font.\n *\n *  \\param renderer The renderer to draw on.\n *  \\param x The X coordinate of the upper left corner of the character.\n *  \\param y The Y coordinate of the upper left corner of the character.\n *  \\param c The character to draw.\n *\n *  \\returns Returns 0 on success, -1 on failure.\n */\nint SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c);\n\n/**\n *  \\brief Draw a string in the currently set font.\n *\n *  \\param renderer The renderer to draw on.\n *  \\param x The X coordinate of the upper left corner of the string.\n *  \\param y The Y coordinate of the upper left corner of the string.\n *  \\param s The string to draw.\n *\n *  \\returns Returns 0 on success, -1 on failure.\n */\nint SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s);\n\n\n/**\n *  \\brief Cleanup textures used by font drawing functions.\n */\nvoid SDLTest_CleanupTextDrawing(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_font_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_fuzzer.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_fuzzer.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n  Data generators for fuzzing test data in a reproducible way.\n\n*/\n\n#ifndef SDL_test_fuzzer_h_\n#define SDL_test_fuzzer_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/*\n  Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>\n*/\n\n\n/**\n * \\file\n * Note: The fuzzer implementation uses a static instance of random context\n * internally which makes it thread-UNsafe.\n */\n\n/**\n * Initializes the fuzzer for a test\n *\n * \\param execKey Execution \"Key\" that initializes the random number generator uniquely for the test.\n *\n */\nvoid SDLTest_FuzzerInit(Uint64 execKey);\n\n\n/**\n * Returns a random Uint8\n *\n * \\returns Generated integer\n */\nUint8 SDLTest_RandomUint8(void);\n\n/**\n * Returns a random Sint8\n *\n * \\returns Generated signed integer\n */\nSint8 SDLTest_RandomSint8(void);\n\n\n/**\n * Returns a random Uint16\n *\n * \\returns Generated integer\n */\nUint16 SDLTest_RandomUint16(void);\n\n/**\n * Returns a random Sint16\n *\n * \\returns Generated signed integer\n */\nSint16 SDLTest_RandomSint16(void);\n\n\n/**\n * Returns a random integer\n *\n * \\returns Generated integer\n */\nSint32 SDLTest_RandomSint32(void);\n\n\n/**\n * Returns a random positive integer\n *\n * \\returns Generated integer\n */\nUint32 SDLTest_RandomUint32(void);\n\n/**\n * Returns random Uint64.\n *\n * \\returns Generated integer\n */\nUint64 SDLTest_RandomUint64(void);\n\n\n/**\n * Returns random Sint64.\n *\n * \\returns Generated signed integer\n */\nSint64 SDLTest_RandomSint64(void);\n\n/**\n * \\returns random float in range [0.0 - 1.0[\n */\nfloat SDLTest_RandomUnitFloat(void);\n\n/**\n * \\returns random double in range [0.0 - 1.0[\n */\ndouble SDLTest_RandomUnitDouble(void);\n\n/**\n * \\returns random float.\n *\n */\nfloat SDLTest_RandomFloat(void);\n\n/**\n * \\returns random double.\n *\n */\ndouble SDLTest_RandomDouble(void);\n\n/**\n * Returns a random boundary value for Uint8 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint16 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint32 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Uint64 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20\n * RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21\n * RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100\n * RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or 0 with error set\n */\nUint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint8 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100\n * RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT8_MIN with error set\n */\nSint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain);\n\n\n/**\n * Returns a random boundary value for Sint16 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100\n * RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT16_MIN with error set\n */\nSint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint32 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100\n * RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value)\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT32_MIN with error set\n */\nSint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain);\n\n/**\n * Returns a random boundary value for Sint64 within the given boundaries.\n * Boundaries are inclusive, see the usage examples below. If validDomain\n * is true, the function will only return valid boundaries, otherwise non-valid\n * boundaries are also possible.\n * If boundary1 > boundary2, the values are swapped\n *\n * Usage examples:\n * RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20\n * RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9\n * RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100\n * RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set\n *\n * \\param boundary1 Lower boundary limit\n * \\param boundary2 Upper boundary limit\n * \\param validDomain Should the generated boundary be valid (=within the bounds) or not?\n *\n * \\returns Random boundary value for the given range and domain or SINT64_MIN with error set\n */\nSint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain);\n\n\n/**\n * Returns integer in range [min, max] (inclusive).\n * Min and max values can be negative values.\n * If Max in smaller than min, then the values are swapped.\n * Min and max are the same value, that value will be returned.\n *\n * \\param min Minimum inclusive value of returned random number\n * \\param max Maximum inclusive value of returned random number\n *\n * \\returns Generated random integer in range\n */\nSint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);\n\n\n/**\n * Generates random null-terminated string. The minimum length for\n * the string is 1 character, maximum length for the string is 255\n * characters and it can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\returns Newly allocated random string; or NULL if length was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiString(void);\n\n\n/**\n * Generates random null-terminated string. The maximum length for\n * the string is defined by the maxLength parameter.\n * String can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\param maxLength The maximum length of the generated string.\n *\n * \\returns Newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);\n\n\n/**\n * Generates random null-terminated string. The length for\n * the string is defined by the size parameter.\n * String can contain ASCII characters from 32 to 126.\n *\n * Note: Returned string needs to be deallocated.\n *\n * \\param size The length of the generated string\n *\n * \\returns Newly allocated random string; or NULL if size was invalid or string could not be allocated.\n */\nchar * SDLTest_RandomAsciiStringOfSize(int size);\n\n/**\n * Returns the invocation count for the fuzzer since last ...FuzzerInit.\n */\nint SDLTest_GetFuzzerInvocationCount(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_fuzzer_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_harness.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_harness.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n  Defines types for test case definitions and the test execution harness API.\n\n  Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>\n*/\n\n#ifndef SDL_test_h_arness_h\n#define SDL_test_h_arness_h\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/* ! Definitions for test case structures */\n#define TEST_ENABLED  1\n#define TEST_DISABLED 0\n\n/* ! Definition of all the possible test return values of the test case method */\n#define TEST_ABORTED        -1\n#define TEST_STARTED         0\n#define TEST_COMPLETED       1\n#define TEST_SKIPPED         2\n\n/* ! Definition of all the possible test results for the harness */\n#define TEST_RESULT_PASSED              0\n#define TEST_RESULT_FAILED              1\n#define TEST_RESULT_NO_ASSERT           2\n#define TEST_RESULT_SKIPPED             3\n#define TEST_RESULT_SETUP_FAILURE       4\n\n/* !< Function pointer to a test case setup function (run before every test) */\ntypedef void (*SDLTest_TestCaseSetUpFp)(void *arg);\n\n/* !< Function pointer to a test case function */\ntypedef int (*SDLTest_TestCaseFp)(void *arg);\n\n/* !< Function pointer to a test case teardown function (run after every test) */\ntypedef void  (*SDLTest_TestCaseTearDownFp)(void *arg);\n\n/**\n * Holds information about a single test case.\n */\ntypedef struct SDLTest_TestCaseReference {\n    /* !< Func2Stress */\n    SDLTest_TestCaseFp testCase;\n    /* !< Short name (or function name) \"Func2Stress\" */\n    char *name;\n    /* !< Long name or full description \"This test pushes func2() to the limit.\" */\n    char *description;\n    /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */\n    int enabled;\n} SDLTest_TestCaseReference;\n\n/**\n * Holds information about a test suite (multiple test cases).\n */\ntypedef struct SDLTest_TestSuiteReference {\n    /* !< \"PlatformSuite\" */\n    char *name;\n    /* !< The function that is run before each test. NULL skips. */\n    SDLTest_TestCaseSetUpFp testSetUp;\n    /* !< The test cases that are run as part of the suite. Last item should be NULL. */\n    const SDLTest_TestCaseReference **testCases;\n    /* !< The function that is run after each test. NULL skips. */\n    SDLTest_TestCaseTearDownFp testTearDown;\n} SDLTest_TestSuiteReference;\n\n\n/**\n * \\brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z).\n *\n * Note: The returned string needs to be deallocated by the caller.\n *\n * \\param length The length of the seed string to generate\n *\n * \\returns The generated seed string\n */\nchar *SDLTest_GenerateRunSeed(const int length);\n\n/**\n * \\brief Execute a test suite using the given run seed and execution key.\n *\n * \\param testSuites Suites containing the test case.\n * \\param userRunSeed Custom run seed provided by user, or NULL to autogenerate one.\n * \\param userExecKey Custom execution key provided by user, or 0 to autogenerate one.\n * \\param filter Filter specification. NULL disables. Case sensitive.\n * \\param testIterations Number of iterations to run each test case.\n *\n * \\returns Test run result; 0 when all tests passed, 1 if any tests failed.\n */\nint SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_h_arness_h */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_images.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_images.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n Defines some images for tests.\n\n*/\n\n#ifndef SDL_test_images_h_\n#define SDL_test_images_h_\n\n#include \"SDL.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *Type for test images.\n */\ntypedef struct SDLTest_SurfaceImage_s {\n  int width;\n  int height;\n  unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */\n  const char *pixel_data;\n} SDLTest_SurfaceImage_t;\n\n/* Test images */\nSDL_Surface *SDLTest_ImageBlit(void);\nSDL_Surface *SDLTest_ImageBlitColor(void);\nSDL_Surface *SDLTest_ImageBlitAlpha(void);\nSDL_Surface *SDLTest_ImageBlitBlendAdd(void);\nSDL_Surface *SDLTest_ImageBlitBlend(void);\nSDL_Surface *SDLTest_ImageBlitBlendMod(void);\nSDL_Surface *SDLTest_ImageBlitBlendNone(void);\nSDL_Surface *SDLTest_ImageBlitBlendAll(void);\nSDL_Surface *SDLTest_ImageFace(void);\nSDL_Surface *SDLTest_ImagePrimitives(void);\nSDL_Surface *SDLTest_ImagePrimitivesBlend(void);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_images_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_log.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_log.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n *\n *  Wrapper to log in the TEST category\n *\n */\n\n#ifndef SDL_test_log_h_\n#define SDL_test_log_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Prints given message with a timestamp in the TEST category and INFO priority.\n *\n * \\param fmt Message to be logged\n */\nvoid SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/**\n * \\brief Prints given message with a timestamp in the TEST category and the ERROR priority.\n *\n * \\param fmt Message to be logged\n */\nvoid SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_log_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_md5.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_md5.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n ***********************************************************************\n ** Header file for implementation of MD5                             **\n ** RSA Data Security, Inc. MD5 Message-Digest Algorithm              **\n ** Created: 2/17/90 RLR                                              **\n ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version               **\n ** Revised (for MD5): RLR 4/27/91                                    **\n **   -- G modified to have y&~z instead of y&z                       **\n **   -- FF, GG, HH modified to add in last register done             **\n **   -- Access pattern: round 2 works mod 5, round 3 works mod 3     **\n **   -- distinct additive constant for each step                     **\n **   -- round 4 added, working mod 7                                 **\n ***********************************************************************\n*/\n\n/*\n ***********************************************************************\n **  Message-digest routines:                                         **\n **  To form the message digest for a message M                       **\n **    (1) Initialize a context buffer mdContext using MD5Init        **\n **    (2) Call MD5Update on mdContext and M                          **\n **    (3) Call MD5Final on mdContext                                 **\n **  The message digest is now in mdContext->digest[0...15]           **\n ***********************************************************************\n*/\n\n#ifndef SDL_test_md5_h_\n#define SDL_test_md5_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* ------------ Definitions --------- */\n\n/* typedef a 32-bit type */\n  typedef unsigned long int MD5UINT4;\n\n/* Data structure for MD5 (Message-Digest) computation */\n  typedef struct {\n    MD5UINT4  i[2];     /* number of _bits_ handled mod 2^64 */\n    MD5UINT4  buf[4];       /* scratch buffer */\n    unsigned char in[64];   /* input buffer */\n    unsigned char digest[16];   /* actual digest after Md5Final call */\n  } SDLTest_Md5Context;\n\n/* ---------- Function Prototypes ------------- */\n\n/**\n * \\brief initialize the context\n *\n * \\param  mdContext        pointer to context variable\n *\n * Note: The function initializes the message-digest context\n *       mdContext. Call before each new use of the context -\n *       all fields are set to zero.\n */\n void SDLTest_Md5Init(SDLTest_Md5Context * mdContext);\n\n\n/**\n * \\brief update digest from variable length data\n *\n * \\param  mdContext       pointer to context variable\n * \\param  inBuf           pointer to data array/string\n * \\param  inLen           length of data array/string\n *\n * Note: The function updates the message-digest context to account\n *       for the presence of each of the characters inBuf[0..inLen-1]\n *       in the message whose digest is being computed.\n*/\n\n void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf,\n                 unsigned int inLen);\n\n\n/**\n * \\brief complete digest computation\n *\n * \\param mdContext     pointer to context variable\n *\n * Note: The function terminates the message-digest computation and\n *       ends with the desired message digest in mdContext.digest[0..15].\n *       Always call before using the digest[] variable.\n*/\n\n void SDLTest_Md5Final(SDLTest_Md5Context * mdContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_md5_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_memory.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_memory.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n#ifndef SDL_test_memory_h_\n#define SDL_test_memory_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n\n/**\n * \\brief Start tracking SDL memory allocations\n * \n * \\note This should be called before any other SDL functions for complete tracking coverage\n */\nint SDLTest_TrackAllocations(void);\n\n/**\n * \\brief Print a log of any outstanding allocations\n *\n * \\note This can be called after SDL_Quit()\n */\nvoid SDLTest_LogAllocations(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_memory_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_test_random.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_test_random.h\n *\n *  Include file for SDL test framework.\n *\n *  This code is a part of the SDL2_test library, not the main SDL library.\n */\n\n/*\n\n A \"32-bit Multiply with carry random number generator. Very fast.\n Includes a list of recommended multipliers.\n\n multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32.\n period: (a*2^31)-1\n\n*/\n\n#ifndef SDL_test_random_h_\n#define SDL_test_random_h_\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* --- Definitions */\n\n/*\n * Macros that return a random number in a specific format.\n */\n#define SDLTest_RandomInt(c)        ((int)SDLTest_Random(c))\n\n/*\n * Context structure for the random number generator state.\n */\n  typedef struct {\n    unsigned int a;\n    unsigned int x;\n    unsigned int c;\n    unsigned int ah;\n    unsigned int al;\n  } SDLTest_RandomContext;\n\n\n/* --- Function prototypes */\n\n/**\n *  \\brief Initialize random number generator with two integers.\n *\n *  Note: The random sequence of numbers returned by ...Random() is the\n *  same for the same two integers and has a period of 2^31.\n *\n *  \\param rndContext     pointer to context structure\n *  \\param xi         integer that defines the random sequence\n *  \\param ci         integer that defines the random sequence\n *\n */\n void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi,\n                  unsigned int ci);\n\n/**\n *  \\brief Initialize random number generator based on current system time.\n *\n *  \\param rndContext     pointer to context structure\n *\n */\n void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext);\n\n\n/**\n *  \\brief Initialize random number generator based on current system time.\n *\n *  Note: ...RandomInit() or ...RandomInitTime() must have been called\n *  before using this function.\n *\n *  \\param rndContext     pointer to context structure\n *\n *  \\returns A random number (32bit unsigned integer)\n *\n */\n unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_test_random_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_thread.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_thread_h_\n#define SDL_thread_h_\n\n/**\n *  \\file SDL_thread.h\n *\n *  Header for the SDL thread management routines.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n/* Thread synchronization primitives */\n#include \"SDL_atomic.h\"\n#include \"SDL_mutex.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* The SDL thread structure, defined in SDL_thread.c */\nstruct SDL_Thread;\ntypedef struct SDL_Thread SDL_Thread;\n\n/* The SDL thread ID */\ntypedef unsigned long SDL_threadID;\n\n/* Thread local storage ID, 0 is the invalid ID */\ntypedef unsigned int SDL_TLSID;\n\n/**\n *  The SDL thread priority.\n *\n *  \\note On many systems you require special privileges to set high or time critical priority.\n */\ntypedef enum {\n    SDL_THREAD_PRIORITY_LOW,\n    SDL_THREAD_PRIORITY_NORMAL,\n    SDL_THREAD_PRIORITY_HIGH,\n    SDL_THREAD_PRIORITY_TIME_CRITICAL\n} SDL_ThreadPriority;\n\n/**\n *  The function passed to SDL_CreateThread().\n *  It is passed a void* user context parameter and returns an int.\n */\ntypedef int (SDLCALL * SDL_ThreadFunction) (void *data);\n\n#if defined(__WIN32__) && !defined(HAVE_LIBC)\n/**\n *  \\file SDL_thread.h\n *\n *  We compile SDL into a DLL. This means, that it's the DLL which\n *  creates a new thread for the calling process with the SDL_CreateThread()\n *  API. There is a problem with this, that only the RTL of the SDL2.DLL will\n *  be initialized for those threads, and not the RTL of the calling\n *  application!\n *\n *  To solve this, we make a little hack here.\n *\n *  We'll always use the caller's _beginthread() and _endthread() APIs to\n *  start a new thread. This way, if it's the SDL2.DLL which uses this API,\n *  then the RTL of SDL2.DLL will be used to create the new thread, and if it's\n *  the application, then the RTL of the application will be used.\n *\n *  So, in short:\n *  Always use the _beginthread() and _endthread() of the calling runtime\n *  library!\n */\n#define SDL_PASSED_BEGINTHREAD_ENDTHREAD\n#include <process.h> /* _beginthreadex() and _endthreadex() */\n\ntypedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)\n                   (void *, unsigned, unsigned (__stdcall *func)(void *),\n                    void * /*arg*/, unsigned, unsigned * /* threadID */);\ntypedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);\n\n/**\n *  Create a thread.\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),\n                 const char *name, const size_t stacksize, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n\n\n/**\n *  Create a thread.\n */\n#if defined(SDL_CreateThread) && SDL_DYNAMIC_API\n#undef SDL_CreateThread\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#undef SDL_CreateThreadWithStackSize\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#else\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)\n#endif\n\n#elif defined(__OS2__)\n/*\n * just like the windows case above:  We compile SDL2\n * into a dll with Watcom's runtime statically linked.\n */\n#define SDL_PASSED_BEGINTHREAD_ENDTHREAD\n#ifndef __EMX__\n#include <process.h>\n#else\n#include <stdlib.h>\n#endif\ntypedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);\ntypedef void (*pfnSDL_CurrentEndThread)(void);\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,\n                 pfnSDL_CurrentBeginThread pfnBeginThread,\n                 pfnSDL_CurrentEndThread pfnEndThread);\n#if defined(SDL_CreateThread) && SDL_DYNAMIC_API\n#undef SDL_CreateThread\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#undef SDL_CreateThreadWithStackSize\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#else\n#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)\n#endif\n\n#else\n\n/**\n *  Create a thread with a default stack size.\n *\n *  This is equivalent to calling:\n *  SDL_CreateThreadWithStackSize(fn, name, 0, data);\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);\n\n/**\n *  Create a thread.\n *\n *   Thread naming is a little complicated: Most systems have very small\n *    limits for the string length (Haiku has 32 bytes, Linux currently has 16,\n *    Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll\n *    have to see what happens with your system's debugger. The name should be\n *    UTF-8 (but using the naming limits of C identifiers is a better bet).\n *   There are no requirements for thread naming conventions, so long as the\n *    string is null-terminated UTF-8, but these guidelines are helpful in\n *    choosing a name:\n *\n *    http://stackoverflow.com/questions/149932/naming-conventions-for-threads\n *\n *   If a system imposes requirements, SDL will try to munge the string for\n *    it (truncate, etc), but the original string contents will be available\n *    from SDL_GetThreadName().\n *\n *   The size (in bytes) of the new stack can be specified. Zero means \"use\n *    the system default\" which might be wildly different between platforms\n *    (x86 Linux generally defaults to eight megabytes, an embedded device\n *    might be a few kilobytes instead).\n *\n *   In SDL 2.1, stacksize will be folded into the original SDL_CreateThread\n *    function.\n */\nextern DECLSPEC SDL_Thread *SDLCALL\nSDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data);\n\n#endif\n\n/**\n * Get the thread name, as it was specified in SDL_CreateThread().\n *  This function returns a pointer to a UTF-8 string that names the\n *  specified thread, or NULL if it doesn't have a name. This is internal\n *  memory, not to be free()'d by the caller, and remains valid until the\n *  specified thread is cleaned up by SDL_WaitThread().\n */\nextern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);\n\n/**\n *  Get the thread identifier for the current thread.\n */\nextern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);\n\n/**\n *  Get the thread identifier for the specified thread.\n *\n *  Equivalent to SDL_ThreadID() if the specified thread is NULL.\n */\nextern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);\n\n/**\n *  Set the priority for the current thread\n */\nextern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);\n\n/**\n *  Wait for a thread to finish. Threads that haven't been detached will\n *  remain (as a \"zombie\") until this function cleans them up. Not doing so\n *  is a resource leak.\n *\n *  Once a thread has been cleaned up through this function, the SDL_Thread\n *  that references it becomes invalid and should not be referenced again.\n *  As such, only one thread may call SDL_WaitThread() on another.\n *\n *  The return code for the thread function is placed in the area\n *  pointed to by \\c status, if \\c status is not NULL.\n *\n *  You may not wait on a thread that has been used in a call to\n *  SDL_DetachThread(). Use either that function or this one, but not\n *  both, or behavior is undefined.\n *\n *  It is safe to pass NULL to this function; it is a no-op.\n */\nextern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status);\n\n/**\n *  A thread may be \"detached\" to signify that it should not remain until\n *  another thread has called SDL_WaitThread() on it. Detaching a thread\n *  is useful for long-running threads that nothing needs to synchronize\n *  with or further manage. When a detached thread is done, it simply\n *  goes away.\n *\n *  There is no way to recover the return code of a detached thread. If you\n *  need this, don't detach the thread and instead use SDL_WaitThread().\n *\n *  Once a thread is detached, you should usually assume the SDL_Thread isn't\n *  safe to reference again, as it will become invalid immediately upon\n *  the detached thread's exit, instead of remaining until someone has called\n *  SDL_WaitThread() to finally clean it up. As such, don't detach the same\n *  thread more than once.\n *\n *  If a thread has already exited when passed to SDL_DetachThread(), it will\n *  stop waiting for a call to SDL_WaitThread() and clean up immediately.\n *  It is not safe to detach a thread that might be used with SDL_WaitThread().\n *\n *  You may not call SDL_WaitThread() on a thread that has been detached.\n *  Use either that function or this one, but not both, or behavior is\n *  undefined.\n *\n *  It is safe to pass NULL to this function; it is a no-op.\n */\nextern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);\n\n/**\n *  \\brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.\n *\n *  \\return The newly created thread local storage identifier, or 0 on error\n *\n *  \\code\n *  static SDL_SpinLock tls_lock;\n *  static SDL_TLSID thread_local_storage;\n * \n *  void SetMyThreadData(void *value)\n *  {\n *      if (!thread_local_storage) {\n *          SDL_AtomicLock(&tls_lock);\n *          if (!thread_local_storage) {\n *              thread_local_storage = SDL_TLSCreate();\n *          }\n *          SDL_AtomicUnlock(&tls_lock);\n *      }\n *      SDL_TLSSet(thread_local_storage, value, 0);\n *  }\n *  \n *  void *GetMyThreadData(void)\n *  {\n *      return SDL_TLSGet(thread_local_storage);\n *  }\n *  \\endcode\n *\n *  \\sa SDL_TLSGet()\n *  \\sa SDL_TLSSet()\n */\nextern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);\n\n/**\n *  \\brief Get the value associated with a thread local storage ID for the current thread.\n *\n *  \\param id The thread local storage ID\n *\n *  \\return The value associated with the ID for the current thread, or NULL if no value has been set.\n *\n *  \\sa SDL_TLSCreate()\n *  \\sa SDL_TLSSet()\n */\nextern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);\n\n/**\n *  \\brief Set the value associated with a thread local storage ID for the current thread.\n *\n *  \\param id The thread local storage ID\n *  \\param value The value to associate with the ID for the current thread\n *  \\param destructor A function called when the thread exits, to free the value.\n *\n *  \\return 0 on success, -1 on error\n *\n *  \\sa SDL_TLSCreate()\n *  \\sa SDL_TLSGet()\n */\nextern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_thread_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_timer.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n#ifndef SDL_timer_h_\n#define SDL_timer_h_\n\n/**\n *  \\file SDL_timer.h\n *\n *  Header for the SDL time management routines.\n */\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n * \\brief Get the number of milliseconds since the SDL library initialization.\n *\n * \\note This value wraps if the program runs for more than ~49 days.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);\n\n/**\n * \\brief Compare SDL ticks values, and return true if A has passed B\n *\n * e.g. if you want to wait 100 ms, you could do this:\n *  Uint32 timeout = SDL_GetTicks() + 100;\n *  while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) {\n *      ... do work until timeout has elapsed\n *  }\n */\n#define SDL_TICKS_PASSED(A, B)  ((Sint32)((B) - (A)) <= 0)\n\n/**\n * \\brief Get the current value of the high resolution counter\n */\nextern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);\n\n/**\n * \\brief Get the count per second of the high resolution counter\n */\nextern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void);\n\n/**\n * \\brief Wait a specified number of milliseconds before returning.\n */\nextern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);\n\n/**\n *  Function prototype for the timer callback function.\n *\n *  The callback function is passed the current timer interval and returns\n *  the next timer interval.  If the returned value is the same as the one\n *  passed in, the periodic alarm continues, otherwise a new alarm is\n *  scheduled.  If the callback returns 0, the periodic alarm is cancelled.\n */\ntypedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param);\n\n/**\n * Definition of the timer ID type.\n */\ntypedef int SDL_TimerID;\n\n/**\n * \\brief Add a new timer to the pool of timers already running.\n *\n * \\return A timer ID, or 0 when an error occurs.\n */\nextern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,\n                                                 SDL_TimerCallback callback,\n                                                 void *param);\n\n/**\n * \\brief Remove a timer knowing its ID.\n *\n * \\return A boolean value indicating success or failure.\n *\n * \\warning It is not safe to remove a timer multiple times.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_timer_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_touch.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_touch.h\n *\n *  Include file for SDL touch event handling.\n */\n\n#ifndef SDL_touch_h_\n#define SDL_touch_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_error.h\"\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef Sint64 SDL_TouchID;\ntypedef Sint64 SDL_FingerID;\n\ntypedef enum\n{\n    SDL_TOUCH_DEVICE_INVALID = -1,\n    SDL_TOUCH_DEVICE_DIRECT,            /* touch screen with window-relative coordinates */\n    SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */\n    SDL_TOUCH_DEVICE_INDIRECT_RELATIVE  /* trackpad with screen cursor-relative coordinates */\n} SDL_TouchDeviceType;\n\ntypedef struct SDL_Finger\n{\n    SDL_FingerID id;\n    float x;\n    float y;\n    float pressure;\n} SDL_Finger;\n\n/* Used as the device ID for mouse events simulated with touch input */\n#define SDL_TOUCH_MOUSEID ((Uint32)-1)\n\n/* Used as the SDL_TouchID for touch events simulated with mouse input */\n#define SDL_MOUSE_TOUCHID ((Sint64)-1)\n\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of registered touch devices.\n */\nextern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);\n\n/**\n *  \\brief Get the touch ID with the given index, or 0 if the index is invalid.\n */\nextern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);\n\n/**\n * \\brief Get the type of the given touch device.\n */\nextern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);\n\n/**\n *  \\brief Get the number of active fingers for a given touch device.\n */\nextern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);\n\n/**\n *  \\brief Get the finger object of the given touch, with the given index.\n */\nextern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index);\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_touch_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_types.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_types.h\n *\n *  \\deprecated\n */\n\n/* DEPRECATED */\n#include \"SDL_stdinc.h\"\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_version.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_version.h\n *\n *  This header defines the current SDL version.\n */\n\n#ifndef SDL_version_h_\n#define SDL_version_h_\n\n#include \"SDL_stdinc.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief Information the version of SDL in use.\n *\n *  Represents the library's version as three levels: major revision\n *  (increments with massive changes, additions, and enhancements),\n *  minor revision (increments with backwards-compatible changes to the\n *  major revision), and patchlevel (increments with fixes to the minor\n *  revision).\n *\n *  \\sa SDL_VERSION\n *  \\sa SDL_GetVersion\n */\ntypedef struct SDL_version\n{\n    Uint8 major;        /**< major version */\n    Uint8 minor;        /**< minor version */\n    Uint8 patch;        /**< update version */\n} SDL_version;\n\n/* Printable format: \"%d.%d.%d\", MAJOR, MINOR, PATCHLEVEL\n*/\n#define SDL_MAJOR_VERSION   2\n#define SDL_MINOR_VERSION   0\n#define SDL_PATCHLEVEL      10\n\n/**\n *  \\brief Macro to determine SDL version program was compiled against.\n *\n *  This macro fills in a SDL_version structure with the version of the\n *  library you compiled against. This is determined by what header the\n *  compiler uses. Note that if you dynamically linked the library, you might\n *  have a slightly newer or older version at runtime. That version can be\n *  determined with SDL_GetVersion(), which, unlike SDL_VERSION(),\n *  is not a macro.\n *\n *  \\param x A pointer to a SDL_version struct to initialize.\n *\n *  \\sa SDL_version\n *  \\sa SDL_GetVersion\n */\n#define SDL_VERSION(x)                          \\\n{                                   \\\n    (x)->major = SDL_MAJOR_VERSION;                 \\\n    (x)->minor = SDL_MINOR_VERSION;                 \\\n    (x)->patch = SDL_PATCHLEVEL;                    \\\n}\n\n/**\n *  This macro turns the version numbers into a numeric value:\n *  \\verbatim\n    (1,2,3) -> (1203)\n    \\endverbatim\n *\n *  This assumes that there will never be more than 100 patchlevels.\n */\n#define SDL_VERSIONNUM(X, Y, Z)                     \\\n    ((X)*1000 + (Y)*100 + (Z))\n\n/**\n *  This is the version number macro for the current SDL version.\n */\n#define SDL_COMPILEDVERSION \\\n    SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)\n\n/**\n *  This macro will evaluate to true if compiled with SDL at least X.Y.Z.\n */\n#define SDL_VERSION_ATLEAST(X, Y, Z) \\\n    (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))\n\n/**\n *  \\brief Get the version of SDL that is linked against your program.\n *\n *  If you are linking to SDL dynamically, then it is possible that the\n *  current version will be different than the version you compiled against.\n *  This function returns the current version, while SDL_VERSION() is a\n *  macro that tells you what version you compiled with.\n *\n *  \\code\n *  SDL_version compiled;\n *  SDL_version linked;\n *\n *  SDL_VERSION(&compiled);\n *  SDL_GetVersion(&linked);\n *  printf(\"We compiled against SDL version %d.%d.%d ...\\n\",\n *         compiled.major, compiled.minor, compiled.patch);\n *  printf(\"But we linked against SDL version %d.%d.%d.\\n\",\n *         linked.major, linked.minor, linked.patch);\n *  \\endcode\n *\n *  This function may be called safely at any time, even before SDL_Init().\n *\n *  \\sa SDL_VERSION\n */\nextern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);\n\n/**\n *  \\brief Get the code revision of SDL that is linked against your program.\n *\n *  Returns an arbitrary string (a hash value) uniquely identifying the\n *  exact revision of the SDL library in use, and is only useful in comparing\n *  against other revisions. It is NOT an incrementing number.\n */\nextern DECLSPEC const char *SDLCALL SDL_GetRevision(void);\n\n/**\n *  \\brief Get the revision number of SDL that is linked against your program.\n *\n *  Returns a number uniquely identifying the exact revision of the SDL\n *  library in use. It is an incrementing number based on commits to\n *  hg.libsdl.org.\n */\nextern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_version_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_video.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_video.h\n *\n *  Header file for SDL video functions.\n */\n\n#ifndef SDL_video_h_\n#define SDL_video_h_\n\n#include \"SDL_stdinc.h\"\n#include \"SDL_pixels.h\"\n#include \"SDL_rect.h\"\n#include \"SDL_surface.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/**\n *  \\brief  The structure that defines a display mode\n *\n *  \\sa SDL_GetNumDisplayModes()\n *  \\sa SDL_GetDisplayMode()\n *  \\sa SDL_GetDesktopDisplayMode()\n *  \\sa SDL_GetCurrentDisplayMode()\n *  \\sa SDL_GetClosestDisplayMode()\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_GetWindowDisplayMode()\n */\ntypedef struct\n{\n    Uint32 format;              /**< pixel format */\n    int w;                      /**< width, in screen coordinates */\n    int h;                      /**< height, in screen coordinates */\n    int refresh_rate;           /**< refresh rate (or zero for unspecified) */\n    void *driverdata;           /**< driver-specific data, initialize to 0 */\n} SDL_DisplayMode;\n\n/**\n *  \\brief The type used to identify a window\n *\n *  \\sa SDL_CreateWindow()\n *  \\sa SDL_CreateWindowFrom()\n *  \\sa SDL_DestroyWindow()\n *  \\sa SDL_GetWindowData()\n *  \\sa SDL_GetWindowFlags()\n *  \\sa SDL_GetWindowGrab()\n *  \\sa SDL_GetWindowPosition()\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_GetWindowTitle()\n *  \\sa SDL_HideWindow()\n *  \\sa SDL_MaximizeWindow()\n *  \\sa SDL_MinimizeWindow()\n *  \\sa SDL_RaiseWindow()\n *  \\sa SDL_RestoreWindow()\n *  \\sa SDL_SetWindowData()\n *  \\sa SDL_SetWindowFullscreen()\n *  \\sa SDL_SetWindowGrab()\n *  \\sa SDL_SetWindowIcon()\n *  \\sa SDL_SetWindowPosition()\n *  \\sa SDL_SetWindowSize()\n *  \\sa SDL_SetWindowBordered()\n *  \\sa SDL_SetWindowResizable()\n *  \\sa SDL_SetWindowTitle()\n *  \\sa SDL_ShowWindow()\n */\ntypedef struct SDL_Window SDL_Window;\n\n/**\n *  \\brief The flags on a window\n *\n *  \\sa SDL_GetWindowFlags()\n */\ntypedef enum\n{\n    /* !!! FIXME: change this to name = (1<<x). */\n    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */\n    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */\n    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */\n    SDL_WINDOW_HIDDEN = 0x00000008,             /**< window is not visible */\n    SDL_WINDOW_BORDERLESS = 0x00000010,         /**< no window decoration */\n    SDL_WINDOW_RESIZABLE = 0x00000020,          /**< window can be resized */\n    SDL_WINDOW_MINIMIZED = 0x00000040,          /**< window is minimized */\n    SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */\n    SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */\n    SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */\n    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */\n    SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),\n    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */\n    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported.\n                                                     On macOS NSHighResolutionCapable must be set true in the\n                                                     application's Info.plist for this to have any effect. */\n    SDL_WINDOW_MOUSE_CAPTURE = 0x00004000,      /**< window has mouse captured (unrelated to INPUT_GRABBED) */\n    SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000,      /**< window should always be above others */\n    SDL_WINDOW_SKIP_TASKBAR  = 0x00010000,      /**< window should not be added to the taskbar */\n    SDL_WINDOW_UTILITY       = 0x00020000,      /**< window should be treated as a utility window */\n    SDL_WINDOW_TOOLTIP       = 0x00040000,      /**< window should be treated as a tooltip */\n    SDL_WINDOW_POPUP_MENU    = 0x00080000,      /**< window should be treated as a popup menu */\n    SDL_WINDOW_VULKAN        = 0x10000000       /**< window usable for Vulkan surface */\n} SDL_WindowFlags;\n\n/**\n *  \\brief Used to indicate that you don't care what the window position is.\n */\n#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000u\n#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))\n#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)\n#define SDL_WINDOWPOS_ISUNDEFINED(X)    \\\n            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)\n\n/**\n *  \\brief Used to indicate that the window position should be centered.\n */\n#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000u\n#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))\n#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)\n#define SDL_WINDOWPOS_ISCENTERED(X)    \\\n            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)\n\n/**\n *  \\brief Event subtype for window events\n */\ntypedef enum\n{\n    SDL_WINDOWEVENT_NONE,           /**< Never used */\n    SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */\n    SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */\n    SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be\n                                         redrawn */\n    SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2\n                                     */\n    SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */\n    SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as\n                                         a result of an API call or through the\n                                         system or user changing the window size. */\n    SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */\n    SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */\n    SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size\n                                         and position */\n    SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */\n    SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */\n    SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */\n    SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */\n    SDL_WINDOWEVENT_CLOSE,          /**< The window manager requests that the window be closed */\n    SDL_WINDOWEVENT_TAKE_FOCUS,     /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */\n    SDL_WINDOWEVENT_HIT_TEST        /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */\n} SDL_WindowEventID;\n\n/**\n *  \\brief Event subtype for display events\n */\ntypedef enum\n{\n    SDL_DISPLAYEVENT_NONE,          /**< Never used */\n    SDL_DISPLAYEVENT_ORIENTATION    /**< Display orientation has changed to data1 */\n} SDL_DisplayEventID;\n\ntypedef enum\n{\n    SDL_ORIENTATION_UNKNOWN,            /**< The display orientation can't be determined */\n    SDL_ORIENTATION_LANDSCAPE,          /**< The display is in landscape mode, with the right side up, relative to portrait mode */\n    SDL_ORIENTATION_LANDSCAPE_FLIPPED,  /**< The display is in landscape mode, with the left side up, relative to portrait mode */\n    SDL_ORIENTATION_PORTRAIT,           /**< The display is in portrait mode */\n    SDL_ORIENTATION_PORTRAIT_FLIPPED    /**< The display is in portrait mode, upside down */\n} SDL_DisplayOrientation;\n\n/**\n *  \\brief An opaque handle to an OpenGL context.\n */\ntypedef void *SDL_GLContext;\n\n/**\n *  \\brief OpenGL configuration attributes\n */\ntypedef enum\n{\n    SDL_GL_RED_SIZE,\n    SDL_GL_GREEN_SIZE,\n    SDL_GL_BLUE_SIZE,\n    SDL_GL_ALPHA_SIZE,\n    SDL_GL_BUFFER_SIZE,\n    SDL_GL_DOUBLEBUFFER,\n    SDL_GL_DEPTH_SIZE,\n    SDL_GL_STENCIL_SIZE,\n    SDL_GL_ACCUM_RED_SIZE,\n    SDL_GL_ACCUM_GREEN_SIZE,\n    SDL_GL_ACCUM_BLUE_SIZE,\n    SDL_GL_ACCUM_ALPHA_SIZE,\n    SDL_GL_STEREO,\n    SDL_GL_MULTISAMPLEBUFFERS,\n    SDL_GL_MULTISAMPLESAMPLES,\n    SDL_GL_ACCELERATED_VISUAL,\n    SDL_GL_RETAINED_BACKING,\n    SDL_GL_CONTEXT_MAJOR_VERSION,\n    SDL_GL_CONTEXT_MINOR_VERSION,\n    SDL_GL_CONTEXT_EGL,\n    SDL_GL_CONTEXT_FLAGS,\n    SDL_GL_CONTEXT_PROFILE_MASK,\n    SDL_GL_SHARE_WITH_CURRENT_CONTEXT,\n    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR,\n    SDL_GL_CONTEXT_RESET_NOTIFICATION,\n    SDL_GL_CONTEXT_NO_ERROR\n} SDL_GLattr;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_PROFILE_CORE           = 0x0001,\n    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 0x0002,\n    SDL_GL_CONTEXT_PROFILE_ES             = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */\n} SDL_GLprofile;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_DEBUG_FLAG              = 0x0001,\n    SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,\n    SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 0x0004,\n    SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 0x0008\n} SDL_GLcontextFlag;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE   = 0x0000,\n    SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH  = 0x0001\n} SDL_GLcontextReleaseFlag;\n\ntypedef enum\n{\n    SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,\n    SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001\n} SDL_GLContextResetNotification;\n\n/* Function prototypes */\n\n/**\n *  \\brief Get the number of video drivers compiled into SDL\n *\n *  \\sa SDL_GetVideoDriver()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);\n\n/**\n *  \\brief Get the name of a built in video driver.\n *\n *  \\note The video drivers are presented in the order in which they are\n *        normally checked during initialization.\n *\n *  \\sa SDL_GetNumVideoDrivers()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);\n\n/**\n *  \\brief Initialize the video subsystem, optionally specifying a video driver.\n *\n *  \\param driver_name Initialize a specific driver by name, or NULL for the\n *                     default video driver.\n *\n *  \\return 0 on success, -1 on error\n *\n *  This function initializes the video subsystem; setting up a connection\n *  to the window manager, etc, and determines the available display modes\n *  and pixel formats, but does not initialize a window or graphics mode.\n *\n *  \\sa SDL_VideoQuit()\n */\nextern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);\n\n/**\n *  \\brief Shuts down the video subsystem.\n *\n *  This function closes all windows, and restores the original video mode.\n *\n *  \\sa SDL_VideoInit()\n */\nextern DECLSPEC void SDLCALL SDL_VideoQuit(void);\n\n/**\n *  \\brief Returns the name of the currently initialized video driver.\n *\n *  \\return The name of the current video driver or NULL if no driver\n *          has been initialized\n *\n *  \\sa SDL_GetNumVideoDrivers()\n *  \\sa SDL_GetVideoDriver()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);\n\n/**\n *  \\brief Returns the number of available video displays.\n *\n *  \\sa SDL_GetDisplayBounds()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);\n\n/**\n *  \\brief Get the name of a display in UTF-8 encoding\n *\n *  \\return The name of a display, or NULL for an invalid display index.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);\n\n/**\n *  \\brief Get the desktop area represented by a display, with the primary\n *         display located at 0,0\n *\n *  \\return 0 on success, or -1 if the index is out of range.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);\n\n/**\n *  \\brief Get the usable desktop area represented by a display, with the\n *         primary display located at 0,0\n *\n *  This is the same area as SDL_GetDisplayBounds() reports, but with portions\n *  reserved by the system removed. For example, on Mac OS X, this subtracts\n *  the area occupied by the menu bar and dock.\n *\n *  Setting a window to be fullscreen generally bypasses these unusable areas,\n *  so these are good guidelines for the maximum space available to a\n *  non-fullscreen window.\n *\n *  \\return 0 on success, or -1 if the index is out of range.\n *\n *  \\sa SDL_GetDisplayBounds()\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);\n\n/**\n *  \\brief Get the dots/pixels-per-inch for a display\n *\n *  \\note Diagonal, horizontal and vertical DPI can all be optionally\n *        returned if the parameter is non-NULL.\n *\n *  \\return 0 on success, or -1 if no DPI information is available or the index is out of range.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);\n\n/**\n *  \\brief Get the orientation of a display\n *\n *  \\return The orientation of the display, or SDL_ORIENTATION_UNKNOWN if it isn't available.\n *\n *  \\sa SDL_GetNumVideoDisplays()\n */\nextern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);\n\n/**\n *  \\brief Returns the number of available display modes.\n *\n *  \\sa SDL_GetDisplayMode()\n */\nextern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);\n\n/**\n *  \\brief Fill in information about a specific display mode.\n *\n *  \\note The display modes are sorted in this priority:\n *        \\li bits per pixel -> more colors to fewer colors\n *        \\li width -> largest to smallest\n *        \\li height -> largest to smallest\n *        \\li refresh rate -> highest to lowest\n *\n *  \\sa SDL_GetNumDisplayModes()\n */\nextern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,\n                                               SDL_DisplayMode * mode);\n\n/**\n *  \\brief Fill in information about the desktop display mode.\n */\nextern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);\n\n/**\n *  \\brief Fill in information about the current display mode.\n */\nextern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);\n\n\n/**\n *  \\brief Get the closest match to the requested display mode.\n *\n *  \\param displayIndex The index of display from which mode should be queried.\n *  \\param mode The desired display mode\n *  \\param closest A pointer to a display mode to be filled in with the closest\n *                 match of the available display modes.\n *\n *  \\return The passed in value \\c closest, or NULL if no matching video mode\n *          was available.\n *\n *  The available display modes are scanned, and \\c closest is filled in with the\n *  closest mode matching the requested mode and returned.  The mode format and\n *  refresh_rate default to the desktop mode if they are 0.  The modes are\n *  scanned with size being first priority, format being second priority, and\n *  finally checking the refresh_rate.  If all the available modes are too\n *  small, then NULL is returned.\n *\n *  \\sa SDL_GetNumDisplayModes()\n *  \\sa SDL_GetDisplayMode()\n */\nextern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);\n\n/**\n *  \\brief Get the display index associated with a window.\n *\n *  \\return the display index of the display containing the center of the\n *          window, or -1 on error.\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);\n\n/**\n *  \\brief Set the display mode used when a fullscreen window is visible.\n *\n *  By default the window's dimensions and the desktop format and refresh rate\n *  are used.\n *\n *  \\param window The window for which the display mode should be set.\n *  \\param mode The mode to use, or NULL for the default mode.\n *\n *  \\return 0 on success, or -1 if setting the display mode failed.\n *\n *  \\sa SDL_GetWindowDisplayMode()\n *  \\sa SDL_SetWindowFullscreen()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,\n                                                     const SDL_DisplayMode\n                                                         * mode);\n\n/**\n *  \\brief Fill in information about the display mode used when a fullscreen\n *         window is visible.\n *\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_SetWindowFullscreen()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,\n                                                     SDL_DisplayMode * mode);\n\n/**\n *  \\brief Get the pixel format associated with the window.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);\n\n/**\n *  \\brief Create a window with the specified position, dimensions, and flags.\n *\n *  \\param title The title of the window, in UTF-8 encoding.\n *  \\param x     The x position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or\n *               ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param w     The width of the window, in screen coordinates.\n *  \\param h     The height of the window, in screen coordinates.\n *  \\param flags The flags for the window, a mask of any of the following:\n *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,\n *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,\n *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,\n *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,\n *               ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN.\n *\n *  \\return The created window, or NULL if window creation failed.\n *\n *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size\n *  in pixels may differ from its size in screen coordinates on platforms with\n *  high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query\n *  the client area's size in screen coordinates, and SDL_GL_GetDrawableSize(),\n *  SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to query the\n *  drawable size in pixels.\n *\n *  If the window is created with any of the SDL_WINDOW_OPENGL or\n *  SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function\n *  (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the\n *  corresponding UnloadLibrary function is called by SDL_DestroyWindow().\n *\n *  If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,\n *  SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.\n *\n *  \\note On non-Apple devices, SDL requires you to either not link to the\n *        Vulkan loader or link to a dynamic library version. This limitation\n *        may be removed in a future version of SDL.\n *\n *  \\sa SDL_DestroyWindow()\n *  \\sa SDL_GL_LoadLibrary()\n *  \\sa SDL_Vulkan_LoadLibrary()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,\n                                                      int x, int y, int w,\n                                                      int h, Uint32 flags);\n\n/**\n *  \\brief Create an SDL window from an existing native window.\n *\n *  \\param data A pointer to driver-dependent window creation data\n *\n *  \\return The created window, or NULL if window creation failed.\n *\n *  \\sa SDL_DestroyWindow()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);\n\n/**\n *  \\brief Get the numeric ID of a window, for logging purposes.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);\n\n/**\n *  \\brief Get a window from a stored ID, or NULL if it doesn't exist.\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);\n\n/**\n *  \\brief Get the window flags.\n */\nextern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);\n\n/**\n *  \\brief Set the title of a window, in UTF-8 format.\n *\n *  \\sa SDL_GetWindowTitle()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,\n                                                const char *title);\n\n/**\n *  \\brief Get the title of a window, in UTF-8 format.\n *\n *  \\sa SDL_SetWindowTitle()\n */\nextern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);\n\n/**\n *  \\brief Set the icon for a window.\n *\n *  \\param window The window for which the icon should be set.\n *  \\param icon The icon for the window.\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,\n                                               SDL_Surface * icon);\n\n/**\n *  \\brief Associate an arbitrary named pointer with a window.\n *\n *  \\param window   The window to associate with the pointer.\n *  \\param name     The name of the pointer.\n *  \\param userdata The associated pointer.\n *\n *  \\return The previous value associated with 'name'\n *\n *  \\note The name is case-sensitive.\n *\n *  \\sa SDL_GetWindowData()\n */\nextern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,\n                                                const char *name,\n                                                void *userdata);\n\n/**\n *  \\brief Retrieve the data pointer associated with a window.\n *\n *  \\param window   The window to query.\n *  \\param name     The name of the pointer.\n *\n *  \\return The value associated with 'name'\n *\n *  \\sa SDL_SetWindowData()\n */\nextern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,\n                                                const char *name);\n\n/**\n *  \\brief Set the position of a window.\n *\n *  \\param window   The window to reposition.\n *  \\param x        The x coordinate of the window in screen coordinates, or\n *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.\n *  \\param y        The y coordinate of the window in screen coordinates, or\n *                  ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.\n *\n *  \\note The window coordinate origin is the upper left of the display.\n *\n *  \\sa SDL_GetWindowPosition()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,\n                                                   int x, int y);\n\n/**\n *  \\brief Get the position of a window.\n *\n *  \\param window   The window to query.\n *  \\param x        Pointer to variable for storing the x position, in screen\n *                  coordinates. May be NULL.\n *  \\param y        Pointer to variable for storing the y position, in screen\n *                  coordinates. May be NULL.\n *\n *  \\sa SDL_SetWindowPosition()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,\n                                                   int *x, int *y);\n\n/**\n *  \\brief Set the size of a window's client area.\n *\n *  \\param window   The window to resize.\n *  \\param w        The width of the window, in screen coordinates. Must be >0.\n *  \\param h        The height of the window, in screen coordinates. Must be >0.\n *\n *  \\note Fullscreen windows automatically match the size of the display mode,\n *        and you should use SDL_SetWindowDisplayMode() to change their size.\n *\n *  The window size in screen coordinates may differ from the size in pixels, if\n *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with\n *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or\n *  SDL_GetRendererOutputSize() to get the real client area size in pixels.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_SetWindowDisplayMode()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,\n                                               int h);\n\n/**\n *  \\brief Get the size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the width, in screen\n *                  coordinates. May be NULL.\n *  \\param h        Pointer to variable for storing the height, in screen\n *                  coordinates. May be NULL.\n *\n *  The window size in screen coordinates may differ from the size in pixels, if\n *  the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with\n *  high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or\n *  SDL_GetRendererOutputSize() to get the real client area size in pixels.\n *\n *  \\sa SDL_SetWindowSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,\n                                               int *h);\n\n/**\n *  \\brief Get the size of a window's borders (decorations) around the client area.\n *\n *  \\param window The window to query.\n *  \\param top Pointer to variable for storing the size of the top border. NULL is permitted.\n *  \\param left Pointer to variable for storing the size of the left border. NULL is permitted.\n *  \\param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.\n *  \\param right Pointer to variable for storing the size of the right border. NULL is permitted.\n *\n *  \\return 0 on success, or -1 if getting this information is not supported.\n *\n *  \\note if this function fails (returns -1), the size values will be\n *        initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as\n *        if the window in question was borderless.\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,\n                                                     int *top, int *left,\n                                                     int *bottom, int *right);\n\n/**\n *  \\brief Set the minimum size of a window's client area.\n *\n *  \\param window    The window to set a new minimum size.\n *  \\param min_w     The minimum width of the window, must be >0\n *  \\param min_h     The minimum height of the window, must be >0\n *\n *  \\note You can't change the minimum size of a fullscreen window, it\n *        automatically matches the size of the display mode.\n *\n *  \\sa SDL_GetWindowMinimumSize()\n *  \\sa SDL_SetWindowMaximumSize()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,\n                                                      int min_w, int min_h);\n\n/**\n *  \\brief Get the minimum size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the minimum width, may be NULL\n *  \\param h        Pointer to variable for storing the minimum height, may be NULL\n *\n *  \\sa SDL_GetWindowMaximumSize()\n *  \\sa SDL_SetWindowMinimumSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Set the maximum size of a window's client area.\n *\n *  \\param window    The window to set a new maximum size.\n *  \\param max_w     The maximum width of the window, must be >0\n *  \\param max_h     The maximum height of the window, must be >0\n *\n *  \\note You can't change the maximum size of a fullscreen window, it\n *        automatically matches the size of the display mode.\n *\n *  \\sa SDL_GetWindowMaximumSize()\n *  \\sa SDL_SetWindowMinimumSize()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,\n                                                      int max_w, int max_h);\n\n/**\n *  \\brief Get the maximum size of a window's client area.\n *\n *  \\param window   The window to query.\n *  \\param w        Pointer to variable for storing the maximum width, may be NULL\n *  \\param h        Pointer to variable for storing the maximum height, may be NULL\n *\n *  \\sa SDL_GetWindowMinimumSize()\n *  \\sa SDL_SetWindowMaximumSize()\n */\nextern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,\n                                                      int *w, int *h);\n\n/**\n *  \\brief Set the border state of a window.\n *\n *  This will add or remove the window's SDL_WINDOW_BORDERLESS flag and\n *  add or remove the border from the actual window. This is a no-op if the\n *  window's border already matches the requested state.\n *\n *  \\param window The window of which to change the border state.\n *  \\param bordered SDL_FALSE to remove border, SDL_TRUE to add border.\n *\n *  \\note You can't change the border state of a fullscreen window.\n *\n *  \\sa SDL_GetWindowFlags()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,\n                                                   SDL_bool bordered);\n\n/**\n *  \\brief Set the user-resizable state of a window.\n *\n *  This will add or remove the window's SDL_WINDOW_RESIZABLE flag and\n *  allow/disallow user resizing of the window. This is a no-op if the\n *  window's resizable state already matches the requested state.\n *\n *  \\param window The window of which to change the resizable state.\n *  \\param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.\n *\n *  \\note You can't change the resizable state of a fullscreen window.\n *\n *  \\sa SDL_GetWindowFlags()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,\n                                                    SDL_bool resizable);\n\n/**\n *  \\brief Show a window.\n *\n *  \\sa SDL_HideWindow()\n */\nextern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);\n\n/**\n *  \\brief Hide a window.\n *\n *  \\sa SDL_ShowWindow()\n */\nextern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);\n\n/**\n *  \\brief Raise a window above other windows and set the input focus.\n */\nextern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);\n\n/**\n *  \\brief Make a window as large as possible.\n *\n *  \\sa SDL_RestoreWindow()\n */\nextern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);\n\n/**\n *  \\brief Minimize a window to an iconic representation.\n *\n *  \\sa SDL_RestoreWindow()\n */\nextern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);\n\n/**\n *  \\brief Restore the size and position of a minimized or maximized window.\n *\n *  \\sa SDL_MaximizeWindow()\n *  \\sa SDL_MinimizeWindow()\n */\nextern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);\n\n/**\n *  \\brief Set a window's fullscreen state.\n *\n *  \\return 0 on success, or -1 if setting the display mode failed.\n *\n *  \\sa SDL_SetWindowDisplayMode()\n *  \\sa SDL_GetWindowDisplayMode()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,\n                                                    Uint32 flags);\n\n/**\n *  \\brief Get the SDL surface associated with the window.\n *\n *  \\return The window's framebuffer surface, or NULL on error.\n *\n *  A new surface will be created with the optimal format for the window,\n *  if necessary. This surface will be freed when the window is destroyed.\n *\n *  \\note You may not combine this with 3D or the rendering API on this window.\n *\n *  \\sa SDL_UpdateWindowSurface()\n *  \\sa SDL_UpdateWindowSurfaceRects()\n */\nextern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);\n\n/**\n *  \\brief Copy the window surface to the screen.\n *\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetWindowSurface()\n *  \\sa SDL_UpdateWindowSurfaceRects()\n */\nextern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);\n\n/**\n *  \\brief Copy a number of rectangles on the window surface to the screen.\n *\n *  \\return 0 on success, or -1 on error.\n *\n *  \\sa SDL_GetWindowSurface()\n *  \\sa SDL_UpdateWindowSurface()\n */\nextern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,\n                                                         const SDL_Rect * rects,\n                                                         int numrects);\n\n/**\n *  \\brief Set a window's input grab mode.\n *\n *  \\param window The window for which the input grab mode should be set.\n *  \\param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.\n *\n *  If the caller enables a grab while another window is currently grabbed,\n *  the other window loses its grab in favor of the caller's window.\n *\n *  \\sa SDL_GetWindowGrab()\n */\nextern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,\n                                               SDL_bool grabbed);\n\n/**\n *  \\brief Get a window's input grab mode.\n *\n *  \\return This returns SDL_TRUE if input is grabbed, and SDL_FALSE otherwise.\n *\n *  \\sa SDL_SetWindowGrab()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);\n\n/**\n *  \\brief Get the window that currently has an input grab enabled.\n *\n *  \\return This returns the window if input is grabbed, and NULL otherwise.\n *\n *  \\sa SDL_SetWindowGrab()\n */\nextern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);\n\n/**\n *  \\brief Set the brightness (gamma correction) for a window.\n *\n *  \\return 0 on success, or -1 if setting the brightness isn't supported.\n *\n *  \\sa SDL_GetWindowBrightness()\n *  \\sa SDL_SetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);\n\n/**\n *  \\brief Get the brightness (gamma correction) for a window.\n *\n *  \\return The last brightness value passed to SDL_SetWindowBrightness()\n *\n *  \\sa SDL_SetWindowBrightness()\n */\nextern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);\n\n/**\n *  \\brief Set the opacity for a window\n *\n *  \\param window The window which will be made transparent or opaque\n *  \\param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be\n *                 clamped internally between 0.0f and 1.0f.\n *\n *  \\return 0 on success, or -1 if setting the opacity isn't supported.\n *\n *  \\sa SDL_GetWindowOpacity()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);\n\n/**\n *  \\brief Get the opacity of a window.\n *\n *  If transparency isn't supported on this platform, opacity will be reported\n *  as 1.0f without error.\n *\n *  \\param window The window in question.\n *  \\param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)\n *\n *  \\return 0 on success, or -1 on error (invalid window, etc).\n *\n *  \\sa SDL_SetWindowOpacity()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);\n\n/**\n *  \\brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)\n *\n *  \\param modal_window The window that should be modal\n *  \\param parent_window The parent window\n *\n *  \\return 0 on success, or -1 otherwise.\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);\n\n/**\n *  \\brief Explicitly sets input focus to the window.\n *\n *  You almost certainly want SDL_RaiseWindow() instead of this function. Use\n *  this with caution, as you might give focus to a window that's completely\n *  obscured by other windows.\n *\n *  \\param window The window that should get the input focus\n *\n *  \\return 0 on success, or -1 otherwise.\n *  \\sa SDL_RaiseWindow()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);\n\n/**\n *  \\brief Set the gamma ramp for a window.\n *\n *  \\param window The window for which the gamma ramp should be set.\n *  \\param red The translation table for the red channel, or NULL.\n *  \\param green The translation table for the green channel, or NULL.\n *  \\param blue The translation table for the blue channel, or NULL.\n *\n *  \\return 0 on success, or -1 if gamma ramps are unsupported.\n *\n *  Set the gamma translation table for the red, green, and blue channels\n *  of the video hardware.  Each table is an array of 256 16-bit quantities,\n *  representing a mapping between the input and output for that channel.\n *  The input is the index into the array, and the output is the 16-bit\n *  gamma value at that index, scaled to the output color precision.\n *\n *  \\sa SDL_GetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,\n                                                   const Uint16 * red,\n                                                   const Uint16 * green,\n                                                   const Uint16 * blue);\n\n/**\n *  \\brief Get the gamma ramp for a window.\n *\n *  \\param window The window from which the gamma ramp should be queried.\n *  \\param red   A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the red channel, or NULL.\n *  \\param green A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the green channel, or NULL.\n *  \\param blue  A pointer to a 256 element array of 16-bit quantities to hold\n *               the translation table for the blue channel, or NULL.\n *\n *  \\return 0 on success, or -1 if gamma ramps are unsupported.\n *\n *  \\sa SDL_SetWindowGammaRamp()\n */\nextern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,\n                                                   Uint16 * red,\n                                                   Uint16 * green,\n                                                   Uint16 * blue);\n\n/**\n *  \\brief Possible return values from the SDL_HitTest callback.\n *\n *  \\sa SDL_HitTest\n */\ntypedef enum\n{\n    SDL_HITTEST_NORMAL,  /**< Region is normal. No special properties. */\n    SDL_HITTEST_DRAGGABLE,  /**< Region can drag entire window. */\n    SDL_HITTEST_RESIZE_TOPLEFT,\n    SDL_HITTEST_RESIZE_TOP,\n    SDL_HITTEST_RESIZE_TOPRIGHT,\n    SDL_HITTEST_RESIZE_RIGHT,\n    SDL_HITTEST_RESIZE_BOTTOMRIGHT,\n    SDL_HITTEST_RESIZE_BOTTOM,\n    SDL_HITTEST_RESIZE_BOTTOMLEFT,\n    SDL_HITTEST_RESIZE_LEFT\n} SDL_HitTestResult;\n\n/**\n *  \\brief Callback used for hit-testing.\n *\n *  \\sa SDL_SetWindowHitTest\n */\ntypedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,\n                                                 const SDL_Point *area,\n                                                 void *data);\n\n/**\n *  \\brief Provide a callback that decides if a window region has special properties.\n *\n *  Normally windows are dragged and resized by decorations provided by the\n *  system window manager (a title bar, borders, etc), but for some apps, it\n *  makes sense to drag them from somewhere else inside the window itself; for\n *  example, one might have a borderless window that wants to be draggable\n *  from any part, or simulate its own title bar, etc.\n *\n *  This function lets the app provide a callback that designates pieces of\n *  a given window as special. This callback is run during event processing\n *  if we need to tell the OS to treat a region of the window specially; the\n *  use of this callback is known as \"hit testing.\"\n *\n *  Mouse input may not be delivered to your application if it is within\n *  a special area; the OS will often apply that input to moving the window or\n *  resizing the window and not deliver it to the application.\n *\n *  Specifying NULL for a callback disables hit-testing. Hit-testing is\n *  disabled by default.\n *\n *  Platforms that don't support this functionality will return -1\n *  unconditionally, even if you're attempting to disable hit-testing.\n *\n *  Your callback may fire at any time, and its firing does not indicate any\n *  specific behavior (for example, on Windows, this certainly might fire\n *  when the OS is deciding whether to drag your window, but it fires for lots\n *  of other reasons, too, some unrelated to anything you probably care about\n *  _and when the mouse isn't actually at the location it is testing_).\n *  Since this can fire at any time, you should try to keep your callback\n *  efficient, devoid of allocations, etc.\n *\n *  \\param window The window to set hit-testing on.\n *  \\param callback The callback to call when doing a hit-test.\n *  \\param callback_data An app-defined void pointer passed to the callback.\n *  \\return 0 on success, -1 on error (including unsupported).\n */\nextern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,\n                                                 SDL_HitTest callback,\n                                                 void *callback_data);\n\n/**\n *  \\brief Destroy a window.\n */\nextern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);\n\n\n/**\n *  \\brief Returns whether the screensaver is currently enabled (default off).\n *\n *  \\sa SDL_EnableScreenSaver()\n *  \\sa SDL_DisableScreenSaver()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);\n\n/**\n *  \\brief Allow the screen to be blanked by a screensaver\n *\n *  \\sa SDL_IsScreenSaverEnabled()\n *  \\sa SDL_DisableScreenSaver()\n */\nextern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);\n\n/**\n *  \\brief Prevent the screen from being blanked by a screensaver\n *\n *  \\sa SDL_IsScreenSaverEnabled()\n *  \\sa SDL_EnableScreenSaver()\n */\nextern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);\n\n\n/**\n *  \\name OpenGL support functions\n */\n/* @{ */\n\n/**\n *  \\brief Dynamically load an OpenGL library.\n *\n *  \\param path The platform dependent OpenGL library name, or NULL to open the\n *              default OpenGL library.\n *\n *  \\return 0 on success, or -1 if the library couldn't be loaded.\n *\n *  This should be done after initializing the video driver, but before\n *  creating any OpenGL windows.  If no OpenGL library is loaded, the default\n *  library will be loaded upon creation of the first OpenGL window.\n *\n *  \\note If you do this, you need to retrieve all of the GL functions used in\n *        your program from the dynamic library using SDL_GL_GetProcAddress().\n *\n *  \\sa SDL_GL_GetProcAddress()\n *  \\sa SDL_GL_UnloadLibrary()\n */\nextern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);\n\n/**\n *  \\brief Get the address of an OpenGL function.\n */\nextern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);\n\n/**\n *  \\brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().\n *\n *  \\sa SDL_GL_LoadLibrary()\n */\nextern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);\n\n/**\n *  \\brief Return true if an OpenGL extension is supported for the current\n *         context.\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char\n                                                           *extension);\n\n/**\n *  \\brief Reset all previously set OpenGL context attributes to their default values\n */\nextern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);\n\n/**\n *  \\brief Set an OpenGL window attribute before window creation.\n *\n *  \\return 0 on success, or -1 if the attribute could not be set.\n */\nextern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);\n\n/**\n *  \\brief Get the actual value for an attribute from the current context.\n *\n *  \\return 0 on success, or -1 if the attribute could not be retrieved.\n *          The integer at \\c value will be modified in either case.\n */\nextern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);\n\n/**\n *  \\brief Create an OpenGL context for use with an OpenGL window, and make it\n *         current.\n *\n *  \\sa SDL_GL_DeleteContext()\n */\nextern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *\n                                                           window);\n\n/**\n *  \\brief Set up an OpenGL context for rendering into an OpenGL window.\n *\n *  \\note The context must have been created with a compatible window.\n */\nextern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,\n                                               SDL_GLContext context);\n\n/**\n *  \\brief Get the currently active OpenGL window.\n */\nextern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);\n\n/**\n *  \\brief Get the currently active OpenGL context.\n */\nextern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);\n\n/**\n *  \\brief Get the size of a window's underlying drawable in pixels (for use\n *         with glViewport).\n *\n *  \\param window   Window from which the drawable size should be queried\n *  \\param w        Pointer to variable for storing the width in pixels, may be NULL\n *  \\param h        Pointer to variable for storing the height in pixels, may be NULL\n *\n * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI\n * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a\n * platform with high-DPI support (Apple calls this \"Retina\"), and not disabled\n * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_CreateWindow()\n */\nextern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,\n                                                    int *h);\n\n/**\n *  \\brief Set the swap interval for the current OpenGL context.\n *\n *  \\param interval 0 for immediate updates, 1 for updates synchronized with the\n *                  vertical retrace. If the system supports it, you may\n *                  specify -1 to allow late swaps to happen immediately\n *                  instead of waiting for the next retrace.\n *\n *  \\return 0 on success, or -1 if setting the swap interval is not supported.\n *\n *  \\sa SDL_GL_GetSwapInterval()\n */\nextern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);\n\n/**\n *  \\brief Get the swap interval for the current OpenGL context.\n *\n *  \\return 0 if there is no vertical retrace synchronization, 1 if the buffer\n *          swap is synchronized with the vertical retrace, and -1 if late\n *          swaps happen immediately instead of waiting for the next retrace.\n *          If the system can't determine the swap interval, or there isn't a\n *          valid current context, this will return 0 as a safe default.\n *\n *  \\sa SDL_GL_SetSwapInterval()\n */\nextern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);\n\n/**\n * \\brief Swap the OpenGL buffers for a window, if double-buffering is\n *        supported.\n */\nextern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);\n\n/**\n *  \\brief Delete an OpenGL context.\n *\n *  \\sa SDL_GL_CreateContext()\n */\nextern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);\n\n/* @} *//* OpenGL support functions */\n\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_video_h_ */\n\n/* vi: set ts=4 sw=4 expandtab: */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/SDL_vulkan.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 2017, Mark Callow\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file SDL_vulkan.h\n *\n *  Header file for functions to creating Vulkan surfaces on SDL windows.\n */\n\n#ifndef SDL_vulkan_h_\n#define SDL_vulkan_h_\n\n#include \"SDL_video.h\"\n\n#include \"begin_code.h\"\n/* Set up for C function definitions, even when using C++ */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Avoid including vulkan.h, don't define VkInstance if it's already included */\n#ifdef VULKAN_H_\n#define NO_SDL_VULKAN_TYPEDEFS\n#endif\n#ifndef NO_SDL_VULKAN_TYPEDEFS\n#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;\n\n#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)\n#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;\n#else\n#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;\n#endif\n\nVK_DEFINE_HANDLE(VkInstance)\nVK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)\n\n#endif /* !NO_SDL_VULKAN_TYPEDEFS */\n\ntypedef VkInstance SDL_vulkanInstance;\ntypedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */\n\n/**\n *  \\name Vulkan support functions\n *\n *  \\note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API\n *        is compatable with Tizen's implementation of Vulkan in SDL.\n */\n/* @{ */\n\n/**\n *  \\brief Dynamically load a Vulkan loader library.\n *\n *  \\param [in] path The platform dependent Vulkan loader library name, or\n *              \\c NULL.\n *\n *  \\return \\c 0 on success, or \\c -1 if the library couldn't be loaded.\n *\n *  If \\a path is NULL SDL will use the value of the environment variable\n *  \\c SDL_VULKAN_LIBRARY, if set, otherwise it loads the default Vulkan\n *  loader library.\n *\n *  This should be called after initializing the video driver, but before\n *  creating any Vulkan windows. If no Vulkan loader library is loaded, the\n *  default library will be loaded upon creation of the first Vulkan window.\n *\n *  \\note It is fairly common for Vulkan applications to link with \\a libvulkan\n *        instead of explicitly loading it at run time. This will work with\n *        SDL provided the application links to a dynamic library and both it\n *        and SDL use the same search path.\n *\n *  \\note If you specify a non-NULL \\c path, an application should retrieve all\n *        of the Vulkan functions it uses from the dynamic library using\n *        \\c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee\n *        \\c path points to the same vulkan loader library the application\n *        linked to.\n *\n *  \\note On Apple devices, if \\a path is NULL, SDL will attempt to find\n *        the vkGetInstanceProcAddr address within all the mach-o images of\n *        the current process. This is because it is fairly common for Vulkan\n *        applications to link with libvulkan (and historically MoltenVK was\n *        provided as a static library). If it is not found then, on macOS, SDL\n *        will attempt to load \\c vulkan.framework/vulkan, \\c libvulkan.1.dylib,\n *        followed by \\c libvulkan.dylib, in that order.\n *        On iOS SDL will attempt to load \\c libvulkan.dylib only. Applications\n *        using a dynamic framework or .dylib must ensure it is included in its\n *        application bundle.\n *\n *  \\note On non-Apple devices, application linking with a static libvulkan is\n *        not supported. Either do not link to the Vulkan loader or link to a\n *        dynamic library version.\n *\n *  \\note This function will fail if there are no working Vulkan drivers\n *        installed.\n *\n *  \\sa SDL_Vulkan_GetVkGetInstanceProcAddr()\n *  \\sa SDL_Vulkan_UnloadLibrary()\n */\nextern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);\n\n/**\n *  \\brief Get the address of the \\c vkGetInstanceProcAddr function.\n *\n *  \\note This should be called after either calling SDL_Vulkan_LoadLibrary\n *        or creating an SDL_Window with the SDL_WINDOW_VULKAN flag.\n */\nextern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);\n\n/**\n *  \\brief Unload the Vulkan loader library previously loaded by\n *         \\c SDL_Vulkan_LoadLibrary().\n *\n *  \\sa SDL_Vulkan_LoadLibrary()\n */\nextern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);\n\n/**\n *  \\brief Get the names of the Vulkan instance extensions needed to create\n *         a surface with \\c SDL_Vulkan_CreateSurface().\n *\n *  \\param [in]     \\c NULL or window Window for which the required Vulkan instance\n *                  extensions should be retrieved\n *  \\param [in,out] pCount pointer to an \\c unsigned related to the number of\n *                  required Vulkan instance extensions\n *  \\param [out]    pNames \\c NULL or a pointer to an array to be filled with the\n *                  required Vulkan instance extensions\n *\n *  \\return \\c SDL_TRUE on success, \\c SDL_FALSE on error.\n *\n *  If \\a pNames is \\c NULL, then the number of required Vulkan instance\n *  extensions is returned in pCount. Otherwise, \\a pCount must point to a\n *  variable set to the number of elements in the \\a pNames array, and on\n *  return the variable is overwritten with the number of names actually\n *  written to \\a pNames. If \\a pCount is less than the number of required\n *  extensions, at most \\a pCount structures will be written. If \\a pCount\n *  is smaller than the number of required extensions, \\c SDL_FALSE will be\n *  returned instead of \\c SDL_TRUE, to indicate that not all the required\n *  extensions were returned.\n *\n *  \\note If \\c window is not NULL, it will be checked against its creation\n *        flags to ensure that the Vulkan flag is present. This parameter\n *        will be removed in a future major release.\n *\n *  \\note The returned list of extensions will contain \\c VK_KHR_surface\n *        and zero or more platform specific extensions\n *\n *  \\note The extension names queried here must be enabled when calling\n *        VkCreateInstance, otherwise surface creation will fail.\n *\n *  \\note \\c window should have been created with the \\c SDL_WINDOW_VULKAN flag\n *        or be \\c NULL\n *\n *  \\code\n *  unsigned int count;\n *  // get count of required extensions\n *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))\n *      handle_error();\n *\n *  static const char *const additionalExtensions[] =\n *  {\n *      VK_EXT_DEBUG_REPORT_EXTENSION_NAME, // example additional extension\n *  };\n *  size_t additionalExtensionsCount = sizeof(additionalExtensions) / sizeof(additionalExtensions[0]);\n *  size_t extensionCount = count + additionalExtensionsCount;\n *  const char **names = malloc(sizeof(const char *) * extensionCount);\n *  if(!names)\n *      handle_error();\n *\n *  // get names of required extensions\n *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))\n *      handle_error();\n *\n *  // copy additional extensions after required extensions\n *  for(size_t i = 0; i < additionalExtensionsCount; i++)\n *      names[i + count] = additionalExtensions[i];\n *\n *  VkInstanceCreateInfo instanceCreateInfo = {};\n *  instanceCreateInfo.enabledExtensionCount = extensionCount;\n *  instanceCreateInfo.ppEnabledExtensionNames = names;\n *  // fill in rest of instanceCreateInfo\n *\n *  VkInstance instance;\n *  // create the Vulkan instance\n *  VkResult result = vkCreateInstance(&instanceCreateInfo, NULL, &instance);\n *  free(names);\n *  \\endcode\n *\n *  \\sa SDL_Vulkan_CreateSurface()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSDL_Window *window,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tunsigned int *pCount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst char **pNames);\n\n/**\n *  \\brief Create a Vulkan rendering surface for a window.\n *\n *  \\param [in]  window   SDL_Window to which to attach the rendering surface.\n *  \\param [in]  instance handle to the Vulkan instance to use.\n *  \\param [out] surface  pointer to a VkSurfaceKHR handle to receive the\n *                        handle of the newly created surface.\n *\n *  \\return \\c SDL_TRUE on success, \\c SDL_FALSE on error.\n *\n *  \\code\n *  VkInstance instance;\n *  SDL_Window *window;\n *\n *  // create instance and window\n *\n *  // create the Vulkan surface\n *  VkSurfaceKHR surface;\n *  if(!SDL_Vulkan_CreateSurface(window, instance, &surface))\n *      handle_error();\n *  \\endcode\n *\n *  \\note \\a window should have been created with the \\c SDL_WINDOW_VULKAN flag.\n *\n *  \\note \\a instance should have been created with the extensions returned\n *        by \\c SDL_Vulkan_CreateSurface() enabled.\n *\n *  \\sa SDL_Vulkan_GetInstanceExtensions()\n */\nextern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(\n\t\t\t\t\t\t\t\t\t\t\t\tSDL_Window *window,\n\t\t\t\t\t\t\t\t\t\t\t\tVkInstance instance,\n\t\t\t\t\t\t\t\t\t\t\t\tVkSurfaceKHR* surface);\n\n/**\n *  \\brief Get the size of a window's underlying drawable in pixels (for use\n *         with setting viewport, scissor & etc).\n *\n *  \\param window   SDL_Window from which the drawable size should be queried\n *  \\param w        Pointer to variable for storing the width in pixels,\n *                  may be NULL\n *  \\param h        Pointer to variable for storing the height in pixels,\n *                  may be NULL\n *\n * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI\n * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a\n * platform with high-DPI support (Apple calls this \"Retina\"), and not disabled\n * by the \\c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.\n *\n *  \\note On macOS high-DPI support must be enabled for an application by\n *        setting NSHighResolutionCapable to true in its Info.plist.\n *\n *  \\sa SDL_GetWindowSize()\n *  \\sa SDL_CreateWindow()\n */\nextern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,\n                                                        int *w, int *h);\n\n/* @} *//* Vulkan support functions */\n\n/* Ends C function definitions when using C++ */\n#ifdef __cplusplus\n}\n#endif\n#include \"close_code.h\"\n\n#endif /* SDL_vulkan_h_ */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/begin_code.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file begin_code.h\n *\n *  This file sets things up for C dynamic library function definitions,\n *  static inlined functions, and structures aligned at 4-byte alignment.\n *  If you don't like ugly C preprocessor code, don't look at this file. :)\n */\n\n/* This shouldn't be nested -- included it around code only. */\n#ifdef _begin_code_h\n#error Nested inclusion of begin_code.h\n#endif\n#define _begin_code_h\n\n#ifndef SDL_DEPRECATED\n#  if (__GNUC__ >= 4)  /* technically, this arrived in gcc 3.1, but oh well. */\n#    define SDL_DEPRECATED __attribute__((deprecated))\n#  else\n#    define SDL_DEPRECATED\n#  endif\n#endif\n\n#ifndef SDL_UNUSED\n#  ifdef __GNUC__\n#    define SDL_UNUSED __attribute__((unused))\n#  else\n#    define SDL_UNUSED\n#  endif\n#endif\n\n/* Some compilers use a special export keyword */\n#ifndef DECLSPEC\n# if defined(__WIN32__) || defined(__WINRT__)\n#  ifdef __BORLANDC__\n#   ifdef BUILD_SDL\n#    define DECLSPEC\n#   else\n#    define DECLSPEC    __declspec(dllimport)\n#   endif\n#  else\n#   define DECLSPEC __declspec(dllexport)\n#  endif\n# elif defined(__OS2__)\n#   ifdef BUILD_SDL\n#    define DECLSPEC    __declspec(dllexport)\n#   else\n#    define DECLSPEC\n#   endif\n# else\n#  if defined(__GNUC__) && __GNUC__ >= 4\n#   define DECLSPEC __attribute__ ((visibility(\"default\")))\n#  else\n#   define DECLSPEC\n#  endif\n# endif\n#endif\n\n/* By default SDL uses the C calling convention */\n#ifndef SDLCALL\n#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)\n#define SDLCALL __cdecl\n#elif defined(__OS2__) || defined(__EMX__)\n#define SDLCALL _System\n# if defined (__GNUC__) && !defined(_System)\n#  define _System /* for old EMX/GCC compat.  */\n# endif\n#else\n#define SDLCALL\n#endif\n#endif /* SDLCALL */\n\n/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */\n#ifdef __SYMBIAN32__\n#undef DECLSPEC\n#define DECLSPEC\n#endif /* __SYMBIAN32__ */\n\n/* Force structure packing at 4 byte alignment.\n   This is necessary if the header is included in code which has structure\n   packing set to an alternate value, say for loading structures from disk.\n   The packing is reset to the previous value in close_code.h\n */\n#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)\n#ifdef _MSC_VER\n#pragma warning(disable: 4103)\n#endif\n#ifdef __clang__\n#pragma clang diagnostic ignored \"-Wpragma-pack\"\n#endif\n#ifdef __BORLANDC__\n#pragma nopackwarning\n#endif\n#ifdef _M_X64\n/* Use 8-byte alignment on 64-bit architectures, so pointers are aligned */\n#pragma pack(push,8)\n#else\n#pragma pack(push,4)\n#endif\n#endif /* Compiler needs structure packing set */\n\n#ifndef SDL_INLINE\n#if defined(__GNUC__)\n#define SDL_INLINE __inline__\n#elif defined(_MSC_VER) || defined(__BORLANDC__) || \\\n      defined(__DMC__) || defined(__SC__) || \\\n      defined(__WATCOMC__) || defined(__LCC__) || \\\n      defined(__DECC) || defined(__CC_ARM)\n#define SDL_INLINE __inline\n#ifndef __inline__\n#define __inline__ __inline\n#endif\n#else\n#define SDL_INLINE inline\n#ifndef __inline__\n#define __inline__ inline\n#endif\n#endif\n#endif /* SDL_INLINE not defined */\n\n#ifndef SDL_FORCE_INLINE\n#if defined(_MSC_VER)\n#define SDL_FORCE_INLINE __forceinline\n#elif ( (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) )\n#define SDL_FORCE_INLINE __attribute__((always_inline)) static __inline__\n#else\n#define SDL_FORCE_INLINE static SDL_INLINE\n#endif\n#endif /* SDL_FORCE_INLINE not defined */\n\n#ifndef SDL_NORETURN\n#if defined(__GNUC__)\n#define SDL_NORETURN __attribute__((noreturn))\n#elif defined(_MSC_VER)\n#define SDL_NORETURN __declspec(noreturn)\n#else\n#define SDL_NORETURN\n#endif\n#endif /* SDL_NORETURN not defined */\n\n/* Apparently this is needed by several Windows compilers */\n#if !defined(__MACH__)\n#ifndef NULL\n#ifdef __cplusplus\n#define NULL 0\n#else\n#define NULL ((void *)0)\n#endif\n#endif /* NULL */\n#endif /* ! Mac OS X - breaks precompiled headers */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/include/SDL2/close_code.h",
    "content": "/*\n  Simple DirectMedia Layer\n  Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>\n\n  This software is provided 'as-is', without any express or implied\n  warranty.  In no event will the authors be held liable for any damages\n  arising from the use of this software.\n\n  Permission is granted to anyone to use this software for any purpose,\n  including commercial applications, and to alter it and redistribute it\n  freely, subject to the following restrictions:\n\n  1. The origin of this software must not be misrepresented; you must not\n     claim that you wrote the original software. If you use this software\n     in a product, an acknowledgment in the product documentation would be\n     appreciated but is not required.\n  2. Altered source versions must be plainly marked as such, and must not be\n     misrepresented as being the original software.\n  3. This notice may not be removed or altered from any source distribution.\n*/\n\n/**\n *  \\file close_code.h\n *\n *  This file reverses the effects of begin_code.h and should be included\n *  after you finish any function and structure declarations in your headers\n */\n\n#ifndef _begin_code_h\n#error close_code.h included without matching begin_code.h\n#endif\n#undef _begin_code_h\n\n/* Reset structure packing at previous byte alignment */\n#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)\n#ifdef __BORLANDC__\n#pragma nopackwarning\n#endif\n#pragma pack(pop)\n#endif /* Compiler needs structure packing set */\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake",
    "content": "# sdl2 cmake project-config input for ./configure scripts\n\nset(prefix \"/opt/local/x86_64-w64-mingw32\") \nset(exec_prefix \"${prefix}\")\nset(libdir \"${exec_prefix}/lib\")\nset(SDL2_PREFIX \"/opt/local/x86_64-w64-mingw32\")\nset(SDL2_EXEC_PREFIX \"/opt/local/x86_64-w64-mingw32\")\nset(SDL2_LIBDIR \"${exec_prefix}/lib\")\nset(SDL2_INCLUDE_DIRS \"${prefix}/include/SDL2\")\nset(SDL2_LIBRARIES \"-L${SDL2_LIBDIR}  -lmingw32 -lSDL2main -lSDL2 -mwindows\")\nstring(STRIP \"${SDL2_LIBRARIES}\" SDL2_LIBRARIES)\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/lib/libSDL2.la",
    "content": "# libSDL2.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname='../bin/SDL2.dll'\n\n# Names of this library.\nlibrary_names='libSDL2.dll.a'\n\n# The name of the static archive.\nold_library='libSDL2.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid'\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2.\ncurrent=10\nage=10\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/x86_64-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/lib/libSDL2_test.la",
    "content": "# libSDL2_test.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname=''\n\n# Names of this library.\nlibrary_names=''\n\n# The name of the static archive.\nold_library='libSDL2_test.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=''\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2_test.\ncurrent=0\nage=0\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/x86_64-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/lib/libSDL2main.la",
    "content": "# libSDL2main.la - a libtool library file\n# Generated by libtool (GNU libtool) 2.4.2\n#\n# Please DO NOT delete this file!\n# It is necessary for linking the library.\n\n# The name that we can dlopen(3).\ndlname=''\n\n# Names of this library.\nlibrary_names=''\n\n# The name of the static archive.\nold_library='libSDL2main.a'\n\n# Linker flags that can not go in dependency_libs.\ninherited_linker_flags=''\n\n# Libraries that this one depends upon.\ndependency_libs=''\n\n# Names of additional weak libraries provided by this library\nweak_library_names=''\n\n# Version information for libSDL2main.\ncurrent=0\nage=0\nrevision=0\n\n# Is this an already installed library?\ninstalled=yes\n\n# Should we warn about portability when linking against -modules?\nshouldnotlink=no\n\n# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n\n# Directory that this library needs to be installed in:\nlibdir='/Users/valve/release/SDL/SDL2-2.0.10/x86_64-w64-mingw32/lib'\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/lib/pkgconfig/sdl2.pc",
    "content": "# sdl pkg-config source file\n\nprefix=/opt/local/x86_64-w64-mingw32\nexec_prefix=${prefix}\nlibdir=${exec_prefix}/lib\nincludedir=${prefix}/include\n\nName: sdl2\nDescription: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.\nVersion: 2.0.10\nRequires:\nConflicts:\nLibs: -L${libdir}  -lmingw32 -lSDL2main -lSDL2 -mwindows\nLibs.private: -lmingw32 -lSDL2main -lSDL2 -mwindows  -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc\nCflags: -I${includedir}/SDL2  -Dmain=SDL_main\n"
  },
  {
    "path": "winlib/SDL2-2.0.10/x86_64-w64-mingw32/share/aclocal/sdl2.m4",
    "content": "# Configure paths for SDL\n# Sam Lantinga 9/21/99\n# stolen from Manish Singh\n# stolen back from Frank Belew\n# stolen from Manish Singh\n# Shamelessly stolen from Owen Taylor\n#\n# Changelog:\n# * also look for SDL2.framework under Mac OS X\n\n# serial 1\n\ndnl AM_PATH_SDL2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])\ndnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS\ndnl\nAC_DEFUN([AM_PATH_SDL2],\n[dnl \ndnl Get the cflags and libraries from the sdl2-config script\ndnl\nAC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],\n            sdl_prefix=\"$withval\", sdl_prefix=\"\")\nAC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],\n            sdl_exec_prefix=\"$withval\", sdl_exec_prefix=\"\")\nAC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],\n\t\t    , enable_sdltest=yes)\nAC_ARG_ENABLE(sdlframework, [  --disable-sdlframework Do not search for SDL2.framework],\n        , search_sdl_framework=yes)\n\nAC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])\n\n  min_sdl_version=ifelse([$1], ,2.0.0,$1)\n\n  if test \"x$sdl_prefix$sdl_exec_prefix\" = x ; then\n    PKG_CHECK_MODULES([SDL], [sdl2 >= $min_sdl_version],\n           [sdl_pc=yes],\n           [sdl_pc=no])\n  else\n    sdl_pc=no\n    if test x$sdl_exec_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --exec-prefix=$sdl_exec_prefix\"\n      if test x${SDL2_CONFIG+set} != xset ; then\n        SDL2_CONFIG=$sdl_exec_prefix/bin/sdl2-config\n      fi\n    fi\n    if test x$sdl_prefix != x ; then\n      sdl_config_args=\"$sdl_config_args --prefix=$sdl_prefix\"\n      if test x${SDL2_CONFIG+set} != xset ; then\n        SDL2_CONFIG=$sdl_prefix/bin/sdl2-config\n      fi\n    fi\n  fi\n\n  if test \"x$sdl_pc\" = xyes ; then\n    no_sdl=\"\"\n    SDL2_CONFIG=\"pkg-config sdl2\"\n  else\n    as_save_PATH=\"$PATH\"\n    if test \"x$prefix\" != xNONE && test \"$cross_compiling\" != yes; then\n      PATH=\"$prefix/bin:$prefix/usr/bin:$PATH\"\n    fi\n    AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])\n    PATH=\"$as_save_PATH\"\n    no_sdl=\"\"\n\n    if test \"$SDL2_CONFIG\" = \"no\" -a \"x$search_sdl_framework\" = \"xyes\"; then\n      AC_MSG_CHECKING(for SDL2.framework)\n      if test \"x$SDL2_FRAMEWORK\" != x; then\n        sdl_framework=$SDL2_FRAMEWORK\n      else\n        for d in / ~/ /System/; do\n          if test -d \"$dLibrary/Frameworks/SDL2.framework\"; then\n            sdl_framework=\"$dLibrary/Frameworks/SDL2.framework\"\n          fi\n        done\n      fi\n\n      if test x\"$sdl_framework\" != x && test -d \"$sdl_framework\"; then\n        AC_MSG_RESULT($sdl_framework)\n        sdl_framework_dir=`dirname $sdl_framework`\n        SDL_CFLAGS=\"-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include\"\n        SDL_LIBS=\"-F$sdl_framework_dir -Wl,-framework,SDL2\"\n      else\n        no_sdl=yes\n      fi\n    fi\n\n    if test \"$SDL2_CONFIG\" != \"no\"; then\n      if test \"x$sdl_pc\" = \"xno\"; then\n        AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)\n        SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`\n        SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`\n      fi\n\n      sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\1/'`\n      sdl_minor_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\2/'`\n      sdl_micro_version=`$SDL2_CONFIG $sdl_config_args --version | \\\n             sed 's/\\([[0-9]]*\\).\\([[0-9]]*\\).\\([[0-9]]*\\)/\\3/'`\n      if test \"x$enable_sdltest\" = \"xyes\" ; then\n        ac_save_CFLAGS=\"$CFLAGS\"\n        ac_save_CXXFLAGS=\"$CXXFLAGS\"\n        ac_save_LIBS=\"$LIBS\"\n        CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n        CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n        LIBS=\"$LIBS $SDL_LIBS\"\ndnl\ndnl Now check if the installed SDL is sufficiently new. (Also sanity\ndnl checks the results of sdl2-config to some extent\ndnl\n      rm -f conf.sdltest\n      AC_TRY_RUN([\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"SDL.h\"\n\nchar*\nmy_strdup (char *str)\n{\n  char *new_str;\n  \n  if (str)\n    {\n      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));\n      strcpy (new_str, str);\n    }\n  else\n    new_str = NULL;\n  \n  return new_str;\n}\n\nint main (int argc, char *argv[])\n{\n  int major, minor, micro;\n  char *tmp_version;\n\n  /* This hangs on some systems (?)\n  system (\"touch conf.sdltest\");\n  */\n  { FILE *fp = fopen(\"conf.sdltest\", \"a\"); if ( fp ) fclose(fp); }\n\n  /* HP/UX 9 (%@#!) writes to sscanf strings */\n  tmp_version = my_strdup(\"$min_sdl_version\");\n  if (sscanf(tmp_version, \"%d.%d.%d\", &major, &minor, &micro) != 3) {\n     printf(\"%s, bad version string\\n\", \"$min_sdl_version\");\n     exit(1);\n   }\n\n   if (($sdl_major_version > major) ||\n      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||\n      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))\n    {\n      return 0;\n    }\n  else\n    {\n      printf(\"\\n*** 'sdl2-config --version' returned %d.%d.%d, but the minimum version\\n\", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);\n      printf(\"*** of SDL required is %d.%d.%d. If sdl2-config is correct, then it is\\n\", major, minor, micro);\n      printf(\"*** best to upgrade to the required version.\\n\");\n      printf(\"*** If sdl2-config was wrong, set the environment variable SDL2_CONFIG\\n\");\n      printf(\"*** to point to the correct copy of sdl2-config, and remove the file\\n\");\n      printf(\"*** config.cache before re-running configure\\n\");\n      return 1;\n    }\n}\n\n],, no_sdl=yes,[echo $ac_n \"cross compiling; assumed OK... $ac_c\"])\n        CFLAGS=\"$ac_save_CFLAGS\"\n        CXXFLAGS=\"$ac_save_CXXFLAGS\"\n        LIBS=\"$ac_save_LIBS\"\n\n      fi\n      if test \"x$sdl_pc\" = \"xno\"; then\n        if test \"x$no_sdl\" = \"xyes\"; then\n          AC_MSG_RESULT(no)\n        else\n          AC_MSG_RESULT(yes)\n        fi\n      fi\n    fi\n  fi\n  if test \"x$no_sdl\" = x ; then\n     ifelse([$2], , :, [$2])\n  else\n     if test \"$SDL2_CONFIG\" = \"no\" ; then\n       echo \"*** The sdl2-config script installed by SDL could not be found\"\n       echo \"*** If SDL was installed in PREFIX, make sure PREFIX/bin is in\"\n       echo \"*** your path, or set the SDL2_CONFIG environment variable to the\"\n       echo \"*** full path to sdl2-config.\"\n     else\n       if test -f conf.sdltest ; then\n        :\n       else\n          echo \"*** Could not run SDL test program, checking why...\"\n          CFLAGS=\"$CFLAGS $SDL_CFLAGS\"\n          CXXFLAGS=\"$CXXFLAGS $SDL_CFLAGS\"\n          LIBS=\"$LIBS $SDL_LIBS\"\n          AC_TRY_LINK([\n#include <stdio.h>\n#include \"SDL.h\"\n\nint main(int argc, char *argv[])\n{ return 0; }\n#undef  main\n#define main K_and_R_C_main\n],      [ return 0; ],\n        [ echo \"*** The test program compiled, but did not run. This usually means\"\n          echo \"*** that the run-time linker is not finding SDL or finding the wrong\"\n          echo \"*** version of SDL. If it is not finding SDL, you'll need to set your\"\n          echo \"*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point\"\n          echo \"*** to the installed location  Also, make sure you have run ldconfig if that\"\n          echo \"*** is required on your system\"\n\t  echo \"***\"\n          echo \"*** If you have an old version installed, it is best to remove it, although\"\n          echo \"*** you may also be able to get things to work by modifying LD_LIBRARY_PATH\"],\n        [ echo \"*** The test program failed to compile or link. See the file config.log for the\"\n          echo \"*** exact error that occured. This usually means SDL was incorrectly installed\"\n          echo \"*** or that you have moved SDL since it was installed. In the latter case, you\"\n          echo \"*** may want to edit the sdl2-config script: $SDL2_CONFIG\" ])\n          CFLAGS=\"$ac_save_CFLAGS\"\n          CXXFLAGS=\"$ac_save_CXXFLAGS\"\n          LIBS=\"$ac_save_LIBS\"\n       fi\n     fi\n     SDL_CFLAGS=\"\"\n     SDL_LIBS=\"\"\n     ifelse([$3], , :, [$3])\n  fi\n  AC_SUBST(SDL_CFLAGS)\n  AC_SUBST(SDL_LIBS)\n  rm -f conf.sdltest\n])\n"
  }
]